[Debian-astro-commits] [python-astropy] 02/03: Rediff patches

Ole Streicher olebole at moszumanska.debian.org
Sat Sep 9 13:25:44 UTC 2017


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

olebole pushed a commit to branch master
in repository python-astropy.

commit 3155a1d83039e3d467bc7787641dbf25cc1f164a
Author: Ole Streicher <olebole at debian.org>
Date:   Sat Sep 9 15:11:40 2017 +0200

    Rediff patches
    
    Dropped
    
     * Changing-parametrized-tests-pytest-3.2.0-compatible.patch
     * Reimplement-reportinfo-in-doctestplus-extension.patch
    
    applied upstream
---
 ...arametrized-tests-pytest-3.2.0-compatible.patch | 129 ---------------------
 ...ement-reportinfo-in-doctestplus-extension.patch |  36 ------
 debian/patches/disable_helper.patch                |   4 +-
 debian/patches/external_python_pkgs.patch          |  17 +--
 debian/patches/mark_known_failures.patch           |  26 +++--
 debian/patches/only_python3-binaries.patch         |   2 +-
 debian/patches/series                              |   2 -
 7 files changed, 19 insertions(+), 197 deletions(-)

diff --git a/debian/patches/Changing-parametrized-tests-pytest-3.2.0-compatible.patch b/debian/patches/Changing-parametrized-tests-pytest-3.2.0-compatible.patch
deleted file mode 100644
index adeec79..0000000
--- a/debian/patches/Changing-parametrized-tests-pytest-3.2.0-compatible.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-From: Brigitta Sipocz <bsipocz at gmail.com>
-Date: Tue, 8 Aug 2017 15:00:19 +0100
-Subject: Changing parametrized tests pytest 3.2.0 compatible
-
-https://github.com/astropy/astropy/pull/6419
----
- astropy/coordinates/tests/test_finite_difference_velocities.py | 10 ++--------
- astropy/io/ascii/tests/test_c_reader.py                        |  8 ++++----
- astropy/utils/tests/test_data.py                               |  4 ++--
- docs/development/testguide.rst                                 |  2 +-
- docs/install.rst                                               |  2 +-
- setup.py                                                       |  2 +-
- 6 files changed, 11 insertions(+), 17 deletions(-)
-
-diff --git a/astropy/coordinates/tests/test_finite_difference_velocities.py b/astropy/coordinates/tests/test_finite_difference_velocities.py
-index 39e8075..f642024 100644
---- a/astropy/coordinates/tests/test_finite_difference_velocities.py
-+++ b/astropy/coordinates/tests/test_finite_difference_velocities.py
-@@ -174,14 +174,8 @@ _xfail = pytest.mark.xfail
- 
- @pytest.mark.parametrize('distance', [1000*u.au,
-                                       10*u.pc,
--                                      pytest.mark.xfail(10*u.kpc),
--                                      pytest.mark.xfail(100*u.kpc)])
--                                      # below is xfail syntax for pytest >=3.1
--                                      # TODO: change to this when the above
--                                      # way of xfailing is turned off in pytest
--                                      # >=4.0
--                                      # pytest.param(10*u.kpc, marks=_xfail),
--                                      # pytest.param(100*u.kpc, marks=_xfail)])
-+                                      pytest.param(10*u.kpc, marks=_xfail),
-+                                      pytest.param(100*u.kpc, marks=_xfail)])
-                                       # TODO:  make these not fail when the
-                                       # finite-difference numerical stability
-                                       # is improved
-diff --git a/astropy/io/ascii/tests/test_c_reader.py b/astropy/io/ascii/tests/test_c_reader.py
-index f3bf89d..2af5cbf 100644
---- a/astropy/io/ascii/tests/test_c_reader.py
-+++ b/astropy/io/ascii/tests/test_c_reader.py
-@@ -964,7 +964,7 @@ def test_read_big_table(tmpdir):
- @pytest.mark.parametrize('reader', [0, 1, 2])
- # catch Windows environment since we cannot use _read() with custom fast_reader
- @pytest.mark.parametrize("parallel", [False,
--    pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows")(True)])
-+    pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows"))])
- def test_data_out_of_range(parallel, reader):
-     """
-     Numbers with exponents beyond float64 range (|~4.94e-324 to 1.7977e+308|)
-@@ -1017,7 +1017,7 @@ def test_data_out_of_range(parallel, reader):
- 
- # catch Windows environment since we cannot use _read() with custom fast_reader
- @pytest.mark.parametrize("parallel", [
--    pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows")(True),
-+    pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows")),
-     False])
- def test_int_out_of_range(parallel):
-     """
-@@ -1056,7 +1056,7 @@ def test_int_out_of_range(parallel):
- 
- 
- @pytest.mark.parametrize("parallel", [
--    pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows")(True),
-+    pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows"))])
-     False])
- def test_fortran_reader(parallel):
-     """
-@@ -1099,7 +1099,7 @@ def test_fortran_reader(parallel):
- 
- 
- @pytest.mark.parametrize("parallel", [
--    pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows")(True),
-+    pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows"))])
-     False])
- def test_fortran_invalid_exp(parallel):
-     """
-diff --git a/astropy/utils/tests/test_data.py b/astropy/utils/tests/test_data.py
-index 2693a0a..e6c75d5 100644
---- a/astropy/utils/tests/test_data.py
-+++ b/astropy/utils/tests/test_data.py
-@@ -324,8 +324,8 @@ def test_data_noastropy_fallback(monkeypatch):
- @pytest.mark.parametrize(('filename'), [
-     'unicode.txt',
-     'unicode.txt.gz',
--    pytest.mark.xfail(not HAS_BZ2, reason='no bz2 support')('unicode.txt.bz2'),
--    pytest.mark.xfail(not HAS_XZ, reason='no lzma support')('unicode.txt.xz')])
-+    pytest.param('unicode.txt.bz2', marks=pytest.mark.xfail(not HAS_BZ2, reason='no bz2 support')),
-+    pytest.param('unicode.txt.xz', marks=pytest.mark.xfail(not HAS_XZ, reason='no lzma support'))])
- def test_read_unicode(filename):
-     from ..data import get_pkg_data_contents
- 
-diff --git a/docs/development/testguide.rst b/docs/development/testguide.rst
-index b820c3a..6d29642 100644
---- a/docs/development/testguide.rst
-+++ b/docs/development/testguide.rst
-@@ -33,7 +33,7 @@ Running Tests
- There are currently three different ways to invoke Astropy tests. Each
- method invokes `pytest`_ to run the tests but offers different options when
- calling. To run the tests, you will need to make sure you have the `pytest`_
--package (version 2.8 or later) installed.
-+package (version 3.1 or later) installed.
- 
- In addition to running the Astropy tests, these methods can also be called
- so that they check Python source code for `PEP8 compliance
-diff --git a/docs/install.rst b/docs/install.rst
-index 3029bd7..b019edf 100644
---- a/docs/install.rst
-+++ b/docs/install.rst
-@@ -15,7 +15,7 @@ Astropy has the following strict requirements:
- 
- - `Numpy`_ |minimum_numpy_version| or later
- 
--- `pytest`_ 2.8 or later
-+- `pytest`_ 3.1 or later
- 
- Astropy also depends on other packages for optional features:
- 
-diff --git a/setup.py b/setup.py
-index 7ae5251..d4ed27b 100755
---- a/setup.py
-+++ b/setup.py
-@@ -66,7 +66,7 @@ setup_requires = ['numpy>=' + astropy.__minimum_numpy_version__]
- if not os.path.exists(os.path.join(os.path.dirname(__file__), 'PKG-INFO')):
-     setup_requires.extend(['cython>=0.21', 'jinja2>=2.7'])
- 
--install_requires = ['pytest>=2.8', 'numpy>=' + astropy.__minimum_numpy_version__]
-+install_requires = ['pytest>=3.1', 'numpy>=' + astropy.__minimum_numpy_version__]
- # Avoid installing setup_requires dependencies if the user just
- # queries for information
- if is_distutils_display_option():
diff --git a/debian/patches/Reimplement-reportinfo-in-doctestplus-extension.patch b/debian/patches/Reimplement-reportinfo-in-doctestplus-extension.patch
deleted file mode 100644
index 3daaf79..0000000
--- a/debian/patches/Reimplement-reportinfo-in-doctestplus-extension.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: Bruno Oliveira <nicoddemus at gmail.com>
-Date: Thu, 3 Aug 2017 18:56:37 -0300
-Subject: Reimplement reportinfo() in doctestplus extension
-
-In pytest 3.2.0 the member `dtest` is used in the `reportinfo()`
-function to report the location of the test examples in the doc,
-but the doctestplus extension does not pass one in the constructor.
-
-Ref: pytest-dev/pytest#2651
----
- astropy/tests/pytest_plugins.py | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/astropy/tests/pytest_plugins.py b/astropy/tests/pytest_plugins.py
-index e55c662..c3d999b 100644
---- a/astropy/tests/pytest_plugins.py
-+++ b/astropy/tests/pytest_plugins.py
-@@ -207,6 +207,18 @@ def pytest_configure(config):
-                 extraglobs=dict(getfixture=fixture_request.getfuncargvalue),
-                 raise_on_error=True, verbose=False, encoding='utf-8')
- 
-+        def reportinfo(self):
-+            """
-+            Overwrite pytest's ``DoctestItem`` because
-+            ``DocTestTextfilePlus`` does not have a ``dtest`` attribute
-+            which is used by pytest>=3.2.0 to return the location of the
-+            tests.
-+
-+            For details see `pytest-dev/pytest#2651
-+            <https://github.com/pytest-dev/pytest/pull/2651>`_.
-+            """
-+            return self.fspath, None, "[doctest] %s" % self.name
-+
-     class DocTestParserPlus(doctest.DocTestParser):
-         """
-         An extension to the builtin DocTestParser that handles the
diff --git a/debian/patches/disable_helper.patch b/debian/patches/disable_helper.patch
index bca5d9d..000991d 100644
--- a/debian/patches/disable_helper.patch
+++ b/debian/patches/disable_helper.patch
@@ -7,10 +7,10 @@ Subject: Disable astropy-helpers copy
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/setup.cfg b/setup.cfg
-index 3782ab9..a1b683a 100644
+index 8d36c71..89a6a9b 100644
 --- a/setup.cfg
 +++ b/setup.cfg
