-
Notifications
You must be signed in to change notification settings - Fork 309
Remove python2.7 support #1423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove python2.7 support #1423
Conversation
Review notes on a previous PR that I want to not lose track of: #1418 (comment) |
15b1332
to
6d02105
Compare
Co-authored-by: Jean-Christophe Morin <[email protected]> Signed-off-by: Stephan Steinbach <[email protected]>
@JeanChristopheMorinPerso It looks like |
@ssteinbach there is a backport on PyPI: https://pypi.org/project/importlib-metadata/. It's what I would call an official backport. Maybe we could use that? |
@JeanChristopheMorinPerso Ok got it. I think I'd like to split that out to a follow up PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I just found one small thing to fix. Also, should we replace the next
methods for __next__
? For example https://github.com/AcademySoftwareFoundation/OpenTimelineIO/blob/main/src/py-opentimelineio/opentimelineio-bindings/otio_serializableObjects.cpp#L247.
There is also some leftover python 2 vs 3 in _core_utils.py
:
- https://github.com/AcademySoftwareFoundation/OpenTimelineIO/blob/main/src/py-opentimelineio/opentimelineio/core/_core_utils.py#L39-L69
- https://github.com/AcademySoftwareFoundation/OpenTimelineIO/blob/main/src/py-opentimelineio/opentimelineio/core/_core_utils.py#L234
- https://github.com/AcademySoftwareFoundation/OpenTimelineIO/blob/main/src/py-opentimelineio/opentimelineio/core/_core_utils.py#L385
Co-authored-by: Jean-Christophe Morin <[email protected]> Signed-off-by: Stephan Steinbach <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1423 +/- ##
==========================================
+ Coverage 86.08% 86.38% +0.30%
==========================================
Files 201 201
Lines 21051 20860 -191
Branches 2461 2446 -15
==========================================
- Hits 18121 18020 -101
+ Misses 2328 2244 -84
+ Partials 602 596 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Great catch! This led me to a bunch of other ones by searching for |
Hm, I'm not sure why |
contrib/opentimelineio_contrib/adapters/advanced_authoring_format.py
Outdated
Show resolved
Hide resolved
@ssteinbach I guess you found the issue (the extra |
…mat.py Co-authored-by: Jean-Christophe Morin <[email protected]> Signed-off-by: Stephan Steinbach <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I re-reviewed everything and it looks good to me!
I'll just ask a question again because I think it kind of got lost. Should we replace the next
methods for __next__
? For example https://github.com/AcademySoftwareFoundation/OpenTimelineIO/blob/main/src/py-opentimelineio/opentimelineio-bindings/otio_serializableObjects.cpp#L247. I think it would be a good idea but can well be push to another PR since this PR is starting to be pretty big.
Lets do that in a follow up PR. I'm not quite clear on what it means for the implementation, so I'd like to do that separately to test it |
Ok this looks good. The two follow up from this:
|
* Sets VFX platform supported years as 2022, 2021, and 2020 * Removes Python2.7 support from the library * Removes Python2.7 build matrix lines from CI/github actions * updates setup.py project metadata to drop 2.7 from versions * modernizes to python3 patterns by running pyupgrade --py37-plus Signed-off-by: Stephan Steinbach <[email protected]> Co-authored-by: ssteinbach <[email protected]> Co-authored-by: Jean-Christophe Morin <[email protected]> Signed-off-by: Michele Spina <[email protected]>
Summary
Following the VFX platform, for which 2019 was the last version which included python 2.7 support, we are dropping python2.7 support starting with v0.16. This enables us to modernize the code base and remove a number of shims and bandaids.
Changes
# python 2
blocksversion_info[0] < 3
blockstry:...except ImportError:...
blockspyupgrade --py37-plus
"".format()
->f""
OTIOZ Note
We will follow this up with a PR proposing to change the ZIP_DEFLATED algorithm used by OTIOZ to use bzip2 or LZMA.
Closes #1395