Skip to content

Commit d80b655

Browse files
Merge branch 'master' of github.com:fsspec/filesystem_spec into patch-1
2 parents 29e2ae8 + dae0e80 commit d80b655

File tree

17 files changed

+124
-60
lines changed

17 files changed

+124
-60
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

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ repos:
1313
- id: check-json
1414
- id: check-yaml
1515
- repo: https://github.com/astral-sh/ruff-pre-commit
16-
rev: v0.12.2
16+
rev: v0.14.3
1717
hooks:
18-
# Run the linter.
1918
- id: ruff-check
2019
args: [ --fix, "--show-fixes"]
2120
- id: ruff-format

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/arrow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ def modified(self, path):
205205
return self.fs.get_file_info(path).mtime
206206

207207
def cat_file(self, path, start=None, end=None, **kwargs):
208-
kwargs["seekable"] = start not in [None, 0]
208+
kwargs.setdefault("seekable", start not in [None, 0])
209209
return super().cat_file(path, start=None, end=None, **kwargs)
210210

211211
def get_file(self, rpath, lpath, **kwargs):
212-
kwargs["seekable"] = False
212+
kwargs.setdefault("seekable", False)
213213
super().get_file(rpath, lpath, **kwargs)
214214

215215

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.

0 commit comments

Comments
 (0)