]> granicus.if.org Git - python/log
python
5 years agobpo-38208: Simplify string.Template by using __init_subclass__(). (GH-16256)
Serhiy Storchaka [Mon, 21 Oct 2019 06:36:21 +0000 (09:36 +0300)]
bpo-38208: Simplify string.Template by using __init_subclass__(). (GH-16256)

5 years agobpo-38465: Convert the type of exports counters to Py_ssize_t. (GH-16746)
Hai Shi [Mon, 21 Oct 2019 06:31:46 +0000 (14:31 +0800)]
bpo-38465: Convert the type of exports counters to Py_ssize_t. (GH-16746)

5 years agobpo-38531: document extend action's added version (GH-16865)
Batuhan Taşkaya [Sun, 20 Oct 2019 20:13:54 +0000 (23:13 +0300)]
bpo-38531: document extend action's added version (GH-16865)

5 years agobpo-37759: More updates to Whatsnew 3.8 (GH-16854)
Raymond Hettinger [Sun, 20 Oct 2019 18:25:16 +0000 (11:25 -0700)]
bpo-37759: More updates to Whatsnew 3.8 (GH-16854)

* math.perm() and math.comb()

* math.isqrt()

* Add singledispatchmethod()

* itertools.accumulate()

* Optional headers for xmlrpc.client.ServerProxy

* IDLE non-BMP characters

* import collections.abc directly

* @coroutine is deprecated

* pprint.pp()

* New options for object.__reduce__()

* DictReader no longer returns OrderedDicts

* "force" option for logging.basicConfig()

* Fix spelling

* cProfile context manager

* Various markup/grammar fixes from Kyle Stanley.
Other minor fixes as well.
Also, dedup the __reduce__ entry.

* Fix markup

* Fix grammar nits found by MS Word

5 years agobpo-36321: Fix misspelled attribute name in namedtuple() (GH-16858)
Raymond Hettinger [Sun, 20 Oct 2019 17:19:47 +0000 (10:19 -0700)]
bpo-36321: Fix misspelled attribute name in namedtuple() (GH-16858)

