-
Notifications
You must be signed in to change notification settings - Fork 23.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
Python 3.9 compatibility master issue #59980
Comments
ping @amigrave @julienlegros freezegun & xlrd issues apply to 3.8 so @d-fence sez you might be interested |
Same here on ubuntu 20.04, 2020-10-30 23:55:27,813 45662 WARNING server py.warnings: /usr/lib/python3/dist-packages/jinja2/sandbox.py:19: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working The fix is done @xmo-odoo |
Fix for Using or importing the ABCs from collections instead of from collections.abc is deprecated since Python 3.3, and in 3.10 it will stop working and py.warnings: /usr/lib/python3/dist-packages/jinja2/sandbox.py:19: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working, its a bug see the fix here pallets/jinja@a7ba0b6"
Only updates outdated requirements which actively cause issues: * freezegun broken in 3.8 (removal of time.clock) * xlrd broken in 3.8 (removal of time.clock) * also monkeypatches xlrd.xlsx for 3.9 (removal of Element.getiterator, breaks because of defusedxml) * jinja triggers DeprecationWarning in 3.8 * pillow triggers warning in 3.9 * lxml, greenlet don't compile in 3.9 * reportlab doesn't work in 3.9 New versions try to match those of Debian Bullseye. Also adds a script to more easily compare dependency versions between the requirements files and what's in various distributions (currently supports checking against debian and ubuntu). Furthermore updates warnings filtering: * removes xlrd (mischeck was monkeypatched as noted above) * removes setuptools (was for older versions, one would hope this isn't an issue anymore) * adds babel: python-babel/babel#684 fixes the deprecation warning but is not part of any release yet * ignores error related to `random.sample` on a set, this is a diagnostics bug because recordsets implement both Sequence and Set, and the stdlib checks for Set first (bpo-42470) See odoo#59980 Closes odoo#61103
Python 3.9 has 10 new bytecode instructions, for now this commit adds 8 * CONTAINS_OP / IS_OP: moved out of COMPARE_OP which is now only used for *rich* comparisons (bpo-39156) * JUMP_IF_NOT_EXC_MATCH: also moved out of COMPARE_OP for the sole purpose of testing exception types * RERAISE and WITH_EXCEPT_START (bpo-32949) used to simplify the context manager bytecode, but RERAISE was then used for try/except/finally, we don't support context managers in safe_eval so we don't care about the latter * LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE, DICT_MERGE and DICT_UPDATE (bpo-39320) updates to unpacking (* and **) in various contexts * LIST_TO_TUPLE we're skipping as it's only used when calling a function with two `*arg` parameters (aka `foo(*a, *b)`) * SET_UPDATE is used for set literals of 3 or more items or unpacking ({*a}) * LIST_EXTEND is used in the same cases as well as function calls with unpacking * DICT_MERGE is used for function calls with `**kwargs` * DICT_UPDATE is used when unpacking in a dict literal (`{**kw}`) See odoo#59980
Only updates outdated requirements which actively cause issues: * freezegun broken in 3.8 (removal of time.clock) * xlrd broken in 3.8 (removal of time.clock) * also monkeypatches xlrd.xlsx for 3.9 (removal of Element.getiterator, breaks because of defusedxml) * jinja triggers DeprecationWarning in 3.8 * pillow triggers warning in 3.9 * lxml, greenlet don't compile in 3.9 * reportlab doesn't work in 3.9 New versions try to match those of Debian Bullseye. Also adds a script to more easily compare dependency versions between the requirements files and what's in various distributions (currently supports checking against debian and ubuntu). Furthermore updates warnings filtering: * removes xlrd (mischeck was monkeypatched as noted above) * removes setuptools (was for older versions, one would hope this isn't an issue anymore) * adds babel: python-babel/babel#684 fixes the deprecation warning but is not part of any release yet * ignores error related to `random.sample` on a set, this is a diagnostics bug because recordsets implement both Sequence and Set, and the stdlib checks for Set first (bpo-42470) See #59980 Closes #61103 closes #62380 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Only updates outdated requirements which actively cause issues: * freezegun broken in 3.8 (removal of time.clock) * xlrd broken in 3.8 (removal of time.clock) * also monkeypatches xlrd.xlsx for 3.9 (removal of Element.getiterator, breaks because of defusedxml) * jinja triggers DeprecationWarning in 3.8 * pillow triggers warning in 3.9 * lxml, greenlet don't compile in 3.9 * reportlab doesn't work in 3.9 New versions try to match those of Debian Bullseye. Also adds a script to more easily compare dependency versions between the requirements files and what's in various distributions (currently supports checking against debian and ubuntu). Furthermore updates warnings filtering: * removes xlrd (mischeck was monkeypatched as noted above) * removes setuptools (was for older versions, one would hope this isn't an issue anymore) * adds babel: python-babel/babel#684 fixes the deprecation warning but is not part of any release yet * ignores error related to `random.sample` on a set, this is a diagnostics bug because recordsets implement both Sequence and Set, and the stdlib checks for Set first (bpo-42470) See odoo#59980 Closes odoo#61103 X-original-commit: 648635d
Only updates outdated requirements which actively cause issues: * freezegun broken in 3.8 (removal of time.clock) * xlrd broken in 3.8 (removal of time.clock) * also monkeypatches xlrd.xlsx for 3.9 (removal of Element.getiterator, breaks because of defusedxml) * jinja triggers DeprecationWarning in 3.8 * pillow triggers warning in 3.9 * lxml, greenlet don't compile in 3.9 * reportlab doesn't work in 3.9 New versions try to match those of Debian Bullseye. Also adds a script to more easily compare dependency versions between the requirements files and what's in various distributions (currently supports checking against debian and ubuntu). Furthermore updates warnings filtering: * removes xlrd (mischeck was monkeypatched as noted above) * removes setuptools (was for older versions, one would hope this isn't an issue anymore) * adds babel: python-babel/babel#684 fixes the deprecation warning but is not part of any release yet * ignores error related to `random.sample` on a set, this is a diagnostics bug because recordsets implement both Sequence and Set, and the stdlib checks for Set first (bpo-42470) See #59980 Closes #61103 closes #62510 X-original-commit: 648635d Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Python 3.9 has 10 new bytecode instructions, for now this commit adds 8 * CONTAINS_OP / IS_OP: moved out of COMPARE_OP which is now only used for *rich* comparisons (bpo-39156) * JUMP_IF_NOT_EXC_MATCH: also moved out of COMPARE_OP for the sole purpose of testing exception types * RERAISE and WITH_EXCEPT_START (bpo-32949) used to simplify the context manager bytecode, but RERAISE was then used for try/except/finally, we don't support context managers in safe_eval so we don't care about the latter * LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE, DICT_MERGE and DICT_UPDATE (bpo-39320) updates to unpacking (* and **) in various contexts * LIST_TO_TUPLE we're skipping as it's only used when calling a function with two `*arg` parameters (aka `foo(*a, *b)`) * SET_UPDATE is used for set literals of 3 or more items or unpacking ({*a}) * LIST_EXTEND is used in the same cases as well as function calls with unpacking * DICT_MERGE is used for function calls with `**kwargs` * DICT_UPDATE is used when unpacking in a dict literal (`{**kw}`) See #59980 closes #62498 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Python 3.9 has 10 new bytecode instructions, for now this commit adds 8 * CONTAINS_OP / IS_OP: moved out of COMPARE_OP which is now only used for *rich* comparisons (bpo-39156) * JUMP_IF_NOT_EXC_MATCH: also moved out of COMPARE_OP for the sole purpose of testing exception types * RERAISE and WITH_EXCEPT_START (bpo-32949) used to simplify the context manager bytecode, but RERAISE was then used for try/except/finally, we don't support context managers in safe_eval so we don't care about the latter * LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE, DICT_MERGE and DICT_UPDATE (bpo-39320) updates to unpacking (* and **) in various contexts * LIST_TO_TUPLE we're skipping as it's only used when calling a function with two `*arg` parameters (aka `foo(*a, *b)`) * SET_UPDATE is used for set literals of 3 or more items or unpacking ({*a}) * LIST_EXTEND is used in the same cases as well as function calls with unpacking * DICT_MERGE is used for function calls with `**kwargs` * DICT_UPDATE is used when unpacking in a dict literal (`{**kw}`) See odoo#59980 X-original-commit: 3d1c723
Python 3.9 has 10 new bytecode instructions, for now this commit adds 8 * CONTAINS_OP / IS_OP: moved out of COMPARE_OP which is now only used for *rich* comparisons (bpo-39156) * JUMP_IF_NOT_EXC_MATCH: also moved out of COMPARE_OP for the sole purpose of testing exception types * RERAISE and WITH_EXCEPT_START (bpo-32949) used to simplify the context manager bytecode, but RERAISE was then used for try/except/finally, we don't support context managers in safe_eval so we don't care about the latter * LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE, DICT_MERGE and DICT_UPDATE (bpo-39320) updates to unpacking (* and **) in various contexts * LIST_TO_TUPLE we're skipping as it's only used when calling a function with two `*arg` parameters (aka `foo(*a, *b)`) * SET_UPDATE is used for set literals of 3 or more items or unpacking ({*a}) * LIST_EXTEND is used in the same cases as well as function calls with unpacking * DICT_MERGE is used for function calls with `**kwargs` * DICT_UPDATE is used when unpacking in a dict literal (`{**kw}`) See #59980 closes #62989 X-original-commit: 3d1c723 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Only updates outdated requirements which actively cause issues: * freezegun broken in 3.8 (removal of time.clock) * xlrd broken in 3.8 (removal of time.clock) * also monkeypatches xlrd.xlsx for 3.9 (removal of Element.getiterator, breaks because of defusedxml) * jinja triggers DeprecationWarning in 3.8 * pillow triggers warning in 3.9 * lxml, greenlet don't compile in 3.9 * reportlab doesn't work in 3.9 New versions try to match those of Debian Bullseye. Also adds a script to more easily compare dependency versions between the requirements files and what's in various distributions (currently supports checking against debian and ubuntu). Furthermore updates warnings filtering: * removes xlrd (mischeck was monkeypatched as noted above) * removes setuptools (was for older versions, one would hope this isn't an issue anymore) * adds babel: python-babel/babel#684 fixes the deprecation warning but is not part of any release yet * ignores error related to `random.sample` on a set, this is a diagnostics bug because recordsets implement both Sequence and Set, and the stdlib checks for Set first (bpo-42470) See odoo#59980 Closes odoo#61103 closes odoo#62380 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Python 3.9 has 10 new bytecode instructions, for now this commit adds 8 * CONTAINS_OP / IS_OP: moved out of COMPARE_OP which is now only used for *rich* comparisons (bpo-39156) * JUMP_IF_NOT_EXC_MATCH: also moved out of COMPARE_OP for the sole purpose of testing exception types * RERAISE and WITH_EXCEPT_START (bpo-32949) used to simplify the context manager bytecode, but RERAISE was then used for try/except/finally, we don't support context managers in safe_eval so we don't care about the latter * LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE, DICT_MERGE and DICT_UPDATE (bpo-39320) updates to unpacking (* and **) in various contexts * LIST_TO_TUPLE we're skipping as it's only used when calling a function with two `*arg` parameters (aka `foo(*a, *b)`) * SET_UPDATE is used for set literals of 3 or more items or unpacking ({*a}) * LIST_EXTEND is used in the same cases as well as function calls with unpacking * DICT_MERGE is used for function calls with `**kwargs` * DICT_UPDATE is used when unpacking in a dict literal (`{**kw}`) See odoo#59980 closes odoo#62498 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Python 3.9 has 10 new bytecode instructions, for now this commit adds 8 * CONTAINS_OP / IS_OP: moved out of COMPARE_OP which is now only used for *rich* comparisons (bpo-39156) * JUMP_IF_NOT_EXC_MATCH: also moved out of COMPARE_OP for the sole purpose of testing exception types * RERAISE and WITH_EXCEPT_START (bpo-32949) used to simplify the context manager bytecode, but RERAISE was then used for try/except/finally, we don't support context managers in safe_eval so we don't care about the latter * LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE, DICT_MERGE and DICT_UPDATE (bpo-39320) updates to unpacking (* and **) in various contexts * LIST_TO_TUPLE we're skipping as it's only used when calling a function with two `*arg` parameters (aka `foo(*a, *b)`) * SET_UPDATE is used for set literals of 3 or more items or unpacking ({*a}) * LIST_EXTEND is used in the same cases as well as function calls with unpacking * DICT_MERGE is used for function calls with `**kwargs` * DICT_UPDATE is used when unpacking in a dict literal (`{**kw}`) See odoo#59980 closes odoo#62498 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Python 3.9 has 10 new bytecode instructions, for now this commit adds 8 * CONTAINS_OP / IS_OP: moved out of COMPARE_OP which is now only used for *rich* comparisons (bpo-39156) * JUMP_IF_NOT_EXC_MATCH: also moved out of COMPARE_OP for the sole purpose of testing exception types * RERAISE and WITH_EXCEPT_START (bpo-32949) used to simplify the context manager bytecode, but RERAISE was then used for try/except/finally, we don't support context managers in safe_eval so we don't care about the latter * LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE, DICT_MERGE and DICT_UPDATE (bpo-39320) updates to unpacking (* and **) in various contexts * LIST_TO_TUPLE we're skipping as it's only used when calling a function with two `*arg` parameters (aka `foo(*a, *b)`) * SET_UPDATE is used for set literals of 3 or more items or unpacking ({*a}) * LIST_EXTEND is used in the same cases as well as function calls with unpacking * DICT_MERGE is used for function calls with `**kwargs` * DICT_UPDATE is used when unpacking in a dict literal (`{**kw}`) See odoo#59980 closes odoo#62498 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
time.clock()
which was removed in Python 3.8 (cf Conditionally patch time.clock spulec/freezegun#296), 1.0 workstest_xls_success
fails withUnable to load "xls" file: requires Python module "xlrd"
despite xlrd being installed, seems to work in a shell, maybe MAINT: time.clock->time.perf_counter closes #294 python-excel/xlrd#300 which is also a Python 3.8 / time.clock issue)ElementTree.getiterator()
instead ofElememtTree.iter()
... and the former has been removed in 3.9issue is known but extant in defusedxml (defusedxml lacks an Element class tiran/defusedxml#48), xlrd has gone readonly (so odds of fix are low), best options seem to be
ensure_elementtree_imported
to directly importlxml
and / or bypass it (set the three globals it updates directly)threading.Thread.isAlive
had been undocumented for multiple versions and was removed entirely in 3.9 (bpo-35283)CONTAINS_OP (
in
/not in
)IS_OP (
is
/is not
)LIST_EXTEND (non-empty const list literals)
In Python 3.8, a non-empty list literal compiles to
in Python 3.9, the same compiles to
SET_UPDATE (non-empty const set literals, see above)
LIST_TO_TUPLE (BPO 39320, also source of the above and below so "unpacking of starred values in arguments and the right hand side of assignments", do we want to allow that in safe_eval?)
in 3.8:
in 3.9:
DICT_UPDATE
DICT_MERGE
used for
foo(**bar)
, which turns out we have at least one ofRERAISE, JUMP_IF_NOT_EXC_MATCH (exception handlers)
Issue fixed in Import abstract base classes from collections.abc pallets/jinja#867 but no release since (the tracking issue Release a version containing #867 pallets/jinja#973 was closed)
Note: apparently now fixed (since original comment), requires updating Jinja, see Need to update jinja2 fix ABC import #61103
since Python 3.9 and will be removed in a subsequent version. [survey_survey.py:440] [exhibitor.py:86]
in 5810ea2 BaseModel was registered against Set and Sequence specifically to work with random.sample, we could remove the Set registration (hopefully that doesn't work anything) leaving the Sequence one, but I'll open a bpo to ask to improve the check in case that works
fixed in Replace usage of parser.suite with ast.parse python-babel/babel#684 but not release yet
The text was updated successfully, but these errors were encountered: