Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support python 3.12 #71

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.8, 3.9, "3.10", "3.11", "3.12.0"]

steps:
- uses: actions/checkout@v3
Expand All @@ -67,7 +67,7 @@ jobs:
XGITHUB_USERNAME: ${{ secrets.XGITHUB_USERNAME }}
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
13 changes: 5 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "fs.onedrivefs"
packages = [
{ include = "fs"}
]
version = "1.1.4"
version = "1.1.5"
description = "Pyfilesystem2 implementation for OneDrive using Microsoft Graph API"
authors = ["Rehan Khwaja <[email protected]>"]
license = "MIT"
Expand All @@ -14,23 +14,20 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.7",
"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]
python = ">=3.7,<4"
python = ">=3.8,<4"
# Need 2.0.5 for opendir factory parameter
# Need 2.0.6 because in 2.0.5, opener didn't work
# Need 2.4.13 for preserve_time flag
fs = ">=2.4.13,<3"
requests = ">=2.20"
urllib3 = [
{ version = ">=1.26", python = ">=3.10,<4" }
]
requests-oauthlib = ">=1.2.0"

[tool.poetry.dev-dependencies]
Expand Down Expand Up @@ -65,7 +62,7 @@ coverage xml

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

Expand Down
11 changes: 10 additions & 1 deletion tests/test_onedrivefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,16 @@ def test_opener_format():
assert isinstance(fs, SubFS), str(fs)
assert fs._sub_dir == f'/{_SAFE_TEST_DIR}' # noqa: SLF001

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