5 years agobpo-38525: Fix a segmentation fault when using reverse iterators of empty dict (GH...
Dong-hee Na [Sat, 19 Oct 2019 20:01:08 +0000 (05:01 +0900)]
bpo-38525: Fix a segmentation fault when using reverse iterators of empty dict (GH-16846)

The reverse iterator for empty dictionaries was not handling correctly shared-key dictionaries.

5 years agoRemove doc reference to unmaitained Nose package (GH-16849)
Jon Dufresne [Sat, 19 Oct 2019 19:22:20 +0000 (12:22 -0700)]
Remove doc reference to unmaitained Nose package (GH-16849)

The Nose package is no longer maintained.

5 years agobpo-36876: Re-organize the c-analyzer tool code. (gh-16841)
Eric Snow [Sat, 19 Oct 2019 02:00:04 +0000 (19:00 -0700)]
bpo-36876: Re-organize the c-analyzer tool code. (gh-16841)

This is partly a cleanup of the code. It also is preparation for getting the variables from the source (cross-platform) rather than from the symbols.

The change only touches the tool (and its tests).

5 years agovalidate_list: make flags argument impossible to spell wrongly. (GH-16843)
Tim Peters [Sat, 19 Oct 2019 01:59:14 +0000 (20:59 -0500)]
validate_list: make flags argument impossible to spell wrongly. (GH-16843)

5 years agobpo-38521: Fix error in NormalDist.__eq__() (GH-16840)
Raymond Hettinger [Fri, 18 Oct 2019 21:20:35 +0000 (14:20 -0700)]
bpo-38521: Fix error in NormalDist.__eq__() (GH-16840)

5 years agobpo-38502: regrtest uses process groups if available (GH-16829)
Victor Stinner [Fri, 18 Oct 2019 13:49:08 +0000 (15:49 +0200)]
bpo-38502: regrtest uses process groups if available (GH-16829)

test.regrtest now uses process groups in the multiprocessing mode
(-jN command line option) if process groups are available: if
os.setsid() and os.killpg() functions are available.

5 years agobpo-27657: Fix urlparse() with numeric paths (#661)
Tim Graham [Fri, 18 Oct 2019 13:07:20 +0000 (09:07 -0400)]
bpo-27657: Fix urlparse() with numeric paths (#661)

* bpo-27657: Fix urlparse() with numeric paths

Revert parsing decision from bpo-754016 in favor of the documented
consensus in bpo-16932 of how to treat strings without a // to
designate the netloc.

* bpo-22891: Remove urlsplit() optimization for 'http' prefixed inputs.

5 years agobpo-38418: Fixes audit event for os.system to be named 'os.system' (GH-16670)
Steve Dower [Fri, 18 Oct 2019 07:52:15 +0000 (00:52 -0700)]
bpo-38418: Fixes audit event for os.system to be named 'os.system' (GH-16670)

https://bugs.python.org/issue38418

Automerge-Triggered-By: @zooba
5 years agoFix minor typos in What's New in Python 3.8. (GH-16770)
Jero Bado [Fri, 18 Oct 2019 07:48:48 +0000 (15:48 +0800)]
Fix minor typos in What's New in Python 3.8. (GH-16770)

Added periods at the end of the sentences.

5 years agoDoc: Add missing entry for functools.cached_property (GH-16803)
Stéphane Wirtel [Fri, 18 Oct 2019 07:14:18 +0000 (09:14 +0200)]
Doc: Add missing entry for functools.cached_property (GH-16803)

5 years agobpo-33604: Raise TypeError on missing hmac arg. (GH-16805)
Gregory P. Smith [Fri, 18 Oct 2019 03:30:42 +0000 (20:30 -0700)]
bpo-33604: Raise TypeError on missing hmac arg. (GH-16805)

Also updates the documentation to clarify the situation surrounding
the digestmod parameter that is required despite its position in the
argument list as of 3.8.0 as well as removing old python2 era
references to "binary strings".

We indavertently had this raise ValueError in 3.8.0 for the missing
arg.  This is not considered an API change as no reasonable code would
be catching this missing argument error in order to handle it.

5 years agobpo-34953: Implement `mmap.mmap.__repr__` (GH-9891)
Taine Zhao [Thu, 17 Oct 2019 10:41:35 +0000 (18:41 +0800)]
bpo-34953: Implement `mmap.mmap.__repr__` (GH-9891)

5 years agobpo-37587: json: Use _PyUnicodeWriter when scanning string. (GH-15591)
Inada Naoki [Thu, 17 Oct 2019 07:12:41 +0000 (16:12 +0900)]
bpo-37587: json: Use _PyUnicodeWriter when scanning string. (GH-15591)

5 years agobpo-37531: regrtest now catchs ProcessLookupError (GH-16827)
Victor Stinner [Wed, 16 Oct 2019 22:29:12 +0000 (00:29 +0200)]
bpo-37531: regrtest now catchs ProcessLookupError (GH-16827)

Fix a warning on a race condition on TestWorkerProcess.kill(): ignore
silently ProcessLookupError rather than logging an useless warning.

5 years agobpo-38492: Remove pythonw.exe dependency on the Microsoft C++ runtime (GH-16824)
Steve Dower [Wed, 16 Oct 2019 17:27:17 +0000 (10:27 -0700)]
bpo-38492: Remove pythonw.exe dependency on the Microsoft C++ runtime (GH-16824)

5 years agobpo-38006: Add unit test for weakref clear bug (GH-16788)
Neil Schemenauer [Wed, 16 Oct 2019 03:56:48 +0000 (20:56 -0700)]
bpo-38006: Add unit test for weakref clear bug (GH-16788)

5 years agobpo-35998: Fix test_asyncio.test_start_tls_server_1() (GH-16815)
Victor Stinner [Wed, 16 Oct 2019 00:36:42 +0000 (02:36 +0200)]
bpo-35998: Fix test_asyncio.test_start_tls_server_1() (GH-16815)

main() is now responsible to send the ANSWER, rather than
ServerProto. main() now waits until it got the HELLO before sending
the ANSWER over the new transport.

Previously, there was a race condition between main() replacing the
protocol and the protocol sending the ANSWER once it gets the HELLO.

TLSv1.3 was disabled for the test: reenable it.

5 years agoUpdate doc switcher list for 3.8.0 (GH-16809)
Ned Deily [Tue, 15 Oct 2019 21:26:05 +0000 (17:26 -0400)]
Update doc switcher list for 3.8.0 (GH-16809)

5 years agoTypo fix - implemention should be implementation (GH-16806)
Hansraj Das [Tue, 15 Oct 2019 20:49:13 +0000 (02:19 +0530)]
Typo fix - implemention should be implementation (GH-16806)

5 years agobpo-38468 : Refactor python-config (#16749)
Joannah Nanjekye [Tue, 15 Oct 2019 14:18:47 +0000 (11:18 -0300)]
bpo-38468 : Refactor python-config (#16749)

* refactor python-config

* 📜🤖 Added by blurb_it.

* Update Misc/NEWS.d/next/Build/2019-10-13-16-18-24.bpo-38468.buCO84.rst

Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
* Use getvar for pyver

* Update news entry with affected file.

* Update Misc/NEWS.d/next/Build/2019-10-13-16-18-24.bpo-38468.buCO84.rst

Co-Authored-By: Victor Stinner <vstinner@python.org>
* Update 2019-10-13-16-18-24.bpo-38468.buCO84.rst

5 years agobpo-37961, tracemalloc: add Traceback.total_nframe (GH-15545)
Julien Danjou [Tue, 15 Oct 2019 12:00:16 +0000 (14:00 +0200)]
bpo-37961, tracemalloc: add Traceback.total_nframe (GH-15545)

Add a total_nframe field to the traces collected by the tracemalloc module.
This field indicates the original number of frames before it was truncated.

5 years agobpo-38478: Correctly handle keyword argument with same name as positional-only parame...
Pablo Galindo [Tue, 15 Oct 2019 11:40:02 +0000 (12:40 +0100)]
bpo-38478: Correctly handle keyword argument with same name as positional-only parameter (GH-16800)

5 years agobpo-38470: Fix test_compileall.test_compile_dir_maxlevels() (GH-16789)
Victor Stinner [Tue, 15 Oct 2019 09:26:13 +0000 (11:26 +0200)]
bpo-38470: Fix test_compileall.test_compile_dir_maxlevels() (GH-16789)

Fix test_compile_dir_maxlevels() on Windows without long path
support: only create 3 subdirectories instead of between 20 and 100
subdirectories.

Fix also compile_dir() to use the current sys.getrecursionlimit()
value as the default maxlevels value, rather than using
sys.getrecursionlimit() value read at startup.

5 years agobpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows...
Vinay Sajip [Tue, 15 Oct 2019 07:26:12 +0000 (08:26 +0100)]
bpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows. (GH-16347)

5 years agobpo-38133: Update docs to reflect fixes to py.exe launcher (GH-16791)
Steve Dower [Mon, 14 Oct 2019 22:45:43 +0000 (15:45 -0700)]
bpo-38133: Update docs to reflect fixes to py.exe launcher (GH-16791)

5 years agoDoc: 3.8 is now stable. (GH-16790)
Julien Palard [Mon, 14 Oct 2019 22:13:38 +0000 (00:13 +0200)]
Doc: 3.8 is now stable. (GH-16790)

5 years agoRemove draft status. Add asyncio REPL example (GH-16785)
Raymond Hettinger [Mon, 14 Oct 2019 16:01:05 +0000 (09:01 -0700)]
Remove draft status.  Add asyncio REPL example (GH-16785)

5 years agobpo-38453: Resolve test directories before chdir to them (GH-16723)
Steve Dower [Mon, 14 Oct 2019 15:42:21 +0000 (08:42 -0700)]
bpo-38453: Resolve test directories before chdir to them (GH-16723)

5 years agobpo-37759: Polish What's New in Python 3.8. (#16769)
Serhiy Storchaka [Mon, 14 Oct 2019 13:10:40 +0000 (16:10 +0300)]
bpo-37759: Polish What's New in Python 3.8. (#16769)

5 years agoUpdate build docs for macOS (GH-16771)
Ned Deily [Mon, 14 Oct 2019 12:16:10 +0000 (08:16 -0400)]
Update build docs for macOS (GH-16771)

5 years agobpo-32498: urllib.parse.unquote also accepts bytes (GH-7768)
Stein Karlsen [Mon, 14 Oct 2019 10:36:29 +0000 (12:36 +0200)]
bpo-32498: urllib.parse.unquote also accepts bytes (GH-7768)

5 years agoUpdate macOS installer display files for 3.9.0a1 (GH-16765)
Ned Deily [Mon, 14 Oct 2019 08:26:45 +0000 (04:26 -0400)]
Update macOS installer display files for 3.9.0a1 (GH-16765)

5 years agobpo-37759: Add examples for the new typing features (GH-16763)
Raymond Hettinger [Mon, 14 Oct 2019 06:32:03 +0000 (23:32 -0700)]
bpo-37759: Add examples for the new typing features (GH-16763)

5 years agobpo-38461 and bpo-38463: Minor fixes to Whatsnew 3.8 (GH-16761)
Raymond Hettinger [Mon, 14 Oct 2019 04:31:12 +0000 (21:31 -0700)]
bpo-38461 and bpo-38463: Minor fixes to Whatsnew 3.8 (GH-16761)

* bpo-38461: ncurses misspelled as curses

* bpo-38463: Fix broken link

5 years agobpo-38469: Handle named expression scope with global/nonlocal keywords (GH-16755)
Pablo Galindo [Mon, 14 Oct 2019 04:18:05 +0000 (05:18 +0100)]
bpo-38469: Handle named expression scope with global/nonlocal keywords (GH-16755)

The symbol table handing of PEP572's assignment expressions is not resolving correctly the scope of some variables in presence of global/nonlocal keywords in conjunction with comprehensions.

5 years agobpo-38464: Document parameter for NormalDist.quantiles() (GH-16757)
Raymond Hettinger [Mon, 14 Oct 2019 02:53:30 +0000 (19:53 -0700)]
bpo-38464: Document parameter for NormalDist.quantiles() (GH-16757)

5 years agoMisc gc code & comment cleanups. (GH-16752)
Tim Peters [Sun, 13 Oct 2019 21:47:04 +0000 (16:47 -0500)]
Misc gc code & comment cleanups. (GH-16752)

* Misc gc code & comment cleanups.

validate_list:  there are two temp flags polluting pointers, but this checked only one.  Now it checks both, and verifies that the list head's pointers are not polluted.

move_unreachable: repaired incoherent comments.  Added new comments.  Cleared the pollution of the unreachable list head's 'next' pointer (it was expedient while the function was running, but there's no excuse for letting this damage survive the function's end).

* Update Modules/gcmodule.c

Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-38467: Fix argument name of typing functions (GH-16753)
Sebastian Rittau [Sun, 13 Oct 2019 18:31:35 +0000 (20:31 +0200)]
bpo-38467: Fix argument name of typing functions (GH-16753)

5 years agobpo-28556: Remove another mention of metaclass of Generic in typing docs (GH-16743)
Ivan Levkivskyi [Sun, 13 Oct 2019 16:53:06 +0000 (17:53 +0100)]
bpo-28556: Remove another mention of metaclass of Generic in typing docs (GH-16743)

Metaclass was removed in Python 3.7 (there is already a `versionchanged` item about this).

https://bugs.python.org/issue28556

5 years agoRebased version of what's new PR (#16745)
Andrew Kuchling [Sun, 13 Oct 2019 15:51:36 +0000 (11:51 -0400)]
Rebased version of what's new PR (#16745)

* Use Unicode character for accent
* Various grammar fixes
* Sort library modules alphabetically; remove duplicated idlelib/IDLE section

5 years agobpo-38379: Don't block collection of unreachable objects when some objects resurrect...
Pablo Galindo [Sun, 13 Oct 2019 15:48:59 +0000 (16:48 +0100)]
bpo-38379: Don't block collection of unreachable objects when some objects resurrect (GH-16687)

Currently if any finalizer invoked during garbage collection resurrects any object, the gc gives up and aborts the collection. Although finalizers are assured to only run once per object, this behaviour of the gc can lead to an ever-increasing memory situation if new resurrecting objects are allocated in every new gc collection.

To avoid this, recompute what objects among the unreachable set need to be resurrected and what objects can be safely collected. In this way, resurrecting objects will not block the collection of other objects in the unreachable set.

5 years agoCorrect signature of __build_class__ (GH-16735)
Pablo Galindo [Sun, 13 Oct 2019 15:35:41 +0000 (16:35 +0100)]
Correct signature of __build_class__ (GH-16735)

5 years agobpo-38202: Fix a crash in dict_view & non-itearble. (GH-16241)
Zackery Spytz [Sun, 13 Oct 2019 11:49:05 +0000 (05:49 -0600)]
bpo-38202: Fix a crash in dict_view & non-itearble. (GH-16241)

5 years agobpo-38431: Fix __repr__ method of InitVar to work with typing objects. (GH-16702)
Samuel Colvin [Sun, 13 Oct 2019 11:45:36 +0000 (12:45 +0100)]
bpo-38431: Fix __repr__ method of InitVar to work with typing objects. (GH-16702)

5 years agobpo-38378: Rename parameters "out" and "in" of os.sendfile(). (GH-16742)
Serhiy Storchaka [Sun, 13 Oct 2019 08:59:31 +0000 (11:59 +0300)]
bpo-38378: Rename parameters "out" and "in" of os.sendfile(). (GH-16742)

They conflicted with keyword "in".

Also rename positional-only parameters of private os._fcopyfile()
for consistency.

5 years agobpo-38456: Handle the case when there is no 'true' command (GH-16739)
Pablo Galindo [Sun, 13 Oct 2019 01:40:24 +0000 (02:40 +0100)]
bpo-38456: Handle the case when there is no 'true' command (GH-16739)

5 years agobpo-38282: Correctly manage the Bluetooth L2CAP socket structure in FreeBSD (GH-16738)
Pablo Galindo [Sun, 13 Oct 2019 01:03:54 +0000 (02:03 +0100)]
bpo-38282: Correctly manage the Bluetooth L2CAP socket structure in FreeBSD (GH-16738)

5 years agobpo-38456: Use /bin/true in test_subprocess (GH-16736)
Gregory P. Smith [Sat, 12 Oct 2019 23:35:53 +0000 (16:35 -0700)]
bpo-38456: Use /bin/true in test_subprocess (GH-16736)

* bpo-38456: Use /bin/true in test_subprocess.

Instead of sys.executable, "-c", "pass" or "import sys; sys.exit(0)"
use /bin/true when it is available.  On a reasonable machine this
shaves up to two seconds wall time off the otherwise ~40sec execution
on a --with-pydebug build.  It should be more notable on many
buildbots or overloaded slower I/O systems (CI, etc).

5 years agobpo-38417: Add umask support to subprocess (GH-16726)
Gregory P. Smith [Sat, 12 Oct 2019 20:24:56 +0000 (13:24 -0700)]
bpo-38417: Add umask support to subprocess (GH-16726)

On POSIX systems, allow the umask to be set in the child process before we exec.

5 years agobpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE...
Pablo Galindo [Sat, 12 Oct 2019 19:14:11 +0000 (20:14 +0100)]
bpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE (GH-16733)

5 years agoFix minor typos in Whatsnew
Hugo van Kemenade [Sat, 12 Oct 2019 17:53:36 +0000 (20:53 +0300)]
Fix minor typos in Whatsnew

5 years agoAnnounce the change in the CancelledError inheritance (GH-16730)
Phil Jones [Sat, 12 Oct 2019 17:46:13 +0000 (17:46 +0000)]
Announce the change in the CancelledError inheritance (GH-16730)

This is a fairly noticeable change that requires adjustments in
existing asyncio code. It should therefore be announced.

5 years agobpo-35800: Deprecate smtpd.MailmanProxy (GH-11675)
Samuel Colvin [Sat, 12 Oct 2019 17:24:26 +0000 (18:24 +0100)]
bpo-35800: Deprecate smtpd.MailmanProxy (GH-11675)

Since `smtpd.MailmanProxy` is already broken, it is not formally deprecated in 3.9. It will be removed in 3.10.

https://bugs.python.org/issue35800

5 years agobpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of...
Abhilash Raj [Sat, 12 Oct 2019 05:41:35 +0000 (22:41 -0700)]
bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15522)" (GH-16724)

This reverts commit 87bd2071c756188b6cd577889fb1682831142ceb.

https://bugs.python.org/issue38449

5 years agobpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536)
Ruediger Pluem [Fri, 11 Oct 2019 13:36:50 +0000 (15:36 +0200)]
bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536)

 pathfix.py: Assume all files that end on '.py' are Python scripts when working recursively.

5 years agobpo-38442: Remove an execution bit from Doc/whatsnew/3.8.rst. (GH-16715)
Serhiy Storchaka [Fri, 11 Oct 2019 08:44:42 +0000 (11:44 +0300)]
bpo-38442: Remove an execution bit from Doc/whatsnew/3.8.rst. (GH-16715)

5 years agoFix strict-aliasing rules errors on gcc 4.8.5. (GH-16714)
Dong-hee Na [Fri, 11 Oct 2019 08:43:11 +0000 (17:43 +0900)]
Fix strict-aliasing rules errors on gcc 4.8.5. (GH-16714)

5 years agoTypo fix: "throuhgh" should be "through". (GH-16704)
Hansraj Das [Fri, 11 Oct 2019 03:43:13 +0000 (09:13 +0530)]
Typo fix: "throuhgh" should be "through". (GH-16704)

5 years agodocs: Add asyncio source code links (GH-16640)
Kyle Stanley [Thu, 10 Oct 2019 23:18:46 +0000 (19:18 -0400)]
docs: Add asyncio source code links (GH-16640)

5 years agobpo-38437: Activate GC_DEBUG when PY_DEBUG is set (GH-16707)
Pablo Galindo [Thu, 10 Oct 2019 21:45:17 +0000 (22:45 +0100)]
bpo-38437: Activate GC_DEBUG when PY_DEBUG is set (GH-16707)

5 years agoRemove AppVeyor badge now that we don't use it in the CI anymore (GH-16708)
Pablo Galindo [Thu, 10 Oct 2019 21:39:15 +0000 (22:39 +0100)]
Remove AppVeyor badge now that we don't use it in the CI anymore (GH-16708)

5 years agobpo-38282: Rewrite getsockaddrarg() helper function (GH-16698)
Victor Stinner [Thu, 10 Oct 2019 19:30:20 +0000 (21:30 +0200)]
bpo-38282: Rewrite getsockaddrarg() helper function (GH-16698)

Rewrite getsockaddrarg() helper function of socketmodule.c (_socket
module) to prevent a false alarm when compiling codde using GCC with
_FORTIFY_SOURCE=2. Pass a pointer of the sock_addr_t union, rather
than passing a pointer to a sockaddr structure.

Add "struct sockaddr_tipc tipc;" to the sock_addr_t union.

5 years agoRe-enable the OverflowError test for test_truediv on test_complex (GH-16591)
Dong-hee Na [Thu, 10 Oct 2019 16:23:36 +0000 (01:23 +0900)]
Re-enable the OverflowError test for test_truediv on test_complex (GH-16591)

5 years agobpo-38353: Fix typos in calculate_argv0_path_framework() (GH-16695)
Victor Stinner [Thu, 10 Oct 2019 13:42:30 +0000 (15:42 +0200)]
bpo-38353: Fix typos in calculate_argv0_path_framework() (GH-16695)

bpo-38353, bpo-38429: Fix typos introduced by commit
c02b41b1fb115c87693530ea6a480b2e15460424 in
calculate_argv0_path_framework() of getpath.c.

5 years agobpo-32996: Documentation fix-up. (GH-16646)
M. Eric Irrgang [Thu, 10 Oct 2019 11:11:33 +0000 (14:11 +0300)]
bpo-32996: Documentation fix-up. (GH-16646)

PR #4906 changed the typing.Generic class hierarchy, leaving an
outdated comment in the library reference. User-defined Generic ABCs now
must get a abc.ABCMeta metaclass from something other than typing.Generic
inheritance.

5 years agobpo-38425: Fix ‘res’ may be used uninitialized warning (GH-16688)
Dong-hee Na [Thu, 10 Oct 2019 07:41:26 +0000 (16:41 +0900)]
bpo-38425: Fix ‘res’ may be used uninitialized warning (GH-16688)

5 years agobpo-38109: Add missing constants to Lib/stat.py (GH-16665)
Ronan Lamy [Thu, 10 Oct 2019 07:34:46 +0000 (09:34 +0200)]
bpo-38109: Add missing constants to Lib/stat.py (GH-16665)

Add missing stat.S_IFDOOR, stat.S_IFPORT, stat.S_IFWHT,
stat.S_ISDOOR, stat.S_ISPORT, and stat.S_ISWHT values to
the Python implementation of the stat module.

5 years agobpo-38392: Only declare visit_validate() if Py_DEBUG is defined (GH-16689)
Victor Stinner [Thu, 10 Oct 2019 07:32:13 +0000 (09:32 +0200)]
bpo-38392: Only declare visit_validate() if Py_DEBUG is defined (GH-16689)

bpo-38392, bpo-38426: Fix a compiler warning in gcmodule.c.

Fix also a typo in PYMEM_DEADBYTE macro comment.

5 years agobpo-38409: Fix grammar in str.strip() docstring (GH-16682)
Zachary Ware [Wed, 9 Oct 2019 21:09:00 +0000 (16:09 -0500)]
bpo-38409: Fix grammar in str.strip() docstring (GH-16682)

5 years agobpo-38379: don't claim objects are collected when they aren't (#16658)
Tim Peters [Wed, 9 Oct 2019 17:37:30 +0000 (12:37 -0500)]
bpo-38379:  don't claim objects are collected when they aren't (#16658)

* bpo-38379:  when a finalizer resurrects an object,
nothing is actually collected in this run of gc.
Change the stats to relect that truth.

5 years agoTypo fix: "empy" should be "empty". (GH-16666)
Hansraj Das [Wed, 9 Oct 2019 02:24:02 +0000 (07:54 +0530)]
Typo fix: "empy" should be "empty". (GH-16666)

5 years agocloses bpo-36161: Use thread-safe ttyname_r instead of ttyname. (GH-14868)
Antonio Gutierrez [Wed, 9 Oct 2019 02:19:48 +0000 (04:19 +0200)]
closes bpo-36161: Use thread-safe ttyname_r instead of ttyname. (GH-14868)

Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
5 years agobpo-38368: Added fix for ctypes crash when handling arrays in structs… (GH-16589)
Vinay Sajip [Tue, 8 Oct 2019 20:59:06 +0000 (21:59 +0100)]
bpo-38368: Added fix for ctypes crash when handling arrays in structs… (GH-16589)

5 years agobpo-37531: regrtest ignores output on timeout (GH-16659)
Victor Stinner [Tue, 8 Oct 2019 16:45:43 +0000 (18:45 +0200)]
bpo-37531: regrtest ignores output on timeout (GH-16659)

bpo-37531, bpo-38207: On timeout, regrtest no longer attempts to call
`popen.communicate() again: it can hang until all child processes
using stdout and stderr pipes completes. Kill the worker process and
ignores its output.

Reenable test_regrtest.test_multiprocessing_timeout().

bpo-37531: Change also the faulthandler timeout of the main process
from 1 minute to 5 minutes, for Python slowest buildbots.

5 years agotest_dictviews: Add testcase for dictviews_sub (GH-16660)
Dong-hee Na [Tue, 8 Oct 2019 15:59:10 +0000 (00:59 +0900)]
test_dictviews: Add testcase for dictviews_sub (GH-16660)

5 years agobpo-38395: Fix ownership in weakref.proxy methods (GH-16632)
Pablo Galindo [Tue, 8 Oct 2019 15:30:50 +0000 (16:30 +0100)]
bpo-38395: Fix ownership in weakref.proxy methods (GH-16632)

The implementation of weakref.proxy's methods call back into the Python
API using a borrowed references of the weakly referenced object
(acquired via PyWeakref_GET_OBJECT). This API call may delete the last
reference to the object (either directly or via GC), leaving a dangling
pointer, which can be subsequently dereferenced.

To fix this, claim a temporary ownership of the referenced object when
calling the appropriate method. Some functions because at the moment they
do not need to access the borrowed referent, but to protect against
future changes to these functions, ownership need to be fixed in
all potentially affected methods.

5 years agobpo-38118: Ignore Valgrind false alarm in PyUnicode_Decode() (GH-16651)
Victor Stinner [Tue, 8 Oct 2019 13:42:17 +0000 (15:42 +0200)]
bpo-38118: Ignore Valgrind false alarm in PyUnicode_Decode() (GH-16651)

Valgrind emits "Conditional jump or move depends on uninitialised
value(s)" false alarms on GCC builtin strcmp() function. The GCC code
is correct.

Valgrind bug: https://bugs.kde.org/show_bug.cgi?id=264936

5 years agobpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644)
Serhiy Storchaka [Tue, 8 Oct 2019 13:30:17 +0000 (16:30 +0300)]
bpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644)

5 years agobpo-38405: Make nested subclasses of typing.NamedTuple pickleable. (GH-16641)
Serhiy Storchaka [Tue, 8 Oct 2019 13:29:52 +0000 (16:29 +0300)]
bpo-38405: Make nested subclasses of typing.NamedTuple pickleable. (GH-16641)

5 years agobpo-36698: IDLE no longer fails when write non-encodable characters to stderr. (GH...
Serhiy Storchaka [Tue, 8 Oct 2019 11:32:25 +0000 (14:32 +0300)]
bpo-36698: IDLE no longer fails when write non-encodable characters to stderr. (GH-16583)

It now escapes them with a backslash, as the regular Python interpreter.
Added the "errors" field to the standard streams.

5 years agobpo-38371: Tkinter: deprecate the split() method. (GH-16584)
Serhiy Storchaka [Tue, 8 Oct 2019 11:31:35 +0000 (14:31 +0300)]
bpo-38371: Tkinter: deprecate the split() method. (GH-16584)

5 years agobpo-33714: Output an exception raised in module's m_clear(). (GH-16592)
Serhiy Storchaka [Tue, 8 Oct 2019 10:46:17 +0000 (13:46 +0300)]
bpo-33714: Output an exception raised in module's m_clear(). (GH-16592)

It is similar to the more general code in the gc module, but
here we know the name of the module.

https://bugs.python.org/issue33714

Automerge-Triggered-By: @encukou
5 years agoFix typo in _warnings.warn_explicit() docstring (GH-16625)
Hansraj Das [Tue, 8 Oct 2019 08:56:07 +0000 (14:26 +0530)]
Fix typo in _warnings.warn_explicit() docstring (GH-16625)

5 years agocloses bpo-38402: Check error of primitive crypt/crypt_r. (GH-16599)
Antonio Gutierrez [Tue, 8 Oct 2019 04:22:17 +0000 (06:22 +0200)]
closes bpo-38402: Check error of primitive crypt/crypt_r. (GH-16599)

Checks also for encryption algorithms methods not supported in different
OSs.

Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
5 years agobpo-38070: Enhance visit_decref() debug trace (GH-16631)
Victor Stinner [Tue, 8 Oct 2019 00:37:38 +0000 (02:37 +0200)]
bpo-38070: Enhance visit_decref() debug trace (GH-16631)

subtract_refs() now pass the parent object to visit_decref() which
pass it to _PyObject_ASSERT(). So if the "is freed" assertion fails,
the parent is used in debug trace, rather than the freed object. The
parent object is more likely to contain useful information. Freed
objects cannot be inspected are are displayed as "<object at xxx is
freed>" with no other detail.

5 years agobpo-38400 Don't check for NULL linked list pointers in _PyObject_IsFreed (GH-16630)
Pablo Galindo [Mon, 7 Oct 2019 23:43:14 +0000 (00:43 +0100)]
bpo-38400 Don't check for NULL linked list pointers in _PyObject_IsFreed (GH-16630)

Some objects like Py_None are not initialized with conventional means
that prepare the circular linked list pointers, leaving them unlinked
from the rest of the objects. For those objects, NULL pointers does
not mean that they are freed, so we need to skip the check in those
cases.

5 years agobpo-38392: PyObject_GC_Track() validates object in debug mode (GH-16615)
Victor Stinner [Mon, 7 Oct 2019 22:09:31 +0000 (00:09 +0200)]
bpo-38392: PyObject_GC_Track() validates object in debug mode (GH-16615)

In debug mode, PyObject_GC_Track() now calls tp_traverse() of the
object type to ensure that the object is valid: test that objects
visited by tp_traverse() are valid.

Fix pyexpat.c: only track the parser in the GC once the parser is
fully initialized.

5 years agobpo-36389: Add newline to _PyObject_AssertFailed() (GH-16629)
Victor Stinner [Mon, 7 Oct 2019 21:44:05 +0000 (23:44 +0200)]
bpo-36389: Add newline to _PyObject_AssertFailed() (GH-16629)

Add a newline between the verbose object dump and the Py_FatalError()
logs for readability.

5 years agobpo-38344: Fix syntax in activate.bat (GH-16533)
James Abel [Mon, 7 Oct 2019 21:07:19 +0000 (14:07 -0700)]
bpo-38344: Fix syntax in activate.bat (GH-16533)

5 years agobpo-38294: Add list of no-longer-escaped chars to re.escape documentation. (GH-16442)
Ricardo Bánffy [Mon, 7 Oct 2019 20:54:35 +0000 (21:54 +0100)]
bpo-38294: Add list of no-longer-escaped chars to re.escape documentation. (GH-16442)

Prior to 3.7, re.escape escaped many characters that don't have
special meaning in Python, but that use to require escaping in other
tools and languages. This commit aims to make it clear which characters
were, but are no longer escaped.

5 years agobpo-36389: Fix _PyBytesWriter in release mode (GH-16624)
Victor Stinner [Mon, 7 Oct 2019 20:31:42 +0000 (22:31 +0200)]
bpo-36389: Fix _PyBytesWriter in release mode (GH-16624)

Fix _PyBytesWriter API when Python is built in release mode with
assertions.

5 years agobpo-36389: _PyObject_CheckConsistency() available in release mode (GH-16612)
Victor Stinner [Mon, 7 Oct 2019 16:42:01 +0000 (18:42 +0200)]
bpo-36389: _PyObject_CheckConsistency() available in release mode (GH-16612)

bpo-36389, bpo-38376: The _PyObject_CheckConsistency() function is
now also available in release mode. For example, it can be used to
debug a crash in the visit_decref() function of the GC.

Modify the following functions to also work in release mode:

* _PyDict_CheckConsistency()
* _PyObject_CheckConsistency()
* _PyType_CheckConsistency()
* _PyUnicode_CheckConsistency()

Other changes:

* _PyMem_IsPtrFreed(ptr) now also returns 1 if ptr is NULL
  (equals to 0).
* _PyBytesWriter_CheckConsistency() now returns 1 and is only used
  with assert().
* Reorder _PyObject_Dump() to write safe fields first, and only
  attempt to render repr() at the end.

5 years agobpo-36356: Fix memory leak in _asynciomodule.c (GH-16598)
Ben Harper [Mon, 7 Oct 2019 16:19:58 +0000 (12:19 -0400)]
bpo-36356: Fix memory leak in _asynciomodule.c (GH-16598)

5 years agoFix a compile warning in selectmodule.c. (GH-16617)
Xiang Zhang [Mon, 7 Oct 2019 12:01:54 +0000 (20:01 +0800)]
Fix a compile warning in selectmodule.c. (GH-16617)

5 years agobpo-38391: Fixing a typo for Py_DECREF (GH-16616)
Krishna Oza [Mon, 7 Oct 2019 11:57:45 +0000 (17:27 +0530)]
bpo-38391: Fixing a typo for Py_DECREF (GH-16616)