Skip to content

Commit 5315c70

Browse files
authored
Add support for Python 3.14 and drop EOL 3.9 (#709)
1 parent 45953e2 commit 5315c70

File tree

10 files changed

+19
-26
lines changed

10 files changed

+19
-26
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
17+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1818

1919
steps:
2020
- name: Checkout source
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222

2323
- name: Setup conda
2424
uses: conda-incubator/setup-miniconda@v3
@@ -47,8 +47,8 @@ jobs:
4747
name: lint
4848
runs-on: ubuntu-latest
4949
steps:
50-
- uses: actions/checkout@v4
51-
- uses: actions/setup-python@v4
50+
- uses: actions/checkout@v5
51+
- uses: actions/setup-python@v6
5252
with:
5353
python-version: "3.11"
54-
- uses: pre-commit/[email protected].0
54+
- uses: pre-commit/[email protected].1

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
exclude: versioneer.py
44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.4.0
6+
rev: v6.0.0
77
hooks:
88
- id: end-of-file-fixer
99
- id: requirements-txt-fixer
1010
- id: trailing-whitespace
11-
- repo: https://github.com/psf/black
12-
rev: 22.10.0
11+
- repo: https://github.com/psf/black-pre-commit-mirror
12+
rev: 25.11.0
1313
hooks:
1414
- id: black
1515
args:
16-
- --target-version=py37
16+
- --target-version=py310
1717
- repo: https://github.com/pycqa/flake8
18-
rev: 6.0.0
18+
rev: 7.3.0
1919
hooks:
2020
- id: flake8
2121
- repo: https://github.com/asottile/seed-isort-config
2222
rev: v2.2.0
2323
hooks:
2424
- id: seed-isort-config
2525
- repo: https://github.com/pre-commit/mirrors-isort
26-
rev: v5.7.0
26+
rev: v5.10.1
2727
hooks:
2828
- id: isort

docs/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: s3fs
22
channels:
33
- defaults
44
dependencies:
5-
- python= 3.9
5+
- python= 3.10
66
- docutils<0.17
77
- sphinx
88
- sphinx_rtd_theme

gcsfs/checkers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import base64
22
from base64 import b64encode
33
from hashlib import md5
4-
from typing import Optional
54

65
from .retry import ChecksumError
76

@@ -104,7 +103,7 @@ def validate_http_response(self, r):
104103
return self.validate_headers(r.headers)
105104

106105

107-
def get_consistency_checker(consistency: Optional[str]) -> ConsistencyChecker:
106+
def get_consistency_checker(consistency: str | None) -> ConsistencyChecker:
108107
if consistency == "size":
109108
return SizeChecker()
110109
elif consistency == "md5":

gcsfs/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def _coalesce_generation(*args):
146146
if len(generations) > 1:
147147
raise ValueError(
148148
"Cannot coalesce generations where more than one are defined,"
149-
" {}".format(generations)
149+
f" {generations}"
150150
)
151151
elif len(generations) == 0:
152152
return None

gcsfs/inventory_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ def _convert_str_to_datetime(str):
623623
return datetime.fromisoformat(str.replace("Z", "+00:00"))
624624

625625

626-
class InventoryReportConfig(object):
626+
class InventoryReportConfig:
627627
"""
628628
Represents the configuration for fetching inventory reports.
629629

gcsfs/tests/test_fuse.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import logging
22
import os
3-
import sys
43
import tempfile
54
import threading
65
import time
@@ -11,7 +10,6 @@
1110
from gcsfs.tests.settings import TEST_BUCKET
1211

1312

14-
@pytest.mark.timeout(180)
1513
@pytest.fixture
1614
def fsspec_fuse_run():
1715
"""Fixture catches other errors on fuse import."""
@@ -26,7 +24,6 @@ def fsspec_fuse_run():
2624
pytest.skip("Error importing fuse.")
2725

2826

29-
@pytest.mark.skipif(sys.version_info < (3, 9), reason="Test fuse causes hang.")
3027
@pytest.mark.xfail(reason="Failing test not previously tested.")
3128
@pytest.mark.timeout(180)
3229
def test_fuse(gcs, fsspec_fuse_run):
@@ -40,7 +37,7 @@ def test_fuse(gcs, fsspec_fuse_run):
4037
timeout = 20
4138
n = 40
4239
for i in range(n):
43-
logging.debug(f"Attempt # {i+1}/{n} to create lock file.")
40+
logging.debug(f"Attempt # {i + 1}/{n} to create lock file.")
4441
try:
4542
open(os.path.join(mountpath, "lock"), "w").close()
4643
os.remove(os.path.join(mountpath, "lock"))

gcsfs/tests/test_inventory_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from gcsfs.inventory_report import InventoryReport, InventoryReportConfig
99

1010

11-
class TestInventoryReport(object):
11+
class TestInventoryReport:
1212
"""
1313
Unit tests for the inventory report logic, see 'inventory_report.py'.
1414

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ versionfile_source = gcsfs/_version.py
55
versionfile_build = gcsfs/_version.py
66
tag_prefix =
77

8-
[bdist_wheel]
9-
universal=1
10-
118
[flake8]
129
exclude = versioneer.py,docs/source/conf.py
1310
ignore =

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
"Intended Audience :: Developers",
1919
"License :: OSI Approved :: BSD License",
2020
"Operating System :: OS Independent",
21-
"Programming Language :: Python :: 3.9",
2221
"Programming Language :: Python :: 3.10",
2322
"Programming Language :: Python :: 3.11",
2423
"Programming Language :: Python :: 3.12",
2524
"Programming Language :: Python :: 3.13",
25+
"Programming Language :: Python :: 3.14",
2626
],
2727
keywords=["google-cloud-storage", "gcloud", "file-system"],
2828
packages=["gcsfs", "gcsfs.cli"],
2929
install_requires=[open("requirements.txt").read().strip().split("\n")],
3030
extras_require={"gcsfuse": ["fusepy"], "crc": ["crcmod"]},
31-
python_requires=">=3.9",
31+
python_requires=">=3.10",
3232
long_description_content_type="text/markdown",
3333
long_description=open("README.md").read(),
3434
zip_safe=False,

0 commit comments

Comments
 (0)