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

Python 3.12 support #106

Closed
m-aciek opened this issue Jun 4, 2023 · 5 comments
Closed

Python 3.12 support #106

m-aciek opened this issue Jun 4, 2023 · 5 comments

Comments

@m-aciek
Copy link
Contributor

m-aciek commented Jun 4, 2023

Library installation fails on Python 3.12 due to incompatibility regarding configparser module. See python/cpython#89336.

        File "/private/var/folders/…/pip-install-…/transifex-python…/versioneer.py", line 1480, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/private/var/folders/…/pip-install-…/transifex-python…/versioneer.py", line 1412, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/…/pip-install-…/transifex-python…/versioneer.py", line 342, in get_config_from_root
          parser = configparser.SafeConfigParser()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
@m-aciek
Copy link
Contributor Author

m-aciek commented Oct 27, 2023

Wouldn't bumping the version of vendored versioneer be enough? Python 3.12 is now current latest stable Python version.

@m-aciek
Copy link
Contributor Author

m-aciek commented Oct 27, 2023

The full stack trace of pip install failing:

Collecting transifex-python
  Downloading transifex-python-3.4.0.tar.gz (125 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.0/126.0 kB 4.1 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      /tmp/pip-install-wksl6_3s/transifex-python_8fa94a11b5d04a6b85cd7ebda619fb62/versioneer.py:421: SyntaxWarning: invalid escape sequence '\s'
        LONG_VERSION_PY['git'] = '''
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 1[18](https://github.com/python/python-docs-pl/actions/runs/6657716328/job/18093013169#step:5:19), in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-6iw56zmc/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-6iw56zmc/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-6iw56zmc/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-6iw56zmc/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 12, in <module>
        File "/tmp/pip-install-wksl6_3s/transifex-python_8fa94a11b5d04a6b85cd7ebda6[19](https://github.com/python/python-docs-pl/actions/runs/6657716328/job/18093013169#step:5:20)fb62/versioneer.py", line 1480, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "/tmp/pip-install-wksl6_3s/transifex-python_8fa94a11b5d04a6b85cd7ebda619fb62/versioneer.py", line 1412, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-wksl6_3s/transifex-python_8fa94a11b5d04a6b85cd7ebda619fb62/versioneer.py", line [34](https://github.com/python/python-docs-pl/actions/runs/6657716328/job/18093013169#step:5:35)2, 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: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

@m-aciek
Copy link
Contributor Author

m-aciek commented Oct 27, 2023

https://github.com/transifex/transifex-python/blob/devel/transifex/_version.py#L9

The current version we have here is 0.18 whereas the latest one is 0.29. Guide to upgrading Versioneer.

@nbasili
Copy link
Contributor

nbasili commented Nov 10, 2023

@m-aciek Thanks to your contribution, 3.5.0 has been released. Can you please verify that the latest version resolves this open issue?

@m-aciek
Copy link
Contributor Author

m-aciek commented Nov 11, 2023

@nbasili Thank you for the release. The most recent PyPI version of transifex-python gets installed and executes successfully on Python 3.12 now. https://github.com/python/python-docs-pl/actions/runs/6833297969/job/18584916064

@m-aciek m-aciek closed this as completed Nov 11, 2023
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

2 participants