Commit graph

151 commits

Author SHA1 Message Date
Christopher Broderick
57b6827ae3
Merge pull request #386 from adamchainz/pep_451
Move to PEP-451 style loader
2024-11-18 17:34:02 +00:00
Adam Johnson
b8f66f76ee Move to PEP-451 style loader 2024-11-18 16:52:55 +00:00
Adam Johnson
b8e94fd796 Prevent FORMS_URLFIELD_ASSUME_HTTPS warning on Django 5.0 2024-11-18 11:37:17 +00:00
Christopher Broderick
e1091160b1
Merge pull request #383 from kloczek/master
really drop support for python<=3.7
2024-09-27 10:52:36 +01:00
Kamil Paduszyński
ef4f49d236 Fix #374 -- Fix URL in Configuration.load_dotenv docstring 2024-09-13 17:36:59 +02:00
Tomasz Kłoczko
6dc2340dfe really drop support for python<=3.7
Filer all code over `pyupgrade --py38`.

Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
2024-03-18 16:08:42 +00:00
Paolo Melchiorre
df2a7f18fd
Fix #368 -- Update Python and Django versions 2023-10-04 16:52:16 +02:00
Michal Szczesny
27f67a58a4 Replace imp with importlib
This project uses the imp module which has been deprecated since Python 3.4 and set for removal in 3.12:
• Raised PendingDeprecationWarning since 3.4 (2014)
• Raised DeprecationWarning since 3.5 (2015)
• Updated DeprecationWarning to say removal in 3.12 since 3.10 (2021)
• Removal planned for 3.12 (2023)

This change removes the dependency on imp in favour of importlib.

Co-authored-by: @jbkkd
Inspired by: @mgorny

