Skip to content

Commit e5050cc

Browse files
authored
cut release 0.3.0 (#412)
* upath: update README with new class diagram * tests: enable tests for 3.14 for all os-es * typechecking: run tests on 3.14 too * update changelog * ci: add 3.14 to typesafety runs * ci: run typesafety via uvx nox
1 parent 6aaa91e commit e5050cc

File tree

4 files changed

+90
-40
lines changed

4 files changed

+90
-40
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [ubuntu-latest, windows-latest, macos-latest]
24-
pyv: ['3.9', '3.10', '3.11', '3.12', '3.13']
24+
pyv: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
2525
session: ['tests']
2626

2727
include:
2828
- os: ubuntu-latest
2929
pyv: '3.9'
3030
session: 'tests-minversion'
31-
- os: ubuntu-latest
32-
pyv: '3.14'
3331

3432
steps:
3533
- name: Check out the repository
@@ -44,26 +42,21 @@ jobs:
4442

4543
typesafety:
4644
runs-on: ubuntu-latest
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
pyv: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
4749

4850
steps:
49-
- name: Check out the repository
50-
uses: actions/checkout@v4
51-
52-
- name: Set up Python
53-
uses: actions/setup-python@v5
54-
with:
55-
python-version: |
56-
3.9
57-
3.10
58-
3.11
59-
3.12
60-
3.13
61-
62-
- name: Install nox
63-
run: python -m pip install --upgrade nox
64-
65-
- name: Run typesafety checks
66-
run: nox -s typesafety
51+
- name: Check out the repository
52+
uses: actions/checkout@v4
53+
with:
54+
fetch-depth: 0
55+
56+
- uses: hynek/setup-cached-uv@v2
57+
58+
- name: Run tests
59+
run: uvx nox --sessions typesafety --python ${{ matrix.pyv }}
6760

6861
lint:
6962
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99
...
1010

11+
## [0.3.0] - 2025-09-29
12+
### Fixed
13+
- upath: support relative paths (#405)
14+
- upath: implement chain functionality (#346)
15+
- upath: fix upath suffixes (#407)
16+
- upath: update flavours (#350, #351, #400, #403, #411)
17+
- upath: fix GH test skipping (#361)
18+
- ci: update ubuntu runners (#359)
19+
- ci: address skip_existing deprecation (#369)
20+
- tests: split protocol mismatch test (#365)
21+
- tests: ensure non-local upaths raise with builtin open (#368)
22+
- tests: add an xfail test for // behaviour on s3 (#370)
23+
- tests: fix xfail call args (#409)
24+
- tests: add a os.PathLike test (#410)
25+
26+
### Added
27+
- upath: api extensions via `upath.extensions.ProxyUPath` (#372)
28+
- upath: add upath.types in preparation for deriving from pathlib-abc (#364)
29+
- upath: add optional support for pydantic (#395)
30+
- upath: list late registered protocols (#358)
31+
- repo: add a security policy (#327)
32+
- ci: start running against 3.14 (#363)
33+
34+
### Changed
35+
- upath: inherit from `pathlib_abc.ReadablePath` and `pathlib_abc.WritablePath` (#366, #402, #404)
36+
- upath: drop Python 3.8 (#360)
37+
- upath: remove deprecated accessor support (#362)
38+
1139
## [0.2.6] - 2024-12-13
1240
### Fixed
1341
- upath: add support for 'abfss' protocol in WrappedFileSystemFlavour (#311)
@@ -183,7 +211,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
183211
### Added
184212
- started a changelog to keep track of significant changes
185213

186-
[Unreleased]: https://github.com/fsspec/universal_pathlib/compare/v0.2.6...HEAD
214+
[Unreleased]: https://github.com/fsspec/universal_pathlib/compare/v0.3.0...HEAD
215+
[0.3.0]: https://github.com/fsspec/universal_pathlib/compare/v0.2.6...v0.3.0
187216
[0.2.6]: https://github.com/fsspec/universal_pathlib/compare/v0.2.5...v0.2.6
188217
[0.2.5]: https://github.com/fsspec/universal_pathlib/compare/v0.2.4...v0.2.5
189218
[0.2.4]: https://github.com/fsspec/universal_pathlib/compare/v0.2.3...v0.2.4

README.md

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
[![Codestyle black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
1111
[![Changelog](https://img.shields.io/badge/changelog-Keep%20a%20Changelog-%23E05735)](./CHANGELOG.md)
1212

13-
Universal Pathlib is a Python library that extends the [`pathlib.Path`][pathlib]
14-
API to support a variety of backend filesystems via [`filesystem_spec`][fsspec].
13+
Universal Pathlib is a Python library that extends the
14+
[`pathlib_abc.JoinablePath`][pathlib_abc] API to provide a
15+
[`pathlib.Path`][pathlib]-like interface for a variety of backend filesystems
16+
via [`filesystem_spec`][fsspec].
1517

18+
[pathlib_abc]: https://github.com/barneygale/pathlib-abc
1619
[pathlib]: https://docs.python.org/3/library/pathlib.html
1720
[fsspec]: https://filesystem-spec.readthedocs.io/en/latest/intro.html
1821

@@ -44,9 +47,9 @@ project as a dependency if you want to use it with `s3` and `http` filesystems:
4447
```toml
4548
[project]
4649
name = "myproject"
47-
requires-python = ">=3.8"
50+
requires-python = ">=3.9"
4851
dependencies = [
49-
"universal_pathlib>=0.2.5",
52+
"universal_pathlib>=0.3.0",
5053
"fsspec[s3,http]",
5154
]
5255
```
@@ -106,33 +109,51 @@ And of course, contributions for new filesystems are welcome!
106109

107110
### Class hierarchy
108111

109-
The class hierarchy for `UPath` implementations and their relation to the stdlib
110-
`pathlib` classes are visualized in the following diagram:
112+
The class hierarchy for `UPath` implementations and their relation to base classes
113+
in `pathlib_abc` and the stdlib `pathlib` classes are visualized in the following
114+
diagram:
111115

112116
```mermaid
113117
flowchart TB
118+
119+
subgraph p0[pathlib_abc]
120+
X ----> Y
121+
X ----> Z
122+
end
123+
114124
subgraph s0[pathlib]
115-
A---> B
125+
X --> A
126+
127+
A----> B
116128
A--> AP
117129
A--> AW
118130
131+
Y --> B
132+
Z --> B
133+
119134
B--> BP
120-
AP---> BP
135+
AP----> BP
121136
B--> BW
122-
AW---> BW
137+
AW----> BW
123138
end
124139
subgraph s1[upath]
125-
B ---> U
140+
Y ---> U
141+
Z ---> U
142+
126143
U --> UP
127144
U --> UW
128-
BP --> UP
129-
BW --> UW
145+
BP ---> UP
146+
BW ---> UW
130147
U --> UL
131148
U --> US3
132149
U --> UH
133150
U -.-> UO
134151
end
135152
153+
X(JoinablePath)
154+
Y(WritablePath)
155+
Z(ReadablePath)
156+
136157
A(PurePath)
137158
AP(PurePosixPath)
138159
AW(PureWindowsPath)
@@ -148,14 +169,17 @@ flowchart TB
148169
UH(HttpPath)
149170
UO(...Path)
150171
172+
classDef na fill:#f7f7f7,stroke:#02a822,stroke-width:2px,color:#333
151173
classDef np fill:#f7f7f7,stroke:#2166ac,stroke-width:2px,color:#333
152174
classDef nu fill:#f7f7f7,stroke:#b2182b,stroke-width:2px,color:#333
153175
176+
class X,Y,Z na
154177
class A,AP,AW,B,BP,BW,UP,UW np
155178
class U,UL,US3,UH,UO nu
156179
157180
style UO stroke-dasharray: 3 3
158181
182+
style p0 fill:none,stroke:#0a2,stroke-width:3px,stroke-dasharray:3,color:#0a2
159183
style s0 fill:none,stroke:#07b,stroke-width:3px,stroke-dasharray:3,color:#07b
160184
style s1 fill:none,stroke:#d02,stroke-width:3px,stroke-dasharray:3,color:#d02
161185
```
@@ -170,16 +194,20 @@ correct behavior for filesystems that are not tested in the test-suite.
170194

171195
### Local paths and url paths
172196

173-
If a local path is provided `UPath` will return a `PosixUPath` or `WindowsUPath`
174-
instance. These two implementations are 100% compatible with the `PosixPath` and
175-
`WindowsPath` classes of their specific Python version. They're tested against a
176-
large subset of the CPython pathlib test-suite to ensure compatibility.
197+
If a local path is without protocol is provided `UPath` will return a `PosixUPath`
198+
or `WindowsUPath` instance. These two implementations are 100% compatible with
199+
the `PosixPath` and `WindowsPath` classes of their specific Python version.
200+
They're tested against a large subset of the CPython pathlib test-suite to ensure
201+
compatibility.
177202

178203
If a local urlpath is provided, i.e. a "file://" or "local://" URI, the returned
179204
instance type will be a `FilePath` instance. This class is a subclass of `UPath`
180205
that provides file access via `LocalFileSystem` from `fsspec`. You can use it to
181206
ensure that all your local file access is done through `fsspec` as well.
182207

208+
All local UPath types are `os.PathLike`, but only the `PosixUPath` and
209+
`WindowsUPath` are subclasses of `pathlib.Path`.
210+
183211
### UPath public class API
184212

185213
The public class interface of `UPath` extends `pathlib.Path` via attributes that

noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ def type_checking(session):
102102
session.run("python", "-m", "mypy")
103103

104104

105-
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"])
105+
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"])
106106
def typesafety(session):
107-
session.install("-e", ".[tests,typechecking]")
107+
session.install("-e", ".[typechecking]")
108108
session.run(
109109
"python",
110110
"-m",

0 commit comments

Comments
 (0)