#4 Update to 21.6.0; Modernize spec a bit
Closed 2 years ago by aekoroglu. Opened 2 years ago by orion.
rpms/ orion/python-contextlib2 update  into  rawhide

file modified
+1
@@ -4,3 +4,4 @@ 

  /contextlib2-0.5.4.tar.gz

  /contextlib2-0.5.5.tar.gz

  /contextlib2-0.6.0.post1.tar.gz

+ /contextlib2-21.6.0.tar.gz

file modified
+10 -13
@@ -1,8 +1,8 @@ 

  %global modname contextlib2

  

  Name:               python-contextlib2

- Version:            0.6.0.post1

- Release:            5%{?dist}

+ Version:            21.6.0

+ Release:            1%{?dist}

  Summary:            Backports and enhancements for the contextlib module

  

  License:            Python
@@ -35,30 +35,27 @@ 

  

  %prep

  %setup -q -n %{modname}-%{version}

- %if 0%{?el6}

- %patch0 -p1 -b skip-tests-on-el6

- %endif

- 

- # Remove bundled egg-info in case it exists

- rm -rf %{modname}.egg-info

  

  %build

- %{__python3} setup.py build

+ %py3_build

  

  %install

- %{__python3} setup.py install -O1 --skip-build --root=%{buildroot}

+ %py3_install

  

  %check

- %{__python3} test_contextlib2.py

+ %{__python3} -m unittest discover -t . -s test

  

  %files -n python3-contextlib2

  %doc README.rst VERSION.txt NEWS.rst

  %license LICENSE.txt

- %{python3_sitelib}/%{modname}.py*

- %{python3_sitelib}/__pycache__/%{modname}*

+ %{python3_sitelib}/%{modname}/

  %{python3_sitelib}/%{modname}-%{version}-*

  

  %changelog

+ * Tue Jun 14 2022 Orion Poplawski <orion@nwra.com> - 21.6.0-1

+ - Update to 21.6.0

+ - Modernize spec a bit

+ 

  * Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.6.0.post1-5

  - Rebuilt for Python 3.11

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (contextlib2-0.6.0.post1.tar.gz) = bd3b458b365bc1d556476f6368bc523fde07e85afdad74037aa98d7a498008103a789f6b481b606700da92606ee6477fc5a817f1596e93a6e3c548ed0d4a5bf8

+ SHA512 (contextlib2-21.6.0.tar.gz) = a85cafaaf66c7c6a59a4e9ac757941b1a98c17e5a49e41573dc759fafbbf17928a21f582e8aaa0fdc60636413ec702e198bde19a78ac304237b6da1c3d47b730

no initial comment
+ /usr/bin/python3 -m unittest discover -t . -s test
....................................EE.....................................................Task was destroyed but it is pending!
task: <Task pending name='Task-12' coro=<<async_generator_athrow without __name__>()>>
.Task was destroyed but it is pending!
task: <Task pending name='Task-14' coro=<<async_generator_athrow without __name__>()>>
.....Task was destroyed but it is pending!
task: <Task pending name='Task-20' coro=<<async_generator_athrow without __name__>()>>
............................
======================================================================
ERROR: test_typo_enter (test.test_contextlib.TestContextDecorator.test_typo_enter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/contextlib2-21.6.0/test/test_contextlib.py", line 498, in test_typo_enter
    with mycontext():
    ^^^^^^^^^^^^^^^^^
TypeError: 'mycontext' object does not support the context manager protocol
======================================================================
ERROR: test_typo_exit (test.test_contextlib.TestContextDecorator.test_typo_exit)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/contextlib2-21.6.0/test/test_contextlib.py", line 510, in test_typo_exit
    with mycontext():
    ^^^^^^^^^^^^^^^^^
TypeError: 'mycontext' object does not support the context manager protocol (missed __exit__ method)
----------------------------------------------------------------------
Ran 125 tests in 0.070s
FAILED (errors=2)

contextlib2 is a backport of the standard library’s contextlib module to earlier Python versions.

Should we rather migrate whatever this is blocking to the standard library?

Yeah, after poking at contextlib2 for python-schema I realized it wasn't really needed. So this PR isn't really a priority - it was just something i filed while poking at it.

Pull-Request has been closed by aekoroglu

2 years ago