- 28 Ock, 2018 1 kayıt (commit)
-
-
Martin Teichmann yazdı
The arguments to a generator function which is declared as a contextmanager are stored inside the context manager, and thus are kept alive, even when it is used as a regular context manager, and not as a function decorator (where it needs the original arguments to recreate the generator on each call). This is a possible unnecessary memory leak, so this changes contextmanager.__enter__ to release the saved arguments, as that method being called means that particular CM instance isn't going to need to recreate the underlying generator. Patch by Martin Teichmann.
-
- 25 Ock, 2018 1 kayıt (commit)
-
-
Ilya Kulakov yazdı
-
- 23 Kas, 2017 1 kayıt (commit)
-
-
Jesse-Bakker yazdı
Adds a simpler and faster alternative to ExitStack for handling single optional context managers without having to change the lexical structure of your code.
-
- 07 Eyl, 2017 1 kayıt (commit)
-
-
Antoine Pitrou yazdı
* Remove Setup.config * Always define WITH_THREAD for compatibility.
-
- 09 Haz, 2017 1 kayıt (commit)
-
-
Jelle Zijlstra yazdı
contextlib.AbstractContextManager now supports anti-registration by setting __enter__ = None or __exit__ = None, following the pattern introduced in bpo-25958.
-
- 11 Nis, 2017 1 kayıt (commit)
-
-
svelankar yazdı
contextlib._GeneratorContextManager.__exit__ includes a special case to deal with PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context manager body. Previously this check was too permissive, and undid one level of chaining on *all* RuntimeError instances, not just those that wrapped a StopIteration instance.
-
- 20 Haz, 2016 1 kayıt (commit)
-
-
Serhiy Storchaka yazdı
-
- 14 Haz, 2016 1 kayıt (commit)
-
-
Gregory P. Smith yazdı
managed by a contextlib.ExitStack() and one of the exit stack generators catches and raises it in a chain, do not re-raise the original exception when exiting, let the new chained one through. This avoids the PEP 479 bug described in issue25782.
-
- 08 Nis, 2016 1 kayıt (commit)
-
-
Brett Cannon yazdı
typing.ContextManager.
-
- 10 Şub, 2016 1 kayıt (commit)
-
-
Martin Panter yazdı
Patch by Anish Shah.
-
- 10 Eki, 2015 1 kayıt (commit)
-
-
Martin Panter yazdı
-
- 28 Haz, 2015 1 kayıt (commit)
-
-
Serhiy Storchaka yazdı
keyword arguments called "func" and "self". Patch by Martin Panter.
-
- 22 May, 2015 1 kayıt (commit)
-
-
Yury Selivanov yazdı
Raise PendingDeprecationWarning when generator raises StopIteration and no __future__ import is used. Fix offenders in the stdlib and tests. See also issue 22906. Thanks to Nick Coghlan and Berker Peksag for reviews.
-
- 09 May, 2015 1 kayıt (commit)
-
-
Yury Selivanov yazdı
Closes issue #22906.
-
- 28 Kas, 2014 1 kayıt (commit)
-
-
Berker Peksag yazdı
-
- 24 Ock, 2014 1 kayıt (commit)
-
-
Nick Coghlan yazdı
- Alex J Burke noticed a debugging raise in the commit that fixed the original bug reported in issue 20317 - this showed that multiple iterations through the affected loop wasn't actually being tested
-
- 22 Ock, 2014 1 kayıt (commit)
-
-
Nick Coghlan yazdı
-
- 03 Kas, 2013 1 kayıt (commit)
-
-
Nick Coghlan yazdı
-
- 26 Eki, 2013 3 kayıt (commit)
-
-
Nick Coghlan yazdı
-
Nick Coghlan yazdı
- added test cases to ensure docstrings are reasonable - also updates various comments in contextlib for accuracy - identifed #19404 as an issue making it difficult to provide good help output on generator based context manager instances
-
Nick Coghlan yazdı
-
- 19 Eki, 2013 1 kayıt (commit)
-
-
Nick Coghlan yazdı
- explain single use, reusable and reentrant in docs - converted suppress to a reentrant class based impl - converted redirect_stdout to a reusable impl - moved both suppress and redirect_stdout behind a functional facade - added reentrancy tests for the updated suppress - added reusability tests for the updated redirect_stdio - slightly cleaned up an exception from contextmanager
-
- 17 Eki, 2013 1 kayıt (commit)
-
-
Nick Coghlan yazdı
Patch by Zero Piraeus.
-
- 11 Eki, 2013 1 kayıt (commit)
-
-
Raymond Hettinger yazdı
-
- 10 Eki, 2013 1 kayıt (commit)
-
-
Raymond Hettinger yazdı
-
- 01 Eki, 2013 1 kayıt (commit)
-
-
Nick Coghlan yazdı
Report and patch by Hrvoje Nikšić
-
- 13 Haz, 2013 1 kayıt (commit)
-
-
Brett Cannon yazdı
instead of manually listing tests for test.support.run_unittest().
-
- 11 Mar, 2013 1 kayıt (commit)
-
-
Raymond Hettinger yazdı
-
- 01 Haz, 2012 1 kayıt (commit)
-
-
Nick Coghlan yazdı
-
- 31 May, 2012 2 kayıt (commit)
-
-
Nick Coghlan yazdı
-
Nick Coghlan yazdı
Issue #14963: Added test cases for contextlib.ExitStack exception handling behaviour (Initial patch by Alon Horev)
-
- 21 May, 2012 1 kayıt (commit)
-
-
Nick Coghlan yazdı
-
- 05 May, 2011 1 kayıt (commit)
-
-
Nick Coghlan yazdı
Issue #11647: allow contextmanager objects to be used as decorators as described in the docs. Initial patch by Ysj Ray.
-
- 01 Ara, 2010 1 kayıt (commit)
-
-
Ezio Melotti yazdı
-
- 02 Agu, 2010 1 kayıt (commit)
-
-
Ezio Melotti yazdı
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79539 | florent.xicluna | 2010-04-01 01:01:03 +0300 (Thu, 01 Apr 2010) | 2 lines Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests. ........
-
- 30 Haz, 2010 1 kayıt (commit)
-
-
Michael Foord yazdı
Issue 9110. Adding ContextDecorator to contextlib. This enables the creation of APIs that act as decorators as well as context managers. contextlib.contextmanager changed to use ContextDecorator.
-
- 28 Nis, 2010 1 kayıt (commit)
-
-
Victor Stinner yazdı
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 ........
-
- 27 Nis, 2010 1 kayıt (commit)
-
-
Victor Stinner yazdı
* Use try/except ImportError or test_support.import_module() to import thread and threading modules * Add @unittest.skipUnless(threading, ...) to testcases using threads
-
- 02 Nis, 2010 1 kayıt (commit)
-
-
Florent Xicluna yazdı
Merged revisions 79534,79537,79539,79558,79606 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79534 | florent.xicluna | 2010-03-31 23:21:54 +0200 (mer, 31 mar 2010) | 2 lines Fix test for xml.etree when using a non-ascii path. And use check_warnings instead of catch_warnings. ........ r79537 | florent.xicluna | 2010-03-31 23:40:32 +0200 (mer, 31 mar 2010) | 2 lines Fix typo ........ r79539 | florent.xicluna | 2010-04-01 00:01:03 +0200 (jeu, 01 avr 2010) | 2 lines Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests. ........ r79558 | florent.xicluna | 2010-04-01 20:17:09 +0200 (jeu, 01 avr 2010) | 2 lines #7092: Fix some -3 warnings, and fix Lib/platform.py when the path contains a double-quote. ........ r79606 | florent.xicluna | 2010-04-02 19:26:42 +0200 (ven, 02 avr 2010) | 2 lines Backport some robotparser test and skip the test if the external resource is not available. ........
-
- 31 Mar, 2010 1 kayıt (commit)
-
-
Florent Xicluna yazdı
Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests.
-