Commit Graph

103675 Commits

Author SHA1 Message Date
Miss Islington (bot) 97e92dbba9
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:12 -07:00
Miss Islington (bot) 34f85af322
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:12:58 -07:00
Miss Islington (bot) 725cbce250
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:11 -07:00
Miss Islington (bot) 148786a2cd
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:47 -07:00
Mark Dickinson 4dcfe5f2e4
[3.7] bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806) (GH-18990)
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:51:53 +00:00
Miss Islington (bot) 962c7220cf
Doc: Fix grammar in PyErr_ResourceWarning (GH-18879) (GH-18963)
(cherry picked from commit fdcd53fe1a)

Co-authored-by: Daniel Hahler <git@thequod.de>
2020-03-13 21:03:04 +05:30
Steve Dower c05e491a69
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.
2020-03-13 11:00:18 +00:00
Miss Islington (bot) 636eecbbbb
bpo-39689: Do not test undefined casts to _Bool (GH-18964) (#18965)
- 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:55:36 +01:00
bobince feaf0c3789
[3.7] bpo-39847: EnterNonRecursiveMutex() uses GetTickCount64() (GH-18780) (GH-18959)
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 64838ce)

Co-authored-by: bobince <and+github@doxdesk.com>
2020-03-12 07:28:31 -07:00
Victor Stinner 6a12676b19
bpo-39884: Add method name in "bad call flags" error (GH-18944) (GH-18957)
_PyMethodDef_RawFastCallDict() and _PyMethodDef_RawFastCallKeywords()
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:08 +01:00
Serhiy Storchaka 6f4e7fcfca
[3.7] bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called with invalid base. (GH-18863). (GH-18955)
(cherry picked from commit e5ccc94bbb)
2020-03-12 10:15:17 +02:00
Miss Islington (bot) 500999fbdf
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:05:45 -07:00
Miss Islington (bot) d0837d2af2
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:16:36 -07:00
Miss Islington (bot) b1b1d5ff11
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:00:09 -07:00
Miss Islington (bot) 3136f6f287
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:30:25 -07:00
Steve Dower eede148296
bpo-39930: Ensure vcruntime140.dll is included in all Windows packages (GH-18918)
Also adds GitHub CI test for Windows installer changes
2020-03-11 13:11:03 +00:00
Miss Islington (bot) 76a69ddbb6
Fix download.html (GH-18902)
`<tt>` is not allowed.

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 39c34933fc)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-03-10 21:40:17 -07:00
Miss Islington (bot) 8d5c958dde
bpo-38662: ensurepip invokes pip via runpy (GH-18901)
The ensurepip module now invokes pip via the runpy module.
Hence it is no longer tightly coupled with the internal API of the bundled
pip version, allowing easier updates to a newer pip version both
internally and for distributors.

This way, any changes to the internal pip API won't mean ensurepip needs to be
changed as well. Also, distributors can update their pip wheels independent on
CPython release schedule.

Co-Authored-By: Pradyun Gedam <pradyunsg@gmail.com>
Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
(cherry picked from commit 88f82b2b9e)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2020-03-10 14:34:51 -07:00
Miss Islington (bot) f0fcf16902
tracemalloc: 'pretty top' example no longer changes the filename (GH-18903)
I've used this recipe a couple times and the filename editing has always
been less than useful and something I've removed. This is because many
modules end up losing which package they are located in, e.g. `util/date.py`.
(cherry picked from commit d06eec218e)

Co-authored-by: Adam Johnson <me@adamj.eu>
2020-03-10 11:24:16 -07:00
Miss Islington (bot) 5b29a82b13
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-10 07:25:42 -07:00
Dong-hee Na 633957d7e3
[3.7] bpo-39828: Fix json.tool to catch BrokenPipeError (GH-18779). (GH-18895)
(cherry picked from commit 700cb58730)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

