Hello community,

here is the log from the commit of package python-zope.testrunner for 
openSUSE:Factory checked in at 2020-08-01 12:28:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-zope.testrunner (Old)
 and      /work/SRC/openSUSE:Factory/.python-zope.testrunner.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-zope.testrunner"

Sat Aug  1 12:28:43 2020 rev:13 rq:822035 version:5.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-zope.testrunner/python-zope.testrunner.changes
    2019-11-22 10:20:13.817348467 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-zope.testrunner.new.3592/python-zope.testrunner.changes
  2020-08-01 12:28:59.598334087 +0200
@@ -1,0 +2,9 @@
+Tue Jul 21 08:53:11 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- Update to 5.2
+  * Add support for Python 3.8.
+  * When a layer is run in a subprocess, read its stderr in a thread to avoid
+    a deadlock if its stderr output (containing failing and erroring test IDs)
+    overflows the capacity of a pipe
+
+-------------------------------------------------------------------

Old:
----
  zope.testrunner-5.1.tar.gz

New:
----
  zope.testrunner-5.2.tar.gz

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

Other differences:
------------------
++++++ python-zope.testrunner.spec ++++++
--- /var/tmp/diff_new_pack.ymqfrW/_old  2020-08-01 12:29:02.870337150 +0200
+++ /var/tmp/diff_new_pack.ymqfrW/_new  2020-08-01 12:29:02.874337154 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-zope.testrunner
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
 %bcond_with test
 %endif
 Name:           python-zope.testrunner
-Version:        5.1
+Version:        5.2
 Release:        0
 Summary:        Zope testrunner script
 License:        ZPL-2.1

++++++ zope.testrunner-5.1.tar.gz -> zope.testrunner-5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zope.testrunner-5.1/.travis.yml 
new/zope.testrunner-5.2/.travis.yml
--- old/zope.testrunner-5.1/.travis.yml 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/.travis.yml 2020-06-29 10:33:31.000000000 +0200
@@ -3,22 +3,10 @@
   - 2.7
   - 3.5
   - 3.6
+  - 3.7
+  - 3.8
   - pypy
   - pypy3
-matrix:
-    include:
-        - python: "3.7"
-          dist: xenial
-          env: SUBUNIT=true
-        - python: "3.7"
-          dist: xenial
-          env: SUBUNIT=false
-        - python: "3.8-dev"
-          dist: xenial
-          env: SUBUNIT=true
-        - python: "3.8-dev"
-          dist: xenial
-          env: SUBUNIT=false
 env:
   - SUBUNIT=true
   - SUBUNIT=false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zope.testrunner-5.1/CHANGES.rst 
new/zope.testrunner-5.2/CHANGES.rst
--- old/zope.testrunner-5.1/CHANGES.rst 2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/CHANGES.rst 2020-06-29 10:33:31.000000000 +0200
@@ -2,6 +2,17 @@
  zope.testrunner Changelog
 ===========================
 
+5.2 (2020-06-29)
+================
+
+- Add support for Python 3.8.
+
+- When a layer is run in a subprocess, read its stderr in a thread to avoid
+  a deadlock if its stderr output (containing failing and erroring test IDs)
+  overflows the capacity of a pipe (`#105
+  <https://github.com/zopefoundation/zope.testrunner/issues/105>`_).
+
+
 5.1 (2019-10-19)
 ================
 
@@ -25,6 +36,7 @@
 
 - Drop support for Python 3.4.
 
+
 4.9.2 (2018-11-24)
 ==================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zope.testrunner-5.1/PKG-INFO 
new/zope.testrunner-5.2/PKG-INFO
--- old/zope.testrunner-5.1/PKG-INFO    2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/PKG-INFO    2020-06-29 10:33:32.112758000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: zope.testrunner
-Version: 5.1
+Version: 5.2
 Summary: Zope testrunner script.
 Home-page: https://github.com/zopefoundation/zope.testrunner
 Author: Zope Foundation and Contributors
@@ -186,6 +186,17 @@
          zope.testrunner Changelog
         ===========================
         
+        5.2 (2020-06-29)
+        ================
+        
+        - Add support for Python 3.8.
+        
+        - When a layer is run in a subprocess, read its stderr in a thread to 
avoid
+          a deadlock if its stderr output (containing failing and erroring 
test IDs)
+          overflows the capacity of a pipe (`#105
+          <https://github.com/zopefoundation/zope.testrunner/issues/105>`_).
+        
+        
         5.1 (2019-10-19)
         ================
         
@@ -209,6 +220,7 @@
         
         - Drop support for Python 3.4.
         
+        
         4.9.2 (2018-11-24)
         ==================
         
@@ -608,11 +620,12 @@
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: Software Development :: Testing
 Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
-Provides-Extra: test
-Provides-Extra: subunit
 Provides-Extra: docs
