Skip to content

Add support for Python 3.13 #1922

Add support for Python 3.13

Add support for Python 3.13 #1922

Workflow file for this run

name: Lint and Test
on:
push:
branches: [ develop, v2.5, v2.5-unsupported-gcp ]
pull_request:
branches: [ develop, v2.5, v2.5-unsupported-gcp ]
jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
container:
image: python:${{ matrix.python-version }}
services:
cassandra:
image: "cassandra:3.11"
memcached:
image: "memcached:1.5.6"
redis:
image: "redis:4.0.9"
zookeeper:
image: "zookeeper:3.4.10"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
# TODO(ckuehl|2024-09-26): Remove this once Python 3.13 wheels are
# available for our dependencies.
- name: Install temporary Python 3.13 build dependencies
if: ${{ matrix.python-version == '3.13' }}
run: |
install -D confluent-archive.key /usr/local/share/keyrings/confluent-archive.key
echo 'deb [signed-by=/usr/local/share/keyrings/confluent-archive.key] https://packages.confluent.io/clients/deb bookworm main' > /etc/apt/sources.list.d/confluent.list
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y install \
build-essential \
curl \
krb5-user \
libffi-dev \
libpq-dev \
librdkafka-dev \
libsasl2-modules-gssapi-mit
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Update PATH
run: 'echo "$HOME/.local/bin" >> "$GITHUB_PATH"'
- name: Install dependencies
env:
CASS_DRIVER_NO_EXTENSIONS: theytaketoolongtobuild
run: |
pip install pipx
pipx install poetry==1.8.3
make .venv
- name: Lint
run: |
make lint
- name: Test
run: |
make test