<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/test/test_fork1.py, branch benjamin-eval-loop-edit</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-31370: Remove support for threads-less builds (#3385)</title>
<updated>2017-09-07T16:56:24+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>pitrou@free.fr</email>
</author>
<published>2017-09-07T16:56:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344'/>
<id>a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344</id>
<content type='text'>
* Remove Setup.config
* Always define WITH_THREAD for compatibility.

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Remove Setup.config
* Always define WITH_THREAD for compatibility.

</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #25795: Fix several tests to run independently.</title>
<updated>2015-12-05T05:32:23+00:00</updated>
<author>
<name>Zachary Ware</name>
<email>zachary.ware@gmail.com</email>
</author>
<published>2015-12-05T05:32:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ac28b796d80f869f39662491446145106960a886'/>
<id>ac28b796d80f869f39662491446145106960a886</id>
<content type='text'>
These were broken in 3aec776fc796 when they were converted
away from using support.run_unittest().  Oops :)

Initial patch by Felippe da Motta Raposo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These were broken in 3aec776fc796 when they were converted
away from using support.run_unittest().  Oops :)

Initial patch by Felippe da Motta Raposo.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #21741: Update 147 test modules to use test discovery.</title>
<updated>2015-04-13T20:00:43+00:00</updated>
<author>
<name>Zachary Ware</name>
<email>zachary.ware@gmail.com</email>
</author>
<published>2015-04-13T20:00:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=38c707e7e0322f9139bb51ad73ede1e3b46985ef'/>
<id>38c707e7e0322f9139bb51ad73ede1e3b46985ef</id>
<content type='text'>
I have compared output between pre- and post-patch runs of these tests
to make sure there's nothing missing and nothing broken, on both
Windows and Linux.  The only differences I found were actually tests
that were previously *not* run.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I have compared output between pre- and post-patch runs of these tests
to make sure there's nothing missing and nothing broken, on both
Windows and Linux.  The only differences I found were actually tests
that were previously *not* run.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #20910: Make tests more reliable, less dependent on time</title>
<updated>2014-03-17T23:39:04+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2014-03-17T23:39:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=1e48eb3b9bce45e596af16cf09930b1c239d7c9d'/>
<id>1e48eb3b9bce45e596af16cf09930b1c239d7c9d</id>
<content type='text'>
* Tolerate 10 seconds instead of 3 seconds for slow test
* Faster test, use sleep of 100 ms instead of 1 sec
* Replace a number of iterations with an explicit deadline for the timeout
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Tolerate 10 seconds instead of 3 seconds for slow test
* Faster test, use sleep of 100 ms instead of 1 sec
* Replace a number of iterations with an explicit deadline for the timeout
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #17177: The imp module is pending deprecation.</title>
<updated>2013-06-16T17:13:40+00:00</updated>
<author>
<name>Brett Cannon</name>
<email>brett@python.org</email>
</author>
<published>2013-06-16T17:13:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=e4f41deccf94ccc798b1eb1f44657ade66669a60'/>
<id>e4f41deccf94ccc798b1eb1f44657ade66669a60</id>
<content type='text'>
To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #9573: os.fork now works when triggered as a side effect of import (the wisdom of actually relying on this remains questionable!)</title>
<updated>2010-12-02T04:11:46+00:00</updated>
<author>
<name>Nick Coghlan</name>
<email>ncoghlan@gmail.com</email>
</author>
<published>2010-12-02T04:11:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=b2ddf7979d228f2e61a4b9d174759ba39737930e'/>
<id>b2ddf7979d228f2e61a4b9d174759ba39737930e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merged revisions 80552-80556,80564-80566,80568-80571 via svnmerge from</title>
<updated>2010-04-28T22:31:17+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@haypocalc.com</email>
</author>
<published>2010-04-28T22:31:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=45df820591c319061a625bdd99d7bbd2a26f8117'/>
<id>45df820591c319061a625bdd99d7bbd2a26f8117</id>
<content type='text'>
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80552 | victor.stinner | 2010-04-27 23:46:03 +0200 (mar., 27 avril 2010) | 3 lines

  Issue #7449, part 1: fix test_support.py for Python compiled without thread
........
  r80553 | victor.stinner | 2010-04-27 23:47:01 +0200 (mar., 27 avril 2010) | 1 line

  Issue #7449, part 2: regrtest.py -j option requires thread support
