Skip to content
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

Adapt to functools.partial becoming a method descriptor in Python 3.14 #1391

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

musicinmybrain
Copy link
Contributor

From https://docs.python.org/dev/whatsnew/3.14.html#changes-in-the-python-api:

functools.partial is now a method descriptor. Wrap it in staticmethod() if you want to preserve the old behavior. (Contributed by Serhiy Storchaka and Dominykas Grigonis in gh-121027.)

This was reported downstream in Fedora as https://bugzilla.redhat.com/show_bug.cgi?id=2322407.

It’s hard to test this change in a virtualenv since there are some dependencies like numpy that are nontrivial to compile from source and haven’t published binary wheels for Python 3.14. However, I tested this PR as a patch for nibabel 5.3.2 in Fedora’s early Python 3.14 testing and got a successful build with no regressions using Python 3.14.0a2.

@musicinmybrain
Copy link
Contributor Author

Adjusted the commit message to note that this fixes #1390.

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.37%. Comparing base (d9c479a) to head (bc216da).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1391   +/-   ##
=======================================
  Coverage   95.37%   95.37%           
=======================================
  Files         207      207           
  Lines       29672    29672           
  Branches     3018     3018           
=======================================
  Hits        28300    28300           
  Misses        934      934           
  Partials      438      438           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@effigies effigies merged commit 994acc5 into nipy:master Nov 26, 2024
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants