Adam Johnson
b8f66f76ee
Move to PEP-451 style loader
2024-11-18 16:52:55 +00: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
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
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
Jannis Leidel
42641f5eb4
Switch to setuptools-scm.
2019-12-03 13:09:15 +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
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
Nicolas Delaby
063bf61a16
Drop support of python 2.6, 3.2 and Django < 1.8
2016-01-27 21:08:54 +01:00
John R Dietrick
cd0f1b4d0c
Fix handling of fallback to optparse.OptionParser
...
By the time the code here runs, it's too late to be modifying
base.BaseCommand.option_list; in fact doing so causes an OptionConflictError if
you later call another management command "recursively" while you're running
the first one.
We want to leave BaseCommand's option_list untouched (it's `()` by default in
Django 1.8+) in case the command we are wrapping has already upgraded to
argparse. BUT, if it hasn't, we'll get an OptionParser back, and can tack our
argument on at the last minute.
2015-12-19 18:25:53 +08:00
Jannis Leidel
6ce3740365
Cover the case in which BaseCommand.create_parser retursn optparse.OptionParser.
2015-02-13 21:52:47 +01:00
Jannis Leidel
f35e7e57e0
Add global --configuration option in Django >= 1.8.
2015-02-13 21:47:08 +01:00
Jannis Leidel
8be47c0813
Merge remote-tracking branch 'benjaminabel/master'
2015-02-13 18:12:56 +01:00
Jannis Leidel
e0e12b1b9f
Fixed minor flake8 error.
2015-02-13 16:21:17 +01:00
Benjamin ABEL
ae767eaf2d
Cleaned importer to be more DRY
2015-01-27 22:36:59 +01:00
Benjamin ABEL
d9b2815526
Use CommandParser instead of LaxOptionParser in django1.8
...
Added a django version check, and removed the `LaxOptionParser` import for django>=1.8 and used `CommandParser` instead as in Claude Paroz django [commit](8568638603 (diff-860fce37924469764af399caaa365e00R275) )
Reference: [#19973 (Management commands migration to argparse) –
Django](https://code.djangoproject.com/ticket/19973 )
2015-01-25 18:13:47 +01:00
Jannis Leidel
41dfcee46c
Backported LaxOptionParser from Django 1.7 to make it work on 1.8.
2015-01-06 21:16:14 +01:00
Jannis Leidel
ab0c748318
Fixed #43 — Removed stdout wrapper from management command hook to not accidently raise an exception too early. Instead use a logger.
2013-11-26 12:25:50 +01:00
Stefan Wehrmeyer
275a5b409a
Fix check_options of ConfigurationImporter
2013-10-08 09:32:05 +02:00
Jannis Leidel
2fd4966549
Add check_options option to the install method of the ConfigurationImporter to prevent unwanted command line option checks outside the management commands.
2013-09-12 18:51:59 +02:00
Jannis Leidel
3848e6b818
Drastically simplified exception messages in the importer.
...
Less eyebleed® included!
2013-09-06 22:41:14 +02:00
Jannis Leidel
90292e3cec
Fixed string formatting.
2013-07-27 16:05:23 +02:00
Jannis Leidel
1a54847375
Added a configuration values system.
...
This also adds some advanced features like a setup classmethod to the Configuration class.
Reorganized and extended the documentation.
2013-07-27 12:37:28 +02:00
Jannis Leidel
e31adbaeed
Renamed Settings class to Configuration to better match what it means. Settings is still importable and is marked to be deprecated in 1.0.
2013-07-27 12:05:39 +02:00
Jannis Leidel
bebe4f254b
Extended the setup methods in pre and post phase. Fixes #27 .
2013-05-15 11:32:57 +02:00
Jannis Leidel
df865840bc
Added a setup method hook for easier startup time code.
2013-05-15 10:57:30 +02:00
Jannis Leidel
6596e191f0
Added pristine decorator to handle callable settings. Fixes #28 .
2013-04-30 17:11:29 +02:00
Jannis Leidel
bbd5f2dce3
Use Django's lax option parser when looking for the configuration option to prevent overlapping with Django's own option parsing.
...
Fixes #21 , #22 , #24 . Thanks to @rolo for helping our in #24 .
2013-04-11 16:08:47 +02:00
Jannis Leidel
b7d6faa46d
Fixed exception syntax of a parallel branch.
2013-03-27 12:04:34 +01:00
Jannis Leidel
f7696e5810
Merge pull request #18 from mvantellingen/python3
...
Python3
2013-03-27 03:58:03 -07:00
Jannis Leidel
560a8b2b84
Merge pull request #16 from bclermont/fix-import
...
catch error raised inside settings code
2013-03-27 03:57:05 -07:00
Jannis Leidel
7db5db8bff
Handle the --configuration option for management commands during installation of the import hook.
2013-03-27 11:55:43 +01:00
Michael van Tellingen
2877b66982
Initial fixes for python 3 support
2013-01-30 21:45:36 +01:00
Bruno Clermont
41b8f3655c
fix indentation
2012-11-26 23:11:26 +08:00
Bruno Clermont
53bf1b5548
oups bad copy-paste
2012-11-26 16:29:59 +08:00
Bruno Clermont
1b052a3a0e
catch error raised inside the settings code
2012-11-26 16:25:00 +08:00
Jannis Leidel
08d36754f6
Merge branch 'master' of github.com:jezdez/django-configurations
2012-09-21 16:34:35 +02:00
Jannis Leidel
26bc0d692f
Added a global --configuration option to management commands and show configuration class path when using runserver. Fixes #9 .
2012-09-21 16:34:16 +02:00
Bruno Clermont
8b78278921
Don't catch AttributeError during cls init
...
if obj = cls() do have an attribute error inside it's initialization, it will appears as if the module could not be find.
which is hard to troubleshoot, when the module is really there :)
2012-09-05 14:29:05 +03:00
Jannis Leidel
775e1b9225
Initial version.
2012-07-21 15:56:04 +02:00