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 20, 2023
1 parent 6b81432 commit a1a6cd9
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 @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12.0"]

steps:
- uses: actions/checkout@v3
Expand All @@ -56,6 +56,6 @@ jobs:
DROPBOX_CREDENTIALS_FOR_CI: ${{ secrets.DROPBOX_CREDENTIALS_FOR_CI }}
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
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fs.dropboxfs"
version = "1.0.1"
version = "1.0.2"
description = "Pyfilesystem2 implementation for Dropbox"
authors = ["Rehan Khwaja <[email protected]>"]
license = "MIT"
Expand All @@ -15,7 +15,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 @@ -46,7 +47,7 @@ pytest -n 8 || exit 1

[tool.ruff]
line-length = 1000
ignore = ["ANN", "B011", "COM812", "D", "DTZ", "EM", "FBT002", "FIX", "G004", "I", "N802", "N806", "N816", "PLR0913", "PTH", "S101", "T201", "TD", "TRY003", "W191"]
ignore = ["ANN", "B011", "COM812", "D", "DTZ", "EM", "ERA001", "FBT002", "FIX", "G004", "I", "N802", "N806", "N815", "N816", "PLR0913", "PTH", "S101", "T201", "TD", "TRY003", "W191"]
select = ["ALL"]
target-version = "py38"

Expand Down
11 changes: 10 additions & 1 deletion tests/test_dropboxfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ def FullFS():
credentials = LoadCredentials()
return DropboxFS(refresh_token=credentials.get('refresh_token'), app_key=credentials.get('app_key'), app_secret=credentials.get('app_secret'))

class TestDropboxFS(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 TestDropboxFS(FSTestCases, TestCase, PyFsCompatLayer):
def make_fs(self):
self.fullFS = FullFS()
self.testSubdir = f'/tests/dropboxfs-test-{uuid4()}'
Expand Down

0 comments on commit a1a6cd9

Please sign in to comment.