]> granicus.if.org Git - python/log
python
7 years agoSimplify NEWS entry to prevent suspicious warnings. (#3339)
Ned Deily [Tue, 5 Sep 2017 06:23:04 +0000 (23:23 -0700)]
Simplify NEWS entry to prevent suspicious warnings. (#3339)

7 years agobpo-31347: _PyObject_FastCall_Prepend: do not call memcpy if args might not be null...
Benjamin Peterson [Tue, 5 Sep 2017 05:23:42 +0000 (22:23 -0700)]
bpo-31347: _PyObject_FastCall_Prepend: do not call memcpy if args might not be null (#3329)

Passing NULL as the second argument to to memcpy is undefined behavior even if the size is 0.

7 years agoRevert "bpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit...
Neil Schemenauer [Tue, 5 Sep 2017 05:13:17 +0000 (22:13 -0700)]
Revert "bpo-17852: Maintain a list of BufferedWriter objects.  Flush them on exit. (#1908)" (#3337)

This reverts commit e38d12ed34870c140016bef1e0ff10c8c3d3f213.

7 years agobpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit. (#1908)
Neil Schemenauer [Tue, 5 Sep 2017 03:18:38 +0000 (20:18 -0700)]
bpo-17852: Maintain a list of BufferedWriter objects.  Flush them on exit. (#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.

7 years agoFix terminology in comment and add more design rationale. (#3335)
Raymond Hettinger [Tue, 5 Sep 2017 01:54:16 +0000 (18:54 -0700)]
Fix terminology in comment and add more design rationale. (#3335)

* Fix terminology in comment and add more design rationale.

* Fix extra space

7 years agoAdd comment to explain the implications of not sorting keywords (#3331)
Raymond Hettinger [Tue, 5 Sep 2017 00:47:53 +0000 (17:47 -0700)]
Add comment to explain the implications of not sorting keywords (#3331)

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).

7 years agobpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315)
Victor Stinner [Mon, 4 Sep 2017 23:58:08 +0000 (01:58 +0200)]
bpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315)

* bpo-31170: Update libexpat from 2.2.3 to 2.2.4

Fix copying of partial characters for UTF-8 input (libexpat bug 115):
https://github.com/libexpat/libexpat/issues/115

* Add NEWS entry.

7 years agobpo-28411: Remove "modules" field from Py_InterpreterState. (#1638)
Eric Snow [Mon, 4 Sep 2017 23:54:09 +0000 (17:54 -0600)]
bpo-28411: Remove "modules" field from Py_InterpreterState. (#1638)

sys.modules is the one true source.

7 years agorandom_triangular: sqrt() is more accurate than **0.5 (#3317)
Raymond Hettinger [Mon, 4 Sep 2017 23:51:06 +0000 (16:51 -0700)]
random_triangular:  sqrt() is more accurate than **0.5 (#3317)

7 years agoTravis: use ccache (#3307)
Christian Heimes [Mon, 4 Sep 2017 23:48:54 +0000 (01:48 +0200)]
Travis: use ccache (#3307)

7 years agoremove IRIX support (closes bpo-31341) (#3310)
Benjamin Peterson [Mon, 4 Sep 2017 23:36:05 +0000 (16:36 -0700)]
remove IRIX support (closes bpo-31341) (#3310)

See PEP 11.

7 years agoCode clean-up. Remove unnecessary pre-increment before the loop starts. (#3312)
Raymond Hettinger [Mon, 4 Sep 2017 23:07:06 +0000 (16:07 -0700)]
Code clean-up.  Remove unnecessary pre-increment before the loop starts. (#3312)

7 years agoRegen Moduls/clinic/_ssl.c.h (GH-3320)
Zachary Ware [Mon, 4 Sep 2017 22:45:18 +0000 (15:45 -0700)]
Regen Moduls/clinic/_ssl.c.h (GH-3320)

Broken in GH-2079

7 years agobpo-30502: Fix handling of long oids in ssl. (#2909)
Serhiy Storchaka [Mon, 4 Sep 2017 22:28:53 +0000 (01:28 +0300)]
bpo-30502: Fix handling of long oids in ssl. (#2909)

7 years agoCache externals, depending on changes to PCbuild (#3308)
Zachary Ware [Mon, 4 Sep 2017 21:59:02 +0000 (14:59 -0700)]
Cache externals, depending on changes to PCbuild (#3308)

7 years agobpo-30622: Change NPN detection: (#2079)
Melvyn Sopacua [Mon, 4 Sep 2017 21:35:15 +0000 (23:35 +0200)]
bpo-30622: Change NPN detection: (#2079)

* Change NPN detection:

Version breakdown, support disabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will not be defined ->
False/False
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will be defined -> True/False

Version breakdown support enabled (pre-patch/post-patch):
- pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False
- 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True
- 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and
OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True

* Refine NPN guard:

- If NPN is disabled, but ALPN is available we need our callback
- Make clinic's ssl behave the same way

This created a working ssl module for me, with NPN disabled and ALPN
enabled for OpenSSL 1.1.0f.

Concerns to address:
The initial commit for NPN support into OpenSSL [1], had the
OPENSSL_NPN_* variables defined inside the OPENSSL_NO_NEXTPROTONEG
guard. The question is if that ever made it into a release.
This would need an ugly hack, something like:

#if defined(OPENSSL_NO_NEXTPROTONEG) && \
!defined(OPENSSL_NPN_NEGOTIATED)
# define OPENSSL_NPN_UNSUPPORTED 0
# define OPENSSL_NPN_NEGOTIATED 1
# define OPENSSL_NPN_NO_OVERLAP 2
#endif

[1] https://github.com/openssl/openssl/commit/68b33cc5c7

7 years agoWhat's New for bpo-1198569 (#3303)
Barry Warsaw [Mon, 4 Sep 2017 21:29:27 +0000 (17:29 -0400)]
What's New for bpo-1198569 (#3303)

7 years agoFixes doc/make.bat to properly handle quoted paths. (#3302)
Steve Dower [Mon, 4 Sep 2017 21:26:27 +0000 (14:26 -0700)]
Fixes doc/make.bat to properly handle quoted paths. (#3302)

7 years agoremove configure.ac support for SGI_ABI (#3294)
Benjamin Peterson [Mon, 4 Sep 2017 21:05:32 +0000 (14:05 -0700)]
remove configure.ac support for SGI_ABI (#3294)

7 years agoremote note about IRIX in aifc (#3299)
Benjamin Peterson [Mon, 4 Sep 2017 20:32:34 +0000 (13:32 -0700)]
remote note about IRIX in aifc (#3299)

This comment hasn't been true since Python 3.0.

7 years agobpo-1198569: Allow string.Template braced pattern to be different (#3288)
Barry Warsaw [Mon, 4 Sep 2017 20:32:10 +0000 (16:32 -0400)]
bpo-1198569: Allow string.Template braced pattern to be different (#3288)

* 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``.

7 years agoBlurbify master branch. (#3298)
larryhastings [Mon, 4 Sep 2017 20:30:19 +0000 (13:30 -0700)]
Blurbify master branch. (#3298)

Blurbify master branch.

7 years agobpo-25674: remove sha256.tbs-internet.com ssl test (#3297)
Christian Heimes [Mon, 4 Sep 2017 20:26:01 +0000 (22:26 +0200)]
bpo-25674: remove sha256.tbs-internet.com ssl test (#3297)

Signed-off-by: Christian Heimes <christian@python.org>
7 years agoClarify nature of parse_args 'args' argument. (#3292)
R. David Murray [Mon, 4 Sep 2017 20:17:26 +0000 (16:17 -0400)]
Clarify nature of parse_args 'args' argument. (#3292)

Patch by Paul.j3.  Includes an unrelated but useful addition to the
optparse porting section.

7 years agoAdd references to modules I am responsible for (#3291)
Raymond Hettinger [Mon, 4 Sep 2017 19:31:15 +0000 (12:31 -0700)]
Add references to modules I am responsible for (#3291)

7 years agoUse a team to maintain the email related packages. (#3290)
Barry Warsaw [Mon, 4 Sep 2017 19:19:26 +0000 (15:19 -0400)]
Use a team to maintain the email related packages. (#3290)

7 years agoImprove clarity (and small speed-up) by using tuple unpacking (#3289)
Raymond Hettinger [Mon, 4 Sep 2017 18:47:58 +0000 (11:47 -0700)]
Improve clarity (and small speed-up) by using tuple unpacking (#3289)

7 years agoremove check for bug last seem in Solaris 9 (#3285)
Benjamin Peterson [Mon, 4 Sep 2017 17:52:51 +0000 (10:52 -0700)]
remove check for bug last seem in Solaris 9 (#3285)

7 years agoChange code owners for hashlib and ssl to the crypto team (#3284)
Alex Gaynor [Mon, 4 Sep 2017 17:40:45 +0000 (13:40 -0400)]
Change code owners for hashlib and ssl to the crypto team (#3284)

* Change code owners for hashlib and ssl to the crypto team

* Include the core CSPRNG for the crypto-team

7 years agobpo-31281: Fix pathlib.Path incompatibility in fileinput (gh-3208)
Zhiming Wang [Mon, 4 Sep 2017 17:37:24 +0000 (01:37 +0800)]
bpo-31281: Fix pathlib.Path incompatibility in fileinput (gh-3208)

Fix fileinput with inplace=True to accept pathlib.Path objects.

7 years agoremove autoconf check for select() (#3283)
Benjamin Peterson [Mon, 4 Sep 2017 17:21:42 +0000 (10:21 -0700)]
remove autoconf check for select() (#3283)

We never actually check HAVE_SELECT.

7 years agoremove configure check for 'volatile' (#3281)
Benjamin Peterson [Mon, 4 Sep 2017 17:09:12 +0000 (10:09 -0700)]
remove configure check for 'volatile' (#3281)

This is a required feature is C99, which we require.

7 years agoAdd missing _sha3 module to Setup.dist (#2395)
Segev Finer [Mon, 4 Sep 2017 16:28:14 +0000 (19:28 +0300)]
Add missing _sha3 module to Setup.dist (#2395)

7 years agobpo-12383: Also ignore __PYVENV_LAUNCHER__ (#3278)
Ned Deily [Mon, 4 Sep 2017 04:00:21 +0000 (00:00 -0400)]
bpo-12383: Also ignore __PYVENV_LAUNCHER__ (#3278)

Used in macOS framework builds.

7 years agobpo-9146: add the missing NEWS entry. (#3275)
Gregory P. Smith [Sun, 3 Sep 2017 21:08:48 +0000 (14:08 -0700)]
bpo-9146: add the missing NEWS entry. (#3275)

7 years agoFix a c.f.as_completed() refleak previously introduced in bpo-27144 (#3270)
Antoine Pitrou [Sun, 3 Sep 2017 13:09:23 +0000 (15:09 +0200)]
Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (#3270)

7 years agobpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076)
Serhiy Storchaka [Sun, 3 Sep 2017 05:10:14 +0000 (08:10 +0300)]
bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076)

7 years agoremove a redundant lower in urllib.parse.urlsplit (#3008)
Oren Milman [Sun, 3 Sep 2017 04:51:39 +0000 (07:51 +0300)]
remove a redundant lower in urllib.parse.urlsplit (#3008)

7 years agobpo-31323: Fix reference leak in test_ssl (#3263)
Victor Stinner [Fri, 1 Sep 2017 22:26:17 +0000 (00:26 +0200)]
bpo-31323: Fix reference leak in test_ssl (#3263)

Store exceptions as string rather than object to prevent reference
cycles which cause leaking dangling threads.

7 years agobpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264)
Victor Stinner [Fri, 1 Sep 2017 22:25:39 +0000 (00:25 +0200)]
bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264)

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().

7 years agobpo-31326: ProcessPoolExecutor waits for the call queue thread (#3265)
Victor Stinner [Fri, 1 Sep 2017 22:25:11 +0000 (00:25 +0200)]
bpo-31326: ProcessPoolExecutor waits for the call queue thread (#3265)

* 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.

7 years agobpo-27144: concurrent.futures as_complete and map iterators do not keep reference...
Grzegorz Grzywacz [Fri, 1 Sep 2017 16:54:00 +0000 (18:54 +0200)]
bpo-27144: concurrent.futures as_complete and map iterators do not keep 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.

7 years agobpo-31250, test_asyncio: fix dangling threads (#3252)
Victor Stinner [Fri, 1 Sep 2017 12:46:06 +0000 (14:46 +0200)]
bpo-31250, test_asyncio: fix dangling threads (#3252)

* 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().

7 years agobpo-31217: Fix regrtest -R for small integer (#3260)
Victor Stinner [Fri, 1 Sep 2017 11:05:27 +0000 (13:05 +0200)]
bpo-31217: Fix regrtest -R for small integer (#3260)

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>
7 years agobpo-30096: Use ABC in abc reference examples (#1220)
Eric Appelt [Wed, 30 Aug 2017 22:47:52 +0000 (17:47 -0500)]
bpo-30096: Use ABC in abc reference examples (#1220)

Use base class rather than metaclass in examples.

7 years agobpo-30737: Update DevGuide links to new URL (GH-3228)
Lisa Hewus Fresh [Wed, 30 Aug 2017 16:37:43 +0000 (09:37 -0700)]
bpo-30737: Update DevGuide links to new URL (GH-3228)

Update old devguide links from https://docs.python.org/devguide to https://devguide.python.org

7 years ago[Trivial] Remove now redundant assert (#3245)
Antoine Pitrou [Wed, 30 Aug 2017 14:57:12 +0000 (16:57 +0200)]
[Trivial] Remove now redundant assert (#3245)

7 years agoFix the indentation in Extending Python code example (GH-3244)
Sergey Fedoseev [Wed, 30 Aug 2017 14:50:40 +0000 (19:50 +0500)]
Fix the indentation in Extending Python code example (GH-3244)

Code was indented with three spaces.
Fixed using four spaces.

7 years agoRemoved noop branch from ctypes code (#3234)
Alex Gaynor [Wed, 30 Aug 2017 11:43:14 +0000 (07:43 -0400)]
Removed noop branch from ctypes code (#3234)

7 years agobpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934)
Christopher Wilcox [Wed, 30 Aug 2017 09:01:08 +0000 (05:01 -0400)]
bpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934)

* Fixes #30581 by adding a path to use newer GetMaximumProcessorCount API on Windows calls to os.cpu_count()

* Add NEWS.d entry for bpo-30581, os.cpu_count on Windows.

* Tweak NEWS entry

7 years agobpo-31051: Rearrange IDLE condigdialog GenPage into Window, Editor, and Help section...
Terry Jan Reedy [Wed, 30 Aug 2017 04:59:11 +0000 (00:59 -0400)]
bpo-31051:  Rearrange IDLE condigdialog GenPage into Window, Editor, and Help sections. (#3239)

7 years agobpo-5001: More-informative multiprocessing error messages (#3079)
Allen W. Smith, Ph.D [Tue, 29 Aug 2017 22:52:18 +0000 (17:52 -0500)]
bpo-5001: More-informative multiprocessing error messages (#3079)

* 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.

7 years agobpo-31291: Fixed an assertion failure in zipimport.zipimporter.get_data() (#3226)
Oren Milman [Tue, 29 Aug 2017 17:40:15 +0000 (20:40 +0300)]
bpo-31291: Fixed an assertion failure in zipimport.zipimporter.get_data() (#3226)

if pathname.replace('/', '\\') returns non-string.

7 years agobpo-31065: Add doc about Popen.poll returning None. (#3169)
Ivan Chernoff [Tue, 29 Aug 2017 14:46:24 +0000 (17:46 +0300)]
bpo-31065: Add doc about Popen.poll returning None. (#3169)

7 years agobpo-31286, bpo-30024: Fixed stack usage in absolute imports with (#3217)
Serhiy Storchaka [Tue, 29 Aug 2017 12:47:44 +0000 (15:47 +0300)]
bpo-31286, bpo-30024: Fixed stack usage in absolute imports with (#3217)

binding a submodule to a name.

7 years agobpo-31243: Fixed PyArg_ParseTuple failure checks. (#3171)
Oren Milman [Tue, 29 Aug 2017 08:58:27 +0000 (11:58 +0300)]
bpo-31243: Fixed PyArg_ParseTuple failure checks. (#3171)

7 years agoFix a typo in the Programming FAQ. (#3230)
Gregory P. Smith [Mon, 28 Aug 2017 20:43:26 +0000 (13:43 -0700)]
Fix a typo in the Programming FAQ. (#3230)

subobjects, not subobjecs.

7 years agobpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (#31)
Pauli Virtanen [Mon, 28 Aug 2017 12:08:49 +0000 (14:08 +0200)]
bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (#31)

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.

7 years agobpo-30987 - Support for ISO-TP protocol in SocketCAN (#2956)
Pier-Yves Lessard [Mon, 28 Aug 2017 08:32:44 +0000 (04:32 -0400)]
bpo-30987 - Support for ISO-TP protocol in SocketCAN (#2956)

* 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

7 years agobpo-26656: Improve re.compile documentation (GH-3211)
Henk-Jaap Wagenaar [Mon, 28 Aug 2017 05:41:20 +0000 (06:41 +0100)]
bpo-26656: Improve re.compile documentation (GH-3211)

- Link to the regular expressions object documentation
- Clarify that it can be used with more than the two methods currently stated.

7 years agobpo-30617: IDLE: docstrings and unittest for outwin.py (#2046)
Cheryl Sabella [Sun, 27 Aug 2017 22:06:00 +0000 (18:06 -0400)]
bpo-30617: IDLE: docstrings and unittest for outwin.py (#2046)

Move some data and functions from the class to module level. Patch by Cheryl Sabella.

7 years agobpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (#3220)
Terry Jan Reedy [Sun, 27 Aug 2017 20:39:41 +0000 (16:39 -0400)]
bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (#3220)

7 years agobpo-30781: IDLE - use ttk widgets in configdialog (#2654)
Cheryl Sabella [Sat, 26 Aug 2017 18:26:02 +0000 (14:26 -0400)]
bpo-30781: IDLE -  use ttk widgets in configdialog (#2654)

Patch by Cheryl Sabella.

7 years agobpo-31072: Rename the new filter argument for zipapp.create_archive. (#3049)
Paul Moore [Sat, 26 Aug 2017 17:04:12 +0000 (18:04 +0100)]
bpo-31072: Rename the new filter argument for zipapp.create_archive. (#3049)

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.

7 years agobpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (#3201)
Oren Milman [Fri, 25 Aug 2017 18:14:54 +0000 (21:14 +0300)]
bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (#3201)

7 years agobpo-31279: Silence -Wstringop-overflow warning. (#3207)
Stefan Krah [Fri, 25 Aug 2017 18:12:05 +0000 (20:12 +0200)]
bpo-31279: Silence -Wstringop-overflow warning. (#3207)

7 years agobpo-31275: Small refactoring to silence a fall-through warning. (#3206)
Stefan Krah [Fri, 25 Aug 2017 16:31:22 +0000 (18:31 +0200)]
bpo-31275: Small refactoring to silence a fall-through warning. (#3206)

7 years agobpo-30923: Silence fall-through warnings in libexpat build. (#3205)
Stefan Krah [Fri, 25 Aug 2017 12:07:50 +0000 (14:07 +0200)]
bpo-30923: Silence fall-through warnings in libexpat build. (#3205)

7 years agoSkip two tests not intended to pass on Windows. (#3202)
Gregory P. Smith [Fri, 25 Aug 2017 01:15:02 +0000 (18:15 -0700)]
Skip two tests not intended to pass on Windows. (#3202)

7 years agobpo-22536: Set the filename in FileNotFoundError. (#3194)
Gregory P. Smith [Thu, 24 Aug 2017 21:58:25 +0000 (14:58 -0700)]
bpo-22536: Set the filename in FileNotFoundError. (#3194)

Have the subprocess module set the filename in the FileNotFoundError
exception raised on POSIX systems when the executable or cwd are missing.

7 years agobpo-29741: Update some methods in the _pyio module to also accept integer types....
Oren Milman [Thu, 24 Aug 2017 18:33:42 +0000 (21:33 +0300)]
bpo-29741: Update some methods in the _pyio module to also accept integer types. Patch by Oren Milman. (#560)

7 years agobpo-28261: fix err msgs where PyArg_ParseTuple is used to parse normal tuples (leftov...
Oren Milman [Thu, 24 Aug 2017 16:51:24 +0000 (19:51 +0300)]
bpo-28261: fix err msgs where PyArg_ParseTuple is used to parse normal tuples (leftovers) (#3198)

7 years agobpo-23835: Restore legacy defaults= behavior for RawConfigParser (#3191)
Łukasz Langa [Thu, 24 Aug 2017 16:43:53 +0000 (09:43 -0700)]
bpo-23835: Restore legacy defaults= behavior for RawConfigParser (#3191)

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.

7 years agobpo-31095: fix potential crash during GC (GH-2974)
INADA Naoki [Thu, 24 Aug 2017 05:55:17 +0000 (14:55 +0900)]
bpo-31095: fix potential crash during GC (GH-2974)

7 years agobpo-31229: Fixed wrong error messages when too many keyword arguments are received...
Oren Milman [Wed, 23 Aug 2017 18:16:48 +0000 (21:16 +0300)]
bpo-31229: Fixed wrong error messages when too many keyword arguments are received. (#3180)

7 years agobpo-31161: only check for parens error for SyntaxError (#3082)
Martijn Pieters [Tue, 22 Aug 2017 20:16:23 +0000 (21:16 +0100)]
bpo-31161: only check for parens error for SyntaxError (#3082)

Subclasses such as IndentError and TabError should not have this message
applied.

7 years agoTouch up the contributing notes (#3158)
Brett Cannon [Tue, 22 Aug 2017 20:06:50 +0000 (13:06 -0700)]
Touch up the contributing notes (#3158)

* Mention how to find out what to do
* Update URL
* Thanks contributors
* Explain there is no timeline

7 years agobpo-31234: test_threaded_import: fix test_side_effect_import() (#3189)
Victor Stinner [Tue, 22 Aug 2017 16:05:32 +0000 (18:05 +0200)]
bpo-31234: test_threaded_import: fix test_side_effect_import() (#3189)

* Don't leak the module into sys.modules
* Avoid dangling thread

7 years agobpo-31234: test_httpservers joins the server thread (#3188)
Victor Stinner [Tue, 22 Aug 2017 16:05:07 +0000 (18:05 +0200)]
bpo-31234: test_httpservers joins the server thread (#3188)

7 years agobpo-31249: Fix ref cycle in ThreadPoolExecutor (#3178)
Victor Stinner [Tue, 22 Aug 2017 14:50:42 +0000 (16:50 +0200)]
bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3178)

* 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()

7 years agobpo-30983: [gdb] Fix py-bt, etc. for non-debug shared builds (#3153)
Łukasz Langa [Mon, 21 Aug 2017 23:40:29 +0000 (16:40 -0700)]
bpo-30983: [gdb] Fix py-bt, etc. for non-debug shared builds (#3153)

PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on
non-debug shared builds.  This breaks the ability to use py-bt, py-up, and
a few other Python-specific gdb integrations.

This patch fixes the problem by only looking for _PyEval_EvalFrameDefault
frames.

test_gdb passes on both a debug and a non-debug build.

Original patch by Bruno "Polaco" Penteado.

7 years agobpo-23835: [docs] configparser converts defaults to strings (#3176)
Łukasz Langa [Mon, 21 Aug 2017 23:23:38 +0000 (16:23 -0700)]
bpo-23835: [docs] configparser converts defaults to strings (#3176)

Title says all.

7 years agobpo-23835: Enforce that configparser defaults are strings (#2558)
James Tocknell [Mon, 21 Aug 2017 22:46:30 +0000 (08:46 +1000)]
bpo-23835: Enforce that configparser defaults are strings (#2558)

* Enforce that configparser defaults are strings
* Update test_configparser.py

7 years agoAdd test_subprocess.test_nonexisting_with_pipes() (#3133)
Victor Stinner [Mon, 21 Aug 2017 21:51:31 +0000 (23:51 +0200)]
Add test_subprocess.test_nonexisting_with_pipes() (#3133)

bpo-30121: Test the Popen failure when Popen was created with pipes.
Create also NONEXISTING_CMD variable in test_subprocess.py.

7 years agobpo-31238: pydoc ServerThread.stop() now joins itself (#3151)
Victor Stinner [Mon, 21 Aug 2017 21:24:40 +0000 (23:24 +0200)]
bpo-31238: pydoc ServerThread.stop() now joins itself (#3151)

* bpo-31238: pydoc ServerThread.stop() now joins itself

ServerThread.stop() now joins itself to wait until
DocServer.serve_until_quit() completes and then explicitly sets
its docserver attribute to None to break a reference cycle.

* Add NEWS.d entry

7 years agobpo-31249: test_concurrent_futures checks dangling threads (#3167)
Victor Stinner [Mon, 21 Aug 2017 21:24:24 +0000 (23:24 +0200)]
bpo-31249: test_concurrent_futures checks dangling threads (#3167)

Add a BaseTestCase class to test_concurrent_futures to check for
dangling threads and processes on all tests, not only tests using
ExecutorMixin.

7 years agobpo-31236: Improved some error messages of min() and max().
Oren Milman [Mon, 21 Aug 2017 17:19:07 +0000 (20:19 +0300)]
bpo-31236: Improved some error messages of min() and max().

7 years agobpo-31247: xmlrpc.server: break reference cycle (#3166)
Victor Stinner [Mon, 21 Aug 2017 16:12:58 +0000 (18:12 +0200)]
bpo-31247: xmlrpc.server: break reference cycle (#3166)

xmlrpc.server now explicitly breaks reference cycles when using
sys.exc_info() in code handling exceptions.

7 years agobpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. (#3157)
Stefan Krah [Mon, 21 Aug 2017 11:09:59 +0000 (13:09 +0200)]
bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. (#3157)

7 years agobpo-9566 & bpo-30747: Silence warnings from pyatomic.h macros (#3140)
Segev Finer [Sun, 20 Aug 2017 22:45:46 +0000 (01:45 +0300)]
bpo-9566 & bpo-30747: Silence warnings from pyatomic.h macros (#3140)

* bpo-9566: Silence warnings from pyatomic.h macros

Apparently MSVC is too stupid to understand that the alternate branch is
not taken and emits a warning for it.

Warnings added in https://github.com/python/cpython/pull/2383

* bpo-9566: A better fix for the pyatomic.h warning

* bpo-9566: Remove a slash

7 years agobpo-28261: Fixed err msgs where PyArg_ParseTuple is used to parse normal tuples....
Oren Milman [Sun, 20 Aug 2017 15:35:36 +0000 (18:35 +0300)]
bpo-28261: Fixed err msgs where PyArg_ParseTuple is used to parse normal tuples. (#3119)

7 years agobpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3160)
Cheryl Sabella [Sun, 20 Aug 2017 12:07:22 +0000 (08:07 -0400)]
bpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3160)

Part 3 of 3.  Remove old highlight functions and load_config as this functionality is now contained within classes. Patch by Cheryl Sabella.

7 years agobpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3156)
Cheryl Sabella [Sun, 20 Aug 2017 02:04:40 +0000 (22:04 -0400)]
bpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3156)

Patch 2 of 3, to avoid horrendous diff.  Create highlights page from new HighPage class instead of old ConfigDialog methods and change tests to match.

7 years agobpo-31234: test_threading: fix ref cycle (#3150)
Victor Stinner [Fri, 18 Aug 2017 23:54:42 +0000 (01:54 +0200)]
bpo-31234: test_threading: fix ref cycle (#3150)

test_bare_raise_in_brand_new_thread() now explicitly breaks a
reference cycle to not leak a dangling thread.

7 years agobpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3141)
Cheryl Sabella [Fri, 18 Aug 2017 22:34:55 +0000 (18:34 -0400)]
bpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3141)

This is the first half of a patch similar to the one for for bpo-31205.  It is being split into 2 PRs to avoid what happened with PR-3096 -- an incomprehensible diff that could not be cleanly backported to 3.6.  This half copies several methods of ConfigDialog and turns them into a new class.

7 years agobpo-31235: Fix ResourceWarning in test_logging (#3147)
Victor Stinner [Fri, 18 Aug 2017 22:34:00 +0000 (00:34 +0200)]
bpo-31235: Fix ResourceWarning in test_logging (#3147)

7 years agobpo-30830: test_logging uses threading_setup/cleanup (#3137)
Victor Stinner [Fri, 18 Aug 2017 21:47:54 +0000 (23:47 +0200)]
bpo-30830: test_logging uses threading_setup/cleanup (#3137)

* bpo-30830: test_logging uses threading_setup/cleanup

Replace @support.reap_threads on some methods with
support.threading_setup() in setUp() and support.threading_cleanup()
in tearDown() in BaseTest.

* bpo-30830: test_logging disables threaded socketserver tests

Disable tests because of socketserver.ThreadingMixIn leaks threads,
whereas leaking threads now makes a test to fail on buildbots.

Disable tests until socketserver is fixed: bpo-31233.

* Skip also setup_via_listener()

7 years agobpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106)
Victor Stinner [Fri, 18 Aug 2017 21:43:54 +0000 (23:43 +0200)]
bpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106)

* bpo-30947: Update libexpat from 2.2.1 to 2.2.3

* Add NEWS entry

* Add new loadlibrary.c

* expat_external.h: restore include "pyexpatns.h"

* PCbuild: add expat/loadlibrary.c

* Define XML_POOR_ENTROPY to compile expat

7 years agobpo-31234: fork_wait tests now join threads (#3139)
Victor Stinner [Fri, 18 Aug 2017 21:12:26 +0000 (23:12 +0200)]
bpo-31234: fork_wait tests now join threads (#3139)

fork_wait.py tests now joins threads, to not leak running threads in
the background.

7 years agobpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142)
Stefan Krah [Fri, 18 Aug 2017 19:39:32 +0000 (21:39 +0200)]
bpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142)