Skip to content

Stop showing DeprecationWarning related to tarfile #190

@jezdez

Description

@jezdez

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

When running an installer like miniconda I get:

Unpacking payload ...
entry_point.py:256: 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.
entry_point.py:256: 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.

Installing base environment...

We should prevent those DeprecationWarning to be shown.

On Slack @ifitchet suggested it's related to the deprecation notes in https://docs.python.org/3.11/library/tarfile.html#tarfile.TarFile.extraction_filter and the following blurb:

In Python 3.12+, leaving extraction_filter=None will emit a DeprecationWarning.

But I can't find a use of extraction_filter directly, other than

if hasattr(t, "extraction_filter"):
tar_args["filter"] = "data"

I'm of course wondering if this is related to conda-package-streaming of course.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type::bugdescribes erroneous operation, use severity::* to classify the type

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions