-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
feat: upgrade docker image to py38 and add support for py39 #16889
Conversation
sqlalchemy-utils==0.36.8 | ||
sqlalchemy-utils==0.37.8 |
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.
sqlalchemy-utils==0.36.8
has been yanked from PyPI, causing an ugly warning when installing deps. In addition, py39
was added to the officially supported versions right after 0.37.8
was cut (kvesteri/sqlalchemy-utils@b5b48b1), so I assume 0.37.8
to be fully supported by 3.9 in practice.
pillow>=7.0.0,<8.0.0 | ||
pillow>=8.3.1,<9 |
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.
Pillow 7.x caused problems on Python 3.9
9ecbb2d
to
6dea8d0
Compare
1476881
to
b417b90
Compare
b417b90
to
f0583ff
Compare
Codecov Report
@@ Coverage Diff @@
## master #16889 +/- ##
==========================================
+ Coverage 76.85% 76.93% +0.08%
==========================================
Files 1030 1030
Lines 55017 55017
Branches 7464 7464
==========================================
+ Hits 42282 42330 +48
+ Misses 12482 12434 -48
Partials 253 253
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
return functools.partial(self.__call__, obj) | ||
func = functools.partial(self.__call__, obj) | ||
func.__func__ = self.func # type: ignore | ||
return func |
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 wasn't quite able to figure out why this is necessary, but running doctests on memoized methods started failing on 3.9 due to the doctests failing to find the __func__
attribute on memoized methods. The only thing I found is this which seems like the same problem, but is said to affect Python 3.8, not 3.9: https://bugs.python.org/issue12790 Hacky workaround, but does the trick. I'll try to figure out how to solve this more elegantly before this gets merged
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.
weird!
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.
LGTM
Minor change is needed
@@ -168,5 +168,6 @@ def get_git_sha() -> str: | |||
classifiers=[ | |||
"Programming Language :: Python :: 3.7", |
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.
"Programming Language :: Python :: 3.7", |
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 think we're still going to support 3.7 (we support last 3 python versions officially). Once 3.10 is out, we'll remove 3.7 support in a major version bump
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 want to deprecate 3.7 too, but I think we should give it some more time (it's still currently the recommended version) - let's leave it alive for a month or so so everyone can get upgraded to at least 3.8
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.
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.
@john-bodley @etr2460 I think we just lightly agreed on the last 3 versions on a community meeting. Making it an official policy is a good idea to let users know what to expect and plan ahead
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.
@john-bodley TBH until this PR we were only really supporting two 😄 But yeah, I think there was an unwritten agreement to try to support 3. I'm fine cutting it down to "at least 2" but trying to support 3 if possible.
Opened a task on Apache Infra to bump required tests: https://issues.apache.org/jira/browse/INFRA-22377 |
…6889) * feat: upgrade docker image to py38 and add support for py39 * update required tests
…6889) * feat: upgrade docker image to py38 and add support for py39 * update required tests
SUMMARY
With Python 3.10 right around the corner (2021-10-04) and multiple performance improvements when going from 3.7 to 3.8 (see Python Speed Center benchmark summary below), we should move to 3.8 and start preparing for transitioning to 3.9. This PR bumps the official image from Python 3.7 to 3.8 and adds support for Python 3.9. CI is also bumped from 3.7 to 3.8 (btw,
tox
was already confgured withbasepython = python3.8
), and dual tests for 3.7 and 3.8 are replaced with 3.8 and 3.9.Performance benchmark
On most benchmark tests, 3.8 (blue) performs slightly better than 3.7 (orange):
TESTING INSTRUCTIONS
Test locally that everything works as expected
ADDITIONAL INFORMATION