Small-Bodies-Node / pds4_tools

Python package to read and display NASA PDS4 data.
17 stars 13 forks source link

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

Open m-stclair opened 1 year ago

m-stclair commented 1 year 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 1 year ago

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

m-stclair commented 1 year ago

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

cmillion commented 5 months 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 5 months 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!

cmillion commented 4 months ago

Hi @LevN0. Just pinging on this. Do you have an estimated timeframe for when a new version will be packaged and available on pip and conda-forge? Thank you.

LevN0 commented 3 months ago

I do not have an estimated time frame currently. I hope the answer is soon.

dcoia740 commented 6 days ago

Hi @LevN0, wondering if there is any updates for this ticket. Thanks!