You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.10 is next in line to become our oldest supported version (currently it's 3.9), sometime about October 2024 (extrapolating from the last couple year's pace).
This version comes with a couple changes that will be picked up but our linters (pyugrade and flake8-bugbear via ruff) and that would affect a large number of lines, so I'd like to start the discussion early to decide what to do about them.
Python 3.10 added a strict argument to the builtin zip function which is False by default for backward compatibility.
This rule checks that strict is explicitly set everywhere, which is always safer or more explicit than leaving it unset.
I don't think it'd be controversial to follow this rule ? It'd a bit tedious to retro-actively set it everywhere but I'd happily volunteer for this boring task. It can actually be addressed right now by using yt._maintenance.backports.zip which imitate the Python 3.10 function.
The text was updated successfully, but these errors were encountered:
neutrinoceros
changed the title
MNT: how should we handle Python 3.10 becoming our old supported version ?
MNT: how should we handle Python 3.10 becoming our oldest supported version ?
Nov 23, 2023
Python 3.10 is next in line to become our oldest supported version (currently it's 3.9), sometime about October 2024 (extrapolating from the last couple year's pace).
This version comes with a couple changes that will be picked up but our linters (
pyugrade
andflake8-bugbear
viaruff
) and that would affect a large number of lines, so I'd like to start the discussion early to decide what to do about them.Here are the rules I know about
pyupgrade UP038
Basically this would change
to
It's noted that the more modern ("good") alternative is actually slower, so we might want to just ignore this specific rule.
flake8-bugbear B905
Python 3.10 added a
strict
argument to the builtinzip
function which isFalse
by default for backward compatibility.This rule checks that
strict
is explicitly set everywhere, which is always safer or more explicit than leaving it unset.I don't think it'd be controversial to follow this rule ? It'd a bit tedious to retro-actively set it everywhere but I'd happily volunteer for this boring task. It can actually be addressed right now by using
yt._maintenance.backports.zip
which imitate the Python 3.10 function.The text was updated successfully, but these errors were encountered: