Commit Graph

105975 Commits

Author SHA1 Message Date
Miss Islington (bot) 267afc2ab2
bpo-40094: Enhance os.WIFEXITED documentation (GH-19244) (GH-19277)
(cherry picked from commit 7c72383f95)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-04-02 01:26:55 +02:00
Miss Islington (bot) fc03640922
bpo-38527: fix configure script for Solaris (GH-16845)
On Solaris, the regular "grep" command may be an old version that fails to search a binary file. We need to use the correct command (ggrep, in our case), which is found by the configure script earlier.

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 5dd836030e)

Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
2020-04-01 08:38:17 -07:00
Miss Islington (bot) f971c8c0a0
bpo-40121: Fix exception type in test (GH-19267)
(cherry picked from commit 3ef4a7e5a7)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-04-01 06:02:55 -07:00
Miss Islington (bot) 6acafee247
Handle when IOCTL_VM_SOCKETS_GET_LOCAL_CID does not exist in "socket" (GH-19270)
Running `test_socket` or anything that depends on it (like python -m
test.pythoninfo) crashes if IOCTL_VM_SOCKETS_GET_LOCAL_CID does not
exist in the socket module.

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 6eb9619c88)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-03-31 18:25:34 -07:00
Victor Stinner 40e1b04e38
Document most common signals (GH-19245) (GH-19257)
Document individual signals (only the most common signals):
description, default action, availability.

(cherry picked from commit 400e1dbcad)
2020-03-31 19:44:28 +02:00
Miss Islington (bot) 4ced9a7611
bpo-40019: Skip test_gdb if Python was optimized (GH-19081)
test_gdb now skips tests if it detects that gdb failed to read debug
information because the Python binary is optimized.
(cherry picked from commit 7bf069b611)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-03-31 10:27:41 -07:00
Miss Islington (bot) fb6e04b5f1
closes bpo-40125: Update multissltests.py to use OpenSSL 1.1.1f. (GH-19248)
(cherry picked from commit cd16661f90)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2020-03-31 09:08:49 -07:00
Miss Islington (bot) 572ef74769
bpo-39689: Do not use native packing for format "?" with standard size (GH-18969)
(cherry picked from commit 472fc843ca)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
2020-03-31 05:26:05 -07:00
Miss Islington (bot) 6a0ee60db4
bpo-40121: Fixes audit event raised on creating a new socket (GH-19238)
(cherry picked from commit 63ba5cccf4)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-03-31 04:57:06 -07:00
Miss Islington (bot) 6c9a2a831e
fix comma location in various places (GH-19233)
(cherry picked from commit c49016e67c)

Co-authored-by: Mathieu Dupuy <deronnax@users.noreply.github.com>
2020-03-30 14:34:31 -07:00
Miss Islington (bot) 8c3ab189ae
bpo-38002: Use False/True for IDLE pyshell bools (GH-19203)
Change 0/1 assignments to 'executing', 'canceled', 'reading', 'endoffile'.
These are not used outside of pyshell. Other bools already use False/True.
Add comment about int needed for Windows call.
Remove self.more, unused in idlelib and code.InteractiveInterpreter.
The latter uses 'more' as a local.
(cherry picked from commit 34a49aa3e4)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-03-28 10:16:03 -07:00
Miss Islington (bot) bb852266b7
bpo-40045: Make "dunder" method documentation easier to locate (GH-19153) (GH-19198)
* issue 40045

* Update lexical_analysis.rst

Make "dunder" method documentation easier(GH-19153)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
(cherry picked from commit 5f9c131c09)

Co-authored-by: Javad Mokhtari <javadmokhtari@outlook.com>