Automerge-Triggered-By: @vstinner
2020-03-10 01:30:49 -07:00
Ned Deily ae0bafc76d
Post release updates 2020-03-10 03:47:29 -04:00
Ned Deily dcecb70e4e Python 3.7.7
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAl5nL78ACgkQLTR+pqpl
 Qh16pQ/9FYdkJP5LMdUWEaDjmEM6ecvVa97QviK+c1kYx4W9yC7nkh49ciUaLn58
 6PpSrhbxfjyvcM7JDVnjKXEyTLX/rT6BHQruwr8QFe40xVFXxrS/IH1yihBmGCNo
 1ADZky82WtOojaBRS/ubHuohtMYF8749WU0OqSQbQ5nZI8su/Nr3fAhbI/qqTv0P
 5P2wAgNAxlG8/mSmti1PSX1NwgtpKL7Kfqni+v2LJycfOhhjO/RqtXhmF6synUL+
 JsB8SsDgxueeD1sSpLFSogzjfpOnSPvlWk6hCnfy0ZdzgGJn4CBtSNdlEt2J4SFh
 PZCzqaMKkf9oF+i6WZd2RGEkzVeeoBIieXB2HNtQO1SlcE5JNUTxbUQS9BPdEZUM
 RJQ5JrK323xUCcrxsxrhwdPe7qh9ZGO3w54eycK715jLvEMScsByB50+bYt7RErp
 WMB1JYLygUl4nUqxrvZdeZRJeXr2KT7qSyd4JTFef8xuzDTCxwfyh55MyhBA41uB
 J9guTqnimIpnmoFKA8M9CWOE97i4azK2LCoLvj2dV1/GGaGeaa/HU2Z6nP5Vinb6
 WB9CjumrkbxsTZPjHMjZ9mmbkni/YZ9xQ2EKXHqimpcgwkIrabQ9Gw7oiCy6Uy2m
 225+/rNFuhaZ2gamNq5vandzEESRL3hrB3yLd9+1/wLBV9k9IPA=
 =Jtfz
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAl5nRaEACgkQLTR+pqpl
 Qh2TlA/9F55wLizlg4HvtnPPQhhvY7cPbyECfs22xh7Hje9bLxTKxeIykktEpUDD
 PpeqpbpMsKOeiurRp5saTXWgwVOPwtoe7kPUdChUpy/P+IoAPKCHkpAyUPKGFuoy
 YUWq20m2+rpY00FqmOaLhoty85R1TCoNB4k2Atk7AqfUyrUfupmUvWtSx+gHZbkJ
 jqHf6VeD6qLWjvdqF8PMGstDmvCmWjn7SKs++YS1qS/9mgfQrPFx/yYG0Qgkmcui
 wutEGFwoXC9OPE9f3rUTQ9EJTOh/RUN7SGtnS3+Yr3d0XUKlAsoPZ42q7fyRe3/T
 zR56X8ThiN5Nq82sMEp42uXE6cHuXX7P+MO61Add5tDPNznqEMUH84y/o7vo6hLK
 kznfw1h4ds5Hq2WlA5SdGRmqR/moBQ7bH9JqihXiuNmEo3wLMvyfmp6f7uH2DYm4
 2b8WJjWTWN57rJJY+Ua3to1VphPBp4wYyLVdNK/wVouBEyY28hVhSLcgm/0Y6i9f
 8BcpXiqFT+gkrzAnUqRkEQNeZopGTKr4zVIKlZbglR0wM4ACm2Ndf0f0MvVu6Ut1
 5bBKAq/hIuTSnIx8ZfLh7BARc016qnBw+qXzMnTYDqDzkidlUHGxMal0aD5TCHlT
 poam44FgQSNxvO6SGjRUvxFH8Wg7No2e5ahoosWsCrellp6YFoI=
 =QaFR
 -----END PGP SIGNATURE-----

Merge release engineering branch
2020-03-10 03:45:37 -04:00
Ned Deily d7c567b08f
3.7.7 2020-03-10 02:11:12 -04:00
Miss Islington (bot) e7ca2d3e6a
fix typo: add space (GH-18853)
Fix typo in cmdline.rst
Add space between the `-m` option and the module name (`timeit`).
(cherry picked from commit c580981ba0)

Co-authored-by: Julin S <48789920+ju-sh@users.noreply.github.com>
2020-03-10 01:49:00 -04:00
Miss Islington (bot) b092892f9a
bpo-39837: Disable macOS tests on Azure Pipelines (GH-18818)
(cherry picked from commit 31350f9af0)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-03-10 01:48:25 -04:00
Miss Islington (bot) 22448149a0
bpo-17422: slightly more precise language (GH-18682)
(cherry picked from commit e59334ebc9)

Co-authored-by: Caleb Donovick <cdonovick@users.noreply.github.com>
2020-03-10 01:48:00 -04:00
Miss Islington (bot) 1e85e1af01
IDLE doc: improve Startup failure subsection. (GH-18771)
Eliminate repeat of 'Options', reported by Jules Lasne, and improve wording elsewhere.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ce305d6410)

Co-authored-by: Jules Lasne (jlasne) <jules.lasne@gmail.com>
2020-03-10 01:47:21 -04:00
Miss Islington (bot) 7058d2d96c
bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. (GH-18786)
`list(sys.modules.items())` was apparently not immune to "dictionary
changed size during iteration" errors.

Tested internally using an integration test that has run into this a couple of times in the past two years.  With this patch applied, the test is no longer flaky.
(cherry picked from commit 85cf1d514b)

Co-authored-by: Gregory P. Smith <gps@google.com>
2020-03-10 01:46:59 -04:00
Miss Islington (bot) c157edb73b
[3.7] bpo-39808: Improve docs for pathlib.Path.stat() (GH-18719) (GH-18782)
(cherry picked from commit 67152d0ed6)


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

