Skip to content

Commit 2e32b76

Browse files
committed
Add official support for Python 3.14
- enable all CI tests for Python 3.14 (except for tests needing pyarrow)
1 parent 1249ae6 commit 2e32b76

File tree

6 files changed

+37
-16
lines changed

6 files changed

+37
-16
lines changed

.github/workflows/testsuite.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,12 @@ jobs:
8686
fi
8787
shell: bash
8888
- name: Install extra dependencies
89-
if: ${{ matrix.python-version != '3.14' }}
9089
run: |
9190
pip install -r extra_requirements.txt
9291
pip install -r legacy_requirements.txt
9392
pip install zstandard cffi # needed to test #910
9493
shell: bash
9594
- name: Run unit tests with extra packages as non-root user
96-
if: ${{ matrix.python-version != '3.14' }}
9795
run: |
9896
export PYTHON_ZSTANDARD_IMPORT_POLICY=cffi # needed to test #910
9997
python -m pyfakefs.tests.all_tests
@@ -115,7 +113,27 @@ jobs:
115113
matrix:
116114
os: [ubuntu-latest, macOS-latest, windows-latest]
117115
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
118-
pytest-version: [6.2.5, 7.0.1, 7.4.4, 8.0.2, 8.3.4]
116+
pytest-version: [6.2.5, 7.0.1, 7.4.4, 8.0.2, 8.4.2]
117+
include:
118+
- python-version: "3.14"
119+
pytest-version: 8.4.2
120+
os: ubuntu-latest
121+
- python-version: "3.14"
122+
pytest-version: 8.4.2
123+
os: macOS-latest
124+
- python-version: "3.14"
125+
pytest-version: 8.4.2
126+
os: windows-latest
127+
exclude:
128+
- python-version: "3.8"
129+
pytest-version: 8.4.2
130+
os: ubuntu-latest
131+
- python-version: "3.8"
132+
pytest-version: 8.4.2
133+
os: macOS-latest
134+
- python-version: "3.8"
135+
pytest-version: 8.4.2
136+
os: windows-latest
119137
steps:
120138
- uses: actions/checkout@v5
121139
- name: Set up Python ${{ matrix.python-version }}
@@ -127,9 +145,14 @@ jobs:
127145
python -m pip install --upgrade pip
128146
python -m pip install -r requirements.txt
129147
python -m pip install -U pytest==${{ matrix.pytest-version }}
130-
python -m pip install pandas parquet pyarrow
148+
python -m pip install pandas parquet
131149
python -m pip install -e .
132150
shell: bash
151+
- name: Install pyarrow (not yet supported by 3.14)
152+
if: ${{ matrix.python-version != '3.14' }}
153+
run: |
154+
python -m pip install pyarrow
155+
shell: bash
133156
- name: Run pytest tests
134157
run: |
135158
echo "$(python -m pytest pyfakefs/pytest_tests/pytest_plugin_failing_helper.py)" > ./testresult.txt

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The released versions correspond to PyPI releases.
1919
* the `errno` codes set in `OSError` have changed for some specific error conditions
2020
in Windows 11/Windows Server 2025; pyfakefs now matches this behavior
2121
instead of the previous behavior under Windows 10
22+
* added official support for Python 3.14
2223

2324
### Enhancements
2425
* added support for `os.readinto` in Python 3.14

docs/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Continuous Integration
162162
......................
163163

164164
``pyfakefs`` is currently automatically tested on Linux, macOS and Windows, with
165-
Python 3.7 to 3.13, and with PyPy3 on Linux, using
165+
Python 3.7 to 3.14, and with PyPy3 on Linux, using
166166
`GitHub Actions <https://github.com/pytest-dev/pyfakefs/actions>`__.
167167

168168
On the command line

pyfakefs/pytest_tests/pytest_reload_pandas_test.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,29 @@
22
Ensures that reloading the `pandas.core.arrays.arrow.extension_types` module succeeds.
33
"""
44

5+
import sys
56
from pathlib import Path
67

78
import pytest
89

910
try:
1011
import pandas as pd
11-
except ImportError:
12-
pd = None
13-
14-
try:
1512
import parquet
1613
except ImportError:
14+
pd = None
1715
parquet = None
1816

1917

20-
@pytest.mark.skipif(
21-
pd is None or parquet is None, reason="pandas or parquet not installed"
22-
)
18+
@pytest.mark.skipif(pd is None, reason="pandas or parquet not installed")
19+
@pytest.mark.skipif(sys.version_info >= (3, 14), reason="parquet not available yet")
2320
def test_1(fs):
2421
dir_ = Path(__file__).parent / "data"
2522
fs.add_real_directory(dir_)
2623
pd.read_parquet(dir_ / "test.parquet")
2724

2825

29-
@pytest.mark.skipif(
30-
pd is None or parquet is None, reason="pandas or parquet not installed"
31-
)
26+
@pytest.mark.skipif(pd is None, reason="pandas or parquet not installed")
27+
@pytest.mark.skipif(sys.version_info >= (3, 14), reason="parquet not available yet")
3228
def test_2():
3329
dir_ = Path(__file__).parent / "data"
3430
pd.read_parquet(dir_ / "test.parquet")

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ classifiers = [
3030
"Programming Language :: Python :: 3.11",
3131
"Programming Language :: Python :: 3.12",
3232
"Programming Language :: Python :: 3.13",
33+
"Programming Language :: Python :: 3.14",
3334
"Programming Language :: Python :: Implementation :: CPython",
3435
"Programming Language :: Python :: Implementation :: PyPy",
3536
"Operating System :: POSIX",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{37,38,39,310,311,312,313}
3+
py{37,38,39,310,311,312,313,314}
44
pypy{37,39,310}
55

66
[testenv]

0 commit comments

Comments
 (0)