Hello community,
here is the log from the commit of package python-pytest-openfiles for
openSUSE:Factory checked in at 2019-02-15 10:02:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-openfiles (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-openfiles.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-openfiles"
Fri Feb 15 10:02:54 2019 rev:2 rq:676068 version:0.3.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-openfiles/python-pytest-openfiles.changes
2018-08-18 00:03:10.442908869 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-openfiles.new.28833/python-pytest-openfiles.changes
2019-02-15 10:02:57.415615015 +0100
@@ -1,0 +2,7 @@
+Thu Feb 14 14:31:00 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.3.2:
+ * Replace deprecated method to allow for compatibility with pytest-4.1 and
later. [#19]
+- Enable tests
+
+-------------------------------------------------------------------
Old:
----
pytest-openfiles-0.3.0.tar.gz
New:
----
pytest-openfiles-0.3.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-openfiles.spec ++++++
--- /var/tmp/diff_new_pack.eVlN4G/_old 2019-02-15 10:02:58.499614665 +0100
+++ /var/tmp/diff_new_pack.eVlN4G/_new 2019-02-15 10:02:58.543614651 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-openfiles
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,26 +12,27 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-openfiles
-Version: 0.3.0
+Version: 0.3.2
Release: 0
-License: BSD-3-Clause
Summary: Pytest plugin for detecting inadvertent open file handles
-Url: https://github.com/astropy/pytest-openfiles
+License: BSD-3-Clause
Group: Development/Languages/Python
+URL: https://github.com/astropy/pytest-openfiles
Source:
https://files.pythonhosted.org/packages/source/p/pytest-openfiles/pytest-openfiles-%{version}.tar.gz
-BuildRequires: %{python_module devel}
+BuildRequires: %{python_module psutil}
+BuildRequires: %{python_module pytest >= 2.8.0}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-psutil
Requires: python-pytest >= 2.8.0
BuildArch: noarch
-
%python_subpackages
%description
@@ -41,6 +42,8 @@
%prep
%setup -q -n pytest-openfiles-%{version}
+# do not override pytest config
+rm setup.cfg
%build
%python_build
@@ -49,6 +52,9 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%check
+%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}
py.test-%{$python_bin_suffix} -v
+
%files %{python_files}
%doc CHANGES.rst README.rst
%license LICENSE.rst
++++++ pytest-openfiles-0.3.0.tar.gz -> pytest-openfiles-0.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-openfiles-0.3.0/CHANGES.rst
new/pytest-openfiles-0.3.2/CHANGES.rst
--- old/pytest-openfiles-0.3.0/CHANGES.rst 2018-04-20 19:48:54.000000000
+0200
+++ new/pytest-openfiles-0.3.2/CHANGES.rst 2019-01-07 16:15:40.000000000
+0100
@@ -1,3 +1,14 @@
+0.3.2 (2019-01-07)
+==================
+
+- Replace deprecated method to allow for compatibility with ``pytest-4.1`` and
+ later. [#19]
+
+0.3.1 (2018-11-26)
+==================
+
+- Fix a minor packaging issue. [#13]
+
0.3.0 (2018-04-20)
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-openfiles-0.3.0/MANIFEST.in
new/pytest-openfiles-0.3.2/MANIFEST.in
--- old/pytest-openfiles-0.3.0/MANIFEST.in 2018-04-20 19:48:54.000000000
+0200
+++ new/pytest-openfiles-0.3.2/MANIFEST.in 2018-11-26 15:35:06.000000000
+0100
@@ -4,4 +4,6 @@
include setup.cfg
+recursive-include tests *
+
global-exclude *.pyc *.o
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-openfiles-0.3.0/PKG-INFO
new/pytest-openfiles-0.3.2/PKG-INFO
--- old/pytest-openfiles-0.3.0/PKG-INFO 2018-04-20 19:49:18.000000000 +0200
+++ new/pytest-openfiles-0.3.2/PKG-INFO 2019-01-07 16:20:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: pytest-openfiles
-Version: 0.3.0
+Version: 0.3.2
Summary: Pytest plugin for detecting inadvertent open file handles
Home-page: https://astropy.org
Author: The Astropy Developers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-openfiles-0.3.0/pytest_openfiles/plugin.py
new/pytest-openfiles-0.3.2/pytest_openfiles/plugin.py
--- old/pytest-openfiles-0.3.0/pytest_openfiles/plugin.py 2018-04-20
19:45:35.000000000 +0200
+++ new/pytest-openfiles-0.3.2/pytest_openfiles/plugin.py 2019-01-07
16:13:08.000000000 +0100
@@ -6,6 +6,10 @@
import imp
import os
+from distutils.version import StrictVersion
+
+import pytest
+
try:
import importlib.machinery as importlib_machinery
except ImportError:
@@ -56,9 +60,16 @@
def pytest_runtest_setup(item):
+
+ # Retain backwards compatibility with earlier versions of pytest
+ if StrictVersion(pytest.__version__) < StrictVersion("3.6"):
+ ignore = item.get_marker('openfiles_ignore')
+ else:
+ ignore = item.get_closest_marker('openfiles_ignore')
+
# Store a list of the currently opened files so we can compare
# against them when the test is done.
- if item.config.getvalue('open_files') and not
item.get_marker('openfiles_ignore'):
+ if item.config.getvalue('open_files') and not ignore:
item.open_files = _get_open_file_list()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-openfiles-0.3.0/pytest_openfiles.egg-info/PKG-INFO
new/pytest-openfiles-0.3.2/pytest_openfiles.egg-info/PKG-INFO
--- old/pytest-openfiles-0.3.0/pytest_openfiles.egg-info/PKG-INFO
2018-04-20 19:49:18.000000000 +0200
+++ new/pytest-openfiles-0.3.2/pytest_openfiles.egg-info/PKG-INFO
2019-01-07 16:20:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: pytest-openfiles
-Version: 0.3.0
+Version: 0.3.2
Summary: Pytest plugin for detecting inadvertent open file handles
Home-page: https://astropy.org
Author: The Astropy Developers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-openfiles-0.3.0/pytest_openfiles.egg-info/SOURCES.txt
new/pytest-openfiles-0.3.2/pytest_openfiles.egg-info/SOURCES.txt
--- old/pytest-openfiles-0.3.0/pytest_openfiles.egg-info/SOURCES.txt
2018-04-20 19:49:18.000000000 +0200
+++ new/pytest-openfiles-0.3.2/pytest_openfiles.egg-info/SOURCES.txt
2019-01-07 16:20:00.000000000 +0100
@@ -12,4 +12,7 @@
pytest_openfiles.egg-info/entry_points.txt
pytest_openfiles.egg-info/not-zip-safe
pytest_openfiles.egg-info/requires.txt
-pytest_openfiles.egg-info/top_level.txt
\ No newline at end of file
+pytest_openfiles.egg-info/top_level.txt
+tests/__init__.py
+tests/test_open_file_detection.py
+tests/data/open_file_detection.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-openfiles-0.3.0/setup.py
new/pytest-openfiles-0.3.2/setup.py
--- old/pytest-openfiles-0.3.0/setup.py 2018-04-20 19:48:54.000000000 +0200
+++ new/pytest-openfiles-0.3.2/setup.py 2019-01-07 16:17:04.000000000 +0100
@@ -19,7 +19,7 @@
setup(
name='pytest-openfiles',
- version='0.3.0',
+ version='0.3.2',
license='BSD',
description='Pytest plugin for detecting inadvertent open file handles',
long_description=readme(),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-openfiles-0.3.0/tests/__init__.py
new/pytest-openfiles-0.3.2/tests/__init__.py
--- old/pytest-openfiles-0.3.0/tests/__init__.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-openfiles-0.3.2/tests/__init__.py 2017-09-25
17:17:06.000000000 +0200
@@ -0,0 +1 @@
+# Licensed under a 3-clause BSD style license - see LICENSE.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-openfiles-0.3.0/tests/data/open_file_detection.txt
new/pytest-openfiles-0.3.2/tests/data/open_file_detection.txt
--- old/pytest-openfiles-0.3.0/tests/data/open_file_detection.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-openfiles-0.3.2/tests/data/open_file_detection.txt
2017-09-25 17:17:06.000000000 +0200
@@ -0,0 +1 @@
+CONTENTS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-openfiles-0.3.0/tests/test_open_file_detection.py
new/pytest-openfiles-0.3.2/tests/test_open_file_detection.py
--- old/pytest-openfiles-0.3.0/tests/test_open_file_detection.py
1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-openfiles-0.3.2/tests/test_open_file_detection.py
2018-04-20 18:30:14.000000000 +0200
@@ -0,0 +1,22 @@
+# Licensed under a 3-clause BSD style license - see LICENSE.rst
+import os
+
+import pytest
+
+PKG_DATA_DIR = os.path.dirname(__file__)
+
+fd = None
+
+
+def test_open_file_detection():
+ global fd
+ fd = open(os.path.join(PKG_DATA_DIR, 'data/open_file_detection.txt'))
+
[email protected]_ignore
+def test_skip_open_file_detection():
+ global fd
+ fd = open(os.path.join(PKG_DATA_DIR, 'data/open_file_detection.txt'))
+
+def teardown():
+ if fd is not None:
+ fd.close()