Automerge-Triggered-By: @brettcannon
2020-03-10 01:46:27 -04:00
Steve Dower 1ecdc9bd7f
Allow python_uwp.vcxproj to build with toolset v142 if present (GH-18777) 2020-03-10 01:46:07 -04:00
Ned Deily 8b9f713321
Update macOS installer ReadMe for 3.7.7. (GH-18775) 2020-03-10 01:45:48 -04:00
Ned Deily ba8c09b925
Post release updates 2020-03-10 01:40:00 -04:00
Miss Islington (bot) f8345358bc
bpo-27115: Use Query subclass for IDLE editor Goto (GH-18871)
Replace tkinter tkSimpleDialog.askinteger with a standard IDLE query dialog.
The new box checks for positivity before returning.
(cherry picked from commit 363fab83b8)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-03-09 16:45:37 -07:00
Miss Islington (bot) 1695836123
bpo-36184: Port python-gdb.py to FreeBSD (GH-18873)
python-gdb.py now checks for "take_gil" function name to check if a
frame tries to acquire the GIL, instead of checking for
"pthread_cond_timedwait" which is specific to Linux and can be a
different condition than the GIL.
(cherry picked from commit 6d0ee60740)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-03-09 11:51:43 -07:00
Pablo Galindo 2235e04170
[3.7] bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866) (GH-18877)
(cherry picked from commit 6012f30bef)
2020-03-09 14:47:50 +00:00
Miss Islington (bot) 80be9c344f
bpo-39903: Fix double decref in _elementtree.Element.__getstate__ (GH-18850)
(cherry picked from commit 88944a44aa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-03-09 05:53:29 -07:00
Miss Islington (bot) 9d5ed8355d
bpo-27115: Move IDLE Query error blanking (GH-18868)
Move required blanking of error text to non-overridden entry_ok().
(Omit news item.)
(cherry picked from commit e53a3932cb)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-03-08 22:54:31 -07:00
Miss Islington (bot) f9684d222e
bpo-39885: IDLE context menu clears selection (GH-18859)
Since clicking to get an IDLE context menu moves the cursor,
any text selection should be and now is cleared.
(cherry picked from commit 4ca060d8ad)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-03-08 12:46:38 -07:00
Miss Islington (bot) ec61f53243
bpo-39852: IDLE 'Go to line' deletes selection, updates status (GH-18801)
It appears standard that moving the text insert cursor away from a selection clears the
selection.  Clearing prevents accidental deletion of a possibly off-screen bit of text.
The update is for Ln and Col on the status bar.
(cherry picked from commit 2522db11df)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-03-08 11:50:34 -07:00
Miss Islington (bot) 516e6735b4
fix typo: add space (GH-18853)
Fix typo in cmdline.rst
Add space between the `-m` option and the module name (`timeit`).
(cherry picked from commit c580981ba0)

Co-authored-by: Julin S <48789920+ju-sh@users.noreply.github.com>
2020-03-08 10:57:11 -07:00
Serhiy Storchaka 89fabe51af
[3.7] bpo-39831: Fix a reference leak in PyErr_WarnEx(). (GH-18750). (GH-18765)
(cherry picked from commit 2d2f85517f)
2020-03-08 18:07:58 +02:00
Miss Islington (bot) cca0b31fb8
bpo-38894: Fix pathlib.Path.glob in the presence of symlinks and insufficient permissions (GH-18815)
Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
(cherry picked from commit eb7560a73d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-03-07 10:10:10 -08:00
Miss Islington (bot) 65b0310901
[3.8] bpo-39889: Fix unparse.py for subscript. (GH-18824). (GH-18826)
(cherry picked from commit c4928fc1a8)
(cherry picked from commit 92b72788ec)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-03-07 09:13:31 -08:00
Miss Islington (bot) 47b7c22704
bpo-39837: Disable macOS tests on Azure Pipelines (GH-18818)
(cherry picked from commit 31350f9af0)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-03-06 16:29:49 -08:00
Miss Islington (bot) f1b79645cf
bpo-17422: slightly more precise language (GH-18682)
(cherry picked from commit e59334ebc9)

Co-authored-by: Caleb Donovick <cdonovick@users.noreply.github.com>
2020-03-06 10:25:51 -08:00
Miss Islington (bot) 3c9cec0b2e
IDLE doc: improve Startup failure subsection. (GH-18771)
Eliminate repeat of 'Options', reported by Jules Lasne, and improve wording elsewhere.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ce305d6410)

Co-authored-by: Jules Lasne (jlasne) <jules.lasne@gmail.com>
2020-03-05 17:33:48 -08:00
Miss Islington (bot) a12381233a
bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. (GH-18786)
`list(sys.modules.items())` was apparently not immune to "dictionary
changed size during iteration" errors.

Tested internally using an integration test that has run into this a couple of times in the past two years.  With this patch applied, the test is no longer flaky.
(cherry picked from commit 85cf1d514b)

Co-authored-by: Gregory P. Smith <gps@google.com>
2020-03-04 17:03:29 -08:00
Miss Islington (bot) 6bb67452d4
[3.7] bpo-39808: Improve docs for pathlib.Path.stat() (GH-18719) (GH-18782)
(cherry picked from commit 67152d0ed6)


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

Automerge-Triggered-By: @brettcannon
2020-03-04 15:17:39 -08:00
Steve Dower a39353efc1
Allow python_uwp.vcxproj to build with toolset v142 if present (GH-18777) 2020-03-04 19:46:50 +00:00