Skip to content

Commit

Permalink
feat(python): support python 3.11
Browse files Browse the repository at this point in the history
 - drop the use of _Accessor class from the internals of pathlib. It was removed in python 3.11 which broke... everything.
 - Detect python < 3.11 and provide the base needed accessor method "scandir"
 - Detect python >= 3.11 and provide the Path._scandir function
 - Move accessor methods to the Pathy class
 - Remove a few _accessor tests, and update those that referenced the accessor directly
 - TODO: Remove the use of pathlib scandir entirely, and replace it with an inlined glob matching system to provide this functionality. This is the only tech debt the project has left at this point that I can see.

BREAKING CHANGE: Pathy.exists() no longer enumerates buckets if given a path with no root.
  • Loading branch information
justindujardin authored Nov 15, 2022
1 parent 048cd51 commit c2a0586
Show file tree
Hide file tree
Showing 13 changed files with 201 additions and 240 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.6, 3.11]

runs-on: ${{ matrix.os }}
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ ENV/
env.bak/
venv.bak/
env3.7/
.py311env

# mypy
.mypy_cache/
Expand Down
Loading

0 comments on commit c2a0586

Please sign in to comment.