villebro commented on a change in pull request #16889:
URL: https://github.com/apache/superset/pull/16889#discussion_r718228885
##########
File path: requirements/base.txt
##########
@@ -257,7 +257,7 @@ sqlalchemy==1.3.24
# flask-sqlalchemy
# marshmallow-sqlalchemy
# sqlalchemy-utils
-sqlalchemy-utils==0.36.8
+sqlalchemy-utils==0.37.8
Review comment:
`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
(https://github.com/kvesteri/sqlalchemy-utils/commit/b5b48b13a22aa6d796e98c0225f367a2f010c788),
so I assume `0.37.8` to be fully supported by 3.9 in practice.
##########
File path: requirements/development.in
##########
@@ -18,7 +18,7 @@
-r base.in
flask-cors>=2.0.0
mysqlclient==1.4.2.post1
-pillow>=7.0.0,<8.0.0
+pillow>=8.3.1,<9
Review comment:
Pillow 7.x caused problems on Python 3.9
##########
File path: superset/utils/memoized.py
##########
@@ -64,7 +64,9 @@ def __get__(
if not self.is_method:
self.is_method = True
# Support instance methods.
- return functools.partial(self.__call__, obj)
+ func = functools.partial(self.__call__, obj)
+ func.__func__ = self.func # type: ignore
+ return func
Review comment:
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
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
##########
File path: superset/utils/memoized.py
##########
@@ -64,7 +64,9 @@ def __get__(
if not self.is_method:
self.is_method = True
# Support instance methods.
- return functools.partial(self.__call__, obj)
+ func = functools.partial(self.__call__, obj)
+ func.__func__ = self.func # type: ignore
+ return func
Review comment:
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
##########
File path: setup.py
##########
@@ -168,5 +168,6 @@ def get_git_sha() -> str:
classifiers=[
"Programming Language :: Python :: 3.7",
Review comment:
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
##########
File path: setup.py
##########
@@ -168,5 +168,6 @@ def get_git_sha() -> str:
classifiers=[
"Programming Language :: Python :: 3.7",
Review comment:
@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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]