Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #368 -- Update Python and Django versions #369

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache
uses: actions/cache@v3
Expand All @@ -50,4 +50,4 @@ jobs:
with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
repository_url: https://jazzband.co/projects/django-configurations/upload
repository-url: https://jazzband.co/projects/django-configurations/upload
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10']
python-version: ['3.8', '3.9', '3.10', '3.11', 'pypy-3.10']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
version: 2
build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"
python:
install:
- requirements: docs/requirements.txt
Expand Down
5 changes: 1 addition & 4 deletions configurations/version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
try:
from importlib.metadata import PackageNotFoundError, version
except ImportError:
from importlib_metadata import PackageNotFoundError, version
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("django-configurations")
Expand Down
14 changes: 14 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
Changelog
---------

v2.5 (unreleased)
^^^^^^^^^^^^^^^^^

- Update Github actions and fix pipeline warnings
- Add compatibility with Django 5.0
- **BACKWARD INCOMPATIBLE** Drop compatibility for Django 4.0
- **BACKWARD INCOMPATIBLE** Drop compatibility for Python 3.7 and PyPy < 3.10

v2.4.2 (2023-09-27)
^^^^^^^^^^^^^^^^^^^

- Replace imp (due for removal in Python 3.12) with importlib
- Test on PyPy 3.10.

v2.4.1 (2023-04-04)
^^^^^^^^^^^^^^^^^^^

Expand Down
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ def read(*parts):
},
install_requires=[
'django>=3.2',
'importlib-metadata;python_version<"3.8"',
],
python_requires='>=3.7, <4.0',
python_requires='>=3.8, <4.0',
extras_require={
'cache': ['django-cache-url'],
'database': ['dj-database-url'],
Expand All @@ -50,7 +49,6 @@ def read(*parts):
'Development Status :: 5 - Production/Stable',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Intended Audience :: Developers',
Expand All @@ -59,7 +57,6 @@ def read(*parts):
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
Expand Down
4 changes: 0 additions & 4 deletions tests/settings/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import uuid
import django

from configurations import Configuration, pristinemethod
from configurations.values import BooleanValue
Expand Down Expand Up @@ -36,9 +35,6 @@ class Test(Configuration):

ROOT_URLCONF = 'tests.urls'

if django.VERSION[:2] < (1, 6):
TEST_RUNNER = 'discover_runner.DiscoverRunner'

@property
def ALLOWED_HOSTS(self):
allowed_hosts = super().ALLOWED_HOSTS[:]
Expand Down
19 changes: 7 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,18 @@ skipsdist = true
usedevelop = true
minversion = 1.8
envlist =
py37-checkqa
py311-checkqa
docs
py{37,py37}-dj{32}
py{38,py38,39,py39}-dj{32,40,41,42}
py{310,py310}-dj{32,40,41,42,main}
py{311}-dj{41,42,main}
py{38,39}-dj{32,41,42}
py{310,py310}-dj{32,41,42,50,main}
py{311}-dj{41,42,50,main}

[gh-actions]
python =
3.7: py37,flake8,readme
3.8: py38
3.9: py39
3.10: py310
3.11: py311
pypy-3.7: pypy37
pypy-3.8: pypy38
pypy-3.9: pypy39
3.11: py311,flake8,readme
pypy-3.10: pypy310

[testenv]
Expand All @@ -30,9 +25,9 @@ setenv =
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
deps =
dj32: django~=3.2.9
dj40: django~=4.0.0
dj41: django~=4.1.3
dj42: django~=4.2.0
dj50: django~=5.0.0a1
djmain: https://github.com/django/django/archive/main.tar.gz
coverage
coverage_enable_subprocess
Expand All @@ -44,7 +39,7 @@ commands =
coverage report -m --skip-covered
coverage xml

[testenv:py37-checkqa]
[testenv:py311-checkqa]
commands =
flake8 {toxinidir}
check-manifest -v
Expand Down