]> granicus.if.org Git - python/log
python
5 years agobpo-27860: use cached_property (GH-12832)
Inada Naoki [Mon, 15 Apr 2019 07:01:00 +0000 (16:01 +0900)]
bpo-27860: use cached_property (GH-12832)

* cached_property is more efficient than hand crafted cache.
* In IPv[46]Network, `self.network.prefixlen` is same to `self._prefixlen`.

5 years agobpo-30485: Re-allow empty strings in ElementPath namespace mappings since they might...
Stefan Behnel [Sun, 14 Apr 2019 19:12:34 +0000 (21:12 +0200)]
bpo-30485: Re-allow empty strings in ElementPath namespace mappings since they might actually be harmless and unused (and thus went undetected previously). (#12830)

5 years agobpo-16079: fix duplicate test method name in test_gzip. (GH-12827)
Gregory P. Smith [Sun, 14 Apr 2019 17:32:07 +0000 (10:32 -0700)]
bpo-16079: fix duplicate test method name in test_gzip. (GH-12827)

5 years agobpo-31658: Make xml.sax.parse accepting Path objects (GH-8564)
Mickaël Schoentgen [Sun, 14 Apr 2019 09:16:54 +0000 (09:16 +0000)]
bpo-31658: Make xml.sax.parse accepting Path objects (GH-8564)

5 years agobpo-30485: support a default prefix mapping in ElementPath by passing None as prefix...
Stefan Behnel [Sun, 14 Apr 2019 08:09:09 +0000 (10:09 +0200)]
bpo-30485: support a default prefix mapping in ElementPath by passing None as prefix (#1823)

5 years agobpo-36227: ElementTree.tostring() default_namespace and xml_declaration arguments...
Bernt Røskar Brenna [Sun, 14 Apr 2019 08:07:02 +0000 (10:07 +0200)]
bpo-36227: ElementTree.tostring() default_namespace and xml_declaration arguments (GH-12225)

Add new keyword arguments "default_namespace" and "xml_declaration" to functions ET.tostring() and ET.tostringlist(), as known from ElementTree.write().

5 years agobpo-36593: Fix isinstance check for Mock objects with spec executed under tracing...
Xtreak [Sat, 13 Apr 2019 19:12:33 +0000 (00:42 +0530)]
bpo-36593: Fix isinstance check for Mock objects with spec executed under tracing (GH-12790)

In Python having a trace function in effect while mock is imported causes isinstance to be wrong for MagicMocks. This is due to the usage of super() in some class methods, as this sets the __class__ attribute. To avoid this, as a workaround, alias the usage of super .

5 years agobpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate...
Pablo Galindo [Sat, 13 Apr 2019 16:23:24 +0000 (17:23 +0100)]
bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread (GH-12541)

Calling these function from a thread when the runtime is finalizing will terminate
the thread, even if the thread was not created by Python. Users can use
_Py_IsFinalizing or sys.is_finalizing to check if the interpreter is in the process of
being finalized before calling this function to avoid unwanted termination.

5 years agoSkip test_preadv_flags if RWF_HIPRI is not supported by the system (GH-12762)
Pablo Galindo [Sat, 13 Apr 2019 16:06:03 +0000 (17:06 +0100)]
Skip test_preadv_flags if RWF_HIPRI is not supported by the system (GH-12762)

5 years agobpo-36623: Clean parser headers and include files (GH-12253)
Pablo Galindo [Sat, 13 Apr 2019 16:05:14 +0000 (17:05 +0100)]
bpo-36623: Clean parser headers and include files (GH-12253)

After the removal of pgen, multiple header and function prototypes that lack implementation or are unused are still lying around.

5 years agobpo-18610: Update wsgiref.validate docstring for wsgi.input read() (GH-11663)
Cheryl Sabella [Sat, 13 Apr 2019 12:01:15 +0000 (08:01 -0400)]
bpo-18610: Update wsgiref.validate docstring for wsgi.input read() (GH-11663)

5 years agobpo-35734: ipaddress: remove unused methods (GH-11591)
Rémi Lapeyre [Sat, 13 Apr 2019 08:49:34 +0000 (10:49 +0200)]
bpo-35734: ipaddress: remove unused methods (GH-11591)

5 years agoDoc: define PY_SSIZE_T_CLEAN always (GH-12794)
Inada Naoki [Sat, 13 Apr 2019 01:46:21 +0000 (10:46 +0900)]
Doc: define PY_SSIZE_T_CLEAN always (GH-12794)

5 years agobpo-36618: Don't add -fmax-type-align flag to old clang (GH-12811)
Victor Stinner [Fri, 12 Apr 2019 22:51:07 +0000 (00:51 +0200)]
bpo-36618: Don't add -fmax-type-align flag to old clang (GH-12811)

5 years agobpo-35581: Document @typing.type_check_only (GH-11312)
Sebastian Rittau [Fri, 12 Apr 2019 22:33:40 +0000 (00:33 +0200)]
bpo-35581: Document @typing.type_check_only (GH-11312)

5 years agobpo-33922: Adding documentation for new "-64" suffix of Python launcher (GH-7849)
mrh1997 [Fri, 12 Apr 2019 22:26:47 +0000 (00:26 +0200)]
bpo-33922: Adding documentation for new "-64" suffix of Python launcher (GH-7849)

Since bpo-30291 it is possible to specify the architecture of Python when using the launcher

5 years agobpo-18748: test_io: silence destructor errors (GH-12805)
Victor Stinner [Fri, 12 Apr 2019 19:58:24 +0000 (21:58 +0200)]
bpo-18748: test_io: silence destructor errors (GH-12805)

5 years agobpo-36611: Disable serialno field of debug memory allocators (#12796)
Victor Stinner [Fri, 12 Apr 2019 19:54:06 +0000 (21:54 +0200)]
bpo-36611: Disable serialno field of debug memory allocators (#12796)

Omit serialno field from debug hooks on Python memory allocators to
reduce the memory footprint by 5%.

Enable tracemalloc to get the traceback where a memory block has been
allocated when a fatal memory error is logged to decide where to put
a breakpoint.

Compile Python with PYMEM_DEBUG_SERIALNO defined to get back the
field.

5 years agobpo-36389: Add _PyObject_CheckConsistency() function (GH-12803)
Victor Stinner [Fri, 12 Apr 2019 19:51:34 +0000 (21:51 +0200)]
bpo-36389: Add _PyObject_CheckConsistency() function (GH-12803)

Add a new _PyObject_CheckConsistency() function which can be used to
help debugging. The function is available in release mode.

Add a 'check_content' parameter to _PyDict_CheckConsistency().

5 years agobpo-36618: Add -fmax-type-align=8 flag for clang (GH-12809)
Victor Stinner [Fri, 12 Apr 2019 19:27:37 +0000 (21:27 +0200)]
bpo-36618: Add -fmax-type-align=8 flag for clang (GH-12809)

Add -fmax-type-align=8 to CFLAGS when clang compiler is detected.

The pymalloc memory allocator aligns memory on 8 bytes. On x86-64,
clang expects alignment on 16 bytes by default and so uses MOVAPS
instruction which can lead to segmentation fault. Instruct clang that
Python is limited to alignemnt on 8 bytes to use MOVUPS instruction
instead: slower but don't trigger a SIGSEGV if the memory is not
aligned on 16 bytes.

Sadly, the flag must be expected to CFLAGS and not just
CFLAGS_NODIST, since third party C extensions can have the same
issue.

5 years agoAllow Windows layout builds to fully skip code signing (GH-12808)
Steve Dower [Fri, 12 Apr 2019 18:24:15 +0000 (11:24 -0700)]
Allow Windows layout builds to fully skip code signing (GH-12808)

5 years agobpo-36509: Add iot layout for Windows IoT containers (GH-12663)
Paul Monson [Fri, 12 Apr 2019 16:55:57 +0000 (09:55 -0700)]
bpo-36509: Add iot layout for Windows IoT containers (GH-12663)

This enables using the `--preset-iot` option with the PC/layout script, but does not enable IoT builds as part of any normal release.

5 years agoEnable building nuget packages for ARM32 (GH-12669)
Paul Monson [Fri, 12 Apr 2019 16:36:38 +0000 (09:36 -0700)]
Enable building nuget packages for ARM32 (GH-12669)

5 years agobpo-33608: Revert "Factor out a private, per-interpreter _Py_AddPendingCall()." ...
Eric Snow [Fri, 12 Apr 2019 16:20:10 +0000 (10:20 -0600)]
bpo-33608: Revert "Factor out a private, per-interpreter _Py_AddPendingCall()." (gh-12806)

This reverts commit f13c5c8b9401a9dc19e95d8b420ee100ac022208 (gh-12360).

5 years agoCorrect grammar in concurrent/futures/process.py docstring (GH-12761)
Thomas Grainger [Fri, 12 Apr 2019 16:17:17 +0000 (17:17 +0100)]
Correct grammar in concurrent/futures/process.py docstring (GH-12761)

5 years agoIndicate that seek and tell are mandatory on BufferedRandom. (GH-11216)
Christopher Head [Fri, 12 Apr 2019 15:50:41 +0000 (08:50 -0700)]
Indicate that seek and tell are mandatory on BufferedRandom. (GH-11216)

For BufferedReader and BufferedWriter, seek and tell operations are
optional (they may or may not exist based on the underlying stream). For
BufferedRandom, they are mandatory: a BufferedRandom should not be
constructed over an unseekable underlying stream. Document this.

5 years agobpo-36549: str.capitalize now titlecases the first character instead of uppercasing...
Kingsley M [Fri, 12 Apr 2019 15:35:39 +0000 (16:35 +0100)]
bpo-36549: str.capitalize now titlecases the first character instead of uppercasing it (GH-12804)

5 years agobpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-12360)
Eric Snow [Fri, 12 Apr 2019 15:18:16 +0000 (09:18 -0600)]
bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (gh-12360)

This is effectively an un-revert of #11617 and #12024 (reverted in #12159). Portions of those were merged in other PRs (with lower risk) and this represents the remainder. Note that I found 3 different bugs in the original PRs and have fixed them here.

5 years agobpo-18748: io.IOBase destructor now logs close() errors in dev mode (GH-12786)
Victor Stinner [Fri, 12 Apr 2019 15:06:47 +0000 (17:06 +0200)]
bpo-18748: io.IOBase destructor now logs close() errors in dev mode (GH-12786)

In development mode (-X dev) and in debug build, the io.IOBase
destructor now logs close() exceptions. These exceptions are silent
by default in release mode.

5 years agobpo-36588: On AIX, remove major version from sys.platform (GH-12787)
Michael Felt [Fri, 12 Apr 2019 14:15:32 +0000 (16:15 +0200)]
bpo-36588: On AIX, remove major version from sys.platform (GH-12787)

On AIX, sys.platform doesn't contain the major version anymore.
Always return 'aix', instead of 'aix3' .. 'aix7'.  Since
older Python versions include the version number, it is recommended to
always use sys.platform.startswith('aix').

5 years agobpo-36611: Fix test_sys.test_getallocatedblocks() (GH-12797)
Victor Stinner [Fri, 12 Apr 2019 13:15:04 +0000 (15:15 +0200)]
bpo-36611: Fix test_sys.test_getallocatedblocks() (GH-12797)

Fix test_sys.test_getallocatedblocks() when tracemalloc is enabled.
If the name of Python memory allocators cannot get read, consider
that pymalloc is disabled.

Fix the following error:

./python -X tracemalloc -m test test_sys -v -m test_getallocatedblocks

ERROR: test_getallocatedblocks (test.test_sys.SysModuleTest)
------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_sys.py", line 770, in test_getallocatedblocks
    alloc_name = _testcapi.pymem_getallocatorsname()
RuntimeError: cannot get allocators name

5 years agobpo-20180: Use argument clinic for dict.pop() and dict.popitem() (GH-12792)
Inada Naoki [Fri, 12 Apr 2019 07:11:28 +0000 (16:11 +0900)]
bpo-20180: Use argument clinic for dict.pop() and dict.popitem() (GH-12792)

5 years agobpo-20582: add link for manpage for flags on getnameinfo() (GH-11977)
Emmanuel Arias [Thu, 11 Apr 2019 21:13:37 +0000 (18:13 -0300)]
bpo-20582: add link for manpage for flags on getnameinfo() (GH-11977)

5 years agobpo-36605: make tags: parse Modules/_io directory (GH-12789)
Victor Stinner [Thu, 11 Apr 2019 20:28:12 +0000 (22:28 +0200)]
bpo-36605: make tags: parse Modules/_io directory (GH-12789)

"make tags" and "make TAGS" now also parse Modules/_io/*.c
and Modules/_io/*.h.

5 years agobpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)
Victor Stinner [Thu, 11 Apr 2019 11:01:15 +0000 (13:01 +0200)]
bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)

Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD,
0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte
patterns than Windows CRT debug malloc() and free().

5 years agobpo-36575: lsprof: Use _PyTime_GetPerfCounter() (GH-8378)
Inada Naoki [Thu, 11 Apr 2019 10:11:46 +0000 (19:11 +0900)]
bpo-36575: lsprof: Use _PyTime_GetPerfCounter() (GH-8378)

5 years agobpo-36597: fix weakref example code (GH-12779)
Inada Naoki [Thu, 11 Apr 2019 10:05:32 +0000 (19:05 +0900)]
bpo-36597: fix weakref example code (GH-12779)

Commit 57b1a2862 fixed doctest, but example code is not
match with document.
Just skip doctest for the block.

5 years agobpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770)
Victor Stinner [Thu, 11 Apr 2019 09:33:27 +0000 (11:33 +0200)]
bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770)

Replace _PyMem_IsFreed() function with _PyMem_IsPtrFreed() inline
function. The function is now way more efficient, it became a simple
comparison on integers, rather than a short loop. It detects also
uninitialized bytes and "forbidden bytes" filled by debug hooks
on memory allocators.

Add unit tests on _PyObject_IsFreed().

5 years agobpo-36597: fix random doctest failure (GH-12776)
Inada Naoki [Thu, 11 Apr 2019 08:53:49 +0000 (17:53 +0900)]
bpo-36597: fix random doctest failure (GH-12776)

5 years agobpo-36597: Disable Travis CI doctest job (GH-12775)
Victor Stinner [Thu, 11 Apr 2019 07:46:46 +0000 (09:46 +0200)]
bpo-36597: Disable Travis CI doctest job (GH-12775)

Disable the job to unblock the CI until the issue is properly
understood.

5 years agobpo-36416: Correct bytes.rpartition documentation (GH-12543)
pewscorner [Thu, 11 Apr 2019 06:58:43 +0000 (08:58 +0200)]
bpo-36416: Correct bytes.rpartition documentation (GH-12543)

5 years agobetter __init__.py explanation in tutorial (#12763)
Inada Naoki [Thu, 11 Apr 2019 06:10:35 +0000 (15:10 +0900)]
better __init__.py explanation in tutorial (#12763)

* better __init__.py explanation in tutorial

* Update Doc/tutorial/modules.rst

Co-Authored-By: methane <songofacandy@gmail.com>
5 years agoDoc: fix typo in IncrementalDecoder.setstate (GH-12724)
Christopher Thorne [Thu, 11 Apr 2019 06:09:29 +0000 (07:09 +0100)]
Doc: fix typo in IncrementalDecoder.setstate (GH-12724)

5 years agobpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12764)
Victor Stinner [Wed, 10 Apr 2019 23:38:48 +0000 (01:38 +0200)]
bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12764)

Set CUSTOMIZED_OSX_COMPILER to True to disable
_osx_support.customize_compiler().

5 years agofix typo in doc (#12686)
Caleb Marchent [Wed, 10 Apr 2019 22:03:02 +0000 (23:03 +0100)]
fix typo in doc (#12686)

5 years agobpo-36559: random module: optimize sha512 import (GH-12742)
Christian Heimes [Wed, 10 Apr 2019 20:18:02 +0000 (22:18 +0200)]
bpo-36559: random module: optimize sha512 import (GH-12742)

The random module now prefers the lean internal _sha512 module over hashlib
for seed(version=2) to optimize import time.

Signed-off-by: Christian Heimes <christian@python.org>
5 years agobpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321)
Lorenz Mende [Wed, 10 Apr 2019 17:19:16 +0000 (19:19 +0200)]
bpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321)

The script needs to be updated to support win 10/ 1803 chcp.com command (output has trailing dot)

https://bugs.python.org/issue34144

5 years agobpo-14826: document that URLopener quotes fullurl. (GH-12758)
Gregory P. Smith [Wed, 10 Apr 2019 09:17:48 +0000 (02:17 -0700)]
bpo-14826: document that URLopener quotes fullurl. (GH-12758)

5 years agobpo-12910: update and correct quote docstring (#2568)
Jörn Hees [Wed, 10 Apr 2019 00:31:18 +0000 (02:31 +0200)]
bpo-12910: update and correct quote docstring (#2568)

Fixes some mistakes and misleadings in the quote function docstring:
- reserved chars are never actually used by quote code, unreserved chars are
- reserved chars were wrong and incomplete
- mentioned that use-case is not minimal quoting wrt. RFC, but cautious quoting

5 years agoFix typos in compile.c comments (GH-12752)
Simeon [Tue, 9 Apr 2019 23:36:57 +0000 (19:36 -0400)]
Fix typos in compile.c comments (GH-12752)

5 years agobpo-31512: Add non-elevated symlink support for Windows (GH-3652)
Vidar Tonaas Fauske [Tue, 9 Apr 2019 18:19:46 +0000 (20:19 +0200)]
bpo-31512: Add non-elevated symlink support for Windows (GH-3652)

5 years agobpo-34373: Fix time.mktime() on AIX (GH-12726)
Victor Stinner [Tue, 9 Apr 2019 17:12:26 +0000 (19:12 +0200)]
bpo-34373: Fix time.mktime() on AIX (GH-12726)

Fix time.mktime() error handling on AIX for year before 1970.

Other changes:

* mktime(): rename variable 'buf' to 'tm'.
* _PyTime_localtime():

  * Use "localtime" rather than "ctime" in the error message
    (specific to AIX).
  * Always initialize errno to 0 just in case if localtime_r()
    doesn't set errno on error.
  * On AIX, avoid abs() which is limited to int type.
  * EINVAL constant is now always available.

5 years agobpo-36577: setup.py reports missing OpenSSL again (GH-12746)
Christian Heimes [Tue, 9 Apr 2019 16:40:12 +0000 (18:40 +0200)]
bpo-36577: setup.py reports missing OpenSSL again (GH-12746)

[bpo-36146](https://bugs.python.org/issue36146) introduced another regression. In case of missing OpenSSL
libraries or headers, setup.py no longer reported _hashlib and _ssl to
be missing.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue36577

5 years agobpo-36560: regrtest: don't collect the GC twice (GH-12747)
Victor Stinner [Tue, 9 Apr 2019 16:26:16 +0000 (18:26 +0200)]
bpo-36560: regrtest: don't collect the GC twice (GH-12747)

dash_R() function of libregrtest doesn't call support.gc_collect()
directly anymore: it's already called by dash_R_cleanup().

Call dash_R_cleanup() before starting the loop.

5 years agobpo-36508: python-config don't export LINKFORSHARED (GH-12661)
Victor Stinner [Tue, 9 Apr 2019 16:12:44 +0000 (18:12 +0200)]
bpo-36508: python-config don't export LINKFORSHARED (GH-12661)

python-config --ldflags no longer includes flags of the LINKFORSHARED
variable. The LINKFORSHARED variable must only be used to build
executables.

5 years agobpo-36544 : Fix regression introduced in bpo-36146 (GH-12708)
xdegaye [Tue, 9 Apr 2019 15:20:08 +0000 (17:20 +0200)]
bpo-36544 : Fix regression introduced in bpo-36146 (GH-12708)

https://bugs.python.org/issue36544

5 years agobpo-34139: Remove unix datagram socket from FS before binding (GH-8323)
Quentin Dawans [Tue, 9 Apr 2019 13:40:59 +0000 (15:40 +0200)]
bpo-34139: Remove unix datagram socket from FS before binding (GH-8323)

https://bugs.python.org/issue34139

5 years agobpo-36560: Fix reference leak hunting in regrtest (GH-12744)
Victor Stinner [Tue, 9 Apr 2019 12:23:47 +0000 (14:23 +0200)]
bpo-36560: Fix reference leak hunting in regrtest (GH-12744)

Fix reference leak hunting in regrtest: compute also deltas (of
reference count, allocated memory blocks, file descriptor count)
during warmup, to ensure that everything is initialized before
starting to hunt reference leaks.

Other changes:

* Replace gc.collect() with support.gc_collect()
* Move calls to read memory statistics from dash_R_cleanup() to
  dash_R()
* Pass regrtest 'ns' to dash_R()
* dash_R() is now more quiet with --quiet option (don't display
  progress).
* Precompute the full range for "for it in range(repcount):" to
  ensure that the iteration doesn't allocate anything new.
* dash_R() now is responsible to call warm_caches().

5 years agobpo-34060: Report system load when running test suite for Windows (GH-8357)
Ammar Askar [Tue, 9 Apr 2019 12:20:41 +0000 (08:20 -0400)]
bpo-34060: Report system load when running test suite for Windows (GH-8357)

While Windows exposes the system processor queue length, the raw value
used for load calculations on Unix systems, it does not provide an API
to access the averaged value. Hence to calculate the load we must track
and average it ourselves. We can't use multiprocessing or a thread to
read it in the background while the tests run since using those would
conflict with test_multiprocessing and test_xxsubprocess.

Thus, we use Window's asynchronous IO API to run the tracker in the
background with it sampling at the correct rate. When we wish to access
the load we check to see if there's new data on the stream, if there is,
we update our load values.

5 years agobpo-33456: site module documentation - fix wrong default for key in pyvenv.cfg (GH...
Lukas Waymann [Tue, 9 Apr 2019 07:27:36 +0000 (15:27 +0800)]
bpo-33456: site module documentation - fix wrong default for key in pyvenv.cfg (GH-6755)

5 years agobpo-33461: emit DeprecationWarning when json.loads(encoding=...) is used (GH-6762)
Matthias Bussonnier [Tue, 9 Apr 2019 07:17:25 +0000 (00:17 -0700)]
bpo-33461: emit DeprecationWarning when json.loads(encoding=...) is used (GH-6762)

5 years agofix code styling (GH-12737)
Inada Naoki [Tue, 9 Apr 2019 05:54:30 +0000 (14:54 +0900)]
fix code styling (GH-12737)

5 years agocloses bpo-35848: Move all documentation regarding the readinto out of IOBase. (GH...
Steve Palmer [Tue, 9 Apr 2019 04:35:27 +0000 (05:35 +0100)]
closes bpo-35848: Move all documentation regarding the readinto out of IOBase. (GH-11893)

Move all documentation regarding the readinto method into either io.RawIOBase or io.BufferedIOBase.

Corresponding changes to documentation in the _pyio.py module.

5 years agoBPO-17561: set create_server backlog default to None (GH-12735)
Giampaolo Rodola [Tue, 9 Apr 2019 02:42:06 +0000 (04:42 +0200)]
BPO-17561: set create_server backlog default to None (GH-12735)

It turns out doing socket.listen(0) does not equal to "choose a
reasonable default". It actually means "set backlog to 0".
As such set backlog=None as the default for socket.create_server.
Fixes the following BB failures:
https://github.com/python/cpython/pull/11784#issuecomment-481036369
Ref. BPO-1756, GH-11784.

5 years agobpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733)
Victor Stinner [Mon, 8 Apr 2019 23:36:34 +0000 (01:36 +0200)]
bpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733)

Fix reference hunting (``python3 -m test -R 3:3``) when Python has no
built-in abc module: fix _get_dump() reimplementation of libregrtest.

5 years agobpo-35934: Add socket.create_server() utility function (GH-11784)
Giampaolo Rodola [Mon, 8 Apr 2019 22:34:02 +0000 (00:34 +0200)]
bpo-35934: Add socket.create_server() utility function (GH-11784)

5 years agobpo-35416: fix potential resource warnings in distutils (GH-10918)
Mickaël Schoentgen [Mon, 8 Apr 2019 13:08:48 +0000 (13:08 +0000)]
bpo-35416: fix potential resource warnings in distutils (GH-10918)

5 years agoAdd a What's New entry for bpo-35459. (GH-12706)
Serhiy Storchaka [Mon, 8 Apr 2019 11:34:04 +0000 (14:34 +0300)]
Add a What's New entry for bpo-35459. (GH-12706)

5 years agoCorrect "inplace" with "in-place" (GH-10480)
Andre Delfino [Mon, 8 Apr 2019 09:14:43 +0000 (06:14 -0300)]
Correct "inplace" with "in-place" (GH-10480)

5 years agoremove duplicate code in biscet (GH-1270)
Chillar Anand [Mon, 8 Apr 2019 08:01:09 +0000 (13:31 +0530)]
remove duplicate code in biscet (GH-1270)

5 years agobpo-36503: remove references to 'aix3' and 'aix4' (GH-12658)
Michael Felt [Mon, 8 Apr 2019 00:51:33 +0000 (02:51 +0200)]
bpo-36503: remove references to 'aix3' and 'aix4' (GH-12658)

5 years agobpo-27181: Add statistics.geometric_mean() (GH-12638)
Raymond Hettinger [Sun, 7 Apr 2019 16:20:03 +0000 (09:20 -0700)]
bpo-27181: Add statistics.geometric_mean() (GH-12638)

5 years agobpo-35936: Updates to modulefinder (GH-11787)
Brandt Bucher [Sun, 7 Apr 2019 08:00:41 +0000 (01:00 -0700)]
bpo-35936: Updates to modulefinder (GH-11787)

* Properly handle SyntaxErrors in Python source files.

SyntaxErrors in the target module will rise normally, while SyntaxErrors in dependencies will be added to badmodules. This includes a new regression test.

* Fix name collision bug.

This fixes an issue where a "fromlist" import with the same name as a previously failed import would be incorrectly added to badmodules. This includes a new regression test.

* Replace mutable default values.

Bound empty lists have been replaced with the "if param is None" idiom.

* Replace deprecated imp usage.

Constants imported from imp have been moved to private module-level constants, and ModuleFinder.find_module has been refactored to use importlib. Other than an improvement on how frozen builtin imports are reported (as the frozen imports they are, rather than the stdlib modules they *may* have originated from), these changes maintain complete compatibility with past versions... including odd behavior for returning relative (below current directory, but not a C extension) vs. absolute (above current directory, or a C extension) paths.

Patch by Brandt Bucher.

5 years agobpo-35726: Add test for QueueHandler with multiple handlers (GH-11659)
Xtreak [Sun, 7 Apr 2019 07:51:27 +0000 (13:21 +0530)]
bpo-35726: Add test for QueueHandler with multiple handlers (GH-11659)

5 years agobpo-30661: Improve docs for tarfile pax change and effect on shutil (GH-12635)
CAM Gerlach [Sun, 7 Apr 2019 04:47:49 +0000 (23:47 -0500)]
bpo-30661: Improve docs for tarfile pax change and effect on shutil (GH-12635)

The shutil archive creation helpers use the default tarfile format,
so that API is also switching to use `pax` by default.

5 years agobpo-9883: Update list of unimplemented interfaces in minidom. (GH-12677)
Stefan Behnel [Sat, 6 Apr 2019 16:57:43 +0000 (18:57 +0200)]
bpo-9883: Update list of unimplemented interfaces in minidom. (GH-12677)

Remove names from the "unimplemented interfaces" list
in the minidom docs that are actually implemented.

5 years agobpo-36050: optimize HTTPResponse.read() (GH-12698)
Inada Naoki [Sat, 6 Apr 2019 09:06:19 +0000 (18:06 +0900)]
bpo-36050: optimize HTTPResponse.read() (GH-12698)

* No need to chunking for now.
* No need to partial read caused by EINTR for now.

5 years agobpo-36527: silence -Wunused-parameter warnings in object.h (GH-12688)
Dmitry Marakasov [Sat, 6 Apr 2019 09:04:47 +0000 (12:04 +0300)]
bpo-36527: silence -Wunused-parameter warnings in object.h (GH-12688)

5 years agoFix doc for create_subprocess_exec (GH-12598)
Dima Tisnek [Fri, 5 Apr 2019 14:02:28 +0000 (23:02 +0900)]
Fix doc for create_subprocess_exec (GH-12598)

Add missing `program` argument to asyncio.create_subprocess_exec documentation.

5 years agobpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406)
Zackery Spytz [Fri, 5 Apr 2019 10:17:13 +0000 (04:17 -0600)]
bpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406)

5 years agobpo-29202: improve dict iteration (GH-11900)
Cheryl Sabella [Fri, 5 Apr 2019 10:08:43 +0000 (06:08 -0400)]
bpo-29202: improve dict iteration (GH-11900)

Use fewer iterations instead of iterating over the whole entry table.

5 years agobpo-36301: Fix _PyPreConfig_Read() compiler warning (GH-12695)
Victor Stinner [Fri, 5 Apr 2019 09:44:04 +0000 (11:44 +0200)]
bpo-36301: Fix _PyPreConfig_Read() compiler warning (GH-12695)

Initialize init_utf8_mode earlier to fix a compiler warning.

5 years agobpo-36404: recommend DeprecationWarning over PendingDeprecationWarning (GH-12505)
Inada Naoki [Fri, 5 Apr 2019 08:54:24 +0000 (17:54 +0900)]
bpo-36404: recommend DeprecationWarning over PendingDeprecationWarning (GH-12505)

5 years agoTools/importbench: Fix a misplaced stderr= (GH-12690)
Anthony Sottile [Fri, 5 Apr 2019 07:18:19 +0000 (00:18 -0700)]
Tools/importbench: Fix a misplaced stderr= (GH-12690)

5 years agoFix duplicated test case for re. (GH-12662)
MakDon [Thu, 4 Apr 2019 10:38:42 +0000 (18:38 +0800)]
Fix duplicated test case for re. (GH-12662)

5 years agobpo-36522: Print all values for headers with multiple values. (GH-12681)
Matt Houglum [Thu, 4 Apr 2019 04:36:47 +0000 (21:36 -0700)]
bpo-36522: Print all values for headers with multiple values. (GH-12681)

5 years agobpo-36440: include node names in ParserError messages, instead of numeric IDs (GH...
tyomitch [Wed, 3 Apr 2019 05:12:07 +0000 (08:12 +0300)]
bpo-36440: include node names in ParserError messages, instead of numeric IDs (GH-12565)

The error messages in the parser module are referring to numeric IDs for the nodes. To improve readability, use the node names when reporting errors.

5 years agoHave UserDict.__init__() implicitly check for updating w/ bool(kwargs) instead of...
Slam [Tue, 2 Apr 2019 21:47:41 +0000 (00:47 +0300)]
Have UserDict.__init__() implicitly check for updating w/ bool(kwargs) instead of len() (GH-12139)

Semantically the same, but more idiomatic by checking against `kwargs` instead of `len(kwargs)`.

5 years agobpo-32413: Add documentation that at the module level, locals(), globals() are the...
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Tue, 2 Apr 2019 17:58:50 +0000 (23:28 +0530)]
bpo-32413: Add documentation that at the module level, locals(), globals() are the  same dictionary (GH-5004)

https://bugs.python.org/issue32413

5 years agobpo-33261: guard access to __code__ attribute in inspect (GH-6448)
Jeroen Demeyer [Tue, 2 Apr 2019 14:03:42 +0000 (16:03 +0200)]
bpo-33261: guard access to __code__ attribute in inspect (GH-6448)

5 years agobpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). (GH-12660)
Zackery Spytz [Tue, 2 Apr 2019 10:47:51 +0000 (04:47 -0600)]
bpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). (GH-12660)

5 years agobpo-36473: add maximum iteration check for dict .values() and .items() (GH-12619)
Thomas Perl [Tue, 2 Apr 2019 09:30:10 +0000 (11:30 +0200)]
bpo-36473: add maximum iteration check for dict .values() and .items() (GH-12619)

5 years agobpo-35838: document optionxform must be idempotent (GH-12656)
Inada Naoki [Tue, 2 Apr 2019 09:08:46 +0000 (18:08 +0900)]
bpo-35838: document optionxform must be idempotent (GH-12656)

5 years agofix confusing argument name in unicodeobject.c (GH-12653)
Max Bernstein [Tue, 2 Apr 2019 08:16:22 +0000 (01:16 -0700)]
fix confusing argument name in unicodeobject.c (GH-12653)

5 years agobpo-36377: Specify that range() can not be compared (GH-12468)
Emmanuel Arias [Tue, 2 Apr 2019 04:52:42 +0000 (01:52 -0300)]
bpo-36377: Specify that range() can not be compared (GH-12468)

5 years agobpo-13120: fix typo with test_issue13120() method name (GH-12250)
Daniel Hahler [Mon, 1 Apr 2019 21:59:50 +0000 (23:59 +0200)]
bpo-13120: fix typo with test_issue13120() method name (GH-12250)

Incorrect issue number '13210' added in 539ee5da6f.

https://bugs.python.org/issue13120

5 years agoTemporary workaround for an ACL issue on Ubuntu on Azure Pipelines (GH-12649)
Steve Dower [Mon, 1 Apr 2019 16:10:20 +0000 (09:10 -0700)]
Temporary workaround for an ACL issue on Ubuntu on Azure Pipelines (GH-12649)

5 years agobpo-36157:Document PyInterpreterState_Main() (GH-12238)
Joannah Nanjekye [Mon, 1 Apr 2019 15:08:43 +0000 (18:08 +0300)]
bpo-36157:Document PyInterpreterState_Main() (GH-12238)

I have added documentation for `PyInterpreterState_Main()`.
 I chose to place it under Advanced Debugger Support together with similar functions like `PyInterpreterState_Head()`, `PyInterpreterState_Next(`), and `PyInterpreterState_ThreadHead()` .

https://bugs.python.org/issue36157

5 years agobpo-36495: Fix two out-of-bounds array reads (GH-12641)
Brad Larsen [Mon, 1 Apr 2019 14:36:05 +0000 (10:36 -0400)]
bpo-36495: Fix two out-of-bounds array reads (GH-12641)

Research and fix by @bradlarsen.

5 years agobpo-20844: open script file with "rb" mode (GH-12616)
Inada Naoki [Mon, 1 Apr 2019 09:35:20 +0000 (18:35 +0900)]
bpo-20844: open script file with "rb" mode (GH-12616)