+Provides-Extra: subunit
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zope.testrunner-5.1/appveyor.yml 
new/zope.testrunner-5.2/appveyor.yml
--- old/zope.testrunner-5.1/appveyor.yml        2019-10-19 11:47:21.000000000 
+0200
+++ new/zope.testrunner-5.2/appveyor.yml        2020-06-29 10:33:31.000000000 
+0200
@@ -11,6 +11,8 @@
     - python: 36-x64
     - python: 37
     - python: 37-x64
+    - python: 38
+    - python: 38-x64
     - { python: 27, SUBUNIT: 1 }
     - { python: 27-x64, SUBUNIT: 1 }
     - { python: 35, SUBUNIT: 1 }
@@ -19,6 +21,8 @@
     - { python: 36-x64, SUBUNIT: 1 }
     - { python: 37, SUBUNIT: 1 }
     - { python: 37-x64, SUBUNIT: 1 }
+    - { python: 38, SUBUNIT: 1 }
+    - { python: 38-x64, SUBUNIT: 1 }
 
 install:
   - "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zope.testrunner-5.1/setup.py 
new/zope.testrunner-5.2/setup.py
--- old/zope.testrunner-5.1/setup.py    2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/setup.py    2020-06-29 10:33:31.000000000 +0200
@@ -21,7 +21,7 @@
 from setuptools import setup
 from setuptools.command.test import test
 
-version = '5.1'
+version = '5.2'
 
 INSTALL_REQUIRES = [
     'setuptools',
@@ -152,8 +152,9 @@
         "Programming Language :: Python :: 3.5",
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
-        'Programming Language :: Python :: Implementation :: CPython',
-        'Programming Language :: Python :: Implementation :: PyPy',
+        "Programming Language :: Python :: 3.8",
+        "Programming Language :: Python :: Implementation :: CPython",
+        "Programming Language :: Python :: Implementation :: PyPy",
         "Topic :: Software Development :: Libraries :: Python Modules",
         "Topic :: Software Development :: Testing",
     ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zope.testrunner-5.1/src/zope/testrunner/runner.py 
new/zope.testrunner-5.2/src/zope/testrunner/runner.py
--- old/zope.testrunner-5.1/src/zope/testrunner/runner.py       2019-10-19 
11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/src/zope/testrunner/runner.py       2020-06-29 
10:33:31.000000000 +0200
@@ -539,6 +539,17 @@
             stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd,
             close_fds=not sys.platform.startswith('win'))
 
+        def reader_thread(f, buf):
+            buf.append(f.read())
+
+        # Start reading stderr in a thread.  This means we don't hang if the
+        # subprocess writes more to stderr than the pipe capacity.
+        stderr_buf = []
+        stderr_thread = threading.Thread(
+            target=reader_thread, args=(child.stderr, stderr_buf))
+        stderr_thread.daemon = True
+        stderr_thread.start()
+
         while True:
             try:
                 while True:
@@ -564,8 +575,9 @@
             else:
                 break
 
-        # Now stderr should be ready to read the whole thing.
-        errlines = child.stderr.read().splitlines()
+        # Now we should be able to finish reading stderr.
+        stderr_thread.join()
+        errlines = stderr_buf[0].splitlines()
         erriter = iter(errlines)
         nfail = nerr = 0
         for line in erriter:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zope.testrunner-5.1/src/zope/testrunner/tests/testrunner-ex/sampletests_many.py
 
new/zope.testrunner-5.2/src/zope/testrunner/tests/testrunner-ex/sampletests_many.py
--- 
old/zope.testrunner-5.1/src/zope/testrunner/tests/testrunner-ex/sampletests_many.py
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/zope.testrunner-5.2/src/zope/testrunner/tests/testrunner-ex/sampletests_many.py
 2020-06-29 10:33:31.000000000 +0200
@@ -0,0 +1,75 @@
+##############################################################################
+#
+# Copyright (c) 2020 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""A large number of sample tests."""
+
+import unittest
+
+
+class Layer1:
+    """A layer that can't be torn down."""
+
+    @classmethod
+    def setUp(self):
+        pass
+
+    @classmethod
+    def tearDown(self):
+        raise NotImplementedError
+
+
+class Layer2:
+
+    @classmethod
+    def setUp(self):
+        pass
+
+    @classmethod
+    def tearDown(self):
+        pass
+
+
+class TestNoTeardown(unittest.TestCase):
+
+    layer = Layer1
+
+    def test_something(self):
+        pass
+
+
+def make_TestMany():
+    attrs = {'layer': Layer2}
+    # Add enough failing test methods to make the concatenation of all their
+    # test IDs (formatted as "test_foo (sampletests_many.TestMany)")
+    # overflow the capacity of a pipe.  This is system-dependent, but on
+    # Linux since 2.6.11 it defaults to 65536 bytes, so will overflow by the
+    # time we've written 874 of these test IDs.  If the pipe capacity is
+    # much larger than that, then this test might be ineffective.
+    for i in range(1000):
+        attrs['test_some_very_long_test_name_with_padding_%03d' % i] = (
+            lambda self: self.fail())
+    return type('TestMany', (unittest.TestCase,), attrs)
+
+
+TestMany = make_TestMany()
+
+
+def test_suite():
+    suite = unittest.TestSuite()
+    suite.addTest(unittest.makeSuite(TestNoTeardown))
+    suite.addTest(unittest.makeSuite(TestMany))
+    return suite
+
+
+if __name__ == '__main__':
+    unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zope.testrunner-5.1/src/zope/testrunner/tests/testrunner-layers-ntd.rst 
new/zope.testrunner-5.2/src/zope/testrunner/tests/testrunner-layers-ntd.rst
--- old/zope.testrunner-5.1/src/zope/testrunner/tests/testrunner-layers-ntd.rst 
2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/src/zope/testrunner/tests/testrunner-layers-ntd.rst 
2020-06-29 10:33:31.000000000 +0200
@@ -268,4 +268,26 @@
 
     >>> sys.stderr = real_stderr
 
