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

Rework supported environment #538

Merged
merged 11 commits into from
Oct 25, 2024
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: '3.10'
python-version: '3.12'

- name: Install dependencies
run: |
Expand Down Expand Up @@ -66,10 +66,10 @@ jobs:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: '3.10'
python-version: '3.12'

- name: Install in dev mode
run: python -m pip install -e .
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,14 @@ jobs:

matrix:
python:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- 'pypy-3.7'
- '3.13'
- 'pypy-3.10'
os: [ ubuntu-latest, macos-latest, windows-latest ]

# These versions are no longer supported by Python team, and may
# eventually be dropped from GitHub Actions. The support of these
# versions by django-environ will continue for as long as possible,
# and may be discontinued at any time.
include:
- python: '3.6'
os: ubuntu-20.04
- python: '3.7'
os: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: '3.10'
python-version: '3.12'

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: '3.10'
python-version: '3.12'

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the django-environ.
#
# Copyright (c) 2021, Serghei Iakovlev <[email protected]>
# Copyright (c) 2021-2024, Serghei Iakovlev <[email protected]>
# Copyright (c) 2013-2021, Daniele Faraglia <[email protected]>
#
# For the full copyright and license information, please view
Expand All @@ -17,7 +17,7 @@ build:
tools:
# Keep version in sync with tox.ini (testenv:docs) and
# docs.yml (GitHub Action Workflow).
python: '3.10'
python: '3.12'

python:
install:
Expand Down
19 changes: 15 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,27 @@ All notable changes to this project will be documented in this file.
The format is inspired by `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.

`v0.11.3`_ - 0-Undefined-2023
`v0.12.0`_ - 0-Undefined-2024
-----------------------------
Added
+++++
- Add support for Python 3.12 and 3.13
`#538 <https://github.com/joke2k/django-environ/issues/538>`_.
- Add support for Django 5.1
`#535 <https://github.com/joke2k/django-environ/issues/535>`_.

Changed
+++++++
- Formally support Python 3.12.
- Disabled inline comments handling by default due to potential side effects.
While the feature itself is useful, the project's philosophy dictates that
it should not be enabled by default for all users
`#499 <https://github.com/joke2k/django-environ/issues/499>`_.

Removed
+++++++
- Removed support of Python 3.6, 3.7 and 3.8.
- Removed support of Django 1.x.


`v0.11.2`_ - 1-September-2023
-----------------------------
Expand Down Expand Up @@ -399,7 +410,7 @@ Added
- Initial release.


.. _v0.11.3: https://github.com/joke2k/django-environ/compare/v0.11.2...v0.11.3
.. _v0.12.0: https://github.com/joke2k/django-environ/compare/v0.11.2...v0.12.0
.. _v0.11.2: https://github.com/joke2k/django-environ/compare/v0.11.1...v0.11.2
.. _v0.11.1: https://github.com/joke2k/django-environ/compare/v0.11.0...v0.11.1
.. _v0.11.0: https://github.com/joke2k/django-environ/compare/v0.10.0...v0.11.0
Expand All @@ -417,4 +428,4 @@ Added
.. _v0.4.1: https://github.com/joke2k/django-environ/compare/v0.4...v0.4.1
.. _v0.4: https://github.com/joke2k/django-environ/compare/v0.3.1...v0.4
.. _v0.3.1: https://github.com/joke2k/django-environ/compare/v0.3...v0.3.1
.. _v0.3: https://github.com/joke2k/django-environ/compare/v0.2.1...v0.3
.. _v0.3: https://github.com/joke2k/django-environ/compare/v0.2.1...v0.3
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ approach, some connection strings are expressed as url, so this package can pars
it and return a ``urllib.parse.ParseResult``. These strings from ``os.environ``
are loaded from a ``.env`` file and filled in ``os.environ`` with ``setdefault``
method, to avoid to overwrite the real environ.
A similar approach is used in `Two Scoops of Django <https://www.feldroy.com/books/two-scoops-of-django-3-x>`_
A similar approach is used in
`Two Scoops of Django <https://web.archive.org/web/20240121133956/https://www.feldroy.com/books/two-scoops-of-django-3-x>`_
book and explained in `12factor-django <https://wellfire.co/learn/easier-12-factor-django>`_
article.

