[Python-modules-commits] [django-nose] 05/12: New upstream version 1.4.5

Michael Fladischer fladi at moszumanska.debian.org
Tue Oct 17 13:34:38 UTC 2017


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch debian/master
in repository django-nose.

commit 3d397725db5ab41be84d35092e063aa9074e6a03
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Tue Oct 17 13:52:11 2017 +0200

    New upstream version 1.4.5
---
 .gitignore                         |  3 +++
 .travis.yml                        | 32 ++++++++++++++++++++++----------
 Makefile                           | 24 +++++++++++-------------
 README.rst                         |  9 +++------
 changelog.rst                      |  6 +++++-
 django_nose/__init__.py            |  2 +-
 django_nose/runner.py              | 11 ++++++++---
 django_nose/tools.py               |  7 ++++---
 docs/usage.rst                     |  6 +++---
 requirements-rtd.txt               |  3 ++-
 requirements.txt                   | 35 ++++++++++++++---------------------
 setup.py                           |  3 ++-
 testapp/migrations/0001_initial.py |  2 +-
 testapp/models.py                  |  2 +-
 testapp/settings.py                |  1 +
 tox.ini                            | 13 ++++++++-----
 16 files changed, 89 insertions(+), 70 deletions(-)

diff --git a/.gitignore b/.gitignore
index 5c9b3f8..7cb0d5a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,6 @@ testapp.sqlite3
 
 # Sphinx documentation build
 docs/_build/*
+
+# pyenv
+.python-version
diff --git a/.travis.yml b/.travis.yml
index 2b3590c..a2b75af 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,10 @@ matrix:
         - env: TOXENV=docs
           python: "2.7"
         # Supported Python / Django versions w/ SQLite
+        - env: TOXENV=py27-django-111
+          python: "2.7"
+        - env: TOXENV=py36-django-111
+          python: "3.6"
         - env: TOXENV=py27-django-110
           python: "2.7"
         - env: TOXENV=py35-django-110
@@ -24,9 +28,13 @@ matrix:
         - env: TOXENV=py34-django-18
           python: "3.4"
         # Test with PostgreSQL
-        - env: TOXENV=py27-django-19-postgres DATABASE_URL="postgres://postgres@localhost:5432/py27-django-110-postgres"
+        - env: TOXENV=py27-django-111-postgres DATABASE_URL="postgres://postgres@localhost:5432/py27-django-111-postgres"
+          python: "2.7"
+        - env: TOXENV=py36-django-111-postgres DATABASE_URL="postgres://postgres@localhost:5432/py36-django-111-postgres"
+          python: "3.6"
+        - env: TOXENV=py27-django-110-postgres DATABASE_URL="postgres://postgres@localhost:5432/py27-django-110-postgres"
           python: "2.7"
-        - env: TOXENV=py35-django-19-postgres DATABASE_URL="postgres://postgres@localhost:5432/py35-django-110-postgres"
+        - env: TOXENV=py35-django-110-postgres DATABASE_URL="postgres://postgres@localhost:5432/py35-django-110-postgres"
           python: "3.5"
         - env: TOXENV=py27-django-19-postgres DATABASE_URL="postgres://postgres@localhost:5432/py27-django-19-postgres"
           python: "2.7"
@@ -35,6 +43,10 @@ matrix:
         - env: TOXENV=py27-django-18-postgres DATABASE_URL="postgres://postgres@localhost:5432/py27-django-18-postgres"
           python: "2.7"
         # Test with MySQL
+        - env: TOXENV=py27-django-111-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-111-mysql"
+          python: "2.7"
+        - env: TOXENV=py36-django-111-mysql DATABASE_URL="mysql://travis@localhost:3306/py36-django-111-mysql"
+          python: "3.6"
         - env: TOXENV=py27-django-110-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-110-mysql"
           python: "2.7"
         - env: TOXENV=py35-django-110-mysql DATABASE_URL="mysql://travis@localhost:3306/py35-django-110-mysql"
@@ -46,20 +58,20 @@ matrix:
         - env: TOXENV=py27-django-18-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-18-mysql"
           python: "2.7"
         # Django master is allowed to fail
-        - env: TOXENV=py27-django-master
-          python: "2.7"
         - env: TOXENV=py35-django-master
           python: "3.5"
-        - env: TOXENV=py27-django-master-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-master-mysql"
-          python: "2.7"
-        - env: TOXENV=py35-django-master-postgres DATABASE_URL="postgres://postgres@localhost:5432/py35-django-master-postgres"
+        - env: TOXENV=py36-django-master
+          python: "3.6"
+        - env: TOXENV=py35-django-master-mysql DATABASE_URL="mysql://travis@localhost:3306/py35-django-master-mysql"
           python: "3.5"
+        - env: TOXENV=py36-django-master-postgres DATABASE_URL="postgres://postgres@localhost:5432/py36-django-master-postgres"
+          python: "3.6"
     allow_failures:
         # Master is allowed to fail
-        - env: TOXENV=py27-django-master
         - env: TOXENV=py35-django-master
-        - env: TOXENV=py27-django-master-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-master-mysql"
-        - env: TOXENV=py35-django-master-postgres DATABASE_URL="postgres://postgres@localhost:5432/py35-django-master-postgres"
+        - env: TOXENV=py36-django-master
+        - env: TOXENV=py35-django-master-mysql DATABASE_URL="mysql://travis@localhost:3306/py35-django-master-mysql"
+        - env: TOXENV=py36-django-master-postgres DATABASE_URL="postgres://postgres@localhost:5432/py36-django-master-postgres"
 
 install:
     - pip install tox coveralls
diff --git a/Makefile b/Makefile
index 98e39c5..90b2ad0 100644
--- a/Makefile
+++ b/Makefile
@@ -28,10 +28,8 @@ clean-build:
 	rm -fr *.egg-info
 
 clean-pyc:
-	find . -name '*.pyc' -exec rm -f {} +
-	find . -name '*.pyo' -exec rm -f {} +
-	find . -name '*~' -exec rm -f {} +
-	find . -name '__pycache__' -exec rm -fr {} +
+	find . \( -name \*.pyc -o -name \*.pyo -o -name __pycache__ \) -delete
+	find . -name '*~' -delete
 
 clean-test:
 	rm -fr .tox/
@@ -50,7 +48,7 @@ test:
 	./manage.py test
 
 test-all:
-	tox --skip-missing-interpreters
+	COVERAGE=1 tox --skip-missing-interpreters
 
 coverage-console:
 	coverage erase
@@ -62,17 +60,17 @@ coverage: coverage-console
 	coverage html
 	open htmlcov/index.html
 
-release: clean
-	python setup.py sdist bdist_wheel upload
-	python -m webbrowser -n https://testpypi.python.org/pypi/django-nose
+release: sdist
+	twine upload dist/*
+	python -m webbrowser -n https://pypi.python.org/pypi/django-nose
 
-test-release:
-	python setup.py register -r https://testpypi.python.org/pypi
-	python setup.py sdist bdist_wheel upload -r https://testpypi.python.org/pypi
+# Add [test] section to ~/.pypirc, https://test.pypi.org/legacy/
+test-release: sdist
+	twine upload --repository test dist/*
 	python -m webbrowser -n https://testpypi.python.org/pypi/django-nose
 
 sdist: clean
-	python setup.py sdist
+	python setup.py sdist bdist_wheel
 	ls -l dist
 	check-manifest
-	pyroma dist/`ls -t dist | head -n1`
+	pyroma dist/`ls -t dist | grep tar.gz | head -n1`
diff --git a/README.rst b/README.rst
index 047ab35..30605fe 100644
--- a/README.rst
+++ b/README.rst
@@ -6,10 +6,6 @@ django-nose
     :alt: The PyPI package
     :target: https://pypi.python.org/pypi/django-nose
 
-.. image:: https://img.shields.io/pypi/dw/django-nose.svg
-    :alt: PyPI download statistics
-    :target: https://pypi.python.org/pypi/django-nose
-
 .. image:: https://img.shields.io/travis/django-nose/django-nose/master.svg
     :alt: TravisCI Build Status
     :target: https://travis-ci.org/django-nose/django-nose
@@ -31,7 +27,7 @@ django-nose
     accidentally shadowing test classes.
   * Taking advantage of all the useful `nose plugins`_
 
-.. _nose: https://nose.readthedocs.org/en/latest/
+.. _nose: https://nose.readthedocs.io/en/latest/
 .. _nose plugins: http://nose-plugins.jottit.com/
 
 It also provides:
@@ -49,6 +45,7 @@ recommended.  It follows the `Django's support policy`_, supporting:
   * Django 1.8 (LTS) with Python 2.7, 3.4, or 3.5
   * Django 1.9 with Python 2.7, 3.4, or 3.5
   * Django 1.10 with Python 2.7, 3.4, or 3.5
+  * Django 1.11 (LTS) with Python 2.7, 3.4, 3.5, or 3.6
 
 .. _latest release: https://pypi.python.org/pypi/nose
 .. _Django's support policy: https://docs.djangoproject.com/en/1.8/internals/release-process/#supported-versions
@@ -57,4 +54,4 @@ Development
 -----------
 :Code:   https://github.com/django-nose/django-nose
 :Issues: https://github.com/django-nose/django-nose/issues?state=open
-:Docs:   https://django-nose.readthedocs.org
+:Docs:   https://django-nose.readthedocs.io
diff --git a/changelog.rst b/changelog.rst
index 1512d4e..8e63182 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -1,10 +1,14 @@
 Changelog
 ---------
 
+1.4.5 (2017-08-22)
+~~~~~~~~~~~~~~~~~~
+* Add Django 1.11 support
+
 1.4.4 (2016-06-27)
 ~~~~~~~~~~~~~~~~~~
 * Add Django 1.10 support
-* Drop Django 1.4, 1.7, and Python 2.6 support
+* Drop Django 1.4 - 1.7, and Python 2.6 support
 * Drop South support
 
 1.4.3 (2015-12-28)
diff --git a/django_nose/__init__.py b/django_nose/__init__.py
index 07d9bcb..beda667 100644
--- a/django_nose/__init__.py
+++ b/django_nose/__init__.py
@@ -8,5 +8,5 @@ assert BasicNoseRunner
 assert NoseTestSuiteRunner
 assert FastFixtureTestCase
 
-VERSION = (1, 4, 4)
+VERSION = (1, 4, 5)
 __version__ = '.'.join(map(str, VERSION))
diff --git a/django_nose/runner.py b/django_nose/runner.py
index 14a26f4..d37b9dd 100644
--- a/django_nose/runner.py
+++ b/django_nose/runner.py
@@ -89,6 +89,10 @@ class BaseRunner(DiscoverRunner):
         '--keepdb', '--reverse', '--debug-sql',
         # 1.9 arguments
         '--parallel',
+        # 1.10 arguments
+        '--tag', '--exclude-tag',
+        # 1.11 arguments
+        '--debug-mode',
     ]
 
     #
@@ -242,7 +246,8 @@ class BasicNoseRunner(BaseRunner):
         return result_plugin.result
 
     def run_tests(self, test_labels, extra_tests=None):
-        """Run the unit tests for all the test names in the provided list.
+        """
+        Run the unit tests for all the test names in the provided list.
 
         Test names specified may be file or module names, and may optionally
         indicate the test case to run by separating the module or file name
@@ -255,7 +260,6 @@ class BasicNoseRunner(BaseRunner):
         not the whole string.
 
         Examples:
-
         runner.run_tests( ('test.module',) )
         runner.run_tests(['another.test:TestCase.test_method'])
         runner.run_tests(['a.test:TestCase'])
@@ -267,6 +271,7 @@ class BasicNoseRunner(BaseRunner):
         but the extra tests will not be run.  Maybe later.
 
         Returns the number of tests that failed.
+
         """
         nose_argv = (['nosetests'] + list(test_labels))
         if hasattr(settings, 'NOSE_ARGS'):
@@ -431,7 +436,7 @@ class NoseTestSuiteRunner(BasicNoseRunner):
                 m._meta.db_table in tables]
 
     def setup_databases(self):
-        """Setup databases, skipping DB creation if requested and possible."""
+        """Set up databases. Skip DB creation if requested and possible."""
         for alias in connections:
             connection = connections[alias]
             creation = connection.creation
diff --git a/django_nose/tools.py b/django_nose/tools.py
index 4469691..c341a1d 100644
--- a/django_nose/tools.py
+++ b/django_nose/tools.py
@@ -14,6 +14,7 @@ def _get_nose_vars():
             new_names[t] = getattr(tools, t)
     return new_names
 
+
 for _name, _value in _get_nose_vars().items():
     vars()[_name] = _value
 
@@ -40,7 +41,7 @@ def _get_django_vars():
         """A dummy test case for gathering current assertion helpers."""
 
         def nop():
-            """A dummy test to get an initialized test case."""
+            """Do nothing, dummy test to get an initialized test case."""
             pass
     dummy_test = Dummy('nop')
 
@@ -86,5 +87,5 @@ def assert_mail_count(count, msg=None):
     if msg is None:
         msg = ', '.join([e.subject for e in mail.outbox])
         msg = '%d != %d %s' % (len(mail.outbox), count, msg)
-    # assert_equals is dynamicaly added above
-    assert_equals(len(mail.outbox), count, msg)  # nopep8
+    # assert_equals is dynamicaly added above. F821 is undefined name error
+    assert_equals(len(mail.outbox), count, msg)  # noqa: F821
diff --git a/docs/usage.rst b/docs/usage.rst
index 219d190..6e5a95e 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -7,7 +7,7 @@ test`` as usual.
 See ``./manage.py help test`` for all the options nose provides, and look to
 the `nose docs`_ for more help with nose.
 
-.. _nose docs: https://nose.readthedocs.org
+.. _nose docs: https://nose.readthedocs.io/en/latest/
 
 Enabling Database Reuse
 -----------------------
@@ -185,7 +185,7 @@ setup.cfg`_ (as usual) or you can specify them in settings.py like this::
 
     NOSE_ARGS = ['--failed', '--stop']
 
-.. _nose.cfg or setup.cfg: https://nose.readthedocs.org/en/latest/usage.html#configuration
+.. _nose.cfg or setup.cfg: https://nose.readthedocs.io/en/latest/usage.html#configuration
 
 
 Custom Plugins
@@ -203,5 +203,5 @@ Just like middleware or anything else, each string must be a dot-separated,
 importable path to an actual class. Each plugin class will be instantiated and
 added to the Nose test runner.
 
-.. _make custom plugins: https://nose.readthedocs.org/en/latest/plugins.html#writing-plugins
+.. _make custom plugins: https://nose.readthedocs.io/en/latest/plugins.html#writing-plugins
 
diff --git a/requirements-rtd.txt b/requirements-rtd.txt
index bf4f197..f95ea8b 100644
--- a/requirements-rtd.txt
+++ b/requirements-rtd.txt
@@ -1,4 +1,5 @@
 # Requirements for ReadTheDocs
-# None right now, but avoid installing gnureadline, etc.
 # Must be set in the RTD Admin, at:
 # https://readthedocs.org/dashboard/django-nose/advanced/
+Django>=1.10,<1.11
+nose
diff --git a/requirements.txt b/requirements.txt
index fa345d8..16da17d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,44 +3,37 @@
 #
 
 # Latest Django
-Django==1.8.5
+Django>=1.11,<2.0
 
 # This project
 -e .
 
 # Load database config from environment
-dj-database-url==0.3.0
+dj-database-url==0.4.2
 
 # Packaging
-wheel==0.26.0
+wheel==0.29.0
+twine==1.9.1
 
 # PEP8, PEP257, and static analysis
-mccabe==0.3.1
-pep8==1.6.2
-pyflakes==1.0.0
-flake8==2.5.0
-pep257==0.7.0
-flake8-docstrings==0.2.1
+flake8==3.4.1
+flake8-docstrings==1.1.0
 
 # Code coverage
-coverage==4.0
+coverage==4.4.1
 
 # Documentation
-Pygments==2.0.2
-Sphinx==1.3.1
-docutils==0.12
+Sphinx==1.6.3
 
 # Packaging Linters
-check-manifest==0.25
-pyroma==1.8.2
+check-manifest==0.35
+pyroma==2.2
 
 # Multi-env test runner
-virtualenv==13.1.2
-py==1.4.30
-tox==2.1.1
+tox==2.7.0
 
 # Better interactive debugging
 gnureadline==6.3.3
-ipython==4.0.0
-ipdb==0.8.1
-ipdbplugin==1.4.2
+ipython==5.4.1
+ipdb==0.10.3
+ipdbplugin==1.4.5
diff --git a/setup.py b/setup.py
index e9ff421..d02e383 100644
--- a/setup.py
+++ b/setup.py
@@ -34,9 +34,10 @@ _(Older changes can be found in the full documentation)._
 """ % locals()
     return long_description
 
+
 setup(
     name='django-nose',
-    version='1.4.4',
+    version='1.4.5',
     description='Makes your Django tests simple and snappy',
     long_description=get_long_description('django-nose'),
     author='Jeff Balogh',
diff --git a/testapp/migrations/0001_initial.py b/testapp/migrations/0001_initial.py
index b1dc553..fafc22f 100644
--- a/testapp/migrations/0001_initial.py
+++ b/testapp/migrations/0001_initial.py
@@ -36,7 +36,7 @@ class Migration(migrations.Migration):
         migrations.AddField(
             model_name='choice',
             name='question',
-            field=models.ForeignKey(to='testapp.Question'),
+            field=models.ForeignKey(to='testapp.Question', on_delete=models.CASCADE),
             preserve_default=True,
         ),
     ]
diff --git a/testapp/models.py b/testapp/models.py
index f4b398e..9f471bf 100644
--- a/testapp/models.py
+++ b/testapp/models.py
@@ -21,7 +21,7 @@ class Question(models.Model):
 class Choice(models.Model):
     """A poll answer."""
 
-    question = models.ForeignKey(Question)
+    question = models.ForeignKey(Question, on_delete=models.CASCADE)
     choice_text = models.CharField(max_length=200)
     votes = models.IntegerField(default=0)
 
diff --git a/testapp/settings.py b/testapp/settings.py
index 51a157f..a803307 100644
--- a/testapp/settings.py
+++ b/testapp/settings.py
@@ -20,6 +20,7 @@ def rel_path(*subpaths):
     """Construct the full path given a relative path."""
     return path.join(BASE_DIR, *subpaths)
 
+
 DATABASES = {
     'default':
         dj_database_url.config(
diff --git a/tox.ini b/tox.ini
index fd3f0ca..af4df74 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,8 @@
 [tox]
 envlist =
-    {py27,py34,py35}-django-{18,19,110,master}
+    py{27,34,35}-django-{18,19,110}{,-postgres,-mysql}
+    py{27,34,35,36}-django-111{,-postgres,-mysql}
+    py{35,36}-django-master{,-postgres,-mysql}
     flake8
     docs
 skip_missing_interpreters = True
@@ -9,16 +11,17 @@ skip_missing_interpreters = True
 passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH COVERAGE RUNTEST_ARGS DATABASE_URL
 commands =
     ./runtests.sh {env:RUNTEST_ARGS:}
-    coverage combine
+    - coverage combine
 deps =
     coveralls
     dj-database-url
     django-18: Django>=1.8,<1.9
     django-19: Django>=1.9,<1.10
-    django-110: Django==1.10b1
+    django-110: Django==1.10,<1.11
+    django-111: Django==1.11,<1.12
     django-master: https://github.com/django/django/archive/master.tar.gz
-    {py27,py34,py35}-django-{18,19,110,master}-postgres: psycopg2
-    {py27,py34,py35}-django-{18,19,110,master}-mysql: mysqlclient
+    postgres: psycopg2
+    mysql: mysqlclient
 
 [testenv:flake8]
 deps =

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-nose.git



More information about the Python-modules-commits mailing list