Small-Bodies-Node / pds4_tools

Python package to read and display NASA PDS4 data.
16 stars 12 forks source link

vendored version of six.py is incompatible with python 3.12 #88

Open m-stclair opened 8 months ago

m-stclair commented 8 months ago

Importing pds4_tools in Python 3.12 fails. This appears to be due to an incompatibility between Python 3.12 and how six.py 1.13.0 constructs the import metapath for six.moves. Updating to version 1.16.0 of six.py fixes this.

Traceback below:

  File "/home/michael/Desktop/pdr/read_scratch.py", line 24, in <module>
    import pds4_tools
  File "/opt/mambaforge/envs/pdr/lib/python3.12/site-packages/pds4_tools/__init__.py", line 3, in <module>
    from .reader import pds4_read
  File "/opt/mambaforge/envs/pdr/lib/python3.12/site-packages/pds4_tools/reader/__init__.py", line 1, in <module>
    from .core import pds4_read
  File "/opt/mambaforge/envs/pdr/lib/python3.12/site-packages/pds4_tools/reader/core.py", line 10, in <module>
    from .label_objects import Label
  File "/opt/mambaforge/envs/pdr/lib/python3.12/site-packages/pds4_tools/reader/label_objects.py", line 11, in <module>
    from .general_objects import Meta_Class
  File "/opt/mambaforge/envs/pdr/lib/python3.12/site-packages/pds4_tools/reader/general_objects.py", line 11, in <module>
    from ..utils.data_access import is_supported_url, download_file
  File "/opt/mambaforge/envs/pdr/lib/python3.12/site-packages/pds4_tools/utils/data_access.py", line 14, in <module>
    from ..extern.six.moves import urllib
ModuleNotFoundError: No module named 'pds4_tools.extern.six.moves'
LevN0 commented 8 months ago

This is fixed by https://github.com/Small-Bodies-Node/pds4_tools/pull/73, but not yet released.

m-stclair commented 8 months ago

Got it, missed that commit. Do you have a rough timeframe for release?

cmillion commented 4 weeks ago

@LevN0 Do you have a timeframe for packaging this? We are still hacking around the issue in pdr and it would be great if we could retire that technical debt. Thank you.

msbentley commented 4 weeks ago

Hi @LevN0 yes it would be great to get this pushed out - we just ran into this in the PSA group this morning. We can stick to python <3.12 for now, but it would be nice to do this "propery" ;-) Thanks!