+When a layer is run in a subprocess, the test IDs of any failures and errors it
+generates are passed to the parent process via the child's stderr.  The parent
+reads these IDs in parallel with reading other output from the child, so this
+works even if there are enough failures to overflow the capacity of the stderr
+pipe.
 
+    >>> argv = [testrunner_script, '--tests-pattern', '^sampletests_many$']
+    >>> testrunner.run_internal(defaults, argv)
+    Running sampletests_many.Layer1 tests:
+      Set up sampletests_many.Layer1 in N.NNN seconds.
+      Ran 1 tests with 0 failures, 0 errors and 0 skipped in N.NNN seconds.
+    Running sampletests_many.Layer2 tests:
+      Tear down sampletests_many.Layer1 ... not supported
+      Running in a subprocess.
+      Set up sampletests_many.Layer2 in N.NNN seconds.
+    <BLANKLINE>
+    <BLANKLINE>
+    Failure in test test_some_very_long_test_name_with_padding_000 
(sampletests_many.TestMany)
+    ...
+      Ran 1000 tests with 1000 failures, 0 errors and 0 skipped in N.NNN 
seconds.
+      Tear down sampletests_many.Layer2 in N.NNN seconds.
+    Total: 1001 tests, 1000 failures, 0 errors and 0 skipped in N.NNN seconds.
+    True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zope.testrunner-5.1/src/zope.testrunner.egg-info/PKG-INFO 
new/zope.testrunner-5.2/src/zope.testrunner.egg-info/PKG-INFO
--- old/zope.testrunner-5.1/src/zope.testrunner.egg-info/PKG-INFO       
2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/src/zope.testrunner.egg-info/PKG-INFO       
2020-06-29 10:33:31.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: zope.testrunner
-Version: 5.1
+Version: 5.2
 Summary: Zope testrunner script.
 Home-page: https://github.com/zopefoundation/zope.testrunner
 Author: Zope Foundation and Contributors
@@ -186,6 +186,17 @@
          zope.testrunner Changelog
         ===========================
         
+        5.2 (2020-06-29)
+        ================
+        
+        - Add support for Python 3.8.
+        
+        - When a layer is run in a subprocess, read its stderr in a thread to 
avoid
+          a deadlock if its stderr output (containing failing and erroring 
test IDs)
+          overflows the capacity of a pipe (`#105
+          <https://github.com/zopefoundation/zope.testrunner/issues/105>`_).
+        
+        
         5.1 (2019-10-19)
         ================
         
@@ -209,6 +220,7 @@
         
         - Drop support for Python 3.4.
         
+        
         4.9.2 (2018-11-24)
         ==================
         
@@ -608,11 +620,12 @@
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: Software Development :: Testing
 Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
-Provides-Extra: test
-Provides-Extra: subunit
 Provides-Extra: docs
+Provides-Extra: subunit
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/zope.testrunner-5.1/src/zope.testrunner.egg-info/SOURCES.txt 
new/zope.testrunner-5.2/src/zope.testrunner.egg-info/SOURCES.txt
--- old/zope.testrunner-5.1/src/zope.testrunner.egg-info/SOURCES.txt    
2019-10-19 11:47:21.000000000 +0200
+++ new/zope.testrunner-5.2/src/zope.testrunner.egg-info/SOURCES.txt    
2020-06-29 10:33:31.000000000 +0200
@@ -141,6 +141,7 @@
 src/zope/testrunner/tests/testrunner-ex/samplelayers.py
 src/zope/testrunner/tests/testrunner-ex/sampletests.rst
 src/zope/testrunner/tests/testrunner-ex/sampletests_buffering.py
+src/zope/testrunner/tests/testrunner-ex/sampletests_many.py
 src/zope/testrunner/tests/testrunner-ex/sampletestsf.py
 src/zope/testrunner/tests/testrunner-ex/sampletestsl.rst
 src/zope/testrunner/tests/testrunner-ex/unicode.py


Reply via email to