Co-authored-by: Javad Mokhtari <javadmokhtari@outlook.com>
2020-03-27 16:15:11 -03:00
Miss Islington (bot) 9c5c497ac1
bpo-38237: Use divmod for positional arguments whatsnew example (GH-19171)
(cherry picked from commit 5a58c5280b)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
2020-03-27 09:45:05 -07:00
Miss Islington (bot) 8dad09a224
bpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related methods (GH-19158) (#19164)
(cherry picked from commit 302e5a8f79)

Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>

Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>
2020-03-26 10:15:05 -07:00
Miss Islington (bot) b05fbe9f37
bpo-1812: Fix newline conversion when doctest.testfile loads from a package whose loader has a get_data method (GH-17385)
This pull request fixes the newline conversion bug originally reported in bpo-1812. When that issue was originally submitted, the open builtin did not default to universal newline mode; now it does, which makes the issue fix simpler, since the only code path that needs to be changed is the one in doctest._load_testfile where the file is loaded from a package whose loader has a get_data method.
(cherry picked from commit e0b8101492)

Co-authored-by: Peter Donis <peterdonis@alum.mit.edu>
2020-03-26 09:18:52 -07:00
Miss Islington (bot) 96686c761d
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)
Co-authored-by: furkanonder <furkantahaonder@gmail.com>
(cherry picked from commit 59c644eaa7)

Co-authored-by: Lahfa Samy <lahfa121999@gmail.com>
2020-03-26 08:00:46 -07:00
Miss Islington (bot) 686d508c26
bpo-40016: re docstring: Clarify relationship of inline and argument flags (GH-19078)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 89a2209ae6)

Co-authored-by: Ram Rachum <ram@rachum.com>
2020-03-25 12:01:31 -07:00
Miss Islington (bot) 2227c1a4ca
bpo-40013: Clarify documentation of restval in csv.DictReader (GH-19099) (GH-19141)
(cherry picked from commit 4b3252cb76)


Co-authored-by: Juhana Jauhiainen <juhana.jauhiainen@gmail.com>
2020-03-25 12:30:53 +05:30
Miss Islington (bot) af6fd1faa6
bpo-40014: Fix os.getgrouplist() (GH-19126)
Fix os.getgrouplist(): if getgrouplist() function fails because the
group list is too small, retry with a larger group list.

On failure, the glibc implementation of getgrouplist() sets ngroups
to the total number of groups. For other implementations, double the
group list size.
(cherry picked from commit f5c7cabb2b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-03-24 10:40:31 -07:00
Miss Islington (bot) 8cd48b60fd
Clarify a guarantee of the logging module. (GH-19132)
When no additional arguments are passed to logging.debug() and related
methods, no % operation is performed on the passed in message.
(cherry picked from commit 9b8e74ca77)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2020-03-24 09:54:40 -07:00
Victor Stinner e97c8b0688
bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120) (GH-19136)
PyThreadState.frame is a borrowed reference, not a strong reference:
PyThreadState_Clear() must not call Py_CLEAR(tstate->frame).

Remove test_threading.test_warnings_at_exit(): we cannot warranty
that the Python thread state of daemon threads is cleared in a
reliable way during Python shutdown.

(cherry picked from commit 5804f878e7)
2020-03-24 17:12:19 +01:00
Miss Islington (bot) 21bee0bd71
bpo-40014: Fix os.getgrouplist() on macOS (GH-19118)
On macOS, getgrouplist() returns a non-zero value without setting
errno if the group list is too small. Double the list size and call
it again in this case.
(cherry picked from commit 8ec7370c89)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-03-23 12:18:41 -07:00
Miss Islington (bot) c959fa9353
bpo-22490: Remove __PYVENV_LAUNCHER__ from environment during launch (GH-9516) (GH-19110)
* bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS

This changeset removes the environment varialbe "__PYVENV_LAUNCHER__"
during interpreter launch as it is only needed to communicate between
the stub executable in framework installs and the actual interpreter.

Leaving the environment variable present may lead to misbehaviour when
launching other scripts.

* Actually commit the changes for issue 22490...

* Correct typo

Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>

