Commit graph

256 commits

Author SHA1 Message Date
James Keys
3e5447175e Version 1.0.0 2015-12-18 20:06:25 +07:00
James Keys
2b9c1d6879 Update changelog. 2015-12-18 10:25:23 +07:00
James Keys
aecce6f374 Bump version. 2015-12-18 09:57:16 +07:00
James Keys
2f26bbae69 Merge remote-tracking branch 'blueyed/fix-tests-and-travis' into upstream
Conflicts:
	tests/test_values.py
	tox.ini
2015-12-18 09:56:15 +07:00
James Keys
0a4f776df1 Merge remote-tracking branch 'jdietrick/master' into upstream
Conflicts:
	.travis.yml
2015-12-18 09:51:46 +07:00
Daniel Hahler
cb3a02ee51 Travis: use master branch in build status image
The URL is the one suggested by Travis CI itself.
2015-12-17 23:31:08 +01:00
Daniel Hahler
06fa8d3eab Travis: minor: fix indent 2015-12-17 23:31:08 +01:00
Daniel Hahler
b5e1eb6ade Travis/tox: use dj19 tarball, add master; remove unsupported
- Add `allow_failures` section for Django master on Travis.
 - Django 1.9 is only supported on Python 2.7 and 3.4+.
 - Only test main Python 2 and 3 with Django master.
2015-12-17 23:31:08 +01:00
Daniel Hahler
3a1a88bd15 Travis: use Python 3.5 for Python 3 flake8 test 2015-12-17 23:07:40 +01:00
Daniel Hahler
11990d1db6 tox: do not use coverage with Python 3.2
Fixes https://github.com/jezdez/django-configurations/issues/129.
2015-12-17 13:05:03 +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
3fe709196a Hook up PyPI via Travis. 2015-12-17 10:25:23 +01:00
Jannis Leidel
dd128b586d Moved to Jazzband. 2015-12-17 10:22:38 +01:00
Jannis Leidel
85fe4c0ae5 Merge branch 'master' of github.com:jezdez/django-configurations 2015-12-17 10:20:52 +01:00
John R Dietrick
c8be50b1f2 Django 1.9 drops support for Python 3.2, 3.3
https://docs.djangoproject.com/en/dev/releases/1.9/
2015-09-17 14:30:15 +08:00
John R Dietrick
10d7c42bef Fix tests, based on updates to django-cache-url in v1.0.0 2015-09-17 14:11:31 +08:00
John R Dietrick
95192bacd0 Add a test which demonstrates the optparse fallback issue 2015-09-17 14:11:31 +08:00
John R Dietrick
f7f1f734d1 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-09-10 20:45:03 +08:00
Jannis Leidel
0ff4c7612d Added a bus factor indicator. 2015-08-10 10:34:50 +02:00
Jannis Leidel
010067b433 Introduced environ_required parameter for Value class. Refs #118. 2015-08-09 14:54:55 +02:00
Jannis Leidel
8ba1804ff2 Added full_environ_name method to Value class. 2015-08-09 14:48:16 +02:00
Jannis Leidel
5ece107044 Only run __init__ in __new__ when late binding is enabled.
Signed-off-by: Jannis Leidel <jannis@leidel.info>
2015-03-16 21:19:40 +01: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
e332d5eff4 Use tar.gz instead of zip to work around an encoding issue in pip's unpacker. 2015-03-16 19:30:57 +01:00
Jannis Leidel
d9f60cfaef Try using the pip caching in the tox config. 2015-03-16 16:59:37 +01:00
Jannis Leidel
01274d4965 Use pip caching and docker based Travis runner. 2015-03-16 15:17:55 +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
cc869bf577 Merge pull request #94 from RonnyPfannschmidt/entrypoints
add entrypoints to run in non-source-tree installs
2015-03-16 15:08:46 +01:00
Ronny Pfannschmidt
7a0b2b378a add entrypoints to run in non-source-tree installs 2015-02-19 10:51:32 +01:00
Jannis Leidel
c60b7daac4 Fixed SequenceValue to work on Python 3.x. 2015-02-13 22:29:14 +01:00
Jannis Leidel
4d35ad346c Call django.setup() for Sphinx, too.
This also adds a configurations.setup() analogue to django.setup().
2015-02-13 22:18:33 +01:00
Jannis Leidel
b91ebf083f Merge pull request #91 from benjaminabel/notebook-support-for-django17
Add `django.setup()` in `load_ipython_extension` function for django>=1....
2015-02-13 22:08:56 +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
13980b3d80 Add Django 1.9/master testing. 2015-02-13 22:06:43 +01:00
Jannis Leidel
f7629aa84c Fix test error on Python 3.x. 2015-02-13 21:54:21 +01: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
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
61d162d376 Fix tox config. 2015-02-13 21:45:37 +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
Jannis Leidel
21d1712143 Use importlib.import_module if needed. 2015-02-13 16:24:02 +01:00
Jannis Leidel
e0e12b1b9f Fixed minor flake8 error. 2015-02-13 16:21:17 +01:00
Jannis Leidel
2e57cde3ea pytest-django works with Django 1.8 now 2015-02-10 18:29:01 +01:00
Benjamin ABEL
546f488197 Add django.setup() in load_ipython_extension function for django>=1.7 compatibility 2015-02-01 16:47:37 +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
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
Benjamin ABEL
a8bf15b358 Use django 1.8 branch in tox.ini 2015-01-25 18:12:41 +01:00