Skip to content

Commit

Permalink
Python 3.13 support, drop Python 3.8 support, support Postgres 17 (#11)
Browse files Browse the repository at this point in the history
* Initialize template from version 2794ea47b0220081dc869d01199ee490dda00762

* Update template to version 072543e27d8b506a6628f7793798609c62d6a8ae

* lock requirements

* bump version
  • Loading branch information
wesleykendall authored Nov 2, 2024
1 parent 0d92533 commit 028ef25
Show file tree
Hide file tree
Showing 12 changed files with 1,152 additions and 395 deletions.
15 changes: 7 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
python:
working_directory: /code
docker:
- image: opus10/circleci-python-library:2024-04-17
- image: opus10/circleci-python-library:2024-10-26
environment:
# Ensure makefile commands are not wrapped in "docker compose run"
EXEC_WRAPPER: ''
Expand All @@ -25,11 +25,11 @@ orbs:
steps:
- checkout
- restore_cache:
key: v4-{{ checksum "poetry.lock" }}
key: v5-{{ checksum "poetry.lock" }}
- run: make dependencies
- run: make full-test-suite
- save_cache:
key: v4-{{ checksum "poetry.lock" }}
key: v5-{{ checksum "poetry.lock" }}
paths:
- /home/circleci/.cache/pypoetry/
- /code/.venv
Expand All @@ -46,7 +46,7 @@ jobs:
test_pg_max:
executor:
name: opus10/python
pg_version: "16.4"
pg_version: "17.0"
steps:
- opus10/test

Expand All @@ -55,7 +55,7 @@ jobs:
steps:
- checkout
- restore_cache:
key: v4-{{ checksum "poetry.lock" }}
key: v5-{{ checksum "poetry.lock" }}
- run: make dependencies
- run: make lint

Expand All @@ -64,7 +64,7 @@ jobs:
steps:
- checkout
- restore_cache:
key: v4-{{ checksum "poetry.lock" }}
key: v5-{{ checksum "poetry.lock" }}
- run: make dependencies
- run: make type-check || true

Expand All @@ -73,9 +73,8 @@ jobs:
steps:
- checkout
- run: ssh-add -D
- run: echo "${GITHUB_DEVOPS_PRIVATE_SSH_KEY_BASE64}" | base64 --decode | ssh-add - > /dev/null
- restore_cache:
key: v4-{{ checksum "poetry.lock" }}
key: v5-{{ checksum "poetry.lock" }}
- run: make dependencies
- run: poetry run python devops.py deploy

Expand Down
3 changes: 2 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.9"
mkdocs:
configuration: mkdocs.yml
fail_on_warning: false
formats: all
python:
install:
- requirements: docs/requirements.txt
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.5.0 (2024-11-01)

#### Changes

- Added Python 3.13 support, dropped Python 3.8. Added Postgres17 support by [@wesleykendall](https://github.com/wesleykendall) in [#11](https://github.com/Opus10/django-pgmigrate/pull/11).

## 1.4.0 (2024-08-24)

#### Changes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You can configure `django-pgmigrate` to show blocked queries instead of automati

## Compatibility

`django-pgmigrate` is compatible with Python 3.8 - 3.12, Django 4.2 - 5.1, Psycopg 2 - 3, and Postgres 13 - 16.
`django-pgmigrate` is compatible with Python 3.9 - 3.13, Django 4.2 - 5.1, Psycopg 2 - 3, and Postgres 13 - 17.

## Documentation

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can configure `django-pgmigrate` to show blocked queries instead of automati

## Compatibility

`django-pgmigrate` is compatible with Python 3.8 - 3.12, Django 4.2 - 5.1, Psycopg 2 - 3, and Postgres 13 - 16.
`django-pgmigrate` is compatible with Python 3.9 - 3.13, Django 4.2 - 5.1, Psycopg 2 - 3, and Postgres 13 - 17.

## Next Steps

Expand Down
208 changes: 116 additions & 92 deletions docs/requirements.txt

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: django-pgmigrate
channels:
- conda-forge
dependencies:
- python==3.12.0
- poetry==1.6.1
- pip==23.2.1
- postgresql==16.0
- python==3.13.0
- poetry==1.8.4
- pip==24.2
- postgresql==17.0
variables:
DATABASE_URL: "postgres://postgres@localhost:5432/pgmigrate_local"
EXEC_WRAPPER: ""
2 changes: 1 addition & 1 deletion footing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
_extensions:
- jinja2_time.TimeExtension
_template: [email protected]:Opus10/python-library-template.git
_version: 2794ea47b0220081dc869d01199ee490dda00762
_version: 072543e27d8b506a6628f7793798609c62d6a8ae
check_types_in_ci: 'False'
is_django: 'True'
module_name: pgmigrate
Expand Down
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ markdown_extensions:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- toc:
permalink: true

theme:
custom_dir: docs/overrides
name: material
logo: static/logo.png
favicon: static/logo.png
features:
- content.code.copy
- navigation.footer
- navigation.path
- navigation.sections
Expand Down
1,242 changes: 982 additions & 260 deletions poetry.lock

Large diffs are not rendered by default.

42 changes: 22 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["poetry_core>=1.0.0"]
requires = ["poetry_core>=1.9.0"]
build-backend = "poetry.core.masonry.api"

[tool.coverage.run]
Expand Down Expand Up @@ -27,18 +27,18 @@ packages = [
exclude = [
"*/tests/"
]
version = "1.4.0"
version = "1.5.0"
description = "Avoid costly downtime during Postgres migrations."
authors = ["Wes Kendall"]
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Framework :: Django",
"Framework :: Django :: 4.2",
Expand All @@ -52,33 +52,35 @@ repository = "https://github.com/Opus10/django-pgmigrate"
documentation = "https://django-pgmigrate.readthedocs.io"

[tool.poetry.dependencies]
python = ">=3.8.0,<4"
python = ">=3.9.0,<4"
django = ">=4"
django-pglock = ">=1.3.0,<2"

[tool.poetry.dev-dependencies]
pytest = "8.3.2"
pytest = "8.3.3"
pytest-cov = "5.0.0"
pytest-dotenv = "0.5.2"
pytest-django = "4.8.0"
pytest-mock = "3.14.0"
pytest-reraise = "2.1.2"
django-dynamic-fixture = "4.0.1"
django-extensions = "3.2.3"
tox = "4.18.0"
ruff = "0.6.2"
pyright = "1.1.377"
mkdocs = "1.6.0"
black = "24.8.0"
mkdocs-material = "9.5.33"
mkdocstrings-python = "1.10.8"
tox = "4.23.2"
ruff = "0.7.1"
pyright = "1.1.386"
mkdocs = "1.6.1"
black = "24.10.0"
mkdocs-material = "9.5.42"
mkdocstrings-python = "1.12.2"
footing = "*"
setuptools = "*"
poetry-core = "*"
poetry-core = "1.9.1"
cleo = "2.1.0"
poetry-plugin-export = "1.8.0"
typing-extensions = "4.12.2"
django-stubs = "5.0.4"
dj-database-url = "2.2.0"
psycopg2-binary = "2.9.9"
django-stubs = "5.1.1"
dj-database-url = "2.3.0"
psycopg2-binary = "2.9.10"
pytest-django = "4.9.0"
django-dynamic-fixture = "4.0.1"

[tool.pytest.ini_options]
xfail_strict = true
Expand All @@ -90,7 +92,7 @@ DJANGO_SETTINGS_MODULE = "settings"
[tool.ruff]
lint.select = ["E", "F", "B", "I", "G", "C4"]
line-length = 99
target-version = "py38"
target-version = "py39"

[tool.pyright]
exclude = [
Expand All @@ -101,5 +103,5 @@ exclude = [
"**/migrations/**",
"**/tests/**",
]
pythonVersion = "3.8"
pythonVersion = "3.9"
typeCheckingMode = "standard"
14 changes: 7 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tox]
isolated_build = true
envlist =
py{38,39,310,311,312}-django42-psycopg2
py312-django42-psycopg3
py{310,311,312}-django50-psycopg2
py312-django50-psycopg3
py{310,311,312}-django51-psycopg2
py312-django51-psycopg3
py{39,310,311,312,313}-django42-psycopg2
py313-django42-psycopg3
py{310,311,312,313}-django50-psycopg2
py313-django50-psycopg3
py{310,311,312,313}-django51-psycopg2
py313-django51-psycopg3
report

[testenv]
Expand Down Expand Up @@ -34,7 +34,7 @@ commands =
allowlist_externals =
coverage
skip_install = true
depends = py{38,39,310,311,312}-django42-psycopg2, py312-django42-psycopg3, py{310,311,312}-django50-psycopg2, py312-django50-psycopg3, py{310,311,312}-django51-psycopg2, py312-django51-psycopg3
depends = py{39,310,311,312,313}-django42-psycopg2, py313-django42-psycopg3, py{310,311,312,313}-django50-psycopg2, py313-django50-psycopg3, py{310,311,312,313}-django51-psycopg2, py313-django51-psycopg3
parallel_show_output = true
commands =
coverage report --fail-under 100
Expand Down

0 comments on commit 028ef25

Please sign in to comment.