Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-django-nine for openSUSE:Factory checked in at 2022-05-10 15:12:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-django-nine (Old) and /work/SRC/openSUSE:Factory/.python-django-nine.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-nine" Tue May 10 15:12:03 2022 rev:5 rq:975952 version:0.2.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python-django-nine/python-django-nine.changes 2022-01-07 12:47:58.895912134 +0100 +++ /work/SRC/openSUSE:Factory/.python-django-nine.new.1538/python-django-nine.changes 2022-05-10 15:12:14.843594015 +0200 @@ -1,0 +2,10 @@ +Mon May 9 16:13:11 UTC 2022 - pgaj...@suse.com + +- version update to 0.2.5 + - Tested against more recent Django versions (Django 3.1 and 3.2). + - Added more Django versions. +- added patches + fix https://github.com/barseghyanartur/django-nine/issues/8 + + python-django-nine-no-mock.patch + +------------------------------------------------------------------- Old: ---- django-nine-0.2.3.tar.gz New: ---- django-nine-0.2.5.tar.gz python-django-nine-no-mock.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-django-nine.spec ++++++ --- /var/tmp/diff_new_pack.9Hxill/_old 2022-05-10 15:12:15.315594610 +0200 +++ /var/tmp/diff_new_pack.9Hxill/_new 2022-05-10 15:12:15.323594620 +0200 @@ -19,17 +19,18 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python36 1 Name: python-django-nine -Version: 0.2.3 +Version: 0.2.5 Release: 0 Summary: Compatibility library for Django License: GPL-2.0-only OR LGPL-2.1-or-later URL: https://github.com/barseghyanartur/django-nine/ Source: https://files.pythonhosted.org/packages/source/d/django-nine/django-nine-%{version}.tar.gz +# https://github.com/barseghyanartur/django-nine/issues/8 +Patch0: python-django-nine-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module Django} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest-django} # /SECTION BuildRequires: fdupes @@ -41,7 +42,7 @@ Version checking library for Django. %prep -%setup -q -n django-nine-%{version} +%autosetup -p1 -n django-nine-%{version} chmod a-x LICENSE_* CHANGELOG.rst README.rst # Remove backwards compatibility layer ++++++ django-nine-0.2.3.tar.gz -> django-nine-0.2.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/CHANGELOG.rst new/django-nine-0.2.5/CHANGELOG.rst --- old/django-nine-0.2.3/CHANGELOG.rst 2020-01-11 02:48:26.000000000 +0100 +++ new/django-nine-0.2.5/CHANGELOG.rst 2021-08-26 23:07:01.000000000 +0200 @@ -15,6 +15,18 @@ 0.3.2 to 0.4). - All backwards incompatible changes are mentioned in this document. +0.2.5 +----- +2021-08-26 + +- Tested against more recent Django versions (Django 3.1 and 3.2). + +0.2.4 +----- +2020-12-03 + +- Added more Django versions. + 0.2.3 ----- 2020-01-11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/PKG-INFO new/django-nine-0.2.5/PKG-INFO --- old/django-nine-0.2.3/PKG-INFO 2020-01-11 02:56:12.000000000 +0100 +++ new/django-nine-0.2.5/PKG-INFO 2021-08-27 02:47:55.986303600 +0200 @@ -1,141 +1,15 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: django-nine -Version: 0.2.3 +Version: 0.2.5 Summary: Version checking library. Home-page: https://github.com/barseghyanartur/django-nine/ Author: Artur Barseghyan Author-email: artur.barsegh...@gmail.com License: GPL-2.0-only OR LGPL-2.1-or-later -Description: =========== - django-nine - =========== - `django-nine` - version checking library for Django. - - .. image:: https://img.shields.io/pypi/v/django-nine.svg - :target: https://pypi.python.org/pypi/django-nine - :alt: PyPI Version - - .. image:: https://img.shields.io/pypi/pyversions/django-nine.svg - :target: https://pypi.python.org/pypi/django-nine/ - :alt: Supported Python versions - - .. image:: https://img.shields.io/travis/barseghyanartur/django-nine/master.svg - :target: http://travis-ci.org/barseghyanartur/django-nine - :alt: Build Status - - .. image:: https://img.shields.io/badge/license-GPL--2.0--only%20OR%20LGPL--2.1--or--later-blue.svg - :target: https://github.com/barseghyanartur/django-nine/#License - :alt: GPL-2.0-only OR LGPL-2.1-or-later - - .. image:: https://coveralls.io/repos/github/barseghyanartur/django-nine/badge.svg?branch=master - :target: https://coveralls.io/github/barseghyanartur/django-nine?branch=master - :alt: Coverage - - Prerequisites - ============= - - Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. - - Django 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, 2.2 and 3.0. - - Documentation - ============= - Documentation is available on `Read the Docs - <http://django-nine.readthedocs.io/>`_. - - Installation - ============ - Install latest stable version from PyPI: - - .. code-block:: sh - - pip install django-nine - - Or latest stable version from GitHub: - - .. code-block:: sh - - pip install https://github.com/barseghyanartur/django-nine/archive/stable.zip - - Or latest stable version from BitBucket: - - .. code-block:: sh - - pip install https://bitbucket.org/barseghyanartur/django-nine/get/stable.zip - - Usage - ===== - Get Django versions - ------------------- - In code - ~~~~~~~ - For example, if Django version installed in your environment is 1.7.4, then - the following would be true. - - .. code-block:: python - - from django_nine import versions - - versions.DJANGO_1_7 # True - versions.DJANGO_LTE_1_7 # True - versions.DJANGO_GTE_1_7 # True - versions.DJANGO_GTE_1_8 # False - versions.DJANGO_GTE_1_4 # True - versions.DJANGO_LTE_1_6 # False - - In templates - ~~~~~~~~~~~~ - With use of context processors - ############################## - Add ``nine.context_processors.versions`` to your context processors. - - .. code-block:: python - - TEMPLATES[0]['OPTIONS']['context_processors'] += \ - ['django_nine.context_processors.versions'] - - Or if you are using an old version of Django: - - .. code-block:: python - - TEMPLATE_CONTEXT_PROCESSORS += ['django_nine.context_processors.versions'] - - Testing - ======= - Simply type: - - .. code-block:: sh - - ./runtests.py - - Or use tox: - - .. code-block:: sh - - tox - - Or use tox to check specific env: - - .. code-block:: sh - - tox -e py37 - - Or run Django tests: - - .. code-block:: sh - - ./manage.py test nine --settings=settings.testing - - License - ======= - GPL-2.0-only OR LGPL-2.1-or-later - - Support - ======= - For any issues contact me at the e-mail given in the `Author`_ section. - - Author - ====== - Artur Barseghyan <artur.barsegh...@gmail.com> - +Project-URL: Bug Tracker, https://github.com/barseghyanartur/django-nine/issues +Project-URL: Documentation, https://django-nine.readthedocs.io/ +Project-URL: Source Code, https://github.com/barseghyanartur/django-nine +Project-URL: Changelog, https://django-nine.readthedocs.io/en/latest/changelog.html Keywords: django,compatibility Platform: UNKNOWN Classifier: Programming Language :: Python :: 2.6 @@ -154,3 +28,137 @@ Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Development Status :: 4 - Beta +License-File: LICENSE_GPL2.0.txt +License-File: LICENSE_LGPL_2.1.txt + +=========== +django-nine +=========== +`django-nine` - version checking library for Django. + +.. image:: https://img.shields.io/pypi/v/django-nine.svg + :target: https://pypi.python.org/pypi/django-nine + :alt: PyPI Version + +.. image:: https://img.shields.io/pypi/pyversions/django-nine.svg + :target: https://pypi.python.org/pypi/django-nine/ + :alt: Supported Python versions + +.. image:: https://img.shields.io/travis/barseghyanartur/django-nine/master.svg + :target: http://travis-ci.org/barseghyanartur/django-nine + :alt: Build Status + +.. image:: https://img.shields.io/badge/license-GPL--2.0--only%20OR%20LGPL--2.1--or--later-blue.svg + :target: https://github.com/barseghyanartur/django-nine/#License + :alt: GPL-2.0-only OR LGPL-2.1-or-later + +.. image:: https://coveralls.io/repos/github/barseghyanartur/django-nine/badge.svg?branch=master + :target: https://coveralls.io/github/barseghyanartur/django-nine?branch=master + :alt: Coverage + +Prerequisites +============= +- Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. +- Django 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, 2.2, 3.0 and 3.1. + +Documentation +============= +Documentation is available on `Read the Docs +<http://django-nine.readthedocs.io/>`_. + +Installation +============ +Install latest stable version from PyPI: + +.. code-block:: sh + + pip install django-nine + +Or latest stable version from GitHub: + +.. code-block:: sh + + pip install https://github.com/barseghyanartur/django-nine/archive/stable.zip + +Or latest stable version from BitBucket: + +.. code-block:: sh + + pip install https://bitbucket.org/barseghyanartur/django-nine/get/stable.zip + +Usage +===== +Get Django versions +------------------- +In code +~~~~~~~ +For example, if Django version installed in your environment is 1.7.4, then +the following would be true. + +.. code-block:: python + + from django_nine import versions + + versions.DJANGO_1_7 # True + versions.DJANGO_LTE_1_7 # True + versions.DJANGO_GTE_1_7 # True + versions.DJANGO_GTE_1_8 # False + versions.DJANGO_GTE_1_4 # True + versions.DJANGO_LTE_1_6 # False + +In templates +~~~~~~~~~~~~ +With use of context processors +############################## +Add ``nine.context_processors.versions`` to your context processors. + +.. code-block:: python + + TEMPLATES[0]['OPTIONS']['context_processors'] += \ + ['django_nine.context_processors.versions'] + +Or if you are using an old version of Django: + +.. code-block:: python + + TEMPLATE_CONTEXT_PROCESSORS += ['django_nine.context_processors.versions'] + +Testing +======= +Simply type: + +.. code-block:: sh + + ./runtests.py + +Or use tox: + +.. code-block:: sh + + tox + +Or use tox to check specific env: + +.. code-block:: sh + + tox -e py37 + +Or run Django tests: + +.. code-block:: sh + + ./manage.py test nine --settings=settings.testing + +License +======= +GPL-2.0-only OR LGPL-2.1-or-later + +Support +======= +For any issues contact me at the e-mail given in the `Author`_ section. + +Author +====== +Artur Barseghyan <artur.barsegh...@gmail.com> + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/README.rst new/django-nine-0.2.5/README.rst --- old/django-nine-0.2.3/README.rst 2020-01-11 02:51:16.000000000 +0100 +++ new/django-nine-0.2.5/README.rst 2020-12-03 21:28:24.000000000 +0100 @@ -26,7 +26,7 @@ Prerequisites ============= - Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. -- Django 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, 2.2 and 3.0. +- Django 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, 2.2, 3.0 and 3.1. Documentation ============= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/setup.py new/django-nine-0.2.5/setup.py --- old/django-nine-0.2.3/setup.py 2020-01-11 02:51:42.000000000 +0100 +++ new/django-nine-0.2.5/setup.py 2021-08-26 23:08:29.000000000 +0200 @@ -3,20 +3,19 @@ from setuptools import setup, find_packages try: - readme = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() + readme = open(os.path.join(os.path.dirname(__file__), "README.rst")).read() except: - readme = '' + readme = "" -version = '0.2.3' +version = "0.2.5" install_requires = [ - #'Django', - #'mock', + "Django", ] tests_require = [ - 'Django', - 'mock', + "Django", + "mock", ] try: @@ -25,12 +24,12 @@ PY3 = sys.version_info[0] == 3 if LTE_PY26: - install_requires.append('importlib') + install_requires.append("importlib") except: pass setup( - name='django-nine', + name="django-nine", version=version, description="Version checking library.", long_description="{0}".format(readme), @@ -53,13 +52,19 @@ "Operating System :: OS Independent", "Development Status :: 4 - Beta", ], - keywords='django, compatibility', - author='Artur Barseghyan', - author_email='artur.barsegh...@gmail.com', - url='https://github.com/barseghyanartur/django-nine/', - package_dir={'': 'src'}, - packages=find_packages(where='./src'), - license='GPL-2.0-only OR LGPL-2.1-or-later', + project_urls={ + "Bug Tracker": "https://github.com/barseghyanartur/django-nine/issues", + "Documentation": "https://django-nine.readthedocs.io/", + "Source Code": "https://github.com/barseghyanartur/django-nine", + "Changelog": "https://django-nine.readthedocs.io/" "en/latest/changelog.html", + }, + keywords="django, compatibility", + author="Artur Barseghyan", + author_email="artur.barsegh...@gmail.com", + url="https://github.com/barseghyanartur/django-nine/", + package_dir={"": "src"}, + packages=find_packages(where="./src"), + license="GPL-2.0-only OR LGPL-2.1-or-later", install_requires=install_requires, tests_require=tests_require, package_data={}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/django_nine/__init__.py new/django-nine-0.2.5/src/django_nine/__init__.py --- old/django-nine-0.2.3/src/django_nine/__init__.py 2020-01-11 02:48:40.000000000 +0100 +++ new/django-nine-0.2.5/src/django_nine/__init__.py 2021-08-26 23:07:42.000000000 +0200 @@ -1,5 +1,5 @@ -__title__ = 'django_nine' -__version__ = '0.2.3' -__author__ = 'Artur Barseghyan <artur.barsegh...@gmail.com>' -__copyright__ = '2015-2020 Artur Barseghyan' -__license__ = 'GPL-2.0-only OR LGPL-2.1-or-later' +__title__ = "django_nine" +__version__ = "0.2.4" +__author__ = "Artur Barseghyan <artur.barsegh...@gmail.com>" +__copyright__ = "2015-2020 Artur Barseghyan" +__license__ = "GPL-2.0-only OR LGPL-2.1-or-later" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/django_nine/context_processors.py new/django-nine-0.2.5/src/django_nine/context_processors.py --- old/django-nine-0.2.3/src/django_nine/context_processors.py 2020-01-11 02:48:54.000000000 +0100 +++ new/django-nine-0.2.5/src/django_nine/context_processors.py 2021-08-26 23:07:42.000000000 +0200 @@ -1,11 +1,11 @@ from django_nine import versions as nine_versions -__title__ = 'django_nine.versions' -__author__ = 'Artur Barseghyan <artur.barsegh...@gmail.com>' -__copyright__ = '2015-2020 Artur Barseghyan' -__license__ = 'GPL-2.0-only OR LGPL-2.1-or-later' +__title__ = "django_nine.versions" +__author__ = "Artur Barseghyan <artur.barsegh...@gmail.com>" +__copyright__ = "2015-2020 Artur Barseghyan" +__license__ = "GPL-2.0-only OR LGPL-2.1-or-later" __all__ = [ - 'versions', + "versions", ] @@ -15,4 +15,4 @@ :param django.http.HttpRequest request: :return dict: """ - return {'VERSIONS': nine_versions} + return {"VERSIONS": nine_versions} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/django_nine/tests/base.py new/django-nine-0.2.5/src/django_nine/tests/base.py --- old/django-nine-0.2.3/src/django_nine/tests/base.py 2019-05-16 23:10:20.000000000 +0200 +++ new/django-nine-0.2.5/src/django_nine/tests/base.py 2021-08-26 23:07:42.000000000 +0200 @@ -1,12 +1,12 @@ import logging -__title__ = 'django_nine.tests.base' -__author__ = 'Artur Barseghyan' -__copyright__ = '2015-2019 Artur Barseghyan' -__license__ = 'GPL-2.0-only OR LGPL-2.1-or-later' +__title__ = "django_nine.tests.base" +__author__ = "Artur Barseghyan" +__copyright__ = "2015-2019 Artur Barseghyan" +__license__ = "GPL-2.0-only OR LGPL-2.1-or-later" __all__ = ( - 'LOG_INFO', - 'log_info', + "LOG_INFO", + "log_info", ) @@ -23,14 +23,15 @@ def inner(self, *args, **kwargs): result = func(self, *args, **kwargs) - logger.info('\n\n%s' % func.__name__) - logger.info('============================') + logger.info("\n\n%s" % func.__name__) + logger.info("============================") if func.__doc__: logger.info('""" %s """' % func.__doc__.strip()) - logger.info('----------------------------') + logger.info("----------------------------") if result is not None: logger.info(result) - logger.info('\n++++++++++++++++++++++++++++') + logger.info("\n++++++++++++++++++++++++++++") return result + return inner diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/django_nine/tests/test_versions.py new/django-nine-0.2.5/src/django_nine/tests/test_versions.py --- old/django-nine-0.2.3/src/django_nine/tests/test_versions.py 2019-09-19 23:56:21.000000000 +0200 +++ new/django-nine-0.2.5/src/django_nine/tests/test_versions.py 2021-08-26 23:07:42.000000000 +0200 @@ -1,5 +1,6 @@ import unittest import mock + # For Python3 >= 3.4 try: from importlib import reload @@ -12,27 +13,29 @@ from .base import log_info -__title__ = 'django_nine.tests.test_versions' -__author__ = 'Artur Barseghyan' -__copyright__ = 'Copyright (c) 2015 Artur Barseghyan' -__license__ = 'GPL-2.0-only OR LGPL-2.1-or-later' -__all__ = ('VersionsTest',) +__title__ = "django_nine.tests.test_versions" +__author__ = "Artur Barseghyan" +__copyright__ = "Copyright (c) 2015 Artur Barseghyan" +__license__ = "GPL-2.0-only OR LGPL-2.1-or-later" +__all__ = ("VersionsTest",) class VersionsTest(unittest.TestCase): """ Tests of ``django_nine.versions`` module. """ + def setUp(self): pass @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='1.4.21')) + @mock.patch("django.get_version", mock.MagicMock(return_value="1.4.21")) def test_django_1_4_21(self): """ Tests as if we were using Django==1.4.21. """ from django_nine import versions + reload(versions) # Exact version matching @@ -60,12 +63,13 @@ self.assertFalse(versions.DJANGO_GTE_1_9) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='1.5.5')) + @mock.patch("django.get_version", mock.MagicMock(return_value="1.5.5")) def test_django_1_5_5(self): """ Tests as if we were using Django==1.5.5. """ from django_nine import versions + reload(versions) # Exact version matching @@ -93,12 +97,13 @@ self.assertFalse(versions.DJANGO_GTE_1_9) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='1.6.5')) + @mock.patch("django.get_version", mock.MagicMock(return_value="1.6.5")) def test_django_1_6_5(self): """ Tests as if we were using Django==1.6.5. """ from django_nine import versions + reload(versions) # Exact version matching @@ -126,12 +131,13 @@ self.assertFalse(versions.DJANGO_GTE_1_9) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='1.7.5')) + @mock.patch("django.get_version", mock.MagicMock(return_value="1.7.5")) def test_django_1_7_5(self): """ Tests as if we were using Django==1.7.5. """ from django_nine import versions + reload(versions) # Exact version matching @@ -159,12 +165,13 @@ self.assertFalse(versions.DJANGO_GTE_1_9) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='1.8.a1')) + @mock.patch("django.get_version", mock.MagicMock(return_value="1.8.a1")) def test_django_1_8_a1(self): """ Tests as if we were using Django==1.8.a1. """ from django_nine import versions + reload(versions) # Exact version matching @@ -192,12 +199,13 @@ self.assertFalse(versions.DJANGO_GTE_1_9) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='1.10')) + @mock.patch("django.get_version", mock.MagicMock(return_value="1.10")) def test_django_1_10(self): """ Tests as if we were using Django==1.10. """ from django_nine import versions + reload(versions) # Exact version matching @@ -227,12 +235,13 @@ self.assertTrue(versions.DJANGO_GTE_1_10) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='1.11')) + @mock.patch("django.get_version", mock.MagicMock(return_value="1.11")) def test_django_1_11(self): """ Tests as if we were using Django==1.11. """ from django_nine import versions + reload(versions) # Exact version matching @@ -278,12 +287,13 @@ self.assertFalse(versions.DJANGO_GTE_3_0) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='2.0')) + @mock.patch("django.get_version", mock.MagicMock(return_value="2.0")) def test_django_2_0(self): """ Tests as if we were using Django==2.0. """ from django_nine import versions + reload(versions) # Exact version matching @@ -329,12 +339,13 @@ self.assertFalse(versions.DJANGO_GTE_3_0) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='2.1')) + @mock.patch("django.get_version", mock.MagicMock(return_value="2.1")) def test_django_2_1(self): """ Tests as if we were using Django==2.1. """ from django_nine import versions + reload(versions) # Exact version matching @@ -380,12 +391,13 @@ self.assertFalse(versions.DJANGO_GTE_3_0) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='2.2')) + @mock.patch("django.get_version", mock.MagicMock(return_value="2.2")) def test_django_2_2(self): """ Tests as if we were using Django==2.2. """ from django_nine import versions + reload(versions) # Exact version matching @@ -431,12 +443,13 @@ self.assertFalse(versions.DJANGO_GTE_3_0) @log_info - @mock.patch('django.get_version', mock.MagicMock(return_value='3.0')) + @mock.patch("django.get_version", mock.MagicMock(return_value="3.0")) def test_django_3_0(self): """ Tests as if we were using Django==3.0. """ from django_nine import versions + reload(versions) # Exact version matching diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/django_nine/user.py new/django-nine-0.2.5/src/django_nine/user.py --- old/django-nine-0.2.3/src/django_nine/user.py 2019-05-19 19:13:56.000000000 +0200 +++ new/django-nine-0.2.5/src/django_nine/user.py 2021-08-26 23:07:42.000000000 +0200 @@ -14,7 +14,7 @@ from django.contrib.auth.models import User else: # Cannot use contrib.auth.get_user_model() at compile time. - user_app_name, user_model_name = settings.AUTH_USER_MODEL.rsplit('.', 1) + user_app_name, user_model_name = settings.AUTH_USER_MODEL.rsplit(".", 1) User = None if DJANGO_LTE_1_6: @@ -25,6 +25,7 @@ break elif DJANGO_GTE_1_7: from django.apps import apps + try: User = apps.get_registered_model(user_app_name, user_model_name) except KeyError: @@ -37,15 +38,15 @@ "".format(settings.AUTH_USER_MODEL, user_app_name) ) -__title__ = 'nine.user' -__author__ = 'Artur Barseghyan <artur.barsegh...@gmail.com>' -__copyright__ = 'Copyright (c) 2015-2017 Artur Barseghyan' -__license__ = 'GPL 2.0/LGPL 2.1' -__all__ = ('User',) +__title__ = "nine.user" +__author__ = "Artur Barseghyan <artur.barsegh...@gmail.com>" +__copyright__ = "Copyright (c) 2015-2017 Artur Barseghyan" +__license__ = "GPL 2.0/LGPL 2.1" +__all__ = ("User",) warnings.warn( "The `django_nine.user` module is deprecated and will be removed in " "version 0.3.", - DeprecationWarning + DeprecationWarning, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/django_nine/versions.py new/django-nine-0.2.5/src/django_nine/versions.py --- old/django-nine-0.2.3/src/django_nine/versions.py 2020-01-11 02:48:47.000000000 +0100 +++ new/django-nine-0.2.5/src/django_nine/versions.py 2021-08-26 23:07:42.000000000 +0200 @@ -7,46 +7,49 @@ import django -__title__ = 'django_nine.versions' -__author__ = 'Artur Barseghyan <artur.barsegh...@gmail.com>' -__copyright__ = '2015-2020 Artur Barseghyan' -__license__ = 'GPL-2.0-only OR LGPL-2.1-or-later' +__title__ = "django_nine.versions" +__author__ = "Artur Barseghyan <artur.barsegh...@gmail.com>" +__copyright__ = "2015-2020 Artur Barseghyan" +__license__ = "GPL-2.0-only OR LGPL-2.1-or-later" __all__ = [ - 'LOOSE_DJANGO_VERSION', 'LOOSE_DJANGO_MINOR_VERSION', + "LOOSE_DJANGO_VERSION", + "LOOSE_DJANGO_MINOR_VERSION", ] LOOSE_DJANGO_VERSION = LooseVersion(django.get_version()) LOOSE_DJANGO_MINOR_VERSION = LooseVersion( - '.'.join([str(i) for i in LOOSE_DJANGO_VERSION.version[0:2]]) + ".".join([str(i) for i in LOOSE_DJANGO_VERSION.version[0:2]]) ) # Loose versions LOOSE_VERSIONS = ( - '1.4', - '1.5', - '1.6', - '1.7', - '1.8', - '1.9', - '1.10', - '1.11', - '2.0', - '2.1', - '2.2', - '3.0', - '3.1', - '3.2', - '3.3', - '3.4', - '4.0', - '4.1', - '4.2', - '4.3', - '4.4', + "1.4", + "1.5", + "1.6", + "1.7", + "1.8", + "1.9", + "1.10", + "1.11", + "2.0", + "2.1", + "2.2", + "3.0", + "3.1", + "3.2", + "4.0", + "4.1", + "4.2", + "5.0", + "5.1", + "5.2", + "6.0", + "6.1", + "6.2", ) for v in LOOSE_VERSIONS: - var_name = 'LOOSE_VERSION_{0}'.format(v.replace('.', '_')) + var_name = "LOOSE_VERSION_{0}".format(v.replace(".", "_")) globals()[var_name] = LooseVersion(v) __all__.append(var_name) @@ -54,34 +57,36 @@ EXACT_VERSIONS = LOOSE_VERSIONS[:-1] for i, v in enumerate(EXACT_VERSIONS): - l_cur = globals()['LOOSE_VERSION_{0}' - ''.format(LOOSE_VERSIONS[i].replace('.', '_'))] - l_nxt = globals()['LOOSE_VERSION_{0}' - ''.format(LOOSE_VERSIONS[i+1].replace('.', '_'))] - var_name = 'DJANGO_{0}'.format(v.replace('.', '_')) - globals()[var_name] = (l_cur <= LOOSE_DJANGO_VERSION < l_nxt) + l_cur = globals()[ + "LOOSE_VERSION_{0}" "".format(LOOSE_VERSIONS[i].replace(".", "_")) + ] + l_nxt = globals()[ + "LOOSE_VERSION_{0}" "".format(LOOSE_VERSIONS[i + 1].replace(".", "_")) + ] + var_name = "DJANGO_{0}".format(v.replace(".", "_")) + globals()[var_name] = l_cur <= LOOSE_DJANGO_VERSION < l_nxt __all__.append(var_name) # LTE list LTE_VERSIONS = LOOSE_VERSIONS[:-1] for i, v in enumerate(EXACT_VERSIONS): - l_cur = globals()['LOOSE_VERSION_{0}' - ''.format(LOOSE_VERSIONS[i].replace('.', '_'))] - var_name = 'DJANGO_LTE_{0}'.format(v.replace('.', '_')) - globals()[var_name] = (LOOSE_DJANGO_MINOR_VERSION <= l_cur) + l_cur = globals()[ + "LOOSE_VERSION_{0}" "".format(LOOSE_VERSIONS[i].replace(".", "_")) + ] + var_name = "DJANGO_LTE_{0}".format(v.replace(".", "_")) + globals()[var_name] = LOOSE_DJANGO_MINOR_VERSION <= l_cur __all__.append(var_name) # GTE list GTE_VERSIONS = LOOSE_VERSIONS[:-1] for i, v in enumerate(EXACT_VERSIONS): - l_cur = globals()['LOOSE_VERSION_{0}' - ''.format(LOOSE_VERSIONS[i].replace('.', '_'))] - var_name = 'DJANGO_GTE_{0}'.format(v.replace('.', '_')) - globals()[var_name] = ( - LOOSE_DJANGO_MINOR_VERSION >= l_cur - ) + l_cur = globals()[ + "LOOSE_VERSION_{0}" "".format(LOOSE_VERSIONS[i].replace(".", "_")) + ] + var_name = "DJANGO_GTE_{0}".format(v.replace(".", "_")) + globals()[var_name] = LOOSE_DJANGO_MINOR_VERSION >= l_cur __all__.append(var_name) __all__ = tuple(__all__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/django_nine.egg-info/PKG-INFO new/django-nine-0.2.5/src/django_nine.egg-info/PKG-INFO --- old/django-nine-0.2.3/src/django_nine.egg-info/PKG-INFO 2020-01-11 02:56:12.000000000 +0100 +++ new/django-nine-0.2.5/src/django_nine.egg-info/PKG-INFO 2021-08-27 02:47:55.000000000 +0200 @@ -1,141 +1,15 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: django-nine -Version: 0.2.3 +Version: 0.2.5 Summary: Version checking library. Home-page: https://github.com/barseghyanartur/django-nine/ Author: Artur Barseghyan Author-email: artur.barsegh...@gmail.com License: GPL-2.0-only OR LGPL-2.1-or-later -Description: =========== - django-nine - =========== - `django-nine` - version checking library for Django. - - .. image:: https://img.shields.io/pypi/v/django-nine.svg - :target: https://pypi.python.org/pypi/django-nine - :alt: PyPI Version - - .. image:: https://img.shields.io/pypi/pyversions/django-nine.svg - :target: https://pypi.python.org/pypi/django-nine/ - :alt: Supported Python versions - - .. image:: https://img.shields.io/travis/barseghyanartur/django-nine/master.svg - :target: http://travis-ci.org/barseghyanartur/django-nine - :alt: Build Status - - .. image:: https://img.shields.io/badge/license-GPL--2.0--only%20OR%20LGPL--2.1--or--later-blue.svg - :target: https://github.com/barseghyanartur/django-nine/#License - :alt: GPL-2.0-only OR LGPL-2.1-or-later - - .. image:: https://coveralls.io/repos/github/barseghyanartur/django-nine/badge.svg?branch=master - :target: https://coveralls.io/github/barseghyanartur/django-nine?branch=master - :alt: Coverage - - Prerequisites - ============= - - Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. - - Django 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, 2.2 and 3.0. - - Documentation - ============= - Documentation is available on `Read the Docs - <http://django-nine.readthedocs.io/>`_. - - Installation - ============ - Install latest stable version from PyPI: - - .. code-block:: sh - - pip install django-nine - - Or latest stable version from GitHub: - - .. code-block:: sh - - pip install https://github.com/barseghyanartur/django-nine/archive/stable.zip - - Or latest stable version from BitBucket: - - .. code-block:: sh - - pip install https://bitbucket.org/barseghyanartur/django-nine/get/stable.zip - - Usage - ===== - Get Django versions - ------------------- - In code - ~~~~~~~ - For example, if Django version installed in your environment is 1.7.4, then - the following would be true. - - .. code-block:: python - - from django_nine import versions - - versions.DJANGO_1_7 # True - versions.DJANGO_LTE_1_7 # True - versions.DJANGO_GTE_1_7 # True - versions.DJANGO_GTE_1_8 # False - versions.DJANGO_GTE_1_4 # True - versions.DJANGO_LTE_1_6 # False - - In templates - ~~~~~~~~~~~~ - With use of context processors - ############################## - Add ``nine.context_processors.versions`` to your context processors. - - .. code-block:: python - - TEMPLATES[0]['OPTIONS']['context_processors'] += \ - ['django_nine.context_processors.versions'] - - Or if you are using an old version of Django: - - .. code-block:: python - - TEMPLATE_CONTEXT_PROCESSORS += ['django_nine.context_processors.versions'] - - Testing - ======= - Simply type: - - .. code-block:: sh - - ./runtests.py - - Or use tox: - - .. code-block:: sh - - tox - - Or use tox to check specific env: - - .. code-block:: sh - - tox -e py37 - - Or run Django tests: - - .. code-block:: sh - - ./manage.py test nine --settings=settings.testing - - License - ======= - GPL-2.0-only OR LGPL-2.1-or-later - - Support - ======= - For any issues contact me at the e-mail given in the `Author`_ section. - - Author - ====== - Artur Barseghyan <artur.barsegh...@gmail.com> - +Project-URL: Bug Tracker, https://github.com/barseghyanartur/django-nine/issues +Project-URL: Documentation, https://django-nine.readthedocs.io/ +Project-URL: Source Code, https://github.com/barseghyanartur/django-nine +Project-URL: Changelog, https://django-nine.readthedocs.io/en/latest/changelog.html Keywords: django,compatibility Platform: UNKNOWN Classifier: Programming Language :: Python :: 2.6 @@ -154,3 +28,137 @@ Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Development Status :: 4 - Beta +License-File: LICENSE_GPL2.0.txt +License-File: LICENSE_LGPL_2.1.txt + +=========== +django-nine +=========== +`django-nine` - version checking library for Django. + +.. image:: https://img.shields.io/pypi/v/django-nine.svg + :target: https://pypi.python.org/pypi/django-nine + :alt: PyPI Version + +.. image:: https://img.shields.io/pypi/pyversions/django-nine.svg + :target: https://pypi.python.org/pypi/django-nine/ + :alt: Supported Python versions + +.. image:: https://img.shields.io/travis/barseghyanartur/django-nine/master.svg + :target: http://travis-ci.org/barseghyanartur/django-nine + :alt: Build Status + +.. image:: https://img.shields.io/badge/license-GPL--2.0--only%20OR%20LGPL--2.1--or--later-blue.svg + :target: https://github.com/barseghyanartur/django-nine/#License + :alt: GPL-2.0-only OR LGPL-2.1-or-later + +.. image:: https://coveralls.io/repos/github/barseghyanartur/django-nine/badge.svg?branch=master + :target: https://coveralls.io/github/barseghyanartur/django-nine?branch=master + :alt: Coverage + +Prerequisites +============= +- Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. +- Django 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, 2.2, 3.0 and 3.1. + +Documentation +============= +Documentation is available on `Read the Docs +<http://django-nine.readthedocs.io/>`_. + +Installation +============ +Install latest stable version from PyPI: + +.. code-block:: sh + + pip install django-nine + +Or latest stable version from GitHub: + +.. code-block:: sh + + pip install https://github.com/barseghyanartur/django-nine/archive/stable.zip + +Or latest stable version from BitBucket: + +.. code-block:: sh + + pip install https://bitbucket.org/barseghyanartur/django-nine/get/stable.zip + +Usage +===== +Get Django versions +------------------- +In code +~~~~~~~ +For example, if Django version installed in your environment is 1.7.4, then +the following would be true. + +.. code-block:: python + + from django_nine import versions + + versions.DJANGO_1_7 # True + versions.DJANGO_LTE_1_7 # True + versions.DJANGO_GTE_1_7 # True + versions.DJANGO_GTE_1_8 # False + versions.DJANGO_GTE_1_4 # True + versions.DJANGO_LTE_1_6 # False + +In templates +~~~~~~~~~~~~ +With use of context processors +############################## +Add ``nine.context_processors.versions`` to your context processors. + +.. code-block:: python + + TEMPLATES[0]['OPTIONS']['context_processors'] += \ + ['django_nine.context_processors.versions'] + +Or if you are using an old version of Django: + +.. code-block:: python + + TEMPLATE_CONTEXT_PROCESSORS += ['django_nine.context_processors.versions'] + +Testing +======= +Simply type: + +.. code-block:: sh + + ./runtests.py + +Or use tox: + +.. code-block:: sh + + tox + +Or use tox to check specific env: + +.. code-block:: sh + + tox -e py37 + +Or run Django tests: + +.. code-block:: sh + + ./manage.py test nine --settings=settings.testing + +License +======= +GPL-2.0-only OR LGPL-2.1-or-later + +Support +======= +For any issues contact me at the e-mail given in the `Author`_ section. + +Author +====== +Artur Barseghyan <artur.barsegh...@gmail.com> + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/django_nine.egg-info/SOURCES.txt new/django-nine-0.2.5/src/django_nine.egg-info/SOURCES.txt --- old/django-nine-0.2.3/src/django_nine.egg-info/SOURCES.txt 2020-01-11 02:56:12.000000000 +0100 +++ new/django-nine-0.2.5/src/django_nine.egg-info/SOURCES.txt 2021-08-27 02:47:55.000000000 +0200 @@ -13,6 +13,7 @@ src/django_nine.egg-info/PKG-INFO src/django_nine.egg-info/SOURCES.txt src/django_nine.egg-info/dependency_links.txt +src/django_nine.egg-info/requires.txt src/django_nine.egg-info/top_level.txt src/django_nine/tests/__init__.py src/django_nine/tests/base.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/django_nine.egg-info/requires.txt new/django-nine-0.2.5/src/django_nine.egg-info/requires.txt --- old/django-nine-0.2.3/src/django_nine.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/django-nine-0.2.5/src/django_nine.egg-info/requires.txt 2021-08-27 02:47:55.000000000 +0200 @@ -0,0 +1 @@ +Django diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/nine/__init__.py new/django-nine-0.2.5/src/nine/__init__.py --- old/django-nine-0.2.3/src/nine/__init__.py 2019-05-19 19:14:57.000000000 +0200 +++ new/django-nine-0.2.5/src/nine/__init__.py 2021-08-26 23:07:42.000000000 +0200 @@ -4,6 +4,5 @@ from django_nine import context_processors # NOQA warnings.warn( - "The `nine` namespace is deprecated, use `django_nine` instead.", - DeprecationWarning + "The `nine` namespace is deprecated, use `django_nine` instead.", DeprecationWarning ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/nine/user.py new/django-nine-0.2.5/src/nine/user.py --- old/django-nine-0.2.3/src/nine/user.py 2019-05-19 19:14:45.000000000 +0200 +++ new/django-nine-0.2.5/src/nine/user.py 2021-08-26 23:07:42.000000000 +0200 @@ -4,12 +4,11 @@ warnings.warn( - "The `nine` namespace is deprecated, use `django_nine` instead.", - DeprecationWarning + "The `nine` namespace is deprecated, use `django_nine` instead.", DeprecationWarning ) warnings.warn( "The `django_nine.user` module is deprecated and will be removed in " "version 0.3.", - DeprecationWarning + DeprecationWarning, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-nine-0.2.3/src/nine/versions.py new/django-nine-0.2.5/src/nine/versions.py --- old/django-nine-0.2.3/src/nine/versions.py 2019-05-19 19:14:37.000000000 +0200 +++ new/django-nine-0.2.5/src/nine/versions.py 2021-08-26 23:07:42.000000000 +0200 @@ -3,6 +3,5 @@ from django_nine.versions import * # NOQA warnings.warn( - "The `nine` namespace is deprecated, use `django_nine` instead.", - DeprecationWarning + "The `nine` namespace is deprecated, use `django_nine` instead.", DeprecationWarning ) ++++++ python-django-nine-no-mock.patch ++++++ diff -upr django-nine-0.2.5.orig/src/django_nine/tests/test_context_processors.py django-nine-0.2.5/src/django_nine/tests/test_context_processors.py --- django-nine-0.2.5.orig/src/django_nine/tests/test_context_processors.py 2022-05-09 18:01:19.114938906 +0200 +++ django-nine-0.2.5/src/django_nine/tests/test_context_processors.py 2022-05-09 18:01:19.122938958 +0200 @@ -1,5 +1,5 @@ # import unittest -# import mock +# from unittest import mock # # For Python3 >= 3.4 # try: # from importlib import reload diff -upr django-nine-0.2.5.orig/src/django_nine/tests/test_versions.py django-nine-0.2.5/src/django_nine/tests/test_versions.py --- django-nine-0.2.5.orig/src/django_nine/tests/test_versions.py 2022-05-09 18:01:19.114938906 +0200 +++ django-nine-0.2.5/src/django_nine/tests/test_versions.py 2022-05-09 18:01:19.122938958 +0200 @@ -1,5 +1,5 @@ import unittest -import mock +from unittest import mock # For Python3 >= 3.4 try: