diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 0c65b86..fc67e77 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -16,31 +16,36 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - - name: Install dependencies - run: >- - python -m pip install --upgrade setuptools wheel - - name: Build - run: >- - python setup.py sdist bdist_wheel - # We do this, since failures on test.pypi aren't that bad - - name: Publish to Test PyPI - if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - - - name: Publish distribution 📦 to PyPI - if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: >- + python -m pip install --upgrade setuptools wheel twine + + - name: Build + run: >- + python setup.py sdist bdist_wheel + + # We do this, since failures on test.pypi aren't that bad + - name: Publish to Test PyPI + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ + + - name: Publish distribution 📦 to PyPI + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90fb494..c2dae2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,15 +8,29 @@ jobs: strategy: matrix: python-version: [ - "3.8", "3.9", "3.10", + "3.11", + "3.12", + "3.13", ] django-version: [ - "django>=3.2,<3.3", - "django>=4.0,<4.1", + "django>=4.2,<5.0", + "django>=5.0,<5.1", + "django>=5.1,<5.2", ] + # What Python version can I use with Django? https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django + exclude: + - python-version: "3.9" + django-version: "django>=5.0,<5.1" + - python-version: "3.9" + django-version: "django>=5.1,<5.2" + - python-version: "3.13" + django-version: "django>=4.2,<5.0" + - python-version: "3.13" + django-version: "django>=5.0,<5.1" + steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -26,6 +40,7 @@ jobs: - name: Install dependencies run: | + pip install --upgrade pip setuptools wheel --quiet pip install "${{ matrix.django-version }}" --quiet python setup.py install pip install flake8 diff --git a/README.md b/README.md index e30d688..842fc58 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ ## Requirements -* Python >=3.8 -* Django >=3.2 +* Python >=3.9 +* Django >=4.2 ## Design diff --git a/changelog.txt b/changelog.txt index 1867ece..b9f91c4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,11 @@ Changelog ========= +v1.1.0 (05/01/2025) +----------------- + - Added support for Python 3.11-3.13, dropped Python 3.8 support + - Added Django 4.2-5.2 support, dropped Django 3.2 support + + v1.0.0 (17/07/2022) ----------------- - Drop Python 3.6,2.7 support diff --git a/django_classified/__init__.py b/django_classified/__init__.py index 1429f4e..4f80522 100644 --- a/django_classified/__init__.py +++ b/django_classified/__init__.py @@ -1,14 +1,15 @@ -VERSION = (1, 0, 0) +VERSION = (1, 1, 0) def get_version(): - version = '%s.%s' % (VERSION[0], VERSION[1]) + """Return the version as a human-format string.""" + version = f"{VERSION[0]}.{VERSION[1]}" # Append 3rd digit if > 0 if VERSION[2]: - version = '%s.%s' % (version, VERSION[2]) + version = f"{version}.{VERSION[2]}" return version -default_app_config = 'django_classified.apps.DjangoClassifiedConfig' +default_app_config = "django_classified.apps.DjangoClassifiedConfig" name = "django_classified" diff --git a/setup.cfg b/setup.cfg index b88034e..9a530fd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,3 @@ [metadata] -description-file = README.md +description_file = README.md +name = django-classified diff --git a/setup.py b/setup.py index b198af3..fb41227 100644 --- a/setup.py +++ b/setup.py @@ -3,38 +3,40 @@ from django_classified import get_version # noqa isort:skip -with open("README.md") as fh: +with open("README.md", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( - author='Sergey Lyapustin', + author="Sergey Lyapustin", name="django-classified", - version=get_version().replace(' ', '-'), + version=get_version().replace(" ", "-"), author_email="s.lyapustin@gmail.com", description="Django Classified", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/slyapustin/django-classified", - keywords='django classified', - packages=setuptools.find_packages(exclude=('demo',)), - python_requires=">=3.8", + keywords="django classified", + packages=setuptools.find_packages(exclude=("demo",)), + python_requires=">=3.9", include_package_data=True, zip_safe=False, classifiers=[ - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', + "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", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], install_requires=[ "django-bootstrap-form", "django-filter", - "Django>=3.2,<4.1", - "Pillow>=6.0", - "sorl-thumbnail>=12.6", + "Django>=4.2,<5.2", + "Pillow", + "sorl-thumbnail", "unidecode", # Babel is used for currency formatting - 'Babel>=1.0,<3.0', - ] + "babel", + ], )