Skip to content

Commit dbc633e

Browse files
authored
Add support for Python 3.14 and drop EOL 3.9 (#1946)
1 parent 04a0c60 commit dbc633e

File tree

14 files changed

+33
-54
lines changed

14 files changed

+33
-54
lines changed

.github/workflows/main.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
PY:
17-
- "3.9"
1817
- "3.10"
1918
- "3.11"
2019
- "3.12"
2120
- "3.13"
21+
- "3.14"
2222

2323
env:
2424
CIRUN: true
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
with:
3030
fetch-depth: 0
3131

@@ -50,7 +50,7 @@ jobs:
5050

5151
steps:
5252
- name: Checkout
53-
uses: actions/checkout@v4
53+
uses: actions/checkout@v5
5454
with:
5555
fetch-depth: 0
5656

@@ -81,7 +81,7 @@ jobs:
8181

8282
steps:
8383
- name: Checkout
84-
uses: actions/checkout@v4
84+
uses: actions/checkout@v5
8585
with:
8686
fetch-depth: 0
8787

@@ -124,7 +124,7 @@ jobs:
124124

125125
steps:
126126
- name: Checkout
127-
uses: actions/checkout@v4
127+
uses: actions/checkout@v5
128128

129129
- name: Setup conda
130130
uses: conda-incubator/setup-miniconda@v3
@@ -145,5 +145,5 @@ jobs:
145145
shell: bash -l {0}
146146
run: |
147147
cd ${{ matrix.FRIEND }}
148-
pytest -v
148+
pytest -v -W ignore::pytest.PytestRemovedIn9Warning
149149
cd ..

.github/workflows/pypipublish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
- name: Set up Python
13-
uses: actions/setup-python@v4
13+
uses: actions/setup-python@v6
1414
with:
1515
python-version: "3.x"
1616
- name: Install dependencies

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ CI runtime. For local use, pick a version suitable for you.
4747

4848
```bash
4949
# For a new environment (mamba / conda).
50-
mamba create -n fsspec -c conda-forge python=3.9 -y
50+
mamba create -n fsspec -c conda-forge python=3.10 -y
5151
conda activate fsspec
5252

5353
# Standard dev install with docs and tests.

docs/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ name: fsspec
22
channels:
33
- defaults
44
dependencies:
5-
- python=3.9
5+
- python=3.10

fsspec/caching.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,11 @@
88
import threading
99
import warnings
1010
from collections import OrderedDict
11+
from collections.abc import Callable
1112
from concurrent.futures import Future, ThreadPoolExecutor
1213
from itertools import groupby
1314
from operator import itemgetter
14-
from typing import (
15-
TYPE_CHECKING,
16-
Any,
17-
Callable,
18-
ClassVar,
19-
Generic,
20-
NamedTuple,
21-
TypeVar,
22-
)
15+
from typing import TYPE_CHECKING, Any, ClassVar, Generic, NamedTuple, TypeVar
2316

2417
if TYPE_CHECKING:
2518
import mmap

fsspec/implementations/cache_metadata.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515

1616
if TYPE_CHECKING:
1717
from collections.abc import Iterator
18-
from typing import Any, Literal
19-
20-
from typing_extensions import TypeAlias
18+
from typing import Any, Literal, TypeAlias
2119

2220
from .cached import CachingFileSystem
2321

fsspec/implementations/cached.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
import tempfile
77
import time
88
import weakref
9+
from collections.abc import Callable
910
from shutil import rmtree
10-
from typing import TYPE_CHECKING, Any, Callable, ClassVar
11+
from typing import TYPE_CHECKING, Any, ClassVar
1112

1213
from fsspec import filesystem
1314
from fsspec.callbacks import DEFAULT_CALLBACK

fsspec/implementations/data.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import base64
22
import io
3-
from typing import Optional
43
from urllib.parse import unquote
54

65
from fsspec import AbstractFileSystem
@@ -50,7 +49,7 @@ def _open(
5049
return io.BytesIO(self.cat_file(path))
5150

5251
@staticmethod
53-
def encode(data: bytes, mime: Optional[str] = None):
52+
def encode(data: bytes, mime: str | None = None):
5453
"""Format the given data into data-URL syntax
5554
5655
This version always base64 encodes, even when the data is ascii/url-safe.

fsspec/implementations/libarchive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def _open(
195195
if mode != "rb":
196196
raise NotImplementedError
197197

198-
data = bytes()
198+
data = b""
199199
with self._open_archive() as arc:
200200
for entry in arc:
201201
if entry.pathname != path:

fsspec/implementations/reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def create(root, storage_options=None, fs=None, record_size=10000, **kwargs):
219219
fs.pipe("/".join([root, ".zmetadata"]), json.dumps(met).encode())
220220
return LazyReferenceMapper(root, fs, **kwargs)
221221

222-
@lru_cache()
222+
@lru_cache
223223
def listdir(self):
224224
"""List top-level directories"""
225225
dirs = (p.rsplit("/", 1)[0] for p in self.zmetadata if not p.startswith(".z"))

0 commit comments

Comments
 (0)