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

Use filter argument when unpacking tar files, when supported #883

Closed
jameswilburlewis opened this issue Jun 17, 2024 · 1 comment
Closed
Labels
Cluster deprecated good first issue Good for newcomers python Issues involving Python and Python-related tools outside of pyspedas refactoring

Comments

@jameswilburlewis
Copy link
Contributor

We are getting deprecation messages in Python 3.12 when unpacking tar files (for example, when downloading Cluster data via CSA):

Starting analysis magnetic nulls tests at Wed Jun 12 03:16:09 UTC 2024
12-Jun-24 03:16:13: Downloading Cluster data, please wait....
12-Jun-24 03:16:40: Download complete.
12-Jun-24 03:16:40: /opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/tarfile.py:2221: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
  warnings.warn(

The 'filter' feature was just introduced in Python 3.12. We need to support older Python versions for at least the next two years, so we should probably do a Python version test and use the filter argument when it's supported.

@jameswilburlewis jameswilburlewis added good first issue Good for newcomers python Issues involving Python and Python-related tools outside of pyspedas refactoring deprecated labels Jun 17, 2024
@KirilBourakov
Copy link
Contributor

I submitted a pr that should fix this.

jameswilburlewis added a commit that referenced this issue Jun 18, 2024
…king-tar-files,-when-supported-#883

Added version checking to avoid deprecation warning in load_csa (#883)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cluster deprecated good first issue Good for newcomers python Issues involving Python and Python-related tools outside of pyspedas refactoring
Projects
None yet
Development

No branches or pull requests

2 participants