Hello community,

here is the log from the commit of package python-pytest-astropy-header for 
openSUSE:Factory checked in at 2019-12-23 22:43:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-astropy-header (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-astropy-header.new.6675 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-astropy-header"

Mon Dec 23 22:43:34 2019 rev:2 rq:758762 version:0.1.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-astropy-header/python-pytest-astropy-header.changes
        2019-12-21 12:29:01.835296163 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-astropy-header.new.6675/python-pytest-astropy-header.changes
      2019-12-23 22:46:03.062036786 +0100
@@ -1,0 +2,11 @@
+Wed Dec 19 16:06:15 UTC 2019 - Benjamin Greiner <[email protected]>
+
+- update to version 0.1.2
+  - Handle the case where the astropy version is 'unknown'. [#11]
+  - Fix declaration of test dependencies. [#9]
+- changes on version 0.1.1:
+  - Make plugin not crash if astropy is not installed. [#1]
+- remove obsolete pytest-astropy-header-pr2.patch
+- require astropy >= 3.0 because astropy-helpers is not found
+
+-------------------------------------------------------------------

Old:
----
  pytest-astropy-header-0.1.tar.gz
  pytest-astropy-header-pr2.patch

New:
----
  pytest-astropy-header-0.1.2.tar.gz

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

Other differences:
------------------
++++++ python-pytest-astropy-header.spec ++++++
--- /var/tmp/diff_new_pack.ZBmEmi/_old  2019-12-23 22:46:03.754037041 +0100
+++ /var/tmp/diff_new_pack.ZBmEmi/_new  2019-12-23 22:46:03.758037043 +0100
@@ -19,14 +19,13 @@
 %define skip_python2 1
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pytest-astropy-header
-Version:        0.1
+Version:        0.1.2
 Release:        0
 Summary:        Pytest plugin to add diagnostic information to the header of 
the test output
 License:        BSD-3-Clause
 Group:          Productivity/Scientific/Astronomy
 URL:            https://github.com/astropy/pytest-astropy-header
 Source:         
https://files.pythonhosted.org/packages/source/p/pytest-astropy-header/pytest-astropy-header-%{version}.tar.gz
-Patch0:         pytest-astropy-header-pr2.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module pytest >= 2.8}
@@ -34,7 +33,7 @@
 BuildRequires:  python-rpm-macros
 Requires:       python-pytest >= 2.8
 # SECTION test requirements
-BuildRequires:  %{python_module astropy >= 2.0}
+BuildRequires:  %{python_module astropy >= 3.0}
 BuildRequires:  %{python_module codecov}
 BuildRequires:  %{python_module coverage}
 BuildRequires:  %{python_module numpy-devel}
@@ -50,7 +49,6 @@
 
 %prep
 %setup -q -n pytest-astropy-header-%{version}
-%patch0 -p1
 
 %build
 export CFLAGS="%{optflags}"

++++++ pytest-astropy-header-0.1.tar.gz -> pytest-astropy-header-0.1.2.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-astropy-header-0.1/CHANGES.rst 
new/pytest-astropy-header-0.1.2/CHANGES.rst
--- old/pytest-astropy-header-0.1/CHANGES.rst   2019-10-25 08:51:01.000000000 
+0200
+++ new/pytest-astropy-header-0.1.2/CHANGES.rst 2019-12-18 15:53:08.000000000 
+0100
@@ -1,3 +1,15 @@
+0.1.2 (2019-12-18)
+==================
+
+- Handle the case where the astropy version is 'unknown'. [#11]
+
+- Fix declaration of test dependencies. [#9]
+
+0.1.1 (2019-10-25)
+==================
+
+- Make plugin not crash if astropy is not installed. [#1]
+
 0.1 (2019-10-25)
 ================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-astropy-header-0.1/PKG-INFO 
new/pytest-astropy-header-0.1.2/PKG-INFO
--- old/pytest-astropy-header-0.1/PKG-INFO      2019-10-25 08:52:25.000000000 
+0200
+++ new/pytest-astropy-header-0.1.2/PKG-INFO    2019-12-18 15:54:13.525991200 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-astropy-header
-Version: 0.1
+Version: 0.1.2
 Summary: pytest plugin to add diagnostic information to the header of the test 
output
 Home-page: http://astropy.org
 Author: The Astropy Developers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-astropy-header-0.1/pytest_astropy_header/__init__.py 
new/pytest-astropy-header-0.1.2/pytest_astropy_header/__init__.py
--- old/pytest-astropy-header-0.1/pytest_astropy_header/__init__.py     
2019-10-25 08:50:41.000000000 +0200
+++ new/pytest-astropy-header-0.1.2/pytest_astropy_header/__init__.py   
2019-12-18 15:53:48.000000000 +0100
@@ -1 +1 @@
-__version__ = '0.1'
+__version__ = '0.1.2'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-astropy-header-0.1/pytest_astropy_header/display.py 
new/pytest-astropy-header-0.1.2/pytest_astropy_header/display.py
--- old/pytest-astropy-header-0.1/pytest_astropy_header/display.py      
2019-10-07 20:13:45.000000000 +0200
+++ new/pytest-astropy-header-0.1.2/pytest_astropy_header/display.py    
2019-12-18 15:51:35.000000000 +0100
@@ -12,32 +12,47 @@
 from collections import OrderedDict
 from distutils.version import LooseVersion
 
-from astropy import __version__ as astropy_version
-from astropy.tests.helper import ignore_warnings
-from astropy.utils.introspection import resolve_name
-
 PYTEST_HEADER_MODULES = OrderedDict([('Numpy', 'numpy'),
                                     ('Scipy', 'scipy'),
                                     ('Matplotlib', 'matplotlib'),
                                     ('h5py', 'h5py'),
                                     ('Pandas', 'pandas')])
-TESTED_VERSIONS = OrderedDict([('Astropy', astropy_version)])
 
-ASTROPY_LT_30 = LooseVersion(astropy_version) < '3.0'
-ASTROPY_LT_40 = LooseVersion(astropy_version) < '4.0'
+try:
+
+    from astropy import __version__ as astropy_version
+    from astropy.tests.helper import ignore_warnings
+    from astropy.utils.introspection import resolve_name
+
+except ImportError:
+
+    ASTROPY_INSTALLED = False
+
+else:
 
-# If using a version of astropy that has the display plugin, we make sure that
-# we use those variables for listing the packages, in case we choose to let
-# that plugin handle things below (which we do if that plugin is active).
-if ASTROPY_LT_30:
-    from astropy.tests.pytest_plugins import (PYTEST_HEADER_MODULES,
-                                              TESTED_VERSIONS)
-elif ASTROPY_LT_40:
-    from astropy.tests.plugins.display import (PYTEST_HEADER_MODULES,
-                                               TESTED_VERSIONS)
+    ASTROPY_INSTALLED = True
+
+    TESTED_VERSIONS = OrderedDict([('Astropy', astropy_version)])
+
+    if astropy_version == 'unknown':  # assume developer version
+        ASTROPY_LT_30 = ASTROPY_LT_40 = False
+    else:
+        ASTROPY_LT_30 = LooseVersion(astropy_version) < '3.0'
+        ASTROPY_LT_40 = LooseVersion(astropy_version) < '4.0'
+
+    # If using a version of astropy that has the display plugin, we make sure 
that
+    # we use those variables for listing the packages, in case we choose to let
+    # that plugin handle things below (which we do if that plugin is active).
+    if ASTROPY_LT_30:
+        from astropy.tests.pytest_plugins import (PYTEST_HEADER_MODULES,
+                                                  TESTED_VERSIONS)
+    elif ASTROPY_LT_40:
+        from astropy.tests.plugins.display import (PYTEST_HEADER_MODULES,
+                                                   TESTED_VERSIONS)
 
 
 def pytest_addoption(parser):
+
     group = parser.getgroup("astropy header options")
     group.addoption('--astropy-header', action='store_true',
                     help="Show the pytest-astropy header")
@@ -51,6 +66,9 @@
 
 def pytest_report_header(config):
 
+    if not ASTROPY_INSTALLED:
+        return
+
     # If the astropy display plugin is registered, we stop now and let it
     # handle the header.
     if ASTROPY_LT_40 and 
config.pluginmanager.hasplugin('astropy.tests.plugins.display'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-astropy-header-0.1/pytest_astropy_header.egg-info/PKG-INFO 
new/pytest-astropy-header-0.1.2/pytest_astropy_header.egg-info/PKG-INFO
--- old/pytest-astropy-header-0.1/pytest_astropy_header.egg-info/PKG-INFO       
2019-10-25 08:52:25.000000000 +0200
+++ new/pytest-astropy-header-0.1.2/pytest_astropy_header.egg-info/PKG-INFO     
2019-12-18 15:54:13.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-astropy-header
-Version: 0.1
+Version: 0.1.2
 Summary: pytest plugin to add diagnostic information to the header of the test 
output
 Home-page: http://astropy.org
 Author: The Astropy Developers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-astropy-header-0.1/pytest_astropy_header.egg-info/requires.txt 
new/pytest-astropy-header-0.1.2/pytest_astropy_header.egg-info/requires.txt
--- old/pytest-astropy-header-0.1/pytest_astropy_header.egg-info/requires.txt   
2019-10-25 08:52:25.000000000 +0200
+++ new/pytest-astropy-header-0.1.2/pytest_astropy_header.egg-info/requires.txt 
2019-12-18 15:54:13.000000000 +0100
@@ -5,3 +5,5 @@
 pytest-cov
 codecov
 coverage
+numpy
+astropy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-astropy-header-0.1/setup.cfg 
new/pytest-astropy-header-0.1.2/setup.cfg
--- old/pytest-astropy-header-0.1/setup.cfg     2019-10-25 08:52:25.000000000 
+0200
+++ new/pytest-astropy-header-0.1.2/setup.cfg   2019-12-18 15:54:13.526912500 
+0100
@@ -28,6 +28,8 @@
        pytest-cov
        codecov
        coverage
+       numpy
+       astropy
 
 [options.entry_points]
 pytest11 = 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-astropy-header-0.1/tests/test_display.py 
new/pytest-astropy-header-0.1.2/tests/test_display.py
--- old/pytest-astropy-header-0.1/tests/test_display.py 2019-10-07 
20:13:45.000000000 +0200
+++ new/pytest-astropy-header-0.1.2/tests/test_display.py       2019-12-18 
15:51:35.000000000 +0100
@@ -176,7 +176,7 @@
 
 def test_modify_in_conftest(testdir, capsys):
     testdir.makeconftest("""
-    from pytest_astropy.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS
+    from pytest_astropy_header.display import PYTEST_HEADER_MODULES, 
TESTED_VERSIONS
 
     def pytest_configure(config):
         config.option.astropy_header = True
@@ -186,6 +186,7 @@
     """)
     testdir.inline_run()
     out, err = capsys.readouterr()
+    assert err == ''
     lines = extract_package_version_lines(out)
     assert len(lines) == 6
     assert lines[0].startswith('Numpy: ')


Reply via email to