Skip to content

build: Update versioneer from 0.15 to 0.29 #242

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

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

EliahKagan
Copy link
Contributor

@EliahKagan EliahKagan commented Aug 14, 2023

One benefit of this update is to support the upcoming Python 3.12 release. (Though other changes, in addition to and unrelated to versioneer, may also need to be made in order to fully support 3.12.) Old versioneer versions use configparser.SafeConfigParser. This was deprecated back in Python 3.2. It is finally being removed in 3.12.

Procedure followed for the update:

  1. Manually removed the code appended by the old version to the end of __init__.py, which the update will not do. (When this is not done, it appends improved but similar code after it.)
  2. In the top-level repository directory (i.e., the directory that directly contains setup.py), followed the current instructions for a "Vendored mode" installation, by installing the versioneer package in a temporary virtual environment and running versioneer install --vendor.

As expected, this reported that the old versioneer.py was replaced, and that the effect of running the new script was to create _version.py and append to __init__.py.

One benefit of this update is to support the upcoming Python 3.12
release. Old versioneer versions use configparser.SafeConfigParser.
This was deprecated back in Python 3.2, and being removed in 3.12.

Procedure followed for the update:

- Manually removed the code appended by the old version to the end
  of __init__.py, which the update will not do. (When this is not
  done, it appends improved but similar code after it.)

- In the top-level repository directory (i.e., the directory that
  directly contains setup.py), followed the current instructions
  for a "Vendored mode" installation, by installing the versioneer
  package in a temporary virtual environment and running
  "versioneer install --vendor".

As expected, this reported that the old versioneer.py was replaced,
and that the effect of running the new script was to create
_version.py and append to __init__.py.
This reformats the new code with black that was generated in the
previous commit with versioneer, as was done in 7da92e2 (except
here the *only* reformatted code is versioneer-generated code).
This does *not* include the vendored versioneer.py script itself,
which we retain unchanged.
@cwacek cwacek merged commit 645acf6 into cwacek:master Aug 17, 2023
@EliahKagan EliahKagan deleted the update-versioneer branch August 17, 2023 23:46
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