Skip to content

Commit deffca0

Browse files
authored
Merge pull request #220 from valkey-io/mkmkme/3.14
Add Python 3.14 and pypy-3.11 to CI, drop Python 3.9 and pypy-3.9
2 parents f991654 + eba0583 commit deffca0

File tree

8 files changed

+17
-57
lines changed

8 files changed

+17
-57
lines changed

.github/workflows/docs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ jobs:
2828
- uses: actions/checkout@v4
2929
- uses: actions/setup-python@v5
3030
with:
31-
python-version: 3.9
31+
# Set the python version to 3.12 to keep imghdr for sphinx.
32+
# TODO: update sphinx to remove imghdr dependency
33+
python-version: 3.12
3234
cache: 'pip'
3335
- name: install deps
3436
run: |

.github/workflows/install_and_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [ -d ${DESTENV} ]; then
1919
fi
2020
python -m venv ${DESTENV}
2121
source ${DESTENV}/bin/activate
22-
pip install --upgrade --quiet pip
22+
pip install --upgrade --quiet pip setuptools wheel
2323
pip install --quiet -r dev_requirements.txt
2424
invoke devenv
2525
invoke package

.github/workflows/integration.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/checkout@v4
4444
- uses: actions/setup-python@v5
4545
with:
46-
python-version: 3.9
46+
python-version: 3.13
4747
cache: 'pip'
4848
- name: run code linters
4949
run: |
@@ -89,7 +89,7 @@ jobs:
8989
max-parallel: 15
9090
fail-fast: false
9191
matrix:
92-
python-version: ['3.9', '3.10', '3.11', '3.11.1', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10']
92+
python-version: ['3.10', '3.11', '3.11.1', '3.12', '3.13', '3.14-dev', 'pypy-3.10', 'pypy-3.11']
9393
test-type: ['standalone', 'cluster']
9494
connection-type: ['libvalkey', 'plain']
9595
protocol-version: ['2','3']
@@ -128,7 +128,9 @@ jobs:
128128
./util/wait-for-it.sh localhost:16379
129129
fi
130130
invoke ${{matrix.test-type}}-tests --protocol=${{ matrix.protocol-version }}
131-
if [[ "${{matrix.python-version}}" != pypy-* ]]; then
131+
# TODO: remove check for 3.14 once it's fixed
132+
# https://github.com/MagicStack/uvloop/issues/637
133+
if [[ "${{matrix.python-version}}" != pypy-* && "${{matrix.python-version}}" != "3.14-dev" ]]; then
132134
invoke ${{matrix.test-type}}-tests --uvloop --protocol=${{ matrix.protocol-version }}
133135
fi
134136
@@ -157,7 +159,7 @@ jobs:
157159
- uses: actions/checkout@v4
158160
- uses: actions/setup-python@v5
159161
with:
160-
python-version: 3.9
162+
python-version: 3.13
161163

162164
- name: Cache docker images
163165
id: custom-cache
@@ -179,7 +181,7 @@ jobs:
179181
strategy:
180182
fail-fast: false
181183
matrix:
182-
python-version: ['3.9', '3.10', '3.11', '3.11.1', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10']
184+
python-version: ['3.10', '3.11', '3.11.1', '3.12', '3.13', '3.14-dev', 'pypy-3.10', 'pypy-3.11']
183185
steps:
184186
- uses: actions/checkout@v4
185187
- uses: actions/setup-python@v5

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ python:
88
build:
99
os: ubuntu-20.04
1010
tools:
11-
python: "3.9"
11+
python: "3.13"
1212

1313
sphinx:
1414
configuration: docs/conf.py

dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ pytest-asyncio
1212
pytest-cov
1313
pytest-timeout
1414
ujson>=4.2.0
15-
uvloop
15+
uvloop; implementation_name != "pypy"
1616
vulture>=2.3.0
1717
wheel>=0.30.0

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ valkey-py - Python Client for Valkey
99
Getting Started
1010
****************
1111

12-
`valkey-py <https://pypi.org/project/valkey>`_ requires a running Valkey server, and Python 3.9+. See the `Valkey
12+
`valkey-py <https://pypi.org/project/valkey>`_ requires a running Valkey server, and Python 3.10+. See the `Valkey
1313
quickstart <https://valkey.io/topics/quickstart>`_ for Valkey installation instructions.
1414

1515
valkey-py can be installed using pip via ``pip install valkey``.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
author="valkey-py authors",
3636
author_email="[email protected]",
37-
python_requires=">=3.9",
37+
python_requires=">=3.10",
3838
install_requires=[
3939
'async-timeout>=4.0.3; python_full_version<"3.11.3"',
4040
],
@@ -47,11 +47,11 @@
4747
"Programming Language :: Python",
4848
"Programming Language :: Python :: 3",
4949
"Programming Language :: Python :: 3 :: Only",
50-
"Programming Language :: Python :: 3.9",
5150
"Programming Language :: Python :: 3.10",
5251
"Programming Language :: Python :: 3.11",
5352
"Programming Language :: Python :: 3.12",
5453
"Programming Language :: Python :: 3.13",
54+
"Programming Language :: Python :: 3.14",
5555
"Programming Language :: Python :: Implementation :: CPython",
5656
"Programming Language :: Python :: Implementation :: PyPy",
5757
],

tests/conftest.py

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -29,50 +29,6 @@
2929
_TestDecorator = Callable[[_DecoratedTest], _DecoratedTest]
3030

3131

32-
# Taken from python3.9
33-
class BooleanOptionalAction(argparse.Action):
34-
def __init__(
35-
self,
36-
option_strings,
37-
dest,
38-
default=None,
39-
type=None,
40-
choices=None,
41-
required=False,
42-
help=None,
43-
metavar=None,
44-
):
45-
_option_strings = []
46-
for option_string in option_strings:
47-
_option_strings.append(option_string)
48-
49-
if option_string.startswith("--"):
50-
option_string = "--no-" + option_string[2:]
51-
_option_strings.append(option_string)
52-
53-
if help is not None and default is not None:
54-
help += f" (default: {default})"
55-
56-
super().__init__(
57-
option_strings=_option_strings,
58-
dest=dest,
59-
nargs=0,
60-
default=default,
61-
type=type,
62-
choices=choices,
63-
required=required,
64-
help=help,
65-
metavar=metavar,
66-
)
67-
68-
def __call__(self, parser, namespace, values, option_string=None):
69-
if option_string in self.option_strings:
70-
setattr(namespace, self.dest, not option_string.startswith("--no-"))
71-
72-
def format_usage(self):
73-
return " | ".join(self.option_strings)
74-
75-
7632
def pytest_addoption(parser):
7733
parser.addoption(
7834
"--valkey-url",
@@ -104,7 +60,7 @@ def pytest_addoption(parser):
10460
)
10561

10662
parser.addoption(
107-
"--uvloop", action=BooleanOptionalAction, help="Run tests with uvloop"
63+
"--uvloop", action=argparse.BooleanOptionalAction, help="Run tests with uvloop"
10864
)
10965

11066
parser.addoption(

0 commit comments

Comments
 (0)