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

Fix versioneer for python >= 3.12 #86

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Conversation

mscheltienne
Copy link
Collaborator

Closes #

configparser.SafeConfigParser has been deprecated in python 3.11 and removed in 3.12; which is now failing the conda-forge release workflows and any installs on Python 3.12.

Proposed Changes

  • By-pass the issue by using ConfigParser, new alias of SafeConfigParser if the latter is absent from configparser namespace.

Change Type

  • bugfix (+0.0.1)
  • minor (+0.1.0)
  • major (+1.0.0)
  • refactoring (no version update)
  • test (no version update)
  • infrastructure (no version update)
  • documentation (no version update)
  • other

Checklist before review

  • I added everything I wanted to add to this PR.
  • [Code or tests only] I wrote/updated the necessary docstrings.
  • [Code or tests only] I ran and passed tests locally.
  • [Documentation only] I built the docs locally.
  • My contribution is harmonious with the rest of the code: I'm not introducing repetitions.
  • My code respects the adopted style, especially linting conventions.
  • The title of this PR is explanatory on its own, enough to be understood as part of a changelog.
  • I added or indicated the right labels.
  • I added information regarding the timeline of completion for this PR.
  • Please, comment on my PR while it's a draft and give me feedback on the development!

Mathieu Scheltienne and others added 2 commits December 13, 2023 13:58
@mscheltienne
Copy link
Collaborator Author

mscheltienne commented Dec 13, 2023

That PR should yield a new release to restore installs on Python 3.12+ and on conda-forge.
Also, I would recommend to use an external tool to manage version, some good options are:

@mscheltienne
Copy link
Collaborator Author

One more point now that I see the CIs, how about bumping between 3.9 and 3.12 the CIs? 3.7 already reached its end of life: https://devguide.python.org/versions/

And most projects maintain the 4 last minor version of Python, see e.g. numpy which dropped support for Python 3.8 since version 1.25.

Also, I think numpy is a (very) major dependency of this project, thus maybe you should add a workflow run against the nightly build of numpy 2.0. It's breaking stuff left and right, better to catch it early!

python -m pip install --progress-bar off --upgrade --pre --only-binary :all: -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --timeout=180 numpy

Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Merging #86 (6a5e920) into master (e1ac636) will not change coverage.
Report is 4 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #86   +/-   ##
=======================================
  Coverage   90.85%   90.85%           
=======================================
  Files          14       14           
  Lines        1236     1236           
=======================================
  Hits         1123     1123           
  Misses        113      113           

Copy link
Collaborator

@smoia smoia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding that!

It's a bit hard to maintain for all python versions, and while most packages maintain for newer versions, most users might use an older version. I will give a go to update and check during the holidays.

@smoia smoia added the Internal Changes affect the internal API. It doesn't increase the version, but produces a changelog label Dec 13, 2023
@smoia smoia changed the title Fix versioneer.py Fix versioneer for python >= 3.12 Dec 13, 2023
@smoia smoia merged commit 12f2a61 into MIPLabCH:master Dec 13, 2023
@mscheltienne mscheltienne deleted the version-fix branch December 13, 2023 15:27
@mscheltienne
Copy link
Collaborator Author

most users might use an older version

Up to them to update or to stick to old versions ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal Changes affect the internal API. It doesn't increase the version, but produces a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants