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 — User-defined virtual path objects · Issue #110109 · python/cpython

User-defined virtual path objects #110109

New issue
Copy link
New issue
Copy link
Closed
Closed
User-defined virtual path objects#110109
Copy link
Assignees
barneygale
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-pathlibtype-featureA feature request or enhancementA feature request or enhancement

Description

@barneygale
barneygale
opened on Sep 29, 2023
Issue body actions

Proposal

Add a PathBase class that can be subclassed by users to implement "virtual paths", e.g. paths within .zip files or on FTP servers, and publish it as an external PyPI package.

Phase 1: Private support in pathlib

  • Add private _PathBase class
    • GH-89812: Add pathlib._PathBase #106337
  • Merge WalkTests into DummyPathTest
    • GH-110109: Simplify pathlib test setup #110308
    • GH-110109: Move tests for pathlib.Path.walk() into main test classes. #110655
  • Sort out __hash__(), __eq__, etc - we shouldn't inherit the PurePath implementation
    • GH-110109: Churn pathlib.PurePath methods #112012
    • GH-110109: Add pathlib._PurePathBase #110670
  • Simplify/speed up path walking and globbing
    • GH-72904: Add glob.translate() function #106703
  • Add from_uri() classmethod
    • GH-107465: Add pathlib.Path.from_uri() classmethod. #107640

Phase 2: Experimental support in PyPI package

  • Move ABCs into pathlib._abc
    • GH-110109: Move pathlib ABCs to new pathlib._abc module. #112881
    • GH-110109: Move tests for pathlib ABCs to new module. #112904
  • Figure out the default value for pathmod, if any
    • GH-110109: pathlib tests: store base directory as test class attribute #113221
    • GH-110109: pathlib ABCs: do not vary path syntax by host OS. #113219
  • Publish PyPI package

Previous Discussion

https://discuss.python.org/t/make-pathlib-extensible/3428

Linked PRs

  • GH-110109: Simplify pathlib test setup #110308
  • GH-110109: pathlib docs: bring from_uri() and as_uri() together. #110312
  • [WIP] GH-110109: Make pathlib extensible #110321
  • GH-110109: Speed up pathlib._PathBase.resolve() #110412
  • GH-110109: Move tests for pathlib.Path.walk() into main test classes. #110655
  • GH-110109: Add pathlib._PurePathBase #110670
  • GH-110109: Churn pathlib.PurePath methods #112012
  • GH-110109: Fix misplaced tests for pathlib.WindowsPath.owner() and group() #112239
  • GH-110109: Test pure functionality of pathlib.Path user subclasses #112242
  • GH-110109: Move pathlib ABCs to new pathlib._abc module. #112881
  • gh-110109: Fix installed buildbots now pathlib is a package #112901
  • GH-110109: Move tests for pathlib ABCs to new module. #112904
  • GH-110109: pathlib ABCs: do not vary path syntax by host OS. #113219
  • GH-110109: pathlib tests: store base directory as test class attribute #113221
  • GH-110109: Drop use of new regex features in pathlib._abc. #113292
  • GH-110109: Fix misleading pathlib._abc.PurePathBase repr #113376
  • GH-110109: Adjust test_pathlib_abc imports to ease backporting #113411
  • GH-110109: pathlib ABCs: drop use of io.text_encoding() #113417
  • GH-110109: pathlib ABCs: drop use of warnings._deprecated() #113419
Reacted by Andreas Poehlmann, Brian Scholer, Marcelo Vaz, Reid D. McKenzie and Edgar Ramírez Mondragón

Activity

Next
  1. barneygale
    added
    type-featureA feature request or enhancementA feature request or enhancement
    topic-pathlib
    on Sep 29, 2023
  2. barneygale
    self-assigned this
    on Sep 29, 2023
  3. barneygale
    added 9 commits that reference this issue on Oct 3, 2023

    pythonGH-110109: Simplify pathlib test setup

    957e1bb

    pythonGH-110109: pathlib docs: bring `from_uri()` and `as_uri()` toge…

    ae5cc1b

    pythonGH-110109: Make pathlib extensible

    a3b2cad

    Merge branch 'main' into pythongh-110109-simplify-test-setup

    eb0298c

    pythonGH-110109: Speed up `pathlib._PathBase.resolve()`

    7321dbd

    Merge branch 'main' into pythongh-110109-simplify-test-setup

    ab5057a

    GH-110109: Simplify pathlib test setup (#110308)

    da0a68a

    pythonGH-110109: Move tests for `pathlib.Path.walk()` into main test …

    17511b3

    pythonGH-110109: Add `pathlib._PurePathBase`

    41a8de4
  4. barneygale
    added 2 commits that reference this issue on Oct 28, 2023

    GH-110109: Move tests for `pathlib.Path.walk()` into main test classe…

    81bc802

    Merge branch 'main' into pythongh-110109-purepathbase

    6489e4b
  5. iritkatriel
    added a commit that references this issue on Oct 29, 2023

    pythonGH-110109: Move tests for `pathlib.Path.walk()` into main test …

    5c9882e
  6. 77 remaining items

  7. Glyphack
    added 15 commits that reference this issue on Sep 2, 2024

    pythonGH-110109: Churn `pathlib.PurePath` methods (python#112012)

    0a59232

    pythonGH-110109: Speed up `pathlib._PathBase.resolve()` (python#110412)

    8d7ec2b

    pythonGH-110109: Fix misplaced tests for `pathlib.WindowsPath.owner()…

    17812ba

    pythonGH-110109: Test pure functionality of `pathlib.Path` user subcl…

    3956495

    pythonGH-110109: Add `pathlib._PurePathBase` (python#110670)

    b794582

    pythonGH-110109: Move pathlib ABCs to new `pathlib._abc` module. (pyt…

    e7c718b

    pythongh-110109: Fix installed buildbots now `pathlib` is a package (p…

    648e04b

    pythonGH-110109: Move tests for pathlib ABCs to new module. (python#1…

    6f2d606

    pythonGH-110109: pathlib tests: store base directory as test class at…

    7d648fc

    pythonGH-110109: Fix misleading `pathlib._abc.PurePathBase` repr (pyt…

    1b1f5b6

    pythonGH-110109: pathlib ABCs: do not vary path syntax by host OS. (p…

    14ad0b7

    pythonGH-110109: Adjust `test_pathlib_abc` imports to ease backporting (

    2c5863c

    pythonGH-110109: pathlib ABCs: drop use of `io.text_encoding()` (pyth…

    20dffcf

    pythonGH-110109: pathlib ABCs: drop use of `warnings._deprecated()` (p…

    31955c4

    pythonGH-110109: pathlib docs: bring `from_uri()` and `as_uri()` toge…

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

Metadata

Metadata

Assignees

  • @barneygale
    barneygale

Labels

stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-pathlibtype-featureA feature request or enhancementA feature request or enhancement

Projects

  • pathlib issues
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — 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.