petl-developers / petl

Python Extract Transform and Load Tables of Data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: support for 3.12

shaunagm opened this issue · comments

Explain why petl needs this feature?

Hi! Our project Parsons depends on PETL. We'd like to support Python 3.12 but need to wait for PETL to support it first. It looks like you've got 3.12 support merged into main but not released on PyPI yet. Do you have a timeline for when you're going to cut your next release/officially support 3.12?

Describe the solution you would like

Apologies if this is the wrong place to make this request, I looked at https://groups.google.com/g/python-etl/ but it seems to be full of spam.

Describe alternatives solutions you would have considered

No response

Source Code Examples

No response

Additional Notes

Thank you so much for your work on PETL!

Code of Conduct

  • I agree to follow this project's Code of Conduct

@shaunagm

  • Current version v1.7.15 should work fine with python3.12
  • There are no changes in the runtime code of this library specific to Python v3.12
  • The last changes committed are just:
    • running the test suite with Python v3.12
    • adding descriptions to the release package marking Python 3.12 as "supported"
  • If you find any problem regarding Python 3.12, please let us know or open a new issue with a reproducible test case.

I'm getting the following error when attempting to install petl version 1.7.15 using Python 3.12:

Collecting petl==1.7.15 (from -r requirements.txt (line 25))
  Using cached petl-1.7.15.tar.gz (414 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [76 lines of output]
      WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
      running dist_info
      creating /tmp/pip-modern-metadata-p5b7mlem/petl.egg-info
      writing /tmp/pip-modern-metadata-p5b7mlem/petl.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-modern-metadata-p5b7mlem/petl.egg-info/dependency_links.txt
      writing requirements to /tmp/pip-modern-metadata-p5b7mlem/petl.egg-info/requires.txt
      writing top-level names to /tmp/pip-modern-metadata-p5b7mlem/petl.egg-info/top_level.txt
      writing manifest file '/tmp/pip-modern-metadata-p5b7mlem/petl.egg-info/SOURCES.txt'
      ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
      reading manifest file '/tmp/pip-modern-metadata-p5b7mlem/petl.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching '*.txt' under directory 'docs'
      adding license file 'LICENSE.txt'
      writing manifest file '/tmp/pip-modern-metadata-p5b7mlem/petl.egg-info/SOURCES.txt'
      creating '/tmp/pip-modern-metadata-p5b7mlem/petl-1.7.15.dist-info'
      Traceback (most recent call last):
        File "/home/shauna/Desktop/git/grc/parsons/parsons-3.12/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/shauna/Desktop/git/grc/parsons/parsons-3.12/venv/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 "/home/shauna/Desktop/git/grc/parsons/parsons-3.12/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 5, in <module>
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 104, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/command/dist_info.py", line 97, in run
          bdist_wheel = self.get_finalized_command('bdist_wheel')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 302, in get_finalized_command
          cmd_obj = self.distribution.get_command_obj(command, create)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 861, in get_command_obj
          klass = self.get_command_class(command)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 714, in get_command_class
          self.cmdclass[command] = cmdclass = ep.load()
                                              ^^^^^^^^^
        File "/home/shauna/.pyenv/versions/3.12.3/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
          module = import_module(match.group('module'))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/shauna/.pyenv/versions/3.12.3/lib/python3.12/importlib/__init__.py", line 90, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 995, in exec_module
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/wheel/bdist_wheel.py", line 27, in <module>
          from .macosx_libfile import calculate_macosx_platform_tag
        File "/tmp/pip-build-env-cfdk2yp3/overlay/lib/python3.12/site-packages/wheel/macosx_libfile.py", line 43, in <module>
          import ctypes
        File "/home/shauna/.pyenv/versions/3.12.3/lib/python3.12/ctypes/__init__.py", line 8, in <module>
          from _ctypes import Union, Structure, Array
      ModuleNotFoundError: No module named '_ctypes'
      [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.

I don't get this error when using 3.10, so I interpreted it as an issue with petl, but lord knows I'm not a dependency expert. I'm running Ubuntu 22.04.1, in case that's relevant.

EDIT: Upon reflection this may be an issue with pyenv, which I used to install 3.12. I will check that out first since that's more likely to be the problem than petl.