diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 9123008..526426d 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -15,49 +15,56 @@ jobs: - "3.8" - "3.9" - "3.10" + - "3.11" + - "3.12" django: - - django32 - - django40 - - django41 + - "4.2" + - "5.0" + exclude: + - python-version: "3.8" + django: "5.0" + - python-version: "3.9" + django: "5.0" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - name: Cache - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: - ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ matrix.python-version }}-v1- + - name: Update pip + run: python -m pip install --upgrade pip + + - name: Install Django 4.2 + if: matrix.django == 4.2 + run: pip install "Django>=4.2,<5.0" + - name: Install Django 5.0 + if: matrix.django == 5.0 + run: pip install "Django>=5.0,<5.1" - - name: Install dependencies - run: python -m pip install tox + - name: Install requirements + run: pip install -r requirements.txt + + - name: Install package + run: pip install -e . - name: Run tests - run: tox -e ${{ matrix.django }} + run: python manage.py test + publish: name: Build and publish Python 🐍 distributions 📦 to PyPI needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - - name: Install req packages + - name: Install deployment packages run: python -m pip install -U setuptools wheel - name: Build a binary wheel and a source tarball diff --git a/CHANGELOG.md b/CHANGELOG.md index f0abc72..bc2b8e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [3.0.0] - unreleased + +Contributors: [@lociii](https://github.com/lociii) + +- Remove support for EOL `Django` versions `3.2`, `4.0` and `4.1` +- Add support for `Django` version `5.0` +- Minimum required `celery` version is now `5.3.0`, released 06/2023 +- Minimum required `django-celery-beat` version is now `2.5.0`, releases 03/2023 +- Minimum required `kombu` version is now `5.3.0`, releases 06/2023 +- Renovate build environment + ## [2.1.0] - 2023-01-03 Contributors: [@lociii](https://github.com/lociii) diff --git a/Dockerfile b/Dockerfile index c35459d..f9a05fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye +FROM debian:bookworm ENV PYTHONUNBUFFERED 1 ENV LC_ALL=C.UTF-8 @@ -20,14 +20,14 @@ WORKDIR /app USER app -ADD requirements-docker.txt /app/ +ADD requirements.txt /app/ ENV PATH /home/app/venv/bin:${PATH} RUN python3 -m venv ~/venv && \ pip install --upgrade pip && \ pip install wheel && \ - pip install -r requirements-docker.txt + pip install -r requirements.txt ADD . /app/ diff --git a/docker-compose.yaml b/docker-compose.yaml index 01ec605..97d0964 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,5 +1,3 @@ -version: '3.5' - services: app: build: . diff --git a/requirements-docker.txt b/requirements-docker.txt deleted file mode 100644 index 4c620f6..0000000 --- a/requirements-docker.txt +++ /dev/null @@ -1,7 +0,0 @@ -bumpversion==0.6.0 -celery==5.2.7 -django-celery-beat==2.4.0 -flake8==6.0.0 -ipython==8.8.0 -mock==5.0.0 # latest mocks independent from python release -tblib==1.7.0 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2e0a7ce --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +bumpversion==0.6.0 +celery==5.4.0 +django-celery-beat==2.6.0 +flake8==7.1.0 +ipython==8.25.0 +mock==5.1.0 # latest mocks independent from python release +tblib==3.0.0 diff --git a/setup.py b/setup.py index 7a0c74b..3c0d63a 100644 --- a/setup.py +++ b/setup.py @@ -34,10 +34,10 @@ def long_description(): long_description=long_description(), long_description_content_type='text/markdown', install_requires=[ - 'celery>=5.0.0', - 'Django>=3.2', - 'django-celery-beat>=2.4.0', - 'kombu>=5.2.4', + 'celery>=5.3.0', + 'Django>=4.2', + 'django-celery-beat>=2.5.0', + 'kombu>=5.3.0', ], license='MIT', url='https://github.com/RegioHelden/django-celery-token-bucket', @@ -50,15 +50,19 @@ def long_description(): keywords=['django', 'celery', 'token', 'bucket', 'rate limiting'], include_package_data=True, classifiers=[ + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Framework :: Django", + "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules", diff --git a/tox.ini b/tox.ini index 8fda87e..a5bc22c 100644 --- a/tox.ini +++ b/tox.ini @@ -2,21 +2,3 @@ exclude = .git,__pycache__ max-line-length = 120 jobs = auto - -[tox] -envlist = - py{38,39,310}-django32 - py{38,39,310}-django40 - py{38,39,310}-django41 - -[testenv] -setenv = - PYTHONPATH = {toxinidir} -deps = - django32: Django>=3.2,<4.0 - django40: Django>=4.0,<4.1 - django41: Django>=4.1,<4.2 - -r{toxinidir}/requirements-docker.txt -commands = - pip install -U pip - python manage.py test