]> granicus.if.org Git - python/log
python
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)

5 years agobpo-36026: make descr error message consistent (GH-11930)
Inada Naoki [Mon, 1 Apr 2019 08:56:11 +0000 (17:56 +0900)]
bpo-36026: make descr error message consistent (GH-11930)

set.add(0) and set.add.__get__(0) now raise TypeError
with same error message.

5 years agobpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)
Serhiy Storchaka [Mon, 1 Apr 2019 06:16:35 +0000 (09:16 +0300)]
bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)

Deprecated passing the following arguments as keyword arguments:

- "func" in functools.partialmethod(), weakref.finalize(),
  profile.Profile.runcall(), cProfile.Profile.runcall(),
  bdb.Bdb.runcall(), trace.Trace.runfunc() and
  curses.wrapper().
- "function" in unittest.addModuleCleanup() and
  unittest.TestCase.addCleanup().
- "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor
  and concurrent.futures.ProcessPoolExecutor.
- "callback" in contextlib.ExitStack.callback(),
  contextlib.AsyncExitStack.callback() and
  contextlib.AsyncExitStack.push_async_callback().
- "c" and "typeid" in the create() method of multiprocessing.managers.Server
  and multiprocessing.managers.SharedMemoryServer.
- "obj" in weakref.finalize().

Also allowed to pass arbitrary keyword arguments (even "self" and "func")
if the above arguments are passed as positional argument.

5 years agobpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). ...
Zackery Spytz [Sun, 31 Mar 2019 16:02:11 +0000 (10:02 -0600)]
bpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). (GH-12106)

5 years agobpo-35947: Fix a compiler warning in _ctypes.c's StructUnionType_paramfunc(). (GH...
Zackery Spytz [Sun, 31 Mar 2019 16:00:12 +0000 (10:00 -0600)]
bpo-35947: Fix a compiler warning in _ctypes.c's StructUnionType_paramfunc(). (GH-12629)

5 years agobpo-36085: Add installer check for KB2533625 (GH-12636)
Steve Dower [Sun, 31 Mar 2019 03:58:17 +0000 (20:58 -0700)]
bpo-36085: Add installer check for KB2533625 (GH-12636)

5 years agobpo-36085: Add additional load flag to ensure DLL loads successfully (GH-12633)
Steve Dower [Sun, 31 Mar 2019 00:14:46 +0000 (17:14 -0700)]
bpo-36085: Add additional load flag to ensure DLL loads successfully (GH-12633)

5 years agobpo-36010: Add venv to the nuget distribution (GH-12367)
Paul Moore [Sat, 30 Mar 2019 16:32:05 +0000 (16:32 +0000)]
bpo-36010: Add venv to the nuget distribution (GH-12367)

5 years agobpo-36384: Remove check for leading zeroes in IPv4 addresses (GH-12577)
Joel Croteau [Sat, 30 Mar 2019 14:53:48 +0000 (07:53 -0700)]
bpo-36384: Remove check for leading zeroes in IPv4 addresses (GH-12577)

Stop rejecting IPv4 octets with leading zeroes as ambiguously octal.

Plenty of other tools generate decimal IPv4 octets with leading zeroes,
so keeping this check hurts interoperability.

Patch by Joel Croteau.

5 years agoC API docs: Py_IsInitialized is always safe to call (GH-12630)
Nick Coghlan [Sat, 30 Mar 2019 11:24:05 +0000 (21:24 +1000)]
C API docs: Py_IsInitialized is always safe to call (GH-12630)

5 years agobpo-22831: Use "with" to avoid possible fd leaks in tools (part 2). (GH-10927)
Serhiy Storchaka [Sat, 30 Mar 2019 06:33:02 +0000 (08:33 +0200)]
bpo-22831: Use "with" to avoid possible fd leaks in tools (part 2). (GH-10927)

5 years agobpo-22831: Use "with" to avoid possible fd leaks in tools (part 1). (GH-10926)
Serhiy Storchaka [Sat, 30 Mar 2019 06:32:18 +0000 (08:32 +0200)]
bpo-22831: Use "with" to avoid possible fd leaks in tools (part 1). (GH-10926)

5 years agobpo-36434: Properly handle writing errors in ZIP files. (GH-12559)
Serhiy Storchaka [Sat, 30 Mar 2019 06:25:19 +0000 (08:25 +0200)]
bpo-36434: Properly handle writing errors in ZIP files. (GH-12559)

Errors during writing no longer prevent to properly close
the ZIP file.

5 years agobpo-24214: Fixed the UTF-8 incremental decoder. (GH-12603)
Serhiy Storchaka [Sat, 30 Mar 2019 06:23:38 +0000 (08:23 +0200)]
bpo-24214: Fixed the UTF-8 incremental decoder. (GH-12603)

