Skip to content

argparse.FileType is deprecated in Python 3.14 #591

Closed

Description

@frenzymadness

This now raises PendingDeprecationWarning:

"files", type=argparse.FileType("rb"), nargs="+", help="File(s) to be analysed"

and because of this setting for pytest:

filterwarnings = [
"error",
]

I think it will cause the test suite to fail with 3.14. I experienced this in Fedora Linux, where we are already preparing Python 3.14.

See this for more context: python/cpython#58032

Activity

  1. added a commit that references this issue on Jan 26, 2025
    b3f4f45
  2. Ousret commented on Jan 26, 2025

    @Ousret
    Member

    OK. We just landed a patch in the main branch that should help with this.
    Unfortunately we won't be able to issue a release until CPython 3.14 reach RC1 as more deprecations or changes may occurs until then.

    Regards,

  3. frenzymadness commented on Jan 27, 2025

    @frenzymadness
    ContributorAuthor

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions