Hello community,

here is the log from the commit of package python-pytest-doctestplus for 
openSUSE:Factory checked in at 2019-09-07 11:55:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-doctestplus (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-doctestplus.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-doctestplus"

Sat Sep  7 11:55:46 2019 rev:4 rq:729081 version:0.3.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-doctestplus/python-pytest-doctestplus.changes
      2019-03-10 09:39:44.880113414 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-doctestplus.new.7948/python-pytest-doctestplus.changes
    2019-09-07 11:55:47.898254009 +0200
@@ -1,0 +2,6 @@
+Fri Sep  6 16:53:49 UTC 2019 - John Vandenberg <[email protected]>
+
+- Add merged_pr_63.patch to fix incompatibility with pytest 5.1
+- Add pr_37.patch to remove numpy dependency
+
+-------------------------------------------------------------------

New:
----
  merged_pr_63.patch
  pr_37.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pytest-doctestplus.spec ++++++
--- /var/tmp/diff_new_pack.f9CEnj/_old  2019-09-07 11:55:48.362253943 +0200
+++ /var/tmp/diff_new_pack.f9CEnj/_new  2019-09-07 11:55:48.366253943 +0200
@@ -33,15 +33,16 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/astropy/pytest-doctestplus
 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
-Requires:       python-numpy >= 1.10
 Requires:       python-pytest >= 3.0
 Requires:       python-six
 BuildArch:      noarch
 %if %{with test}
-BuildRequires:  %{python_module numpy >= 1.10}
 BuildRequires:  %{python_module pytest >= 3.0}
 BuildRequires:  %{python_module pytest-doctestplus >= %{version}}
 BuildRequires:  %{python_module six}
@@ -55,6 +56,7 @@
 
 %prep
 %setup -q -n pytest-doctestplus-%{version}
+%autopatch -p1
 # do not change the pytest behaviour for us
 rm -f setup.cfg
 
@@ -70,7 +72,8 @@
 %if %{with test}
 %check
 export LANG=en_US.UTF8
-%python_expand PYTHONPATH=%{$python_sitelib} py.test-%{$python_bin_suffix} 
tests/ --doctest-plus --doctest-rst
+# README.rst contains Python 3 only imports
+%pytest --doctest-plus --doctest-rst -k 'not README.rst'
 %endif
 
 %if !%{with test}

++++++ merged_pr_63.patch ++++++
>From 0a7176531d8395a381bf76ce8ae2e59eef1a60ea Mon Sep 17 00:00:00 2001
From: Pey Lian Lim <[email protected]>
Date: Fri, 16 Aug 2019 14:55:38 -0400
Subject: [PATCH] Compatibility with pytest 5.1

---
 pytest_doctestplus/plugin.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pytest_doctestplus/plugin.py b/pytest_doctestplus/plugin.py
index 8a830f9..20114b8 100644
--- a/pytest_doctestplus/plugin.py
+++ b/pytest_doctestplus/plugin.py
@@ -160,7 +160,7 @@ def runtest(self):
             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):
++++++ pr_37.patch ++++++
commit 898d66c7eeabddf5d17bb899c8beebe5aad2c4ee
Author: Oscar Benjamin <[email protected]>
Date:   Thu Jan 3 17:15:04 2019 +0000

    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
 
 import doctest
 import re
-
-import numpy as np
+import math
 
 import six
 from six.moves import zip
@@ -125,8 +124,10 @@ class OutputChecker(doctest.OutputChecker):
                 else:
                     nw_.append(nw)
 
-                if not np.allclose(float(ng), float(nw), rtol=self.rtol,
-                                   atol=self.atol, equal_nan=True):
+                ng = float(ng)
+                nw = float(nw)
+                if not (abs(ng - nw) <= self.atol + self.rtol * abs(nw)
+                        or (math.isnan(ng) and math.isnan(nw))):
                     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(
         'Topic :: Utilities',
     ],
     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': [

Reply via email to