Registry / serialization / pathlib3x

pathlib3x

JSON →
library2.0.3pypypi✓ verified 91d ago

A backport of Python 3.10's pathlib module to Python 3.6-3.9 (now 3.8+) with a few extensions. It aims to provide a pure-Python drop-in replacement for pathlib.Path with additional features like globbing and pattern matching from later versions. Current version: 2.0.3, release cadence is low.

pip install pathlib3x
INSTALL
IMPORT
SIG · PATHLIB3X
P
pathlib3x
serializationpythonv2.0.3
Install
2.9s avg
Import
45ms
Disk
31MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v2.0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.046s · 32.2MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 2.9s · import 0.044s · 33MB
31MB installed
● package 31MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Path
✓ from pathlib3x import Path
✗ from pathlib import Path
Standard library pathlib is different, especially on older Python versions.

Basic usage mimicking pathlib with extended features.

from pathlib3x import Path p = Path('/tmp') print(p.exists()) # Using extended features (e.g., glob with pattern matching) for f in p.glob('**/*.txt'): print(f)
Debug
Known issues
deprecatedPython 3.10+ users: pathlib3x is unnecessary; use the standard library.
fix
Remove pathlib3x dependency and use `from pathlib import Path`.
affects: >=3.10
gotchapathlib3x is pure Python, not implemented in C like the stdlib pathlib. Performance may be notably slower for large directory trees.
fix
If performance is critical, consider using `pathlib` from stdlib or `scandir`.
affects: all
breakingpathlib3x 2.0.0 dropped Python 3.6 and 3.7 support. Only 3.8+ is supported.
fix
Update Python to 3.8+ if pinned to pathlib3x>=2.0.0.
affects: >=2.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pathlib3x'
Package not installed or environment mismatch.
fix
Run `pip install pathlib3x` in the correct environment.
AttributeError: module 'pathlib' has no attribute 'Path'
Mistakenly imported stdlib pathlib instead of pathlib3x.
fix
Use `from pathlib3x import Path` instead of `from pathlib import Path`.
Upgrade
Version history
2.0.3latest on PyPI · released Jul 20, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
pathlib3x — pip install pathlib3x · libregistry