-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
MAINT: Post-release deprecations #13040
base: main
Are you sure you want to change the base?
Conversation
pyproject.toml
Outdated
@@ -111,7 +111,7 @@ full-no-qt = [ | |||
"nilearn", | |||
"numba", | |||
"openmeeg >= 2.5.5", | |||
"pandas", | |||
"pandas", # >= 1.5 |
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.
Also I noticed in our unification of README and pyproject etc. in #12890 we didn't document anywhere what our internal min (for whichever release is coming up next) is AFAIK. We used to have:
- `pandas <https://pandas.pydata.org>`__ ≥ 1.5.2
Here I've put pandas
in there. We could consider explicit pins at some point, but for now comments seem okay. For now I've only added pandas
since it's the only one where I removed a shim for < 1.5.
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.
what's the downside to putting an explicit (non-comment) pin right now? Is it that the repo README will reflect pins that don't apply to current stable release? (doesn't seem that bad to me... when we add new deps we add them into pyproject.toml
right away in the PR where they're needed so in general I expect the repo README to reflect main
not PyPI 🤷🏻)
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.
Just that in most cases we are 99% compatible with older versions, and just a single test or two breaks, or some niche plotting function. But it's probably most standard to add an explicit lower bound so I'll do that
@@ -3456,11 +3456,9 @@ def _trigradient(x, y, z): | |||
"""Take gradients of z on a mesh.""" | |||
from matplotlib.tri import CubicTriInterpolator, Triangulation | |||
|
|||
with warnings.catch_warnings(): # catch matplotlib warnings |
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'm also trying some removals of warnings.catch_warnings
, we'll see how many of them work 🤞
+1 to this idea/effort. Not sure "Deprecation" is the right signal here. My ad-hoc practice includes comments like mne-python/mne/time_frequency/tfr.py Line 1190 in 05bd738
which aren't really a deprecation... why not EDIT: I realize that the linked comment actually does contain the word "deprecation" but it could easily not have, and still made sense! E.g. something like "shim for matplotlib <2.1" or similar. |
Because of this:
that's too many to have to go through every release, and most of them are longer-term or things we don't care about so imminently.
One advantage of |
never mind my suggestion about
that has 62 hits vs 53 from yours, and seems at least slightly better in terms of not missing things that we likely want to change. Whatever you settle on, please add it to |
pyproject.toml
Outdated
@@ -111,7 +111,7 @@ full-no-qt = [ | |||
"nilearn", | |||
"numba", | |||
"openmeeg >= 2.5.5", | |||
"pandas", | |||
"pandas", # >= 1.5 |
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.
what's the downside to putting an explicit (non-comment) pin right now? Is it that the repo README will reflect pins that don't apply to current stable release? (doesn't seem that bad to me... when we add new deps we add them into pyproject.toml
right away in the PR where they're needed so in general I expect the repo README to reflect main
not PyPI 🤷🏻)
env_file = repo_root / "environment.yml" | ||
old_env = env_file.read_text("utf-8") | ||
if old_env != env: | ||
diff = "\n".join(difflib.unified_diff(old_env.splitlines(), env.splitlines())) | ||
print(f"Updating {env_file} with diff:\n{diff}") | ||
env_file.write_text(env, encoding="utf-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.
❤️
Post-release deprecations, plus some comment rewordings so that after release this line:
gives way fewer false alarms. I think going forward we should try to reserve variants of the term "deprecation" in our codebase to signal something that we need to change release-to-release as it makes things easier to find. After this PR it only shows:
which is actually the set of things we should consider thinking about after a release, like TODO items or in the case of
dataframe.py
checking if our min pandas version is high enough that we can remove the shim.We could now consider starting to use the word
deprecate
to signal other stuff we should look at like other shims that are required for version-by-version changes in other libraries (e.g., typically / most often pandas, matplotlib).