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 — Improve performance of pathlib.Path.absolute() · Issue #100562 · python/cpython

Improve performance of pathlib.Path.absolute() #100562

New issue
Copy link
New issue
Copy link
Closed
#100563
Closed
Improve performance of pathlib.Path.absolute()#100562
#100563
Copy link
Labels
3.12only security fixesonly security fixesperformancePerformance or resource usagePerformance or resource usagetopic-pathlibtype-featureA feature request or enhancementA feature request or enhancement

Description

@barneygale
barneygale
opened on Dec 28, 2022
Issue body actions

The current implementation of pathlib.Path.absolute() calls self.cwd() rather than os.getcwd(), and so constructs two Path objects rather than one. As path objects are slow to construct, this has a performance impact.

Linked PRs

  • gh-100562: improve performance of pathlib.Path.absolute() #100563

Activity

  1. barneygale
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Dec 28, 2022
  2. AlexWaygood
    added
    performancePerformance or resource usagePerformance or resource usage
    topic-pathlib
    3.12only security fixesonly security fixes
    on Dec 28, 2022
  3. barneygale
    added a commit that references this issue on Dec 28, 2022

    pythongh-100562: improve performance of `pathlib.Path.absolute()`

    d386e95
  4. AlexWaygood
    added a commit that references this issue on Jan 5, 2023

    Merge branch 'main' into pythongh-100562-path-absolute-perf

    031c322
  5. AlexWaygood
    linked a pull request that will close this issuegh-100562: improve performance of `pathlib.Path.absolute()` #100563on Jan 5, 2023
  6. miss-islington
    closed this as completedin #100563on Jan 5, 2023
  7. miss-islington
    added a commit that references this issue on Jan 5, 2023

    gh-100562: improve performance of `pathlib.Path.absolute()` (GH-100563)

    7fba99e
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

    3.12only security fixesonly security fixesperformancePerformance or resource usagePerformance or resource usagetopic-pathlibtype-featureA feature request or enhancementA feature request or enhancement

    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.