diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3dabe55..fb2eb70 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,12 +22,14 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] pyv: ['3.9', '3.10', '3.11', '3.12', '3.13'] - fsspec: [''] + session: ['tests'] include: - os: ubuntu-latest pyv: '3.9' - fsspec: 'minversion' + session: 'tests-minversion' + - os: ubuntu-latest + pyv: '3.14' steps: - name: Check out the repository @@ -35,20 +37,13 @@ jobs: with: fetch-depth: 0 - - name: Set up Python ${{ matrix.pyv }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.pyv }} - allow-prereleases: true - - - name: Upgrade pip and nox - run: | - python -m pip install --upgrade pip nox - pip --version - nox --version + - uses: hynek/setup-cached-uv@v2 - name: Run tests - run: nox -s tests-${{ matrix.fsspec || matrix.pyv }} -- --cov-report=xml + env: + SESSION: ${{ matrix.session }} + PYTHON: ${{ matrix.pyv }} + run: uvx nox --sessions $SESSION --python $PYTHON -- --cov-report=xml typesafety: runs-on: ubuntu-latest diff --git a/noxfile.py b/noxfile.py index 0fbfd66..cc5b11f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -6,16 +6,24 @@ import nox nox.options.reuse_existing_virtualenvs = True +nox.options.error_on_external_run = True + +nox.needs_version = ">=2024.3.2" +nox.options.default_venv_backend = "uv|virtualenv" + nox.options.sessions = "lint", "tests" locations = ("upath",) running_in_ci = os.environ.get("CI", "") != "" -@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"]) +@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]) def tests(session: nox.Session) -> None: # workaround in case no aiohttp binary wheels are available - session.env["AIOHTTP_NO_EXTENSIONS"] = "1" - session.install(".[tests,dev]") + if session.python == "3.14": + session.env["AIOHTTP_NO_EXTENSIONS"] = "1" + session.install(".[tests,dev]") + else: + session.install(".[tests,dev,dev-third-party]") session.run("python", "-m", "pip", "freeze", silent=not running_in_ci) session.run( "pytest", @@ -90,13 +98,13 @@ def black(session): @nox.session def type_checking(session): - session.install("-e", ".[tests]") + session.install("-e", ".[typechecking]") session.run("python", "-m", "mypy") @nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"]) def typesafety(session): - session.install("-e", ".[tests]") + session.install("-e", ".[tests,typechecking]") session.run( "python", "-m", diff --git a/pyproject.toml b/pyproject.toml index aec91be..1545e36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Development Status :: 4 - Beta", ] keywords = ["filesystem-spec", "pathlib"] @@ -40,27 +41,29 @@ tests = [ "pytest-cov >=4.1.0", "pytest-mock >=3.12.0", "pylint >=2.17.4", + "packaging", +] +typechecking = [ "mypy >=1.10.0", "pytest-mypy-plugins >=3.1.2", - "packaging", ] dev = [ - "adlfs>=2024", - "aiohttp", - "requests", - "gcsfs>=2024.5.0", - "s3fs>=2024.5.0", - "moto[s3,server]", + "fsspec[adl,http,github,gcs,s3,ssh,smb] >=2024.5.0", + "s3fs >=2024.5.0", + "gcsfs >=2024.5.0", + "adlfs >=2024", "webdav4[fsspec]", - "paramiko", + # testing + "moto[s3,server]", "wsgidav", "cheroot", # "hadoop-test-cluster", # "pyarrow", + "typing_extensions; python_version<'3.11'", +] +dev-third-party = [ "pydantic", "pydantic-settings", - "smbprotocol", - "typing_extensions; python_version<'3.11'", ] [project.urls]