# # spec file for package python-contextlib2 # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2014 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-contextlib2 Version: 0.6.0 Release: 1.2 Summary: Backports and enhancements for the contextlib module License: Python-2.0 Group: Development/Languages/Python URL: http://contextlib2.readthedocs.org Source: https://files.pythonhosted.org/packages/source/c/contextlib2/contextlib2-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: %{python_module unittest2} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch %python_subpackages %description contextlib2 is a backport of the standard library's contextlib module to earlier Python versions. It also serves as a real world proving ground for possible future enhancements to the standard library version. %prep %setup -q -n contextlib2-%{version} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python test_contextlib2.py %files %{python_files} %license LICENSE.txt %doc README.rst NEWS.rst %{python_sitelib}/* %changelog * Tue Sep 24 2019 Tomáš Chvátal - Update to 0.6.0: * Various minor fixes and metadata updates * Add nullcontext * Add AbstractContextManager * Tue May 22 2018 tchvatal@suse.com - Do not run the tests twice for no reason * Tue May 22 2018 mcepl@suse.com - Clean the SPEC, enable tests * Thu Aug 24 2017 jmatejek@suse.com - singlespec auto-conversion * Thu May 25 2017 toddrme2178@gmail.com - Fix source URL. - Provide python2- package for compatibility with singlespec macros. - Run unit tests - Update to version 0.5.5 * Issue `#13 `__: ``setup.py`` now falls back to plain ``distutils`` if ``setuptools`` is not available (patch by Allan Harwood) * Updates to the default compatibility testing matrix: * Added: PyPy3, CPython 3.6 (maintenance), CPython 3.7 (development) * Dropped: CPython 3.3 - Update to version 0.5.4 * Thanks to the welcome efforts of Jannis Leidel, contextlib2 is now a [Jazzband](https://jazzband.co/) project! This means that I (Nick Coghlan) am no longer a single point of failure for backports of future contextlib updates to earlier Python versions. * Issue `#7 `__: Backported fix for CPython issue `#27122 `__, preventing a potential infinite loop on Python 3.5 when handling ``RuntimeError`` (CPython updates by Gregory P. Smith & Serhiy Storchaka) - Update to version 0.5.3 * ``ExitStack`` now correctly handles context managers implemented as old-style classes in Python 2.x (such as ``codecs.StreamReader`` and ``codecs.StreamWriter``) * ``setup.py`` has been migrated to setuptools and configured to emit a universal wheel file by default - Update to version 0.5.2 * development migrated from BitBucket to GitHub * ``redirect_stream``, ``redirect_stdout``, ``redirect_stderr`` and ``suppress`` now explicitly inherit from ``object``, ensuring compatibility with ``ExitStack`` when run under Python 2.x (patch contributed by Devin Jeanpierre). * ``MANIFEST.in`` is now included in the published sdist, ensuring the archive can be precisely recreated even without access to the original source repo (patch contributed by Guy Rozendorn) - Update to version 0.5.1 * Python 2.6 compatilibity restored (patch contributed by Armin Ronacher) * README converted back to reStructured Text formatting - Update to version 0.5.0 * Updated to include all features from the Python 3.4 and 3.5 releases of contextlib (also includes some ``ExitStack`` enhancements made following the integration into the standard library for Python 3.3) * The legacy ``ContextStack`` and ``ContextDecorator.refresh_cm`` APIs are no longer documented and emit ``DeprecationWarning`` when used * Python 2.6, 3.2 and 3.3 have been dropped from compatibility testing * tox is now supported for local version compatibility testing (patch by Marc Abramowitz) * Tue Nov 4 2014 hpj@urpla.net - version 0.4.0: initial build