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
29 changes: 24 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
---
name: CI

on: [push, pull_request]
on:
push:
pull_request:
schedule:
# every Monday
- cron: '30 4 * * 1'
workflow_dispatch:

permissions:
contents: read

jobs:
distros:
name: "Ubuntu with Python ${{ matrix.python-version }}"
runs-on: "ubuntu-20.04"
runs-on: "${{ matrix.image }}"
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"]
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "pypy3.9"
image:
- "ubuntu-22.04"
include:
- python-version: "3.6"
image: "ubuntu-20.04"
steps:
- name: Checkout
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"
- name: Install apt dependencies
run: |
set -ex
Expand All @@ -25,9 +43,10 @@ jobs:
- name: Disable AppArmor
run: sudo aa-disable /usr/sbin/slapd
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: "Install Python dependencies"
run: |
set -xe
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tox-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- py39
- py310
- py311
- py312
- c90-py36
- c90-py37
- py3-nosasltls
Expand Down
4 changes: 2 additions & 2 deletions Modules/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ LDAP_set_option(LDAPObject *self, int option, PyObject *value)
}
else {
PyErr_Format(PyExc_ValueError,
"timeout must be >= 0 or -1/None for infinity, got %f",
doubleval);
"timeout must be >= 0 or -1/None for infinity, got %S",
value);
return 0;
}
break;
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class OpenLDAP2:
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
# Note: when updating Python versions, also change tox.ini and .github/workflows/*

'Topic :: Database',
Expand Down
10 changes: 8 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

[gh-actions]
Expand All @@ -16,7 +16,8 @@ python =
3.9: py39, py3-trace
3.10: py310
3.11: py311
pypy3: pypy3
3.12: py312
pypy3.9: pypy3.9

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

[testenv:py312]
# Python 3.12 headers are incompatible with declaration-after-statement
setenv =
CFLAGS=-Wno-int-in-bool-context -Werror -std=c99

[testenv:py3-nosasltls]
basepython = python3
# don't install, install dependencies manually
Expand Down