summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-29781: Fix SSLObject.version before handshake (#3364)Christian Heimes2017-09-061-0/+2
| | | | | | SSLObject.version() now correctly returns None when handshake over BIO has not been performed yet. Signed-off-by: Christian Heimes <christian@python.org>
* Stop test_xmlrpc from writing to sys.stderr (#3359)Christian Heimes2017-09-061-0/+4
| | | | | | | | One test case of test_xmlrpc uses HTTPServer with a subclass of BaseHTTPRequestHandler. The BaseRequestHandler class logs to sys.stderr by default. Override log_message() to not clobber test output. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31350: Optimize get_event_loop and _get_running_loop (#3347)jimmylai2017-09-061-6/+4
| | | | | | | | | | | | | | | | * call remove_done_callback in finally section * Optimize get_event_loop and _get_running_loop * rename _loop_pid as loop_pid and add blurb news * rename _loop_pid as loop_pid and add blurb news * add back _RunningLoop * Update 2017-09-05-10-30-48.bpo-31350.dXJ-7N.rst * Update 2017-09-05-10-30-48.bpo-31350.dXJ-7N.rst
* bpo-31320: No traceback to sys.stderr in test_ssl (#3360)Christian Heimes2017-09-051-1/+4
| | | | | | | In case PROTOCOL_TLS_SERVER is used for both client context and server context, the test thread dies with OSError. Catch OSError to avoid traceback on sys.stderr Signed-off-by: Christian Heimes <christian@python.org>
* bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179)Jonathan Eunice2017-09-051-3/+1
| | | | | | | | | | | | * fixed OrderedDict.__init__ docstring re PEP 468 * tightened comment and mirrored to C impl * added space after period per marco-buttu * preserved substituted for stable * drop references to Python 3.6 and PEP 468
* Conceptually, roots is a set. Also searching it as a set is a tiny bit ↵Raymond Hettinger2017-09-051-1/+1
| | | | faster (#3338)
* Revert "bpo-17852: Maintain a list of BufferedWriter objects. Flush them on ↵Neil Schemenauer2017-09-051-24/+0
| | | | | exit. (#1908)" (#3337) This reverts commit e38d12ed34870c140016bef1e0ff10c8c3d3f213.
* bpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit. ↵Neil Schemenauer2017-09-051-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#1908) * Maintain a list of BufferedWriter objects. Flush them on exit. In Python 3, the buffer and the underlying file object are separate and so the order in which objects are finalized matters. This is unlike Python 2 where the file and buffer were a single object and finalization was done for both at the same time. In Python 3, if the file is finalized and closed before the buffer then the data in the buffer is lost. This change adds a doubly linked list of open file buffers. An atexit hook ensures they are flushed before proceeding with interpreter shutdown. This is addition does not remove the need to properly close files as there are other reasons why buffered data could get lost during finalization. Initial patch by Armin Rigo. * Use weakref.WeakSet instead of WeakKeyDictionary. * Simplify buffered double-linked list types. * In _flush_all_writers(), suppress errors from flush(). * Remove NEWS entry, use blurb.
* Add comment to explain the implications of not sorting keywords (#3331)Raymond Hettinger2017-09-051-0/+4
| | | In Python 3.6, sorted() was removed from _make_key() for the lru_cache and instead rely on guaranteed keyword argument order preservation. This makes keyword argument handling faster but it also causes multiple callers with a different keyword argument order to be cached as separate items. Depending on your point of view, this is either a performance regression (increased number of cache misses) or a performance enhancement (faster computation of keys).
* random_triangular: sqrt() is more accurate than **0.5 (#3317)Raymond Hettinger2017-09-041-1/+1
|
* remove IRIX support (closes bpo-31341) (#3310)Benjamin Peterson2017-09-046-40/+19
| | | See PEP 11.
* bpo-1198569: Allow string.Template braced pattern to be different (#3288)Barry Warsaw2017-09-042-1/+27
| | | | | | | | * bpo-1198569: Allow the braced pattern to be different ``string.Template`` subclasses can optionally define ``braceidpattern`` if they want to specify different placeholder patterns inside and outside the braces. If None (the default) it falls back to ``idpattern``.
* bpo-25674: remove sha256.tbs-internet.com ssl test (#3297)Christian Heimes2017-09-042-156/+0
| | | Signed-off-by: Christian Heimes <christian@python.org>
* Improve clarity (and small speed-up) by using tuple unpacking (#3289)Raymond Hettinger2017-09-041-8/+8
|
* bpo-31281: Fix pathlib.Path incompatibility in fileinput (gh-3208)Zhiming Wang2017-09-042-1/+14
| | | Fix fileinput with inplace=True to accept pathlib.Path objects.
* bpo-12383: Also ignore __PYVENV_LAUNCHER__ (#3278)Ned Deily2017-09-041-0/+1
| | | Used in macOS framework builds.
* Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (#3270)Antoine Pitrou2017-09-032-8/+20
|
* bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076)Serhiy Storchaka2017-09-031-8/+37
|
* remove a redundant lower in urllib.parse.urlsplit (#3008)Oren Milman2017-09-031-2/+1
|
* bpo-31323: Fix reference leak in test_ssl (#3263)Victor Stinner2017-09-011-2/+6
| | | | Store exceptions as string rather than object to prevent reference cycles which cause leaking dangling threads.
* bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264)Victor Stinner2017-09-011-2/+2
| | | | | | | Call doCleanups() to close the loop after calling executor.shutdown(wait=True): see TestCase.set_event_loop() of asyncio.test_utils. Replace also gc.collect() with support.gc_collect().
* bpo-31326: ProcessPoolExecutor waits for the call queue thread (#3265)Victor Stinner2017-09-011-1/+5
| | | | | | | | | | * bpo-31326: ProcessPoolExecutor waits for the call queue thread concurrent.futures.ProcessPoolExecutor.shutdown() now explicitly closes the call queue. Moreover, shutdown(wait=True) now also join the call queue thread, to prevent leaking a dangling thread. * Fix for shutdown() being called twice.
* bpo-27144: concurrent.futures as_complete and map iterators do not keep ↵Grzegorz Grzywacz2017-09-013-10/+89
| | | | | | | | | | reference to returned object (#1560) * bpo-27144: concurrent.futures as_complie and map iterators do not keep reference to returned object * Some nits. Improve wordings in docstrings and comments, and avoid relying on sys.getrefcount() in tests.
* bpo-31250, test_asyncio: fix dangling threads (#3252)Victor Stinner2017-09-013-2/+10
| | | | | | | * Explicitly call shutdown(wait=True) on executors to wait until all threads complete to prevent side effects between tests. * Fix test_loop_self_reading_exception(): don't mock loop.close(). Previously, the original close() method was called rather than the mock, because how set_event_loop() registered loop.close().
* bpo-31217: Fix regrtest -R for small integer (#3260)Victor Stinner2017-09-011-3/+11
| | | | | | | | Use a pool of integer objects toprevent false alarm when checking for memory block leaks. Fill the pool with values in -1000..1000 which are the most common (reference, memory block, file descriptor) differences. Co-Authored-By: Antoine Pitrou <pitrou@free.fr>
* [Trivial] Remove now redundant assert (#3245)Antoine Pitrou2017-08-301-1/+0
|
* Removed noop branch from ctypes code (#3234)Alex Gaynor2017-08-301-4/+1
|
* bpo-31051: Rearrange IDLE condigdialog GenPage into Window, Editor, and ↵Terry Jan Reedy2017-08-301-38/+45
| | | | Help sections. (#3239)
* bpo-5001: More-informative multiprocessing error messages (#3079)Allen W. Smith, Ph.D2017-08-2914-39/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make error message more informative Replace assertions in error-reporting code with more-informative version that doesn't cause confusion over where and what the error is. * Additional clarification + get travis to check * Change from SystemError to TypeError As suggested in PR comment by @pitrou, changing from SystemError; TypeError appears appropriate. * NEWS file installation; ACKS addition (will do my best to justify it by additional work) * Making current AssertionErrors in multiprocessing more informative * Blurb added re multiprocessing managers.py, queues.py cleanup * Further multiprocessing cleanup - went through pool.py * Fix two asserts in multiprocessing/util.py * Most asserts in multiprocessing more informative * Didn't save right version * Further work on multiprocessing error messages * Correct typo * Correct typo v2 * Blasted colon... serves me right for trying to work on two things at once * Simplify NEWS entry * Update 2017-08-18-17-16-38.bpo-5001.gwnthq.rst * Update 2017-08-18-17-16-38.bpo-5001.gwnthq.rst OK, never mind. * Corrected (thanks to pitrou) error messages for notify * Remove extraneous backslash in docstring.
* bpo-31291: Fixed an assertion failure in zipimport.zipimporter.get_data() ↵Oren Milman2017-08-291-0/+17
| | | | | (#3226) if pathname.replace('/', '\\') returns non-string.
* bpo-31286, bpo-30024: Fixed stack usage in absolute imports with (#3217)Serhiy Storchaka2017-08-291-0/+17
| | | binding a submodule to a name.
* bpo-31243: Fixed PyArg_ParseTuple failure checks. (#3171)Oren Milman2017-08-291-0/+20
|
* bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (#31)Pauli Virtanen2017-08-281-28/+55
| | | | | | | | | | | | | | | Ctypes currently produces wrong pep3118 type codes for several types. E.g. memoryview(ctypes.c_long()).format gives "<l" on 64-bit platforms, but it should be "<q" instead for sizeof(c_long) == 8 The problem is that the '<>' endian specification in the struct syntax also turns on the "standard size" mode, which makes type characters have a platform-independent meaning, which does not match with the codes used internally in ctypes. The struct module format syntax also does not allow specifying native-size non-native-endian items. This commit adds a converter function that maps the internal ctypes codes to appropriate struct module standard-size codes in the pep3118 format strings. The tests are modified to check for this.
* bpo-30987 - Support for ISO-TP protocol in SocketCAN (#2956)Pier-Yves Lessard2017-08-281-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added support for CAN_ISOTP protocol * Added unit tests for CAN ISOTP * Updated documentation for ISO-TP protocol * Removed trailing whitespace in documentation * Added blurb NEWS.d file * updated Misc/ACKS * Fixed broken unit test that was using isotp const outside of skippable section * Removed dependecy over third party project * Added implementation for getsockname + unit tests * Missing newline at end of ACKS file * Accidentally inserted a type in ACKS file * Followed tiran changes review #1 recommendations * Added spaces after comma
* bpo-30617: IDLE: docstrings and unittest for outwin.py (#2046)Cheryl Sabella2017-08-272-62/+274
| | | Move some data and functions from the class to module level. Patch by Cheryl Sabella.
* bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (#3220)Terry Jan Reedy2017-08-272-7/+15
|
* bpo-30781: IDLE - use ttk widgets in configdialog (#2654)Cheryl Sabella2017-08-262-85/+85
| | | Patch by Cheryl Sabella.
* bpo-31072: Rename the new filter argument for zipapp.create_archive. (#3049)Paul Moore2017-08-262-9/+30
| | | | | | | bpo-31072: Rename the new filter argument for zipapp.create_archive (GH-3049) * Rename the new argument to "filter" * Improve tests for the new functionality * Add a "What's New" entry.
* bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (#3201)Oren Milman2017-08-251-0/+8
|
* Skip two tests not intended to pass on Windows. (#3202)Gregory P. Smith2017-08-251-0/+2
|
* bpo-22536: Set the filename in FileNotFoundError. (#3194)Gregory P. Smith2017-08-242-6/+16
| | | | Have the subprocess module set the filename in the FileNotFoundError exception raised on POSIX systems when the executable or cwd are missing.
* bpo-29741: Update some methods in the _pyio module to also accept integer ↵Oren Milman2017-08-242-14/+66
| | | | types. Patch by Oren Milman. (#560)
* bpo-23835: Restore legacy defaults= behavior for RawConfigParser (#3191)Łukasz Langa2017-08-242-10/+30
| | | | | | | The fix for bpo-23835 fixed ConfigParser behavior in defaults= handling. Unfortunately, it caused a backwards compatibility regression with RawConfigParser objects which allow for non-string values. This commit restores the legacy behavior for RawConfigParser only.
* bpo-31229: Fixed wrong error messages when too many keyword arguments are ↵Oren Milman2017-08-231-0/+21
| | | | received. (#3180)
* bpo-31161: only check for parens error for SyntaxError (#3082)Martijn Pieters2017-08-221-0/+28
| | | | Subclasses such as IndentError and TabError should not have this message applied.
* bpo-31234: test_threaded_import: fix test_side_effect_import() (#3189)Victor Stinner2017-08-221-1/+3
| | | | * Don't leak the module into sys.modules * Avoid dangling thread
* bpo-31234: test_httpservers joins the server thread (#3188)Victor Stinner2017-08-221-0/+1
|
* bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3178)Victor Stinner2017-08-221-2/+4
| | | | | | | | | | | | | * bpo-31249: Fix ref cycle in ThreadPoolExecutor concurrent.futures: WorkItem.run() used by ThreadPoolExecutor now breaks a reference cycle between an exception object and the WorkItem object. ThreadPoolExecutor.shutdown() now also clears its threads set. * shutdown() now only clears threads if wait is true. * Revert changes on shutdown()
* bpo-23835: Enforce that configparser defaults are strings (#2558)James Tocknell2017-08-212-3/+11
| | | | * Enforce that configparser defaults are strings * Update test_configparser.py
* Add test_subprocess.test_nonexisting_with_pipes() (#3133)Victor Stinner2017-08-211-4/+47
| | | | bpo-30121: Test the Popen failure when Popen was created with pipes. Create also NONEXISTING_CMD variable in test_subprocess.py.