The bug occurred when the encoded surrogate character is passed
to the incremental decoder in two chunks.

5 years agobpo-17110: doc: add note how to get bytes from sys.argv (GH-12602)
Inada Naoki [Sat, 30 Mar 2019 05:32:08 +0000 (14:32 +0900)]
bpo-17110: doc: add note how to get bytes from sys.argv (GH-12602)

5 years agogithub: assign @methane to dict owner (GH-12617)
Inada Naoki [Sat, 30 Mar 2019 02:08:17 +0000 (11:08 +0900)]
github: assign @methane to dict owner (GH-12617)

5 years agobpo-36085: Enable better DLL resolution on Windows (GH-12302)
Steve Dower [Fri, 29 Mar 2019 23:37:16 +0000 (16:37 -0700)]
bpo-36085: Enable better DLL resolution on Windows (GH-12302)

5 years agobpo-35947: Update Windows to the current version of libffi (GH-11797)
Paul Monson [Fri, 29 Mar 2019 23:30:10 +0000 (16:30 -0700)]
bpo-35947: Update Windows to the current version of libffi (GH-11797)

We now use a pre-built libffi binary from our binaries repository, and no longer vendor the full implementation.

5 years agobpo-36448: mention 'make regen-all' in error message (GH-12585)
Jeroen Demeyer [Fri, 29 Mar 2019 18:37:22 +0000 (19:37 +0100)]
bpo-36448: mention 'make regen-all' in error message (GH-12585)

5 years agobpo-36471: Add _Py_RunMain() (GH-12618)
Victor Stinner [Fri, 29 Mar 2019 14:13:46 +0000 (15:13 +0100)]
bpo-36471: Add _Py_RunMain() (GH-12618)

* Add config_read_cmdline() subfunction. Remove _PyCmdline structure.
* _PyCoreConfig_Read() now also parses config->argv command line
  arguments

5 years agobpo-35194: cjkcodec: check the encoded value is not truncated (GH-10432)
Alexey Izbyshev [Fri, 29 Mar 2019 07:48:47 +0000 (10:48 +0300)]
bpo-35194: cjkcodec: check the encoded value is not truncated (GH-10432)

5 years agobpo-36064: Clarify allowed data types for urllib.request.Request. (GH-11990)
Julien Palard [Fri, 29 Mar 2019 02:15:34 +0000 (03:15 +0100)]
bpo-36064: Clarify allowed data types for urllib.request.Request. (GH-11990)

5 years agobpo-33043: Add a Contributing to Docs link and Update the Found a Bug Page (#12006)
Susan Su [Fri, 29 Mar 2019 01:55:24 +0000 (18:55 -0700)]
bpo-33043: Add a Contributing to Docs link and Update the Found a Bug Page (#12006)

* changes to html file -> added contributing to docs link at the end of the page

* revisions to the dealing with bugs page. added more links in the documentation bugs section

* 📜🤖 Added by blurb_it.

* Update Doc/bugs.rst

Updated Doc/bugs.rst in accordance with willingc and JulienPalard suggestions.

Co-Authored-By: suhearsawho <susansu.software@gmail.com>
5 years agobpo-30427: eliminate redundant type checks in os.path.normcase() (GH-1712)
Wolfgang Maier [Thu, 28 Mar 2019 21:47:18 +0000 (22:47 +0100)]
bpo-30427: eliminate redundant type checks in os.path.normcase() (GH-1712)

https://bugs.python.org/issue30427

5 years agobpo-36366: Return None on stopping unstarted patch object (GH-12472)
Xtreak [Thu, 28 Mar 2019 21:08:43 +0000 (02:38 +0530)]
bpo-36366: Return None on stopping unstarted patch object (GH-12472)

Return None after calling unittest.mock.patch.object.stop() regardless of whether the object was started. This makes the method idempotent.

https://bugs.python.org/issue36366

5 years agoFixed capital letters missing and missing . (GH-12584)
Jules Lasne (jlasne) [Thu, 28 Mar 2019 21:06:27 +0000 (22:06 +0100)]
Fixed capital letters missing and missing . (GH-12584)

No `bpo` for minor doc fix

5 years agoFix typo in email.encoders doc (GH-9700)
ksamuel [Thu, 28 Mar 2019 20:38:30 +0000 (21:38 +0100)]
Fix typo in email.encoders doc (GH-9700)

Make the encoding/encoders mention congruent.

5 years agobpo-35941: Fix ssl certificate enumeration for windows (GH-12486)
kctherookie [Thu, 28 Mar 2019 17:59:06 +0000 (00:59 +0700)]
bpo-35941: Fix ssl certificate enumeration for windows (GH-12486)

Add a function to collect certificates from several certificate stores into one certificate collection store that is then enumerated. This ensures we load as many certificates as we can access.