Skip to content

Commit

Permalink
Support python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
rkhwaja committed Nov 23, 2023
1 parent f6606f2 commit a9ca76d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12.0"]

steps:
- uses: actions/checkout@v3
Expand All @@ -64,7 +64,7 @@ jobs:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
if: ${{needs.secrets.outputs.valid}} == 'true'
run: |
if python --version | grep -q 'Python 3.11' ; then
if python --version | grep -q 'Python 3.12' ; then
poe test
fi
- name: Coverage
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "fs.googledrivefs"
packages = [
{ include = "fs"}
]
version = "2.4.1"
version = "2.4.2"
description = "Pyfilesystem2 implementation for Google Drive"
authors = ["Rehan Khwaja <[email protected]>"]
license = "MIT"
Expand All @@ -18,7 +18,8 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]

[tool.poetry.dependencies]
Expand Down Expand Up @@ -55,7 +56,7 @@ coverage xml

[tool.ruff]
line-length = 200
ignore = ["ANN", "D", "DTZ", "EM102", "FBT002", "FIX", "I", "N", "PT009", "PT027", "PT013", "PTH", "S101", "TCH003", "TD", "TRY003", "W191"]
ignore = ["ANN", "D", "DTZ", "EM102", "ERA001", "FBT002", "FIX", "G004", "I", "N", "PT009", "PT027", "PT013", "PTH", "S101", "TCH003", "TD", "TRY003", "W191"]
select = ["ALL"]
target-version = "py37"

Expand Down
11 changes: 10 additions & 1 deletion tests/test_googledrivefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ def testserver(request):
yield server
server.stop()

class TestGoogleDriveFS(FSTestCases, TestCase):
class PyFsCompatLayer:
"""PyFilesystem2 Python 3.12 compatibility layer.
Adds a workaround for PyFilesystem2#568:
https://github.com/PyFilesystem/pyfilesystem2/issues/568
"""

assertRaisesRegexp = TestCase.assertRaisesRegex

class TestGoogleDriveFS(FSTestCases, TestCase, PyFsCompatLayer):
def make_fs(self):
self.fullFS = FullFS()
self.testSubdir = f'{_safeDirForTests}/{uuid4()}'
Expand Down

0 comments on commit a9ca76d

Please sign in to comment.