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

DeprecationWarning from tarfile.Tarfile.extractall in Python 3.12+ #379

Open
nernst opened this issue Feb 16, 2025 · 1 comment
Open

DeprecationWarning from tarfile.Tarfile.extractall in Python 3.12+ #379

nernst opened this issue Feb 16, 2025 · 1 comment

Comments

@nernst
Copy link

nernst commented Feb 16, 2025

Hi,

I'm getting a DeprecationWarning from nodenv via pyright on Python 3.12:

.venv/lib/python3.12/site-packages/nodeenv.py:639: 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.
  archive.extractall(src_dir, extract_list)

This appears because Python 3.12 added a filter=None default argument to tarfile.TarFile.extractall in 3.12 and raises a DeprecationWarning when filter is None.

I think this can be resolved by adding filter="data" to the call when sys.version_info >= (3, 12).

@nernst
Copy link
Author

nernst commented Feb 16, 2025

I've opened #380 with a proposed fix; I have not tested this, however.

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

1 participant