From 143752b90d07c3d67c4e741b3d8f14e927d5f704 Mon Sep 17 00:00:00 2001 From: Swen Kooij Date: Wed, 4 Oct 2023 12:00:16 +0200 Subject: [PATCH 1/2] Run tests against Python 3.12 --- .circleci/config.yml | 21 +++++++++++++++++++-- README.md | 2 +- tox.ini | 4 ++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 64e60c3..24a4225 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ executors: version: type: string docker: - - image: python:<< parameters.version >>-buster + - image: python:<< parameters.version >>-bullseye - image: postgres:13.0 environment: POSTGRES_DB: 'psqlextra' @@ -22,7 +22,7 @@ commands: steps: - run: name: Install packages - command: apt-get update && apt-get install -y --no-install-recommends postgresql-client-11 libpq-dev build-essential git + command: apt-get update && apt-get install -y --no-install-recommends postgresql-client-13 libpq-dev build-essential git - run: name: Install Python packages @@ -112,6 +112,17 @@ jobs: name: Upload coverage report command: coveralls + test-python312: + executor: + name: python + version: "3.12" + steps: + - checkout + - install-dependencies: + extra: test + - run-tests: + pyversion: 312 + analysis: executor: name: python @@ -188,6 +199,12 @@ workflows: only: /.*/ branches: only: /.*/ + - test-python312: + filters: + tags: + only: /.*/ + branches: + only: /.*/ - analysis: filters: tags: diff --git a/README.md b/README.md index 17037d8..b66baa9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ | :package: | **PyPi** | [![PyPi](https://badge.fury.io/py/django-postgres-extra.svg)](https://pypi.python.org/pypi/django-postgres-extra) | | :four_leaf_clover: | **Code coverage** | [![Coverage Status](https://coveralls.io/repos/github/SectorLabs/django-postgres-extra/badge.svg?branch=coveralls)](https://coveralls.io/github/SectorLabs/django-postgres-extra?branch=master) | | | **Django Versions** | 2.0, 2.1, 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0 | -| | **Python Versions** | 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 | +| | **Python Versions** | 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 | | | **Psycopg Versions** | 2, 3 | | :book: | **Documentation** | [Read The Docs](https://django-postgres-extra.readthedocs.io/en/master/) | | :warning: | **Upgrade** | [Upgrade from v1.x](https://django-postgres-extra.readthedocs.io/en/master/major_releases.html#new-features) diff --git a/tox.ini b/tox.ini index 70a0e8c..fe6bc7e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,8 @@ envlist = {py36,py37}-dj{20,21,22,30,31,32}-psycopg{28,29} {py38,py39,py310}-dj{21,22,30,31,32,40}-psycopg{28,29} - {py38,py39,py310,py311}-dj{41}-psycopg{28,29} - {py310,py311}-dj{42,50}-psycopg{28,29,31} + {py38,py39,py310,py311,py312}-dj{41}-psycopg{28,29} + {py310,py311,py312}-dj{42,50}-psycopg{28,29,31} [testenv] deps = From 52a6b94e0adbba72af9e068331b214e38a9e909a Mon Sep 17 00:00:00 2001 From: Swen Kooij Date: Wed, 7 Feb 2024 22:26:32 +0100 Subject: [PATCH 2/2] Remove dependency on `distutils`, was removed in Python 3.12 --- setup.py | 5 ++--- tox.ini | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c3431e2..2eeb56f 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,12 @@ -import distutils.cmd import os import subprocess -from setuptools import find_packages, setup +from setuptools import Command, find_packages, setup exec(open("psqlextra/_version.py").read()) -class BaseCommand(distutils.cmd.Command): +class BaseCommand(Command): user_options = [] def initialize_options(self): diff --git a/tox.ini b/tox.ini index fe6bc7e..ce84f42 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,7 @@ deps = psycopg28: psycopg2[binary]~=2.8 psycopg29: psycopg2[binary]~=2.9 psycopg31: psycopg[binary]~=3.1 + setuptools .[test] setenv = DJANGO_SETTINGS_MODULE=settings