Skip to content

[WIP] Add support for Python 3.13 #1738

[WIP] Add support for Python 3.13

[WIP] Add support for Python 3.13 #1738

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.8', '3.9', '3.10', '3.11', '3.12', '3.13.0rc2']
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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.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.0rc2' }}
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