diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16d2a89..0eb4a4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,28 +13,26 @@ on: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: - tox-env: [py36, py37, py38, py39, py310, linters, packaging, migrations] + tox-env: [py38, py39, py310, py311, linters, packaging, migrations] include: - - tox-env: py36 - python-version: 3.6 - - tox-env: py37 - python-version: 3.7 - tox-env: py38 python-version: 3.8 - tox-env: py39 python-version: 3.9 - tox-env: py310 python-version: "3.10" + - tox-env: py311 + python-version: "3.11" - tox-env: linters - python-version: "3.10" + python-version: "3.11" - tox-env: packaging - python-version: "3.10" + python-version: "3.11" - tox-env: migrations - python-version: "3.10" + python-version: "3.11" steps: - uses: actions/checkout@v2 @@ -50,13 +48,13 @@ jobs: tox -e ${{ matrix.tox-env }} --recreate - name: Upload coverage to Codecov - if: matrix.tox-env == 'py37' || matrix.tox-env == 'py38' || matrix.tox-env == 'py39' || matrix.tox-env == 'py310' + if: matrix.tox-env == 'py38' || matrix.tox-env == 'py39' || matrix.tox-env == 'py310' || matrix.tox-env == 'py311' uses: codecov/codecov-action@v1 with: file: .coverage build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: test @@ -64,10 +62,10 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v1 with: - python-version: "3.10" + python-version: "3.11" - name: Install build run: python -m pip install --user build - name: Build a binary wheel and a source tarball diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index 4483a51..6268a1c 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -6,6 +6,18 @@ All notable changes to this project are documented in this file. This project adheres to `Semantic Versioning `_. +================== +5.0.0 - 2023-04-09 +================== + +Changed +======= +- **BACKWARD INCOMPATIBLE:** Require ``Django 4.2`` +- Add support for ``Python 3.11`` +- Drop support for ``Python 3.6`` and ``Python 3.7`` +- Bump ``setuptools`` version + + ================ 4.0.0 2022-02-16 ================ diff --git a/pyproject.toml b/pyproject.toml index c469ea7..23173aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] requires = [ - "setuptools >= 59.6.0", - "setuptools_scm >= 6.4.2, <7", + "setuptools >= 67.6.1", + "setuptools_scm >= 7.1.0", ] build-backend = "setuptools.build_meta" [tool.black] -py36 = true +target-version = ['py310', 'py311'] skip-string-normalization = true diff --git a/setup.py b/setup.py index 14b2769..2e1117e 100644 --- a/setup.py +++ b/setup.py @@ -26,8 +26,8 @@ license=about['__license__'], packages=setuptools.find_packages('src'), package_dir={'': 'src'}, - python_requires='>=3.6, <3.11', - install_requires=['Django~=3.2'], + python_requires='>=3.8, <3.12', + install_requires=['Django~=4.2'], extras_require={ 'docs': ['Sphinx', 'sphinx_rtd_theme'], 'package': ['twine', 'wheel'], @@ -52,11 +52,10 @@ 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', ], keywords='django transaction batching prioritization', ) diff --git a/src/django_priority_batch/prioritized_batcher.py b/src/django_priority_batch/prioritized_batcher.py index a8ea076..86a583f 100644 --- a/src/django_priority_batch/prioritized_batcher.py +++ b/src/django_priority_batch/prioritized_batcher.py @@ -35,7 +35,6 @@ def global_instance(cls): try: return GLOBAL_BATCHER.instance except AttributeError: - instance = PrioritizedBatcher( **getattr(settings, 'PRIORITIZED_BATCHER', {}) ) diff --git a/tox.ini b/tox.ini index 0048b07..35f42b5 100644 --- a/tox.ini +++ b/tox.ini @@ -18,18 +18,17 @@ basepython = python3 [testenv] basepython = - py36: python3.6 - py37: python3.7 py38: python3.8 py39: python3.9 py310: python3.10 - docs,linters,packaging,migrations: python3.10 + py311: python3.11 + docs,linters,packaging,migrations: python3.11 extras = docs: docs !docs: test setenv = # Enable pytest to find Django's setting module. - py{36,37,38,39,310}: PYTHONPATH={toxinidir}/tests + py{38,39,310,311}: PYTHONPATH={toxinidir}/tests ignore_errors = !linters: false # Run all linters to see their output even if one of them fails. @@ -46,7 +45,7 @@ commands_pre = commands = # General tests commands: # Run tests. - py{36,37,38,39,310}: pytest + py{38,39,310,311}: pytest # Docs commands: # Build documentation.