Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
# Set the python version to 3.12 to keep imghdr for sphinx.
# TODO: update sphinx to remove imghdr dependency
python-version: 3.12
cache: 'pip'
- name: install deps
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ -d ${DESTENV} ]; then
fi
python -m venv ${DESTENV}
source ${DESTENV}/bin/activate
pip install --upgrade --quiet pip
pip install --upgrade --quiet pip setuptools wheel
pip install --quiet -r dev_requirements.txt
invoke devenv
invoke package
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13
cache: 'pip'
- name: run code linters
run: |
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
max-parallel: 15
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.11.1', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10']
python-version: ['3.10', '3.11', '3.11.1', '3.12', '3.13', '3.14-dev', 'pypy-3.10', 'pypy-3.11']
test-type: ['standalone', 'cluster']
connection-type: ['libvalkey', 'plain']
protocol-version: ['2','3']
Expand Down Expand Up @@ -128,7 +128,9 @@ jobs:
./util/wait-for-it.sh localhost:16379
fi
invoke ${{matrix.test-type}}-tests --protocol=${{ matrix.protocol-version }}
if [[ "${{matrix.python-version}}" != pypy-* ]]; then
# TODO: remove check for 3.14 once it's fixed
# https://github.com/MagicStack/uvloop/issues/637
if [[ "${{matrix.python-version}}" != pypy-* && "${{matrix.python-version}}" != "3.14-dev" ]]; then
invoke ${{matrix.test-type}}-tests --uvloop --protocol=${{ matrix.protocol-version }}
fi

Expand Down Expand Up @@ -157,7 +159,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13

- name: Cache docker images
id: custom-cache
Expand All @@ -179,7 +181,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.11.1', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10']
python-version: ['3.10', '3.11', '3.11.1', '3.12', '3.13', '3.14-dev', 'pypy-3.10', 'pypy-3.11']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python:
build:
os: ubuntu-20.04
tools:
python: "3.9"
python: "3.13"

sphinx:
configuration: docs/conf.py
2 changes: 1 addition & 1 deletion dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ pytest-asyncio
pytest-cov
pytest-timeout
ujson>=4.2.0
uvloop
uvloop; implementation_name != "pypy"
vulture>=2.3.0
wheel>=0.30.0
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ valkey-py - Python Client for Valkey
Getting Started
****************

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

valkey-py can be installed using pip via ``pip install valkey``.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
author="valkey-py authors",
author_email="valkey-py@lists.valkey.io",
python_requires=">=3.9",
python_requires=">=3.10",
install_requires=[
'async-timeout>=4.0.3; python_full_version<"3.11.3"',
],
Expand All @@ -47,11 +47,11 @@
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
Expand Down
46 changes: 1 addition & 45 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,50 +29,6 @@
_TestDecorator = Callable[[_DecoratedTest], _DecoratedTest]


# Taken from python3.9
class BooleanOptionalAction(argparse.Action):
def __init__(
self,
option_strings,
dest,
default=None,
type=None,
choices=None,
required=False,
help=None,
metavar=None,
):
_option_strings = []
for option_string in option_strings:
_option_strings.append(option_string)

if option_string.startswith("--"):
option_string = "--no-" + option_string[2:]
_option_strings.append(option_string)

if help is not None and default is not None:
help += f" (default: {default})"

super().__init__(
option_strings=_option_strings,
dest=dest,
nargs=0,
default=default,
type=type,
choices=choices,
required=required,
help=help,
metavar=metavar,
)

def __call__(self, parser, namespace, values, option_string=None):
if option_string in self.option_strings:
setattr(namespace, self.dest, not option_string.startswith("--no-"))

def format_usage(self):
return " | ".join(self.option_strings)


def pytest_addoption(parser):
parser.addoption(
"--valkey-url",
Expand Down Expand Up @@ -104,7 +60,7 @@ def pytest_addoption(parser):
)

parser.addoption(
"--uvloop", action=BooleanOptionalAction, help="Run tests with uvloop"
"--uvloop", action=argparse.BooleanOptionalAction, help="Run tests with uvloop"
)

parser.addoption(
Expand Down