Repository navigation
v0.9.6
Added
Path.glob(None)/rglob(None): expand the pattern the path itself
carries (LocalPath("/etc/*.conf").glob(None)), splitting at the first
wildcard.glob("")still raisesValueErroras pathlib does --None
is the spelling that cannot collide with a real pattern -- so this restores
what 0.9.4 removed as an explicit, supported form rather than by accident.Path.glob(native=)/rglob(native=), defaultTrue: follow the
running interpreter on the two rules pathlib changed mid-series. A
trailing/is ignored before 3.11 and selects directories only from
3.11; a component that merely contains**(a**) raisesValueError
before 3.13 and is a plain wildcard from 3.13.native=Falseapplies one
rule on every version instead, which is what a caller comparing results
across backends or interpreters wants.
Changed
glob()now matches the running interpreter exactly, including on
Python 3.9-3.12 where it previously applied its own rule for a trailing
/and fora**. Measured with a 46-comparison differential sweep
againstpathlib: 3.14 was already identical, and 3.9 went from 4
disagreements to 0. Passnative=Falsefor the previous, version-
independent behaviour;pathlib_next.testing's contract suite does.
Documentation
- Named the replacement for
glob(""), which 0.9.4 removed for pathlib
parity:pathlib_next.utils.glob.glob(path, recursive=...)expands a
pattern the path itself carries, splitting at the first wildcard. The
0.9.4 entry withdrew the capability without naming it, andPath.glob()'s
docstring documented theValueErrorbut not the alternative. Reported by
yaconfiglib, whosepath.glob("", recursive=...)calls stopped working.
Full Changelog: v0.9.5...v0.9.6