Closed wookayin closed 1 year ago
@wookayin, thanks so much for reporting that Python 3.11 was not working, and thanks for offering a PR! Unfortunately, Pathy relies on the base pathlib internals for glob matching, so it's not as simple as removing the _Accessor usage. I merged support for 3.11 today if you'd like to see how it had to change: https://github.com/justindujardin/pathy/commit/c2a0586c198a19cf6fcf81b41c60689af574db17
Ideally, we would not rely on the internals of pathlib at all, but that would require adding code to replace the wildcard matching scandir functionality in pathlib.Path. I haven't had time to do that work, but if you'd like to contribute that would be a very welcomed PR.
@justindujardin Thanks! Awesome to see more dedicated python3.11 support (#89).
Changes
pathlib._Accessor
.Python 3.11 has removed a non-public method
pathlib._Accessor
: https://github.com/python/cpython/pull/25701.Accessor-style classes in pathlib are discouraged, but a simple fix here to make pathy work is to simply remove the deprecated superclass
_Accessor
.