https://github.com/jazzband/django-configurations/issues/358
2023-09-27 14:08:16 +03:00
Ran Benita
6f47271526
Fix "STATICFILES_STORAGE/STORAGES are mutually exclusive" on Django>=4.2 (#349) 2023-02-13 09:18:38 +01:00
Tim Gates
ac5408d7eb
docs: Fix a few typos
There are small typos in:
- configurations/base.py
- configurations/values.py
- docs/patterns.rst

Fixes:
- Should read `whether` rather than `wether`.
- Should read `overridden` rather than `overriden`.
- Should read `environment` rather than `enviroment`.

Signed-off-by: Tim Gates <tim.gates@iress.com>
2022-09-01 20:41:53 +10:00
Nicolas Delaby
45a4557efe Remove deprecated default fields only from the global
And keep user defined values
2022-01-24 18:46:17 +01:00
Thomas Grainger
089a039efa Added "python -m configurations" entry point.
inspired by e0a46367df/django/__main__.py (L1-L9)

see also https://code.djangoproject.com/ticket/24857
2021-10-27 07:29:02 +06:00
Brian Helba
f5d6ef7877 Add importlib.metadata backport for older Python versions 2021-10-25 14:33:55 -04:00
Brian Helba
4bd4cf5dd4 Use importlib.metadata instead of pkg_resources to get version 2021-10-25 14:33:54 -04:00
Brian Helba
6da8420635 Prevent warnings for settings deprecated in Django 2.2
Fixes #233.
2021-10-25 11:15:14 -04:00
Brian Helba
40bdab3f4a Preserve Django warnings when DEFAULT_AUTO_FIELD is not set
Fixes #286.
2021-10-25 10:40:24 -04:00
Brian Helba
b1f62da419
Merge pull request #281 from brianhelba/warning 2021-10-25 10:38:07 -04:00
Brian Helba
f4e2241f44
Merge pull request #300 from jazzband/wsgi-import 2021-10-25 10:35:03 -04:00
Brian Helba
c9c4a02169
Merge pull request #301 from jazzband/space-typo 2021-10-25 10:33:41 -04:00
Brian Helba
ec12828877 Simplify import of django.core.wsgi.get_wsgi_application
This has been available since Django 1.4. The import guard is no longer necessary.
2021-10-25 09:52:21 -04:00
Brian Helba
91ef9fd8ad Fix a double space typo in a string 2021-10-25 09:50:51 -04:00
Brian Helba
7c9ac5e53f
Suppress import ordering style error 2021-10-25 09:34:42 -04:00
Finn-Thorben Sell
c1cb3874f2
remove fallback onto ASGIHandler
ASGIHandler is considered a django internal api with get_asgi_application being the public counterpart.
get_asgi_application is also present since the introduction of django's asgi support so the ImportError should never occur anyways.
2021-09-09 15:01:11 +02:00
Richard de Wit
1ada7d14f7
Add ASGI support
Then in your project's `asgi.py` file use this:

```python
from configurations.asgi import get_asgi_application

application = get_asgi_application()
```
2021-09-09 14:35:09 +02:00
Brian Helba
d715a719a4 Use a more general structure for removing deprecated settings 2021-08-31 21:38:51 -04:00
Brian Helba
f85ec1fb89
Prevent an ImproperlyConfigured warning from DEFAULT_HASHING_ALGORITHM 2021-04-09 00:20:36 -04:00
Michael Käufl
9b9ff4c0a2 Deprecate utils.import_by_path in favor of django.utils.module_loading.import_string 2021-01-19 13:11:16 +06:00
Michael Käufl
6cb932e47f Run pyupgrade on the code
But don't touch string formatting.

https://pypi.org/project/pyupgrade/
2021-01-19 13:11:16 +06:00
Michael Käufl
dd5d6974cb Drop support for Django < 2.2 LTS, incl. Python 2.7 2021-01-19 13:11:16 +06:00
Nicholas Dujay
4fb5928a9c
use package name in get_distribution function call 2020-09-21 09:43:42 -04:00
Jannis Leidel
42641f5eb4
Switch to setuptools-scm. 2019-12-03 13:09:15 +01:00
Jannis Leidel
0f486ef6e4
Fix running on Django master.
This fixes an exception that was introduced upstream in 226ebb1729 (diff-ec2bed07bb264cb95a80f08d71a47c06R163-R170)
2019-12-03 11:52:00 +01:00
John Franey
41b905c92e Update tested Python & Django versions
Replaces `django.utils.six` with `six` to support newer Django versions.

Updates Tox config to:
- remove unsupported Django versions
- add pypy3
- add Django 2.2
- update djmaster Python versions
2019-10-06 15:43:03 -04:00
Peter Bittner
79b92372f7 Remove deprecated import (gone in Django 1.9) 2018-12-10 00:16:51 +01:00
Daniel Hahler
605e6fe296
flake8: ignore W503 (and pick W504) (#220) 2018-12-09 18:48:17 +01:00
Peter Bittner
06f2d57386 Fix flake8 complaints 2018-12-09 15:52:53 +01:00
Daniel Hahler
9dcb47dc55
Fix utils.reraise for exceptions without args (#210)
This is the case for e.g. `bdb.BdbQuit`.
2018-08-30 21:15:31 +02:00
Daniel Hahler
8f199eb40c _setup: do not call django.setup() if settings are configured already
Without this, using `configurations.setup()` after Django has been setup
already re-triggers the logging configuration, which then causes e.g.
pytest's caplog to not work anymore.
2018-08-16 17:04:50 +02:00
Daniel Hahler
fbb0ff8884 Fix compatibility with Django 2.1
Ref: https://github.com/django/django/pull/9894
Closes: https://github.com/jazzband/django-configurations/pull/201
2018-08-02 20:32:40 +02:00
Mike
1c6fd0f505 Add PositiveIntegerValue to only allow positive integers (#186) 2018-03-15 13:19:50 +01:00
Nicolas Delaby
8f318991c2 Drop unmaintained version of django and python
- Drop django==1.9 as it reached end of life
- Drop python2.6, python3.3, and bring python3.6
- Bring django-2.0 in the matrix as expected failure until we add its
support
2017-09-30 14:37:38 +02:00
José Antonio Perdiguero
a606003c77 Fix truthy and falsey of values (#162) 2016-10-13 00:00:47 +02:00
Jannis Leidel
ea8d4deb58 Merge pull request #156 from adamchainz/readthedocs.io
Convert readthedocs links for their .org -> .io migration for hosted projects
2016-07-30 02:11:24 +02:00
Jannis Leidel
eb0cde231b Update changelog. 2016-07-30 00:03:19 +02:00
Jannis Leidel
5dba80b313 Finally remove configurations.Settings. 2016-07-30 00:00:47 +02:00
Johannes Hoppe
9592356572 Move sphinx callback to a separate sphinx submodule 2016-06-13 12:26:52 +02:00
Adam Chainz
4158480c91 Convert readthedocs links for their .org -> .io migration for hosted projects
As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.
2016-06-11 10:56:42 +01:00
Johannes Hoppe
cd596f6788 Fixes #146 -- Adds multiprocessing support for sphinx 2016-04-05 18:14:20 +02:00
Maxime Rouyrre
aba5100e4f Fixed RemovedInDjango19Warning
It's better to try the new import method first because in Django<1.9 the
old method is still available and will raise a RemovedInDjango19Warning
that we could have avoided.
2016-03-11 11:02:26 +01:00
Nicolas Delaby
cf3961ea1d Bump upcoming version to 2.0 as this changeset introduce breaking change 2016-01-27 21:08:54 +01:00