* Run make patchcheck

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
(cherry picked from commit 044cf94f61)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-03-22 14:56:26 -04:00
Miss Islington (bot) 687f5921a4
bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. (GH-18942)
(cherry picked from commit b146568dfc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-03-21 07:32:25 -07:00
Victor Stinner ba26bf3094
[3.8] bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060) (GH-19090)
test_site.test_startup_imports() is now skipped if a path of sys.path
contains a .pth file.

Sort test_site imports.
2020-03-20 15:10:14 +01:00
Miss Islington (bot) 29723368e7
bpo-39797 Changes to socketserver.BaseServer's shutdown() method. (GH-18929)
Automerge-Triggered-By: @ned-deily
(cherry picked from commit 2de7ac9798)

Co-authored-by: amaajemyfren <32741226+amaajemyfren@users.noreply.github.com>
2020-03-20 01:08:52 -07:00
Miss Islington (bot) 2477aed12d
Fix "versionchanged" for pow named arguments (GH-19042) (GH-19079)
The ability to use named arguments in "pow" was introduced in Python 3.8, not Python 3.9. See https://bugs.python.org/issue38237
(cherry picked from commit c691f20952)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2020-03-19 18:35:02 +00:00
Miss Islington (bot) ec8a973f7c
bpo-39562: Allow executing asynchronous comprehensions in the asyncio REPL (GH-18968)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 9052f7a41b)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
2020-03-19 04:54:16 -07:00
Miss Islington (bot) da1fe768e5
bpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026)
PyObject_GenericSetDict() takes three arguments, not two.
(cherry picked from commit a45b695b9f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-03-17 01:25:34 -07:00
Victor Stinner 046255c40f
bpo-35370: PyEval_SetTrace() logs unraisable error (GH-18977) (GH-19029)
If PySys_Audit() fails in PyEval_SetProfile() or PyEval_SetTrace(),
log the error as an unraisable exception.

(cherry picked from commit f6a5850782)
2020-03-16 18:18:20 +01:00
Miss Islington (bot) 7f5302fed4
bpo-39360: Ensure all workers exit when finalizing a multiprocessing Pool (GH-19009)
When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads.

This commit moves the notification to the _terminate_pool function so is called from both code paths.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit ac10e0c932)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
2020-03-15 14:26:43 -07:00
Miss Islington (bot) 890dcfe403
Fix a possible refleak in tupleobject.c (GH-19018)
(cherry picked from commit c81609e44e)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2020-03-15 12:55:39 -07:00
Miss Islington (bot) f7e32fcbd6
bpo-39965: Correctly raise SyntaxError if await is used outside async functions when PyCF_ALLOW_TOP_LEVEL_AWAIT is set (GH-19010)
(cherry picked from commit 90235810ec)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-03-14 21:46:26 -07:00
Miss Islington (bot) 4abe77c725
bpo-39869: Fix typo in 'Instance objects' section. (GH-18889)
(cherry picked from commit e5e56328af)

Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
2020-03-14 15:13:18 -07:00
Miss Islington (bot) 9c63cd8c63
Link to list of keywords in the laguage reference (GH-18024)
(cherry picked from commit 33238ec2af)

Co-authored-by: Борис Верховский <boris.verk@gmail.com>
2020-03-14 12:14:57 -07:00
Miss Islington (bot) ff69c9d12c
bpo-38576: Disallow control characters in hostnames in http.client (GH-18995)
Add host validation for control characters for more CVE-2019-18348 protection.
(cherry picked from commit 9165addc22)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
2020-03-14 12:13:32 -07:00
Miss Islington (bot) a927e91186
bpo-39677: dis: rename the operand of MAKE_FUNCTION from `argc` to `flags` for 3.6+ (GC-18550)
(cherry picked from commit 6672c16b1d)

Co-authored-by: Taine Zhao <twshere@outlook.com>
2020-03-14 07:45:23 -07:00
Miss Islington (bot) 9644702936
bpo-39582: ossaudiodev module update helpers signature for ioctl calls. (GH-18412)
(cherry picked from commit b81f40f0ad)

