diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 704c1ca..3bcbe68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 5db9ce0..6a4db8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "MIT" @@ -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] @@ -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" diff --git a/tests/test_googledrivefs.py b/tests/test_googledrivefs.py index e734362..cc98279 100644 --- a/tests/test_googledrivefs.py +++ b/tests/test_googledrivefs.py @@ -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()}'