........
  r80554 | victor.stinner | 2010-04-27 23:51:26 +0200 (mar., 27 avril 2010) | 9 lines

  Issue #7449 part 3, test_doctest: import trace module in test_coverage()

  Import trace module fail if the threading module is missing. test_coverage() is
  only used if test_doctest.py is used with the -c option. This commit allows to
  execute the test suite without thread support.

  Move "import trace" in test_coverage() and use
  test_support.import_module('trace').
........
  r80555 | victor.stinner | 2010-04-27 23:56:26 +0200 (mar., 27 avril 2010) | 6 lines

  Issue #7449, part 4: skip test_multiprocessing if thread support is disabled

  import threading after _multiprocessing to raise a more revelant error message:
  "No module named _multiprocessing". _multiprocessing is not compiled without
  thread support.
........
  r80556 | victor.stinner | 2010-04-28 00:01:24 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py

   * Split Test.test_open() in 2 functions: test_open() and test_thread_open()
   * Skip test_open() and test_thread_open() if we are unable to find the C
     library
   * Skip test_thread_open() if thread support is disabled
   * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError()
........
  r80564 | victor.stinner | 2010-04-28 00:59:35 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 6: fix test_hashlib for missing threading module

  Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing().
........
  r80565 | victor.stinner | 2010-04-28 01:01:29 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 7: simplify threading detection in test_capi

   * Skip TestPendingCalls if threading module is missing
   * Test if threading module is present or not, instead of test the presence of
     _testcapi._test_thread_state
........
  r80566 | victor.stinner | 2010-04-28 01:03:16 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing

  TestFifo can be executed without the threading module
........
  r80568 | victor.stinner | 2010-04-28 01:14:58 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 9: fix test_xmlrpclib for missing threading module

   * Skip testcases using threads if threading module is missing
   * Use "http://" instead of URL in ServerProxyTestCase if threading is missing
     because URL is not set in this case