Co-authored-by: David CARLIER <devnexen@gmail.com>
2020-03-14 07:43:53 -07:00
Mark Dickinson e634a8ac1f
[3.8] bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806) (GH-18989)
In math_2(), the first PyFloat_AsDouble() call should be checked
for failure before the second call.

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>.
(cherry picked from commit 5208b4b379)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-03-14 11:38:52 +00:00
Miss Islington (bot) f6bdac1bf7
bpo-39915: Ensure await_args_list is updated according to the order in which coroutines were awaited (GH-18927)
Create call objects with awaited arguments instead of using call_args which has only last call value.
(cherry picked from commit e553f204bf)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
2020-03-14 07:12:57 +00:00
Karthikeyan Singaravelan d3af92ecc2
[3.8] Doc: Fix grammar in PyErr_ResourceWarning (GH-18879) (GH-18976)
(cherry picked from commit fdcd53f)

Co-authored-by: Daniel Hahler <git@thequod.de>
2020-03-13 21:02:38 +05:30
Miss Islington (bot) f8ce3e2dae
bpo-39689: Do not test undefined casts to _Bool (GH-18964) (#18966)
- When casting to _Bool, arrays should only contain zeros or ones.
(cherry picked from commit 1ae9cde4b2)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
2020-03-12 19:56:18 +01:00
Miss Islington (bot) 35ae5d916c
bpo-39930: Fix MSBuild detection for Build Tools (GH-18938)
Ensure we detect Build Tools installs using the newer logic, and skip looking in the registry for VS 2017.
(cherry picked from commit 894adc18b4)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-03-12 09:47:53 -07:00
Victor Stinner 03ac090c5f
bpo-39884: Add method name in "bad call flags" error (GH-18944) (GH-18956)
PyDescr_NewMethod() and PyCFunction_NewEx() now include the method
name in the SystemError "bad call flags" error message to ease debug.

(cherry picked from commit c7d2d69d95)
2020-03-12 13:37:02 +01:00
Serhiy Storchaka ab9c729121
[3.8] bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called with invalid base. (GH-18863). (GH-18954)
(cherry picked from commit e5ccc94bbb)
2020-03-12 09:30:56 +02:00
Miss Islington (bot) 99ef1ac9a7
Fix syntax error in an example in the ast documentation and sync docstrings (GH-18946)
(cherry picked from commit c00c86b904)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-03-11 18:06:53 -07:00
Miss Islington (bot) 60b1b5ac56
bpo-39847: EnterNonRecursiveMutex() uses GetTickCount64() (GH-18780)
The 32-bit (49-day) TickCount relied on in EnterNonRecursiveMutex can overflow
in the gap between the 'target' time and the 'now' time WaitForSingleObjectEx
returns, causing the loop to think it needs to wait another 49 days. This is
most likely to happen when the machine is hibernated during
WaitForSingleObjectEx.

This makes acquiring a lock/event/etc from the _thread or threading module
appear to never timeout.

Replace with GetTickCount64 - this is OK now Python no longer supports XP which
lacks it, and is in use for time.monotonic().

Co-authored-by: And Clover <and.clover@bromium.com>
(cherry picked from commit 64838ce717)

Co-authored-by: bobince <and+github@doxdesk.com>
2020-03-11 16:57:16 -07:00
Miss Islington (bot) cd07b4da65
bpo-39520: Fix un-parsing of ext slices with no dimensions (GH-18304)
(cherry picked from commit 185903de12)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
2020-03-11 13:18:01 -07:00
Miss Islington (bot) c22879914b
bpo-39916: Use os.scandir() as context manager in Path.glob(). (GH-18880)
(cherry picked from commit 704e2065f8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-03-11 10:07:04 -07:00
Miss Islington (bot) 17571c54e0
bpo-39930: Convert error to warning for more silent failure (GH-18921)
Makes it an error to create a layout without vcruntime DLL
(cherry picked from commit fde44ae6d0)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-03-11 07:31:07 -07:00