Expand Down Expand Up @@ -126,8 +127,8 @@ its documentation lives at `Read the Docs <https://django-environ.readthedocs.io
the code on `GitHub <https://github.com/joke2k/django-environ>`_,
and the latest release on `PyPI <https://pypi.org/project/django-environ/>`_.

It’s rigorously tested on Python 3.6+, and officially supports
Django 1.11, 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, and 5.0.
It’s rigorously tested on Python 3.9+, and officially supports
Django 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, and 5.1.

If you'd like to contribute to ``django-environ`` you're most welcome!

Expand Down
4 changes: 2 additions & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Installation
Requirements
============

* `Django <https://www.djangoproject.com/>`_ >= 1.11
* `Python <https://www.python.org/>`_ >= 3.5
* `Django <https://www.djangoproject.com/>`_ >= 2.2
* `Python <https://www.python.org/>`_ >= 3.9

Installing django-environ
=========================
Expand Down
17 changes: 7 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of the django-environ.
#
# Copyright (c) 2021-2023, Serghei Iakovlev <[email protected]>
# Copyright (c) 2021-2024, Serghei Iakovlev <[email protected]>
# Copyright (c) 2013-2021, Daniele Faraglia <[email protected]>
#
# For the full copyright and license information, please view
Expand Down Expand Up @@ -135,9 +135,6 @@ def get_version_string():
'Development Status :: 5 - Production/Stable',

'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
Expand All @@ -146,6 +143,7 @@ def get_version_string():
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',

'Operating System :: OS Independent',

Expand All @@ -154,13 +152,11 @@ def get_version_string():

'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',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',

Expand All @@ -185,11 +181,12 @@ def get_version_string():
'testing': [
'coverage[toml]>=5.0a4', # Code coverage measurement for Python
'pytest>=4.6.11', # Our tests framework
'setuptools>=71.0.0', # Needed as a dependency for some tests
],
# Dependencies that are required to build documentation
'docs': [
'furo>=2021.8.17b43,==2021.8.*', # Sphinx documentation theme
'sphinx>=3.5.0', # Python documentation generator
'furo>=2024.8.6', # Sphinx documentation theme
'sphinx>=5.0', # Python documentation generator
'sphinx-notfound-page', # Create a custom 404 page
],
}
Expand Down Expand Up @@ -232,7 +229,7 @@ def get_version_string():
platforms=['any'],
include_package_data=True,
zip_safe=False,
python_requires='>=3.6,<4',
python_requires='>=3.9,<4',
install_requires=INSTALL_REQUIRES,
dependency_links=DEPENDENCY_LINKS,
extras_require=EXTRAS_REQUIRE,
Expand Down
21 changes: 8 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the django-environ.
#
# Copyright (c) 2021-2023, Serghei Iakovlev <[email protected]>
# Copyright (c) 2021-2024, Serghei Iakovlev <[email protected]>
# Copyright (c) 2013-2021, Daniele Faraglia <[email protected]>
#
# For the full copyright and license information, please view
Expand All @@ -18,28 +18,23 @@ envlist =
docs
lint
manifest
py{36,37,38,39,310,311}-django{111,22}
py{36,37,38,39,310,311}-django{30,31,32}
py{38,39,310,311}-django{40,41,42}
py{310,311}-django{50}
pypy-django{111,22,30,31,32}
py{39,310,311,312,313}-django{22,30,31,32,40,41,42}
py{310,311,312,313}-django{50,51}
pypy-django{22,30,31,32}

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
pypy-3.7: pypy
3.13: py313
pypy-3.10: pypy

[testenv]
description = Unit tests
extras = testing
deps =
django111: Django>=1.11,<2
django22: Django>=2.2,<3.0
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
Expand Down Expand Up @@ -93,7 +88,7 @@ commands =
description = Check external links in the package documentation
# Keep basepython in sync with .readthedocs.yml and docs.yml
# (GitHub Action Workflow).
basepython = python3.10
basepython = python3.12
extras = docs
commands =
{envpython} -m sphinx \
Expand All @@ -111,7 +106,7 @@ isolated_build = true
description = Build package documentation (HTML)
# Keep basepython in sync with .readthedocs.yml and docs.yml
# (GitHub Action Workflow).
basepython = python3.10
basepython = python3.12
extras = docs
commands =
{envpython} -m sphinx \
Expand Down
Loading