........
  r80569 | victor.stinner | 2010-04-28 01:33:58 +0200 (mer., 28 avril 2010) | 6 lines

  Partial revert of r80556 (Issue #7449, part 5, fix ctypes test)

  Rewrite r80556: the thread test have to be executed just after the test on
  libc_open() and so the test cannot be splitted in two functions (without
  duplicating code, and I don't want to duplicate code).
........
  r80570 | victor.stinner | 2010-04-28 01:51:16 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 10: test_cmd imports trace module using test_support.import_module()

  Use test_support.import_module() instead of import to raise a SkipTest
  exception if the import fail. Import trace fails if the threading module is
  missing.

  See also part 3: test_doctest: import trace module in test_coverage().
........
  r80571 | victor.stinner | 2010-04-28 01:55:59 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, last part (11): fix many tests if thread support is disabled

   * Use try/except ImportError or test_support.import_module() to import thread
     and threading modules
   * Add @unittest.skipUnless(threading, ...) to testcases using threads
........
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80552 | victor.stinner | 2010-04-27 23:46:03 +0200 (mar., 27 avril 2010) | 3 lines

  Issue #7449, part 1: fix test_support.py for Python compiled without thread
........
  r80553 | victor.stinner | 2010-04-27 23:47:01 +0200 (mar., 27 avril 2010) | 1 line

  Issue #7449, part 2: regrtest.py -j option requires thread support
........
  r80554 | victor.stinner | 2010-04-27 23:51:26 +0200 (mar., 27 avril 2010) | 9 lines

  Issue #7449 part 3, test_doctest: import trace module in test_coverage()

  Import trace module fail if the threading module is missing. test_coverage() is
  only used if test_doctest.py is used with the -c option. This commit allows to
  execute the test suite without thread support.

  Move "import trace" in test_coverage() and use
  test_support.import_module('trace').
........
  r80555 | victor.stinner | 2010-04-27 23:56:26 +0200 (mar., 27 avril 2010) | 6 lines

  Issue #7449, part 4: skip test_multiprocessing if thread support is disabled

  import threading after _multiprocessing to raise a more revelant error message:
  "No module named _multiprocessing". _multiprocessing is not compiled without
  thread support.
........
  r80556 | victor.stinner | 2010-04-28 00:01:24 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py

   * Split Test.test_open() in 2 functions: test_open() and test_thread_open()
   * Skip test_open() and test_thread_open() if we are unable to find the C
     library
   * Skip test_thread_open() if thread support is disabled
   * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError()
........
  r80564 | victor.stinner | 2010-04-28 00:59:35 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 6: fix test_hashlib for missing threading module

  Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing().
........
  r80565 | victor.stinner | 2010-04-28 01:01:29 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 7: simplify threading detection in test_capi

   * Skip TestPendingCalls if threading module is missing
   * Test if threading module is present or not, instead of test the presence of
     _testcapi._test_thread_state
........
  r80566 | victor.stinner | 2010-04-28 01:03:16 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing

  TestFifo can be executed without the threading module
........
  r80568 | victor.stinner | 2010-04-28 01:14:58 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 9: fix test_xmlrpclib for missing threading module

   * Skip testcases using threads if threading module is missing
   * Use "http://" instead of URL in ServerProxyTestCase if threading is missing
     because URL is not set in this case
........
  r80569 | victor.stinner | 2010-04-28 01:33:58 +0200 (mer., 28 avril 2010) | 6 lines

  Partial revert of r80556 (Issue #7449, part 5, fix ctypes test)

  Rewrite r80556: the thread test have to be executed just after the test on
  libc_open() and so the test cannot be splitted in two functions (without
  duplicating code, and I don't want to duplicate code).
........
  r80570 | victor.stinner | 2010-04-28 01:51:16 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 10: test_cmd imports trace module using test_support.import_module()

  Use test_support.import_module() instead of import to raise a SkipTest
  exception if the import fail. Import trace fails if the threading module is
  missing.

  See also part 3: test_doctest: import trace module in test_coverage().
........
  r80571 | victor.stinner | 2010-04-28 01:55:59 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, last part (11): fix many tests if thread support is disabled

   * Use try/except ImportError or test_support.import_module() to import thread
     and threading modules
   * Add @unittest.skipUnless(threading, ...) to testcases using threads
........
</pre>
</div>
</content>
</entry>
<entry>
<title>Merged revisions 78093 via svnmerge from</title>
<updated>2010-03-14T10:45:50+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2010-03-14T10:45:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=1b37e8728c654efe928b9bc028b2f4f5621a35ea'/>
<id>1b37e8728c654efe928b9bc028b2f4f5621a35ea</id>
<content type='text'>
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line

  Remove unused imports in test modules.
........
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line

  Remove unused imports in test modules.
........
</pre>
</div>
</content>
</entry>
<entry>
<title>Merged revisions 74841 via svnmerge from</title>
<updated>2009-10-04T20:32:25+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2009-10-04T20:32:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=0df35a93a2c53debf6d3ce00f022b79ea7892429'/>
<id>0df35a93a2c53debf6d3ce00f022b79ea7892429</id>
<content type='text'>
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74841 | thomas.wouters | 2009-09-16 14:55:54 -0500 (Wed, 16 Sep 2009) | 23 lines


  Fix issue #1590864, multiple threads and fork() can cause deadlocks, by
  acquiring the import lock around fork() calls. This prevents other threads
  from having that lock while the fork happens, and is the recommended way of
  dealing with such issues. There are two other locks we care about, the GIL
  and the Thread Local Storage lock. The GIL is obviously held when calling
  Python functions like os.fork(), and the TLS lock is explicitly reallocated
  instead, while also deleting now-orphaned TLS data.

  This only fixes calls to os.fork(), not extension modules or embedding
  programs calling C's fork() directly. Solving that requires a new set of API
  functions, and possibly a rewrite of the Python/thread_*.c mess. Add a
  warning explaining the problem to the documentation in the mean time.

  This also changes behaviour a little on AIX. Before, AIX (but only AIX) was
  getting the import lock reallocated, seemingly to avoid this very same
  problem. This is not the right approach, because the import lock is a
  re-entrant one, and reallocating would do the wrong thing when forking while
  holding the import lock.

  Will backport to 2.6, minus the tiny AIX behaviour change.
........
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74841 | thomas.wouters | 2009-09-16 14:55:54 -0500 (Wed, 16 Sep 2009) | 23 lines


  Fix issue #1590864, multiple threads and fork() can cause deadlocks, by
  acquiring the import lock around fork() calls. This prevents other threads
  from having that lock while the fork happens, and is the recommended way of
  dealing with such issues. There are two other locks we care about, the GIL
  and the Thread Local Storage lock. The GIL is obviously held when calling
  Python functions like os.fork(), and the TLS lock is explicitly reallocated
  instead, while also deleting now-orphaned TLS data.

  This only fixes calls to os.fork(), not extension modules or embedding
  programs calling C's fork() directly. Solving that requires a new set of API
  functions, and possibly a rewrite of the Python/thread_*.c mess. Add a
  warning explaining the problem to the documentation in the mean time.

  This also changes behaviour a little on AIX. Before, AIX (but only AIX) was
  getting the import lock reallocated, seemingly to avoid this very same
  problem. This is not the right approach, because the import lock is a
  re-entrant one, and reallocating would do the wrong thing when forking while
  holding the import lock.

  Will backport to 2.6, minus the tiny AIX behaviour change.
........
</pre>
</div>
</content>
</entry>
<entry>
<title>Merged revisions 70734,70775,70856,70874,70876-70877 via svnmerge</title>
<updated>2009-03-31T23:16:50+00:00</updated>
<author>
<name>R. David Murray</name>
<email>rdmurray@bitdance.com</email>
</author>
<published>2009-03-31T23:16:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a21e4ca3c6dc00b2825e2bb4e77a4aa76d8485f0'/>
<id>a21e4ca3c6dc00b2825e2bb4e77a4aa76d8485f0</id>
<content type='text'>
........
  r70734 | r.david.murray | 2009-03-30 15:04:00 -0400 (Mon, 30 Mar 2009) | 7 lines

  Add import_function method to test.test_support, and modify a number of
  tests that expect to be skipped if imports fail or functions don't
  exist to use import_function and import_module.  The ultimate goal is
  to change regrtest to not skip automatically on ImportError.  Checking
  in now to make sure the buldbots don't show any errors on platforms
  I can't direct test on.
........
  r70775 | r.david.murray | 2009-03-30 19:05:48 -0400 (Mon, 30 Mar 2009) | 4 lines

  Change more tests to use import_module for the modules that
  should cause tests to be skipped.  Also rename import_function
  to the more descriptive get_attribute and add a docstring.
........
  r70856 | r.david.murray | 2009-03-31 14:32:17 -0400 (Tue, 31 Mar 2009) | 7 lines

  A few more test skips via import_module, and change import_module to
  return the error message produced by importlib, so that if an import
  in the package whose import is being wrapped is what failed the skip
  message will contain the name of that module instead of the name of the
  wrapped module.  Also fixed formatting of some previous comments.
........
  r70874 | r.david.murray | 2009-03-31 15:33:15 -0400 (Tue, 31 Mar 2009) | 5 lines

  Improve test_support.import_module docstring, remove
  deprecated flag from get_attribute since it isn't likely
  to do anything useful.
........
  r70876 | r.david.murray | 2009-03-31 15:49:15 -0400 (Tue, 31 Mar 2009) | 4 lines

  Remove the regrtest check that turns any ImportError into a skipped test.
  Hopefully all modules whose imports legitimately result in a skipped
  test have been properly wrapped by the previous commits.
........
  r70877 | r.david.murray | 2009-03-31 15:57:24 -0400 (Tue, 31 Mar 2009) | 2 lines

  Add NEWS entry for regrtest change.
........
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
........
  r70734 | r.david.murray | 2009-03-30 15:04:00 -0400 (Mon, 30 Mar 2009) | 7 lines

  Add import_function method to test.test_support, and modify a number of
  tests that expect to be skipped if imports fail or functions don't
  exist to use import_function and import_module.  The ultimate goal is
  to change regrtest to not skip automatically on ImportError.  Checking
  in now to make sure the buldbots don't show any errors on platforms
  I can't direct test on.
........
  r70775 | r.david.murray | 2009-03-30 19:05:48 -0400 (Mon, 30 Mar 2009) | 4 lines

  Change more tests to use import_module for the modules that
  should cause tests to be skipped.  Also rename import_function
  to the more descriptive get_attribute and add a docstring.
........
  r70856 | r.david.murray | 2009-03-31 14:32:17 -0400 (Tue, 31 Mar 2009) | 7 lines

  A few more test skips via import_module, and change import_module to
  return the error message produced by importlib, so that if an import
  in the package whose import is being wrapped is what failed the skip
  message will contain the name of that module instead of the name of the
  wrapped module.  Also fixed formatting of some previous comments.
........
  r70874 | r.david.murray | 2009-03-31 15:33:15 -0400 (Tue, 31 Mar 2009) | 5 lines

  Improve test_support.import_module docstring, remove
  deprecated flag from get_attribute since it isn't likely
  to do anything useful.
........
  r70876 | r.david.murray | 2009-03-31 15:49:15 -0400 (Tue, 31 Mar 2009) | 4 lines

  Remove the regrtest check that turns any ImportError into a skipped test.
  Hopefully all modules whose imports legitimately result in a skipped
  test have been properly wrapped by the previous commits.
........
  r70877 | r.david.murray | 2009-03-31 15:57:24 -0400 (Tue, 31 Mar 2009) | 2 lines

  Add NEWS entry for regrtest change.
........
</pre>
</div>
</content>
</entry>
</feed>