-@@ -23,7 +23,7 @@ addopts = -p no:warnings
+@@ -24,7 +24,7 @@ addopts = --pyargs -p no:warnings
  bitmap = static/wininst_background.bmp
  
  [ah_bootstrap]
diff --git a/debian/patches/external_python_pkgs.patch b/debian/patches/external_python_pkgs.patch
index fff0896..5aa5048 100644
--- a/debian/patches/external_python_pkgs.patch
+++ b/debian/patches/external_python_pkgs.patch
@@ -4,14 +4,13 @@ Subject: Use external python modules instead of convenience copies
 
 ---
  astropy/coordinates/angle_utilities.py |  2 +-
- astropy/extern/configobj.py            |  5 ++++-
  astropy/extern/six.py                  |  2 +-
  astropy/table/jsviewer.py              | 14 ++++++++------
  astropy/table/tests/test_jsviewer.py   |  6 +++---
  astropy/units/format/cds.py            |  4 ++--
  astropy/units/format/generic.py        |  4 ++--
  astropy/units/format/ogip.py           |  4 ++--
- 8 files changed, 23 insertions(+), 18 deletions(-)
+ 7 files changed, 19 insertions(+), 17 deletions(-)
 
 diff --git a/astropy/coordinates/angle_utilities.py b/astropy/coordinates/angle_utilities.py
 index cfa894e..bb8fb7d 100644
