Skip to content

Commit 2229d83

Browse files
authored
Test with Python 3.12 (#537)
1 parent 30fe146 commit 2229d83

File tree

5 files changed

+36
-9
lines changed

5 files changed

+36
-9
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
11
---
22
name: CI
33

4-
on: [push, pull_request]
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# every Monday
9+
- cron: '30 4 * * 1'
10+
workflow_dispatch:
511

612
permissions:
713
contents: read
814

915
jobs:
1016
distros:
1117
name: "Ubuntu with Python ${{ matrix.python-version }}"
12-
runs-on: "ubuntu-20.04"
18+
runs-on: "${{ matrix.image }}"
1319
strategy:
1420
fail-fast: false
1521
matrix:
16-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"]
22+
python-version:
23+
- "3.7"
24+
- "3.8"
25+
- "3.9"
26+
- "3.10"
27+
- "3.11"
28+
- "3.12"
29+
- "pypy3.9"
30+
image:
31+
- "ubuntu-22.04"
32+
include:
33+
- python-version: "3.6"
34+
image: "ubuntu-20.04"
1735
steps:
1836
- name: Checkout
19-
uses: "actions/checkout@v2"
37+
uses: "actions/checkout@v4"
2038
- name: Install apt dependencies
2139
run: |
2240
set -ex
@@ -25,9 +43,10 @@ jobs:
2543
- name: Disable AppArmor
2644
run: sudo aa-disable /usr/sbin/slapd
2745
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v2
46+
uses: actions/setup-python@v4
2947
with:
3048
python-version: ${{ matrix.python-version }}
49+
allow-prereleases: true
3150
- name: "Install Python dependencies"
3251
run: |
3352
set -xe

.github/workflows/tox-fedora.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- py39
2828
- py310
2929
- py311
30+
- py312
3031
- c90-py36
3132
- c90-py37
3233
- py3-nosasltls

Modules/options.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ LDAP_set_option(LDAPObject *self, int option, PyObject *value)
207207
}
208208
else {
209209
PyErr_Format(PyExc_ValueError,
210-
"timeout must be >= 0 or -1/None for infinity, got %f",
211-
doubleval);
210+
"timeout must be >= 0 or -1/None for infinity, got %S",
211+
value);
212212
return 0;
213213
}
214214
break;

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class OpenLDAP2:
9292
'Programming Language :: Python :: 3.9',
9393
'Programming Language :: Python :: 3.10',
9494
'Programming Language :: Python :: 3.11',
95+
'Programming Language :: Python :: 3.12',
9596
# Note: when updating Python versions, also change tox.ini and .github/workflows/*
9697

9798
'Topic :: Database',

tox.ini

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[tox]
77
# Note: when updating Python versions, also change setup.py and .github/worlflows/*
8-
envlist = py{36,37,38,39,310,311},c90-py{36,37},py3-nosasltls,doc,py3-trace,pypy3
8+
envlist = py{36,37,38,39,310,311,312},c90-py{36,37},py3-nosasltls,doc,py3-trace,pypy3.9
99
minver = 1.8
1010

1111
[gh-actions]
@@ -16,7 +16,8 @@ python =
1616
3.9: py39, py3-trace
1717
3.10: py310
1818
3.11: py311
19-
pypy3: pypy3
19+
3.12: py312
20+
pypy3.9: pypy3.9
2021

2122
[testenv]
2223
deps =
@@ -28,6 +29,11 @@ setenv =
2829
commands = {envpython} -bb -Werror \
2930
-m unittest discover -v -s Tests -p 't_*' {posargs}
3031

32+
[testenv:py312]
33+
# Python 3.12 headers are incompatible with declaration-after-statement
34+
setenv =
35+
CFLAGS=-Wno-int-in-bool-context -Werror -std=c99
36+
3137
[testenv:py3-nosasltls]
3238
basepython = python3
3339
# don't install, install dependencies manually

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy