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

Incompatibility with Python 3.12 #788

Closed
ddiez opened this issue May 23, 2024 · 6 comments
Closed

Incompatibility with Python 3.12 #788

ddiez opened this issue May 23, 2024 · 6 comments

Comments

@ddiez
Copy link

ddiez commented May 23, 2024

I tried installing the airr package with Python 3.12 and got the following error:

~$ pip install airr
Collecting airr
  Using cached airr-1.5.0.tar.gz (64 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      /tmp/pip-install-o4j0x2bo/airr_13e65210b78a41cb8c85bc48adf90011/versioneer.py:421: SyntaxWarning: invalid escape sequence '\s'
        LONG_VERSION_PY['git'] = '''
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-o4j0x2bo/airr_13e65210b78a41cb8c85bc48adf90011/setup.py", line 21, in <module>
          version=versioneer.get_version(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-o4j0x2bo/airr_13e65210b78a41cb8c85bc48adf90011/versioneer.py", line 1480, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/tmp/pip-install-o4j0x2bo/airr_13e65210b78a41cb8c85bc48adf90011/versioneer.py", line 1412, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-o4j0x2bo/airr_13e65210b78a41cb8c85bc48adf90011/versioneer.py", line 342, in get_config_from_root
          parser = configparser.SafeConfigParser()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

The same does not happen with Python 3.11.

@schristley
Copy link
Member

Hi @ddiez I believe we are working on that exact issue. If you are feeling adventurous, you can try the 1.5 release branch to see if it works for you, otherwise we should have a new release soon.

git clone https://github.com/airr-community/airr-standards.git
cd airr-standards
git checkout release-1.5
cd lang/python
pip install .

@ddiez
Copy link
Author

ddiez commented May 23, 2024

@schristley good to know. Thanks!

@VincentGardeux
Copy link

A quick fix is to download the airr-py-1.5.0.tar.gz from the release section, then

tar -xzvf airr-py-1.5.0.tar.gz
cd airr-1.5.0/
sed -i 's/SafeConfigParser/ConfigParser/g' versioneer.py
sed -i 's/readfp/read_file/g' versioneer.py
python3.12 -m pip install .

SafeConfigParser was replaced by ConfigParser in latest Python v3.12

@ssnn-airr
Copy link
Contributor

Linking to the original issue for context #742

One more way to install from the main branch:

pip3 install -e "git+https://github.com/airr-community/airr-standards.git#egg=airr&subdirectory=lang/python"

If you want to use a specific commit:

pip3 install -e "git+https://github.com/airr-community/airr-standards.git@b3e4a69169200b2644cb7e0e534f1781b68829f1#egg=airr&subdirectory=lang/python"

@javh
Copy link
Contributor

javh commented Jun 2, 2024

This should now be fixed in v1.5.1 on PyPI:
https://pypi.org/project/airr/1.5.1

Thanks for the report and let us know if you have any more trouble.

@javh javh closed this as completed Jun 2, 2024
@ddiez
Copy link
Author

ddiez commented Jun 3, 2024

I tested and it worked without issues. Thanks!

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

No branches or pull requests

5 participants