Commit graph

66 commits

Author SHA1 Message Date
Christopher Broderick
63cac8d54e Fix failing test due to external library change 2024-10-28 20:55:21 +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
Paolo Melchiorre
df2a7f18fd
Fix #368 -- Update Python and Django versions 2023-10-04 16:52:16 +02:00
Paolo Melchiorre
352d95b2ab
Update github actions and fix pipeline 2023-01-19 18:06:05 +01:00
Paolo Melchiorre
794b858548
Fixed #336 -- Update Python and Django versions (#337) 2022-08-05 16:42:58 +02: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
Brian Helba
93e628e870
Refactor the documentation build process (#311)
* Refactor the documentation build process

Significant improvements:
* Allow easy isolated local builds via a dedicated Tox environment
* Configure Sphinx to use consistent packages and theme across local, CI,
  and ReadTheDocs builds; local builds now look the same as the published
  RTD pages
* Explicitly add a ReadTheDocs configuration as code, per their documented
  best practices
* Remove lots of dead code and simplify the Sphinx configuration file
* Build docs in a dedicated CI step and enable stricter warning checking

* Fix docutils related build error.

* Relax Sphinx version.

* Invalidate RTD build cache.

* No need to combine coverage reporting I think.

* Add combining again.

Co-authored-by: Jannis Leidel <jannis@leidel.info>
2021-11-08 16:49:41 +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
df967f4d76 Remove an obsolete command used for testing
The test using this was removed in a045609934.
2021-10-25 11:21:06 -04: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
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
0e45c7b3e4 Also move testing requirements into packaging setup 2018-12-09 15:52:05 +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
ea060f0985 tox/Travis: use separate coverage factor
This will only install/run coverage on demand.
2018-08-26 02:00:52 +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
Drew Winstel
a045609934 Drop obsolete Django 1.8 and 1.10 from Travis configs (#207)
* Drop obsolete versions of Django from Travis tests

Django 1.8 reached EOL in April 2018.
Django 1.10 reached EOL in December 2017.

* Add support for testing Django 2.0 and 2.1 on Python 3.7

* Drop obsolete test (requires Django < 1.10)
2018-08-16 17:03:31 +02:00
Mike
1c6fd0f505 Add PositiveIntegerValue to only allow positive integers (#186) 2018-03-15 13:19:50 +01:00
Daniel Hahler
d364802a8a Fix Django 2.0: use new url syntax (#182) 2017-10-05 02:42:34 +02: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
Daniel Hahler
6f163727dc tests: fix test_cache_url_value for new django-cache-url 2017-09-29 12:21:12 +02:00
José Antonio Perdiguero
a606003c77 Fix truthy and falsey of values (#162) 2016-10-13 00:00:47 +02:00
Johannes Hoppe
7aaffd3a95 Add EMAIL_USE_SSL to tests (#157)
`dj-email-url` added support for `EMAIL_USE_SSL` in its latest
version.
2016-06-14 18:59:13 +02:00
Johannes Hoppe
9592356572 Move sphinx callback to a separate sphinx submodule 2016-06-13 12:26:52 +02:00
Johannes Hoppe
cd596f6788 Fixes #146 -- Adds multiprocessing support for sphinx 2016-04-05 18:14:20 +02:00
Maxime Rouyrre
7b4df1f6ce Fixed test_database_url_value 2016-03-11 12:01:40 +01: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
66bb6a8725 Get skipIf without installing unittest2
In Python 2.7+, unittest *is* unittest2. We prefer this one. But in
Python 2.6, we can get skipIf from django.utils.unittest, provided
Django is 1.8 or older.
2016-01-03 01:21:29 -05:00
John R Dietrick
4fe1c74b35 Add a test which demonstrates the optparse fallback issue 2016-01-03 01:20:29 -05:00
Daniel Hahler
3a1a88bd15 Travis: use Python 3.5 for Python 3 flake8 test 2015-12-17 23:07:40 +01:00
Daniel Hahler
09eae37b23 Fix test_cache_url_value for newer django-cache-url
This fixes the following failure:

    ERROR: test_cache_url_value (tests.test_values.ValueTests)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "…/django-configurations/configurations/values.py", line 158, in to_python
        return self._caster(value)
      File "…/django-configurations/.tox/py34-dj18/lib/python3.4/site-packages/django_cache_url.py", line 98, in parse
        config['LOCATION'] = "%s:%s:%s" % (url.hostname, url.port, db)
      File "…/pyenv/3.4.3/lib/python3.4/urllib/parse.py", line 156, in port
        port = int(port, 10)
    ValueError: invalid literal for int() with base 10: 'port'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "…/django-configurations/tests/test_values.py", line 415, in test_cache_url_value
        value = CacheURLValue(cache_url)
      File "…/django-configurations/configurations/values.py", line 420, in __init__
        self.default = self.to_python(self.default)
      File "…/django-configurations/configurations/values.py", line 423, in to_python
        value = super(DictBackendMixin, self).to_python(value)
      File "…/django-configurations/configurations/values.py", line 160, in to_python
        raise ValueError(self.message.format(value))
    ValueError: Cannot interpret cache URL value 'redis://user@host:port/1'

    ----------------------------------------------------------------------
    Ran 63 tests in 1.132s

    FAILED (errors=1)
2015-12-17 13:05:03 +01:00
Jannis Leidel
010067b433 Introduced environ_required parameter for Value class. Refs #118. 2015-08-09 14:54:55 +02:00
Miguel Araujo Perez
e09e1e0f42 Added equal operator to values.Value
Allows value setting to work when checking if setting variable is within
a list, i.e: settings.database in ['default', 'other']

Signed-off-by: Jannis Leidel <jannis@leidel.info>
2015-03-16 20:54:17 +01:00
Jannis Leidel
d9f60cfaef Try using the pip caching in the tox config. 2015-03-16 16:59:37 +01:00
Jannis Leidel
6f6930495c Get rid of manage.py for running tests now that we have django-cadmin.
Closes #92.
2015-03-16 15:13:31 +01:00
Jannis Leidel
8f617ad98c Merge pull request #85 from abbottc/master
Add values.TupleOfTuplesValue (plus associated tests and docs)
2015-02-13 22:08:08 +01:00
Jannis Leidel
f7629aa84c Fix test error on Python 3.x. 2015-02-13 21:54:21 +01:00
Jannis Leidel
f35e7e57e0 Add global --configuration option in Django >= 1.8. 2015-02-13 21:47:08 +01:00
Jannis Leidel
9be0c4f700 Fix compatibility between Django versions with regard to the type of some iterable settings such as TEMPLATE_CONTEXT_PROCESSORS. 2015-02-13 21:46:25 +01:00
Jannis Leidel
8be47c0813 Merge remote-tracking branch 'benjaminabel/master' 2015-02-13 18:12:56 +01:00
Jannis Leidel
ea28a6ebd6 Minor fixes for 1.8. 2015-02-13 18:12:02 +01:00
Jannis Leidel
c6b3d05f71 Revert "Use py.test."
This reverts commit 7799241900.
2015-02-13 16:43:55 +01:00
Benjamin ABEL
36a7061a61 Add a test for configuration argument
This test do not use mock, and only searches the `configuration` option in
the help messages.
2015-01-27 22:49:58 +01:00
Christian Abbott
8287ab6f7f Merge remote-tracking branch 'upstream/master' 2015-01-07 03:19:24 -08:00
Christian Abbott
e0a68fdbb6 Rename TupleOfTupleValue to SingleNestedTupleValue; Add SingleNestedListValue and do a DRY refactor of ListValue, TupleValue, and their SingleNested subclasses 2015-01-07 03:08:30 -08:00
Jannis Leidel
7799241900 Use py.test.
Signed-off-by: Jannis Leidel <jannis@leidel.info>
2015-01-06 23:27:00 +01:00
Jannis Leidel
44476bdd1d Merge remote-tracking branch 'hiisi13/master'
Signed-off-by: Jannis Leidel <jannis@leidel.info>
2015-01-06 23:15:08 +01:00
Jannis Leidel
01e3f5837f Merge remote-tracking branch 'joke2k/dot-env'
Signed-off-by: Jannis Leidel <jannis@leidel.info>

Conflicts:
	.gitignore
2015-01-06 22:34:29 +01:00
Mauricio de Abreu Antunes
3f892f9814 Fixed wrong behaviour when assigning BooleanValue
When assigning False to a BooleanValue and reusing it was raising a
ValueError exception because BooleanValue was evaluating False as None.

Thanks to @abbottc for catching this error.
2014-12-27 10:34:40 -02:00
Christian Abbott
c4ba5ca559 Add TupleOfTuplesValue along with associated tests and updated documentation 2014-12-18 07:15:20 -08:00
Jannis Leidel
fb9275744e Merge pull request #78 from slafs/validationmixinfix
fix ValidationMixin instantiation with no default
2014-12-12 16:28:58 +01:00