Hello community, here is the log from the commit of package python-pytest-doctestplus for openSUSE:Factory checked in at 2019-09-26 20:37:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pytest-doctestplus (Old) and /work/SRC/openSUSE:Factory/.python-pytest-doctestplus.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-doctestplus" Thu Sep 26 20:37:55 2019 rev:5 rq:732116 version:0.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pytest-doctestplus/python-pytest-doctestplus.changes 2019-09-07 11:55:47.898254009 +0200 +++ /work/SRC/openSUSE:Factory/.python-pytest-doctestplus.new.2352/python-pytest-doctestplus.changes 2019-09-26 20:37:55.439073145 +0200 @@ -1,0 +2,11 @@ +Fri Sep 20 09:47:57 UTC 2019 - Tomáš Chvátal <tchva...@suse.com> + +- Update to 0.4.0: + * Avoid SyntaxWarning regarding invalid escape sequence in Python 3.9. [#62] + * Compatibility with pytest 5.1 to avoid AttributeError caused by FixtureRequest. [#63] +- Drop merged patch: + * merged_pr_63.patch +- Rebase patch: + * pr_37.patch + +------------------------------------------------------------------- Old: ---- merged_pr_63.patch pytest-doctestplus-0.3.0.tar.gz New: ---- pytest-doctestplus-0.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pytest-doctestplus.spec ++++++ --- /var/tmp/diff_new_pack.piVZ8B/_old 2019-09-26 20:37:56.207071093 +0200 +++ /var/tmp/diff_new_pack.piVZ8B/_new 2019-09-26 20:37:56.211071082 +0200 @@ -26,7 +26,7 @@ %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest-doctestplus%{psuffix} -Version: 0.3.0 +Version: 0.4.0 Release: 0 Summary: Pytest plugin with advanced doctest features License: BSD-3-Clause @@ -35,7 +35,6 @@ Source: https://files.pythonhosted.org/packages/source/p/pytest-doctestplus/pytest-doctestplus-%{version}.tar.gz # Backport of https://github.com/astropy/pytest-doctestplus/pull/37 Patch0: pr_37.patch -Patch1: https://github.com/astropy/pytest-doctestplus/commit/0a7176531d8395a381bf76ce8ae2e59eef1a60ea.patch#/merged_pr_63.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -56,7 +55,7 @@ %prep %setup -q -n pytest-doctestplus-%{version} -%autopatch -p1 +%patch0 -p1 # do not change the pytest behaviour for us rm -f setup.cfg ++++++ pr_37.patch ++++++ --- /var/tmp/diff_new_pack.piVZ8B/_old 2019-09-26 20:37:56.243070996 +0200 +++ /var/tmp/diff_new_pack.piVZ8B/_new 2019-09-26 20:37:56.243070996 +0200 @@ -4,11 +4,11 @@ Inline np.allclose to remove dependency on numpy -diff --git a/pytest_doctestplus/output_checker.py b/pytest_doctestplus/output_checker.py -index e77e2ec..b889b1c 100644 ---- a/pytest_doctestplus/output_checker.py -+++ b/pytest_doctestplus/output_checker.py -@@ -6,8 +6,7 @@ normalizations of Python expression output. See the docstring on +Index: pytest-doctestplus-0.4.0/pytest_doctestplus/output_checker.py +=================================================================== +--- pytest-doctestplus-0.4.0.orig/pytest_doctestplus/output_checker.py ++++ pytest-doctestplus-0.4.0/pytest_doctestplus/output_checker.py +@@ -6,8 +6,7 @@ normalizations of Python expression outp import doctest import re @@ -18,7 +18,7 @@ import six from six.moves import zip -@@ -125,8 +124,10 @@ class OutputChecker(doctest.OutputChecker): +@@ -125,8 +124,10 @@ class OutputChecker(doctest.OutputChecke else: nw_.append(nw) @@ -31,16 +31,16 @@ return False # replace all floats in the "got" string by those from "wanted". -diff --git a/setup.py b/setup.py -index 6513c57..463f382 100755 ---- a/setup.py -+++ b/setup.py -@@ -48,7 +48,7 @@ setup( +Index: pytest-doctestplus-0.4.0/setup.py +=================================================================== +--- pytest-doctestplus-0.4.0.orig/setup.py ++++ pytest-doctestplus-0.4.0/setup.py +@@ -40,7 +40,7 @@ setup( 'Topic :: Utilities', ], - keywords=[ 'doctest', 'rst', 'pytest', 'py.test' ], -- install_requires=[ 'six', 'pytest>=3.0', 'numpy>=1.10' ], -+ install_requires=[ 'six', 'pytest>=3.0'], + keywords=['doctest', 'rst', 'pytest', 'py.test'], +- install_requires=['six', 'pytest>=3.0', 'numpy>=1.10'], ++ install_requires=['six', 'pytest>=3.0'], python_requires='>=2.7', entry_points={ 'pytest11': [ ++++++ pytest-doctestplus-0.3.0.tar.gz -> pytest-doctestplus-0.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/CHANGES.rst new/pytest-doctestplus-0.4.0/CHANGES.rst --- old/pytest-doctestplus-0.3.0/CHANGES.rst 2019-03-06 19:32:26.000000000 +0100 +++ new/pytest-doctestplus-0.4.0/CHANGES.rst 2019-09-18 04:14:46.000000000 +0200 @@ -1,3 +1,13 @@ +0.4.0 (2019-09-17) +================== + +- Avoid ``SyntaxWarning`` regarding invalid escape sequence in Python + 3.9. [#62] + +- Compatibility with ``pytest`` 5.1 to avoid ``AttributeError`` caused by + ``FixtureRequest``. [#63] + + 0.3.0 (2019-03-06) ================== @@ -10,7 +20,7 @@ - Drop support for ``pytest`` versions earlier than 3.0. [#46] - Extend ``doctest-skip``, ``doctest-skip-all``, and ``doctest-requires`` - directives to work in TeX files. [#43] + directives to work in TeX files. [#43, #47] 0.2.0 (2018-11-14) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/PKG-INFO new/pytest-doctestplus-0.4.0/PKG-INFO --- old/pytest-doctestplus-0.3.0/PKG-INFO 2019-03-06 19:34:06.000000000 +0100 +++ new/pytest-doctestplus-0.4.0/PKG-INFO 2019-09-18 04:15:04.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: pytest-doctestplus -Version: 0.3.0 +Version: 0.4.0 Summary: Pytest plugin with advanced doctest features. Home-page: https://astropy.org Author: The Astropy Developers @@ -211,7 +211,7 @@ marked:: .. code-block:: python - + >>> from urlib.request import urlopen >>> url = urlopen('http://astropy.org') # doctest: +REMOTE_DATA @@ -229,10 +229,6 @@ :target: https://travis-ci.org/astropy/pytest-doctestplus :alt: Travis CI Status - .. image:: https://ci.appveyor.com/api/projects/status/vwbkv8vulemhak2p?svg=true - :target: https://ci.appveyor.com/project/Astropy/pytest-remotedata/branch/master - :alt: Appveyor Status - Questions, bug reports, and feature requests can be submitted on `github`_. .. _github: https://github.com/astropy/pytest-doctestplus diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/README.rst new/pytest-doctestplus-0.4.0/README.rst --- old/pytest-doctestplus-0.3.0/README.rst 2019-03-06 19:31:35.000000000 +0100 +++ new/pytest-doctestplus-0.4.0/README.rst 2019-08-29 11:14:43.000000000 +0200 @@ -203,7 +203,7 @@ marked:: .. code-block:: python - + >>> from urlib.request import urlopen >>> url = urlopen('http://astropy.org') # doctest: +REMOTE_DATA @@ -221,10 +221,6 @@ :target: https://travis-ci.org/astropy/pytest-doctestplus :alt: Travis CI Status -.. image:: https://ci.appveyor.com/api/projects/status/vwbkv8vulemhak2p?svg=true - :target: https://ci.appveyor.com/project/Astropy/pytest-remotedata/branch/master - :alt: Appveyor Status - Questions, bug reports, and feature requests can be submitted on `github`_. .. _github: https://github.com/astropy/pytest-doctestplus diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/pytest_doctestplus/plugin.py new/pytest-doctestplus-0.4.0/pytest_doctestplus/plugin.py --- old/pytest-doctestplus-0.3.0/pytest_doctestplus/plugin.py 2019-03-06 19:31:35.000000000 +0100 +++ new/pytest-doctestplus-0.4.0/pytest_doctestplus/plugin.py 2019-09-18 04:05:24.000000000 +0200 @@ -7,19 +7,21 @@ import doctest import fnmatch -import imp +import importlib import os import re import sys import warnings +from distutils.version import LooseVersion + import pytest from .output_checker import OutputChecker, FIX comment_characters = {'txt': '#', 'tex': '%', - 'rst': '\.\.' + 'rst': r'\.\.' } @@ -160,7 +162,7 @@ failed, tot = doctest.testfile( str(self.fspath), module_relative=False, optionflags=options, parser=DocTestParserPlus(), - extraglobs=dict(getfixture=fixture_request.getfuncargvalue), + extraglobs=dict(getfixture=fixture_request.getfixturevalue), raise_on_error=True, verbose=False, encoding='utf-8') def reportinfo(self): @@ -400,9 +402,17 @@ if mod in cls._import_cache: if not cls._import_cache[mod]: return False - try: - imp.find_module(mod) - except ImportError: + + if LooseVersion(sys.version) < LooseVersion('3.4'): + import imp + try: + module = imp.find_module(mod) + except ImportError: + module = None + else: + module = importlib.util.find_spec(mod) + + if module is None: cls._import_cache[mod] = False return False else: @@ -419,8 +429,8 @@ name = obj.__name__ else: raise ValueError("DocTestFinder.find: name must be given " - "when obj.__name__ doesn't exist: {!r}".format( - (type(obj),))) + "when obj.__name__ doesn't exist: {!r}" + .format((type(obj),))) def test_filter(test): for pat in getattr(obj, '__doctest_skip__', []): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/pytest_doctestplus.egg-info/PKG-INFO new/pytest-doctestplus-0.4.0/pytest_doctestplus.egg-info/PKG-INFO --- old/pytest-doctestplus-0.3.0/pytest_doctestplus.egg-info/PKG-INFO 2019-03-06 19:34:06.000000000 +0100 +++ new/pytest-doctestplus-0.4.0/pytest_doctestplus.egg-info/PKG-INFO 2019-09-18 04:15:04.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: pytest-doctestplus -Version: 0.3.0 +Version: 0.4.0 Summary: Pytest plugin with advanced doctest features. Home-page: https://astropy.org Author: The Astropy Developers @@ -211,7 +211,7 @@ marked:: .. code-block:: python - + >>> from urlib.request import urlopen >>> url = urlopen('http://astropy.org') # doctest: +REMOTE_DATA @@ -229,10 +229,6 @@ :target: https://travis-ci.org/astropy/pytest-doctestplus :alt: Travis CI Status - .. image:: https://ci.appveyor.com/api/projects/status/vwbkv8vulemhak2p?svg=true - :target: https://ci.appveyor.com/project/Astropy/pytest-remotedata/branch/master - :alt: Appveyor Status - Questions, bug reports, and feature requests can be submitted on `github`_. .. _github: https://github.com/astropy/pytest-doctestplus diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/setup.cfg new/pytest-doctestplus-0.4.0/setup.cfg --- old/pytest-doctestplus-0.3.0/setup.cfg 2019-03-06 19:34:06.000000000 +0100 +++ new/pytest-doctestplus-0.4.0/setup.cfg 2019-09-18 04:15:04.000000000 +0200 @@ -1,6 +1,11 @@ [tool:pytest] minversion = 3.0 testpaths = tests +xfail_strict = true +filterwarnings = + error + ignore:file format.*:UserWarning + ignore:.*non-empty pattern match.*:FutureWarning [egg_info] tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/setup.py new/pytest-doctestplus-0.4.0/setup.py --- old/pytest-doctestplus-0.3.0/setup.py 2019-03-06 19:31:56.000000000 +0100 +++ new/pytest-doctestplus-0.4.0/setup.py 2019-09-18 04:14:46.000000000 +0200 @@ -2,13 +2,6 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- encoding: utf-8 -*- -import io -import re -from glob import glob -from os.path import basename -from os.path import dirname -from os.path import join -from os.path import splitext from setuptools import setup, find_packages @@ -19,7 +12,7 @@ setup( name='pytest-doctestplus', - version='0.3.0', + version='0.4.0', license='BSD', description='Pytest plugin with advanced doctest features.', long_description=readme(), @@ -30,7 +23,6 @@ include_package_data=True, zip_safe=False, classifiers=[ - # complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers 'Development Status :: 3 - Alpha', 'Framework :: Pytest', 'Intended Audience :: Developers', @@ -47,8 +39,8 @@ 'Topic :: Software Development :: Testing', 'Topic :: Utilities', ], - keywords=[ 'doctest', 'rst', 'pytest', 'py.test' ], - install_requires=[ 'six', 'pytest>=3.0', 'numpy>=1.10' ], + keywords=['doctest', 'rst', 'pytest', 'py.test'], + install_requires=['six', 'pytest>=3.0', 'numpy>=1.10'], python_requires='>=2.7', entry_points={ 'pytest11': [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/tests/python/doctests.py new/pytest-doctestplus-0.4.0/tests/python/doctests.py --- old/pytest-doctestplus-0.3.0/tests/python/doctests.py 2019-01-24 15:32:38.000000000 +0100 +++ new/pytest-doctestplus-0.4.0/tests/python/doctests.py 2019-08-29 11:55:06.000000000 +0200 @@ -11,6 +11,7 @@ 'depends_on_two_modules': ['os', 'foobar'], } + def this_test_works(): """ This test should be executed by --doctest-plus and should pass. @@ -19,6 +20,7 @@ 2 """ + def skip_this_test(): """ This test will cause a failure if __doctest_skip__ is not working properly. @@ -27,6 +29,7 @@ 2 """ + def depends_on_real_module(): """ This test should be executed by --doctest-plus and should pass. @@ -36,15 +39,17 @@ '.' """ + def depends_on_foobar(): """ This test will cause a failure if __doctest_requires__ is not working. >>> import foobar >>> foobar.foo.bar('baz') - 42 + 42 """ + def depends_on_two_modules(): """ This test will cause a failure if __doctest_requires__ is not working. @@ -55,6 +60,7 @@ 'The meaning of life' """ + class ClassWithSomeBadDocTests(object): def this_test_works(): """ @@ -72,6 +78,7 @@ 5 """ + class ClassWithAllBadDocTests(object): def this_test_fails(): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/tests/python/skip_doctests.py new/pytest-doctestplus-0.4.0/tests/python/skip_doctests.py --- old/pytest-doctestplus-0.3.0/tests/python/skip_doctests.py 2017-10-10 18:36:19.000000000 +0200 +++ new/pytest-doctestplus-0.4.0/tests/python/skip_doctests.py 2019-08-29 11:55:06.000000000 +0200 @@ -12,6 +12,7 @@ 5 """ + def another_bad_doctest(): """ This test will fail if __doctest_skip__ is not working properly. @@ -21,10 +22,11 @@ 5 """ + def yet_another_bad_doctest(): """ This test will fail if __doctest_skip__ is not working properly. - + >>> NOT VALID PYTHON, RIGHT >>> + 7 42 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-doctestplus-0.3.0/tests/test_doctestplus.py new/pytest-doctestplus-0.4.0/tests/test_doctestplus.py --- old/pytest-doctestplus-0.3.0/tests/test_doctestplus.py 2019-03-06 19:31:35.000000000 +0100 +++ new/pytest-doctestplus-0.4.0/tests/test_doctestplus.py 2019-08-29 11:14:43.000000000 +0200 @@ -1,3 +1,5 @@ +import pytest + pytest_plugins = ['pytester'] @@ -100,6 +102,30 @@ reprec = testdir.inline_run(p, "--doctest-plus") reprec.assertoutcome(passed=1) + +@pytest.mark.xfail(reason='FLOAT_CMP and ELLIPSIS are not currently compatible') +def test_float_cmp_and_ellipsis(testdir): + testdir.makeini( + """ + [pytest] + doctest_optionflags = FLOAT_CMP ELLIPSIS + doctestplus = enabled + """) + p = testdir.makepyfile( + """ + def f(): + ''' + >>> for char in ['A', 'B', 'C', 'D', 'E']: + ... print(char, float(ord(char))) + A 65.0 + B 66.0 + ... + ''' + pass + """) + reprec = testdir.inline_run(p, "--doctest-plus") + reprec.assertoutcome(passed=1) + def test_allow_bytes_unicode(testdir): testdir.makeini(