@@ -26,20 +25,6 @@ index cfa894e..bb8fb7d 100644
  
          # List of token names.
          tokens = (
-diff --git a/astropy/extern/configobj.py b/astropy/extern/configobj.py
-index 8d1bd8c..e3bb0e0 100644
---- a/astropy/extern/configobj.py
-+++ b/astropy/extern/configobj.py
-@@ -7,5 +7,8 @@ currently installed version of python.
- Also, this should actually never actually show up as a docstring, because
- it should get overwritten by the appropriate configobj docstring.
- """
-+from __future__ import absolute_import
-+import validate
-+import configobj
-+
- 
--from .configobj import configobj, validate, __doc__
 diff --git a/astropy/extern/six.py b/astropy/extern/six.py
 index 5398fc0..fb3a30c 100644
 --- a/astropy/extern/six.py
diff --git a/debian/patches/mark_known_failures.patch b/debian/patches/mark_known_failures.patch
index 4298d41..bc21ac2 100644
--- a/debian/patches/mark_known_failures.patch
+++ b/debian/patches/mark_known_failures.patch
@@ -4,32 +4,36 @@ Subject: Mark all known test failures as xfail. These failures have been
  discussed with upstream.
 
 ---
- astropy/io/ascii/tests/test_c_reader.py   | 4 ++--
+ astropy/io/ascii/tests/test_c_reader.py   | 8 ++++++--
  astropy/tests/tests/test_socketblocker.py | 2 ++
- 2 files changed, 4 insertions(+), 2 deletions(-)
+ 2 files changed, 8 insertions(+), 2 deletions(-)
 
 diff --git a/astropy/io/ascii/tests/test_c_reader.py b/astropy/io/ascii/tests/test_c_reader.py
-index 2af5cbf..c8aaab3 100644
+index 7bc8618..ceb2ddd 100644
 --- a/astropy/io/ascii/tests/test_c_reader.py
 +++ b/astropy/io/ascii/tests/test_c_reader.py
-@@ -1056,7 +1056,7 @@ def test_int_out_of_range(parallel):
+@@ -1057,7 +1057,9 @@ def test_int_out_of_range(parallel):
+     assert_table_equal(table, expected)
  
  
- @pytest.mark.parametrize("parallel", [
--    pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows"))])
+- at pytest.mark.parametrize("parallel", [True, False])
++ at pytest.mark.parametrize("parallel", [
 +    pytest.param(True, marks=pytest.mark.xfail(reason="see https://github.com/astropy/astropy/issues/5693")),
-     False])
++    False])
  def test_fortran_reader(parallel):
      """
-@@ -1099,7 +1099,7 @@ def test_fortran_reader(parallel):
+     Make sure that ascii.read() can read Fortran-style exponential notation
+@@ -1101,7 +1103,9 @@ def test_fortran_reader(parallel):
+     assert_table_equal(table, expected)
  
  
- @pytest.mark.parametrize("parallel", [
--    pytest.param(True, marks=pytest.mark.xfail(os.name == 'nt', reason="Multiprocessing is currently unsupported on Windows"))])
+- at pytest.mark.parametrize("parallel", [True, False])
++ at pytest.mark.parametrize("parallel", [
 +    pytest.param(True, marks=pytest.mark.xfail(reason="see https://github.com/astropy/astropy/issues/5693")),
-     False])
++    False])
  def test_fortran_invalid_exp(parallel):
      """
+     Test Fortran-style exponential notation in the fast_reader with invalid
 diff --git a/astropy/tests/tests/test_socketblocker.py b/astropy/tests/tests/test_socketblocker.py
 index 18524b6..fff462d 100644
 --- a/astropy/tests/tests/test_socketblocker.py
diff --git a/debian/patches/only_python3-binaries.patch b/debian/patches/only_python3-binaries.patch
index c8f66bd..b58eba1 100644
--- a/debian/patches/only_python3-binaries.patch
+++ b/debian/patches/only_python3-binaries.patch
@@ -7,7 +7,7 @@ Subject: Install the scripts only for the Python 3 version
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/setup.py b/setup.py
-index b39bb4a..7ae5251 100755
+index 1340b7f..ed6f40f 100755
 --- a/setup.py
 +++ b/setup.py
 @@ -47,7 +47,8 @@ package_info['package_data'].setdefault('astropy', []).append('data/*')
diff --git a/debian/patches/series b/debian/patches/series
index 8c187ea..69494b6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,4 @@
 disable_helper.patch
 only_python3-binaries.patch
-Changing-parametrized-tests-pytest-3.2.0-compatible.patch
 mark_known_failures.patch
 external_python_pkgs.patch
-Reimplement-reportinfo-in-doctestplus-extension.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/python-astropy.git



More information about the Debian-astro-commits mailing list