Skip to content

Conversation

JeanChristopheMorinPerso
Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso commented Oct 5, 2022

Summarize your change.

A while ago, I found out that the __iter__ methods defined in our bindings were being overridden in _core_utils.py. This PR fixes that by making sure we don't override methods that already exist.

For example,

was completely overridden before.

Note that I changed this only in the _add_mutable_sequence_methods function. _add_mutable_mapping_methods is slightly different in that AnyDictionary actually has an __eq__ method built-in and it needs to be overridden with __eq__ from collections.abc.

Signed-off-by: Jean-Christophe Morin <[email protected]>
@JeanChristopheMorinPerso JeanChristopheMorinPerso changed the title Use C++ iterator for bindings Don't override __iter__ methods Oct 5, 2022
Signed-off-by: Jean-Christophe Morin <[email protected]>
@ssteinbach ssteinbach added this to the Public Beta 16 milestone Oct 5, 2022
Signed-off-by: Jean-Christophe Morin <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #1444 (2d2576b) into main (0763bf6) will increase coverage by 0.13%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1444      +/-   ##
==========================================
+ Coverage   78.83%   78.97%   +0.13%     
==========================================
  Files         203      203              
  Lines       22252    22252              
  Branches     4521     4521              
==========================================
+ Hits        17543    17574      +31     
+ Misses       2437     2402      -35     
- Partials     2272     2276       +4     
Flag Coverage Δ
py-unittests 78.97% <ø> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...-opentimelineio/opentimelineio/core/_core_utils.py 84.12% <ø> (ø)
...ntimelineio/opentimelineio-bindings/otio_tests.cpp 27.65% <0.00%> (-1.07%) ⬇️
src/opentimelineio/composition.cpp 46.68% <0.00%> (+0.33%) ⬆️
...entimelineio-bindings/otio_serializableObjects.cpp 26.53% <0.00%> (+1.80%) ⬆️
...pentimelineio/opentimelineio-bindings/otio_utils.h 60.75% <0.00%> (+8.86%) ⬆️
...imelineio/opentimelineio-bindings/otio_anyVector.h 86.53% <0.00%> (+26.92%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0763bf6...2d2576b. Read the comment docs.

@ssteinbach ssteinbach merged commit bb671db into AcademySoftwareFoundation:main Oct 11, 2022
@JeanChristopheMorinPerso JeanChristopheMorinPerso deleted the use_cpp_iter branch October 12, 2022 01:44
MichaelPlug pushed a commit to MichaelPlug/OpenTimelineIO that referenced this pull request Aug 5, 2023
* Use C++ iterator for bindings

Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Michele Spina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants