GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Defer `import warnings` in pathlib · Issue #119049 · python/cpython

Defer import warnings in pathlib #119049

New issue
Copy link
New issue
Copy link
Closed
Closed
Defer import warnings in pathlib#119049
Copy link
Labels
performancePerformance or resource usagePerformance or resource usagetopic-pathlib

Description

@barneygale
barneygale
opened on May 14, 2024
Issue body actions

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

  • gh-119049: Fix incorrect usage of GET_WARNINGS_ATTR #119063
  • [3.13] gh-119049: Fix incorrect display of warning which is constructed by C API (GH-119063) #119106
  • gh-119049: Defer import warnings in pathlib._locals #119111
  • [3.12] gh-119049: Fix incorrect display of warning which is constructed by C API (GH-119063) #119119
Reacted by Alex Waygood

Activity

  1. barneygale
    added
    performancePerformance or resource usagePerformance or resource usage
    topic-pathlib
    on May 14, 2024
  2. Eclips4
    added a commit that references this issue on May 15, 2024

    pythongh-119049: Fix incorrect display of warning which is constructe…

    88b9e20
  3. Eclips4 commented on May 15, 2024

    @Eclips4
    Eclips4
    on May 15, 2024
    Member
    More actions

    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 :)

  4. serhiy-storchaka
    added a commit that references this issue on May 16, 2024

    gh-119049: Fix incorrect display of warning which is constructed by C…

    100c7ab
  5. miss-islington
    added a commit that references this issue on May 16, 2024

    pythongh-119049: Fix incorrect display of warning which is constructe…

    0de65e5
  6. Eclips4
    added a commit that references this issue on May 17, 2024

    pythongh-119049: Defer import warnings

    4a0be46
  7. serhiy-storchaka
    added a commit that references this issue on May 17, 2024

    [3.13] gh-119049: Fix incorrect display of warning which is construct…

    ced71d3
  8. barneygale
    added a commit that references this issue on May 17, 2024

    gh-119049: Defer `import warnings` in `pathlib._local` (#119111)

    31a28cb
  9. barneygale commented on May 17, 2024

    @barneygale
    barneygale
    on May 17, 2024
    ContributorAuthor
    More actions

    Woot! Thank you @Eclips4 for sorting this :)

    Reacted by Kirill Podoprigora
  10. barneygale
    closed this as completedon May 17, 2024
  11. estyxx
    added 2 commits that reference this issue on Jul 17, 2024

    pythongh-119049: Fix incorrect display of warning which is constructe…

    ba0c110

    pythongh-119049: Defer `import warnings` in `pathlib._local` (python#…

    83e3b51
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

    performancePerformance or resource usagePerformance or resource usagetopic-pathlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.