Visitar URL original
Defer `import warnings` in pathlib · Issue #119049 · python/cpython · GitHub
Skip to content

Defer import warnings in pathlib #119049

Description

@barneygale

As of GH-118793, the warnings module is used only once in pathlib, by PurePath.is_reserved(). We should be able to move the import warnings line into that method. But beware! Doing so seems to cause a failure in test_io, which needs further investigation.

Linked PRs

Activity

  1. added a commit that references this issue on May 15, 2024
  2. Eclips4 commented on May 15, 2024

    @Eclips4
    Member

    But beware! Doing so seems to cause a failure in test_io, which needs further investigation.

    I've written #119063 to address this. FYI, this is not related to pathlib :)

  3. added a commit that references this issue on May 16, 2024
  4. added a commit that references this issue on May 16, 2024
  5. added a commit that references this issue on May 17, 2024
  6. added a commit that references this issue on May 17, 2024
  7. added a commit that references this issue on May 17, 2024
  8. barneygale commented on May 17, 2024

    @barneygale
    ContributorAuthor

    Woot! Thank you @Eclips4 for sorting this :)

  9. added 2 commits that reference this issue on Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions