Commit Graph

23121 Commits

Author SHA1 Message Date
Miss Islington (bot) d50a070026
bpo-41774: Add programming FAQ entry (GH-22402)
In the "Sequences (Tuples/Lists)" section, add
"How do you remove multiple items from a list".
(cherry picked from commit 5b0181d1f6)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-28 22:11:06 -07:00
Miss Islington (bot) e4008404fb
bpo-40105: ZipFile truncate in append mode with shorter comment (GH-19337)
(cherry picked from commit ff9147d93b)

Co-authored-by: Jan Mazur <16736821+mzr@users.noreply.github.com>
2020-09-28 12:18:39 -07:00
Miss Islington (bot) 18e59f587b
bpo-41775: Make 'IDLE Shell' the shell title (GH-22399)
'Python Shell' may have contributed to some beginners confusing 'IDLE' with ' Python'.
(cherry picked from commit 05cc881cbc)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-24 13:08:06 -07:00
Thomas Grainger ae462297c0
[3.8] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (GH-21956) (#22398)
Closes bpo issue 41602.
(cherry picked from commit a68a2ad19c)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2020-09-24 18:44:14 +02:00
Łukasz Langa db455296be
Python 3.8.6 2020-09-23 14:36:32 +02:00
Miss Islington (bot) 5acc1b5f0b
bpo-37062: Enum: add extended AutoNumber example (GH-22349) (GH-22369)
(cherry picked from commit 62e40d8450)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-22 20:57:48 -07:00
Miss Islington (bot) 2466a7ae6b
bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-22 14:36:02 -04:00
Miss Islington (bot) 6d372ef194
fix `EventType` bases
`StrEnum` does not exist in 3.8, so use original `(str, enum.Enum)` bases.
2020-09-22 11:30:47 -07:00
Miss Islington (bot) 7bcbb536dd
bpo-40181: Remove '/' reminder in IDLE calltips. (GH-22350)
The marker was added to the language in 3.8 and
3.7 only gets security patches.
(cherry picked from commit 40a0625792)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-21 23:02:45 -07:00
Miss Islington (bot) ca2d99d091
bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)
GH- [bpo-41815](): SQLite: fix segfault if backup called on closed database

Attempting to backup a closed database will trigger segfault:

```python
import sqlite3
target = sqlite3.connect(':memory:')
source = sqlite3.connect(':memory:')
source.close()
source.backup(target)
```
(cherry picked from commit bfee9fad84)

Co-authored-by: Peter McCormick <peter@pdmccormick.com>
2020-09-21 15:00:34 -07:00
Miss Islington (bot) b7cdea8f08
bpo-35293: Remove RemovedInSphinx40Warning (GH-22198)
* bpo-35293: Remove RemovedInSphinx40Warning

* Update Misc/NEWS.d/next/Documentation/2020-09-12-17-37-13.bpo-35293._cOwPD.rst

Co-authored-by: Victor Stinner <vstinner@python.org>

* bpo-35293: Apply Victor's review

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 6595cb0af4)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-09-18 02:31:30 -07:00
Serhiy Storchaka 038688a53b
[3.8] Remove duplicated words words (GH-20413). (GH-22297)
(cherry picked from commit 1c5d1d7304)
2020-09-18 09:37:04 +03:00
Ethan Furman 5efb1a77e7
[3.8] bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) (GH-22283)
fix default `_missing_` to return `None` instead of raising a `ValueError`
Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>.
(cherry picked from commit c95ad7a91f)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-16 17:38:14 -07:00
Miss Islington (bot) 3f4012117b
bpo-41517: do not allow Enums to be extended (GH-22271)
fix bug that let Enums be extended via multiple inheritance
(cherry picked from commit 3064dbf5df)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-16 07:30:54 -07:00
Miss Islington (bot) 929112ef81
bpo-41789: honor object overrides in Enum classes (GH-22250)
EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed.  This patch fixes that.

Automerge-Triggered-By: @ethanfurman
(cherry picked from commit 22415ad625)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-15 17:16:36 -07:00
Miss Islington (bot) 8f8ebcca95
bpo-39587: Enum - use correct mixed-in data type (GH-22263)
(cherry picked from commit bff01f3a3a)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-15 16:23:57 -07:00
Miss Islington (bot) b007a9be6f
bpo-41744: Package python.props with correct name in NuGet package (GH-22154)
NuGet automatically includes .props file from the build directory in the
target using the package, but only if the .props file has the correct
name: it must be $(id).props

Rename python.props correspondingly in all the nuspec variants. Also
keep python.props as it were for backward compatibility.
(cherry picked from commit 7c11a9acca)

Co-authored-by: Václav Slavík <vaclav@slavik.io>
2020-09-14 12:47:40 -07:00
Ethan Furman 38c8d3930e
[3.8] bpo-37479: Enum - use correct __format__ (GH-14545)
* bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__.
(cherry picked from commit 2f19e82fbe)

Co-authored-by: thatneat <thatneat@users.noreply.github.com>
2020-09-13 13:47:43 -07:00
Miss Islington (bot) 530d1105ed
bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)
Fix a race condition in the call_soon_threadsafe() method of
asyncio.ProactorEventLoop: do nothing if the self-pipe socket has
been closed.
(cherry picked from commit 1b0f0e3d7d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-12 00:09:54 -07:00
Miss Islington (bot) 77901dc6c3
bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)
Argument script_exec_args is usually an absolute file name,
but twice has form ['-m', 'module_name'].
(cherry picked from commit 7e711ead26)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-11 23:43:27 -07:00
Miss Islington (bot) 8a30bdd21d
bpo-37149: Change Shipman tkinter link from archive.org to TkDocs (GH-22188) (#22193)
The new link responds much faster and begins with a short explanation of the status of the doc.
(cherry picked from commit 06d0b8b67e)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2020-09-10 16:21:35 -04:00
Miss Islington (bot) 9171dc2827
bpo-41525: Make the Python program help ASCII-only (GH-21836)
(cherry picked from commit 58de1dd6a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-08 17:46:41 -07:00
Łukasz Langa 7c6dc8517e Python 3.8.6rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl9WV1gACgkQsmmV4xAl
 BWhaFA/+MhK/h03WVVmcmK53W3aU70AHhLLlRhftYSxN6hUgEYWt8VFupOtD8947
 56RDjlpDKxeRiErjxT2ymLCdkiLCbXSfVD2aKY2H76370On4SKMjAB2VcPa2dsA9
 cw8HPjc3CzXxSYBz1+aKc5OJsw+Bv+T+7wlfbJSlzSnP3E71Ny/Esko5bVqzwj1B
 cUT6y0Pt+Vwb0lJQEDtVaPGRNqBuJjc6yi0EScz0WIXQlBR+eialYMHb8IbNGsrR
 2FT2K8gktXltpfsMSb2eInj6YaZNsshNwoCyCuT2iPC+482i4m3U20oNWhlPxL0G
 +159C9fGTrJ4uFu2CC85CWjB2lZQ6ArB/odsdfixlaQOruGkVMWQBCF2bvYaJqqT
 n80n6tzfhIYVcV8SpjrdkrsurmUTcwdZN2WTdZLBE6S5c8O/XEYgvSOoy6f2E/aH
 IYlQrZrBlnyBctgHFNYnACetIcsyYByqH6XehLHzLIvoY4ncJTLoDPCJrg/opRw7
 zgIYFBK2Bf8GlG6tdmi50+uD+8VIK8YkeH7RgE3X7SW55xzA6xyXPUIf5TNHCHCe
 4hsy7oFj4pxogGx1NvJ6jpThang0EHMsubVICT4Ieej56ye7R8hHQ8rHPxRSveVD
 IqhmZmDjai2xx3DaTV5wfNqEsDPzOgOlgZJVr5R4Tefe0z4PEs8=
 =Fzio
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl9XUS4QHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaMx/EACO5v/JZDPrw3yREKhPXvAUZH3+AtAeKT+C
 SLm4cD1UzzI2JwgO62N3ilVAQ43xw2eCV6DvOmPGKI+Bn4KVRlNAjD63WEfYm8WB
 RseLVTih1eumTAVHlMj1zv3TN8XQOPg9vNtwx4GI7WF+b66v912orJBw6zYEiInm
 MtNNfPMzNBgc6WPRrMOTwNd7eXwPo+VvUWtneryLKtdIa6tREubLW6qjFCjTqSzn
 S5y1VuBoEbTpUVwDYChexdErEzHJ84jJ46gow0D/0j2pUcU9Huw08zN/Ztb0eElM
 0v64m/WGJ5Y8se1BDPBE9aFdn20l32ANKE3pLwopiuhjZU3rS/fJvjSxdLNn/49a
 Y7Jvib4SfWTb87qOv2f0hzZTrx1xB1UYplljaXFPeD6DsrkrHm2YgqytGuE0768X
 9tAInVlLWQ0MCxO0OeyVJpV0Mi2NapG+hqRY3UlRcsLQdoK9grMZxTdyCqGJcYCK
 CyiL13etXP6kHsAa6PwgxTCL/HyE25ZgRyc0ZVEolELx3eGZR9UyQg/l8KJpOLQI
 tMnTMIxuoLzPEBvFtHHp7L7/V11OmWl4ojW8Vl3thYbXGScjtHVEXh4GRm0dT1br
 VigswpqDx+Njj/XqNUanZo59rtWiLB6b5b6z0y4JvPxF3BX6GFRRsUOO8ILUENma
 bf0QNqrN1Q==
 =/G5i
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.6rc1' into 3.8

Python 3.8.6rc1
2020-09-08 11:38:51 +02:00
Miss Islington (bot) ebef6c0b50
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
(cherry picked from commit fd4cafd470)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-07 09:28:04 -07:00
Łukasz Langa 08bd63da6e
Python 3.8.6rc1 2020-09-07 17:52:19 +02:00
Miss Islington (bot) 66e9c2aee4
[3.8] closes bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847) (GH-22015)
Free the stack allocated in va_build_stack if do_mkstack fails
and the stack is not a small_stack
(cherry picked from commit 75c80b0bda)


Co-authored-by: Tony Solomonik <tony.solomonik@gmail.com>
2020-09-04 15:26:05 -07:00
Miss Islington (bot) 1f5f127377
bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22072)
* bpo-41696: Fix handling of debug mode in asyncio.run

This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode
when using asyncio.run

* 📜🤖 Added by blurb_it.

Co-authored-by: hauntsaninja <>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0770ad948c)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2020-09-03 13:54:06 -07:00
Miss Islington (bot) a986b061a3
bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22035)
Stopping and restarting a proactor event loop on windows can lead to
spurious errors logged (ConnectionResetError while reading from the
self pipe). This fixes the issue by ensuring that we don't attempt
to start multiple copies of the self-pipe reading loop.
(cherry picked from commit ea5a6363c3)

Co-authored-by: Ben Darnell <ben@bendarnell.com>

Co-authored-by: Ben Darnell <ben@bendarnell.com>
2020-09-03 12:38:34 -07:00
Miss Islington (bot) 9fef7c54a0
bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22074)
The PSF board approved this use.
(cherry picked from commit e223d06a8b)

Co-authored-by: Todd <toddrjen@gmail.com>
2020-09-03 07:41:09 -07:00
Pablo Galindo 77f4000ae0
[3.8] [3.9] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020) (GH-22046)
When allocating MemoryError classes, there is some logic to use
pre-allocated instances in a freelist only if the type that is being
allocated is not a subclass of MemoryError. Unfortunately in the
destructor this logic is not present so the freelist is altered even
with subclasses of MemoryError..
(cherry picked from commit 9b648a95cc)

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

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-01 21:40:48 +01:00
Miss Islington (bot) 38e32872eb
bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556) (GH-22019)
(cherry picked from commit 475a5fbb56)

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
2020-08-30 20:42:27 +01:00
Miss Islington (bot) 85ca9c049c
bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) (GH-22016) 2020-08-30 16:20:40 +09:00
Karthikeyan Singaravelan 838316db08
[3.8] bpo-41624: fix documentation of typing.Coroutine (GH-21952). (#21983)
(cherry picked from commit 8c58d2a216)

Co-authored-by: MingZhe Hu <humingzhework@163.com>

Co-authored-by: MingZhe Hu <humingzhework@163.com>
2020-08-28 08:03:40 -07:00
Miss Islington (bot) 641279e6e5
bpo-41609: Fix output of pdb's whatis command for instance methods (GH-21935) (#21976)
(cherry picked from commit 022bc7572f)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-08-27 03:17:05 +02:00
Miss Islington (bot) 7475aa2c59
bpo-33660: Fix PosixPath to resolve a relative path on root (GH-21975)
(cherry picked from commit 94ad6c674f)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-08-27 02:47:10 +02:00
Elvis Pranskevichus 57b698886b
[3.8] bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (GH-21895) (#21967)
When I was fixing bpo-32751 back in GH-7216 I missed the case when
*timeout* is zero or negative.  This takes care of that.

Props to @aaliddell for noticing the inconsistency..
(cherry picked from commit c517fc7121)
2020-08-26 13:59:17 -07:00
Miss Islington (bot) 6e1954cd82
bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) (#21965)
Currently, if `asyncio.wait_for()` itself is cancelled it will always
raise `CancelledError` regardless if the underlying task is still
running.  This is similar to a race with the timeout, which is handled
already.
(cherry picked from commit a2118a1462)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2020-08-26 11:26:28 -07:00
Victor Stinner 7d0fef56d8
bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844)

Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the
c_warn_on_allowed_pre_v3 option to make the documentation compatible
with Sphinx 2 and Sphinx 3.

(cherry picked from commit 423e77d6de)

* bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)

Use generic '.. object::' to declare markers, rather than abusing
'..  c:function::' which fails on Sphinx 3.

(cherry picked from commit 43577c01a2)

* bpo-40204: Fix duplicates in the documentation (GH-21857)

Fix two Sphinx 3 issues:

Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'.
Declaration is 'PyBUF_ND'.

Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'.
Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'.

(cherry picked from commit 46d10b1237)

* bpo-40204: Add :noindex: in the documentation (GH-21859)

Add :noindex: to duplicated documentation to fix "duplicate object
description" errors.

For example, fix this Sphinx 3 issue:

Doc/library/configparser.rst:1146: WARNING: duplicate object
description of configparser.ConfigParser.optionxform, other instance
in library/configparser, use :noindex: for one of them

(cherry picked from commit d3ded08048)

* bpo-40204, doc: Fix syntax of C variables (GH-21846)

For example, fix the following Sphinx 3 errors:

Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 5]
  void \*obj
  -----^

Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*'
Invalid C declaration: Expected end of definition. [error at 8]
  PyObject*
  --------^

The modified documentation is compatible with Sphinx 2 and Sphinx 3.

(cherry picked from commit 474652fe93)

* bpo-40204: Fix reference to terms in the doc (GH-21865)

Sphinx 3 requires to refer to terms with the exact case.

For example, fix the Sphinx 3 warning:

Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.

(cherry picked from commit bb0b08540c)

* bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)

Sphinx 3 disallows having more than one productionlist markup with
the same name. Simply remove names in this case, since names are not
shown anyway. For example, fix the Sphinx 3 warning:

Doc/reference/introduction.rst:96: duplicate token description
of *:name, other instance in reference/expressions

(cherry picked from commit 1abeda80f7)
(cherry picked from commit 8f88190af5)
2020-08-20 13:28:49 +02:00
Miss Islington (bot) 1baa8b14ee
bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method not a coroutine (GH-21852)
asyncio.AbstractEventLoop.run_in_executor should be a method that returns an asyncio Future, not an async method.
This matches the concrete implementations, and the documentation better.
(cherry picked from commit 29f84294d8)

Co-authored-by: James Weaver <james.barrett@bbc.co.uk>
2020-08-17 07:37:12 -07:00
Miss Islington (bot) 08f0a21092
[3.8] bpo-41503: Fix race between setTarget and flush in logging.handlers.MemoryHandler (GH-21765) (GH-21898)
(cherry picked from commit 2353d77fad)


Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>

Automerge-Triggered-By: @vsajip
2020-08-16 09:27:01 -07:00
Miss Islington (bot) 243458115e
bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation (GH-18772)
[bpo-31122](): ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation

Reproducer: http://tiny.cc/f4ztnz (tiny url because some bot keeps renaming b.p.o.-nnn as bpo links)
(cherry picked from commit 495bd03566)

Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
2020-08-15 10:42:36 -07:00
Miss Islington (bot) a3416c13b5
[3.9] bpo-41520: Fix second codeop regression (GH-21848)
Fix the repression introduced by the initial regression fix.

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

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-13 11:38:55 -07:00
Miss Islington (bot) afff51fc09
bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)
(cherry picked from commit 369a1cbdee)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-12 06:12:05 -07:00
Miss Islington (bot) 61f23cb62d
bpo-41468: Improve and test IDLE run error exit (GH-21798)
A message box pops up when an unexpected error stops the run process.  Tell users it is likely a random glitch, but report it if not.
(cherry picked from commit f2e161c279)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-09 13:26:37 -07:00
Miss Islington (bot) 66c8996619
bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)
(cherry picked from commit a4084b9d1e)

Co-authored-by: Konge <zkonge@outlook.com>
2020-08-07 20:21:33 -07:00
Steve Dower 135de08128
bpo-41490: Update ensurepip to install pip 20.2.1 and setuptools 49.2.1 (GH-21775) 2020-08-07 23:10:32 +01:00
Miss Islington (bot) 713ba03276
bpo-41492: Fixes the description appearing in UAC prompts on Windows (GH-21754)
(cherry picked from commit 777b611c8c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-08-06 09:52:57 -07:00
Batuhan Taskaya b24c9d2b06
[3.8] bpo-40726: handle uninitalized end_lineno on ast.increment_lineno (GH-21745)
…no (GH-20312).

(cherry picked from commit 8f4380d2f5)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>

Automerge-Triggered-By: @pablogsal
2020-08-05 11:37:19 -07:00
Miss Islington (bot) b934d832d1
bpo-41467: Fix asyncio recv_into() on Windows (GH-21720)
On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').
(cherry picked from commit 602a971a2a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-03 17:58:06 -07:00
Miss Islington (bot) 4bc8445c39
bpo-41425: Make tkinter doc example runnable (GH-21706)
Co-authored-by: Ankit Chandawala <achandaw@amazon.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit c36dbac588)
2020-08-03 00:25:04 -04:00
Miss Islington (bot) 7cfede6859
closes bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH-21569)
This consolidates the handling of my_fgets return values, so that interrupts are always handled, even if they come after EOF.

 I believe PyOS_StdioReadline is still buggy in that I/O errors will not result in a proper Python exception being set. However, that is a separate issue.
(cherry picked from commit a74eea238f)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2020-07-28 18:16:19 -07:00
Guido van Rossum 3baff21f5b
[3.8] bpo-41045: Document debug feature of f-strings ('=') (GH-21509) (#21647)
Co-Authored-By: Rishi <rishi93dev@gmail.com>

(cherry picked from commit 13efaec)

Co-authored-by: amaajemyfren <32741226+amaajemyfren@users.noreply.github.com>
2020-07-27 16:22:16 -07:00
Miss Islington (bot) 104adedf64
bpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)
... when an unknown option is passed.  TypeError was being raised because a 2to3 fix was missing.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit f1d40f941a)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2020-07-26 22:14:49 -04:00
Miss Islington (bot) b99f770230
bpo-41314: fixed annotations __future__ version (GH-21616)
PEP 563 was updated to change the release where `from __future__ import annotations` becomes the default (and only) behavior from 4.0 to 3.10. Update `__future__.py` and its docs to reflect this.
(cherry picked from commit 0028c14073)

Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
2020-07-25 15:00:17 -07:00
Miss Islington (bot) 949cf93f8e
bpo-38731: Fix NameError in command-line interface of py_compile (GH-21617)
(cherry picked from commit 2024d7aca1)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2020-07-26 00:03:50 +03:00
Miss Islington (bot) 1c562ced21
bpo-41373: IDLE: Fix saving files loaded with no newlines or mixed newlines (GH-21597)
Fixes regression in 3.8.4 and 3.9.0b4.

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

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-07-24 20:38:46 -07:00
Terry Jan Reedy 29df301a92
[3.8] bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
Also one in news log.

(cherry picked from commit 592527f3ee)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-07-23 04:18:03 -04:00
Steve Dower a18f22ab11
bpo-41364: Reduce import overhead of uuid module (GH-21586) 2020-07-22 12:26:37 +01:00
Miss Islington (bot) f599f9ea3c
bpo-40741: Update Windows build to include SQLite 3.32.3 (GH-21570)
(cherry picked from commit 84761c3cc4)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-20 17:09:51 -07:00
Łukasz Langa 580fbb018f
Python 3.8.5
Contains security fixes for CVE-2019-20907, CVE-2020-15801, and BPO-39603.
2020-07-20 15:01:32 +02:00
Miss Islington (bot) 58f59a9621
bpo-37703: improve asyncio.gather documentation regarding cancellation (GH-15312)
These changes updates the doc to comprehensively mention the behaviour of gather.cancel()

Automerge-Triggered-By: @asvetlov
(cherry picked from commit d42528a3a2)

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
2020-07-20 02:00:51 -07:00
Miss Islington (bot) 892fc8d328
bpo-40741: Update macOS installer to use SQLite 3.32.3 (GH-20979)
(cherry picked from commit 7cf1cb36ec)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2020-07-19 23:37:57 -07:00
Miss Islington (bot) 38d930f2cc
bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528)
Walk down the MRO backwards to find the type that originally defined the final `tp_setattro`, then make sure we are not jumping over intermediate C-level bases with the Python-level call.

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit c53b310e59)

Co-authored-by: scoder <stefan_ml@behnel.de>
2020-07-18 14:37:43 -07:00
Miss Islington (bot) 668d321476
bpo-39603: Prevent header injection in http methods (GH-18485)
reject control chars in http method in http.client.putrequest to prevent http header injection
(cherry picked from commit 8ca8a2e8fb)

Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
2020-07-18 13:39:12 -07:00
Miss Islington (bot) 79ed1a53fa
bpo-41304: Update NEWS to include CVE-2020-15801 reference (GH-21521)
(cherry picked from commit 164b04c47e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-17 17:54:11 +01:00
Miss Islington (bot) ffeb920254
[3.8] bpo-41300: IDLE - save files with non-ascii chars (GH-21512)
Fix regression released in 3.9.0b4 and 3.8.4.
(cherry picked from commit 38d3864efe)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-07-16 18:47:52 -04:00
Miss Islington (bot) 3b6a8d2455
bpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495)
(cherry picked from commit 936a660945)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-15 15:15:37 -07:00
Felix Yan 16eea45fbd
[3.8] bpo-41302: Support system libmpdec 2.5 for Python 3.8 (GH-21488)
Define UNUSED only when mpdecimal.h doesn't define it. This would support
building with system libmpdec 2.5 while retaining compatibility with system
libmpdec 2.4 or the vendored copy.

Tested to build fine with either system libmpdec or the vendored one.
2020-07-15 22:22:23 +02:00
Miss Islington (bot) c55479556d
[3.8] bpo-39017: Avoid infinite loop in the tarfile module (GH-21454) (GH-21483)
Avoid infinite loop when reading specially crafted TAR files using the tarfile module
(CVE-2019-20907).
(cherry picked from commit 5a8d121a1f)


Co-authored-by: Rishi <rishi_devan@mail.com>

Automerge-Triggered-By: @encukou
2020-07-15 05:30:53 -07:00
Łukasz Langa 0277b914ca Python 3.8.4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl8MT5gACgkQsmmV4xAl
 BWg0CA//Q+aC/BwXrpPrUfgFAGF1UlwxkRlaEfDRvA+Yip3mo2QR005w4xfxkrzS
 8A0PNWOMH/nbmGabmZ/2xZH4ntOvjy2/+5Bcmj1tqNuDOc1gUqywuQ9MtDmW6w+6
 oZ7NE/m948NJwlnoreJCOuFUqXsjtMtnGVfJWs8+Fb7kjZJW3MOytEScVku3434Y
 5/DMrs3kzQxAag2L5GqdUoA7rrdjpzSfMV25ZOeZAd41kZ2/4DqC22PfOp8ApmDA
 /cpeE9tuhHlHz3139bi89F584ZHW+EW7zSNtmBduMPVb1TPS+26oHw44MJ3hJBRK
 tpTtHQytISIRhS4r4iERd26QngbN2tsN7eQZbq4p5ilCx29+7p6ekeWEzNJgvl6O
 Lg9FN62nVacvJqpaa0DZTSUmP/rlCciZFIz+r2Yar0Z2y+Bv2s1IGu6TL0pk96d7
 NpnxvD2EUhN0DpjIm98QhaSeElfqdDTkLRsh6M0bhgiGwvQsVk+wXjNgysuDR3wR
 uXSmO7dBgicKdGpdXX9fd1p8Ind4ibyuD7XxvWRzsMxRm5GQgigEKt9IAXrrkf9n
 r/07AvKbJj8nf9y7SwleUPsaplsrbP0FALmHwkzDQeGA6nbwphRon6bkWQtHMWhu
 kIZJYpGhs0wqnGzylgkI1d5cyXlcok2JbH1D4PALbvkX0tKDN/0=
 =vlbw
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl8MyOsQHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaFdlD/sEkprGVKulgfYim0D18Al+0T/LjKRa2wMy
 FHehobDCtKtJDI1jSwbXmlajbid7LHlPBJ6x6pHX7JElXVUQmGsOey1xhqO0Zkkz
 xlbwnZmVby0sco8Mp+5tY+UWkxJX6KlYwqaJ8GLhzsmrhj3YZP1DeUCJr5t4mGjV
 gfFB1NY+5x3XbA2F8op8AASUb2djxbhKc9FPzT6e3+XgMHHSMMZZ60atwmoM0CFw
 9NWCxBteOsUGnhj1UTk4Cbh8Bmpf/4l6kQpIyo4lxiplox99LmE52z4nXgZsHjDs
 UMePNJeYtEsLRZoz9N0FZn/RU4oux2I86qqs6gQPh8Sg23TlP7XHBN4Gav+Lj9Sv
 CWl999p/MFduBRXCyNJKeUmSi2wawnBnT2vk3XFadLdfnM8UWU7JvtjBmki/YOQK
 D9mAXzOgDMpnah4ora2YeS554OxwxbIyJlf2PilRL6MMZ7mSqpndEYvFPd9yeIoK
 HWTKpyTM3W1UOAAZzs09UdOg17Aq1Ei6jLaeEm2uI3mvCP6YUlcQxZVSq5GVkaR1
 eB8JB5plCdM83mrP+9XPXCD+MPaO5V0L+1O2lxcJuwVl4kRKW6tsA6NoDbRqLdk+
 EnlryOAALHbk3aDD/J+qhfjNgPsfeuJLC9nvB6IkUWw57TcjKWReVHLhELfUmOkO
 3EP8tA3k9w==
 =YNqk
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.4' into 3.8

Python 3.8.4
2020-07-13 22:49:45 +02:00
Miss Islington (bot) f56c75ed53
bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)
Automerge-Triggered-By: @tiran
(cherry picked from commit 4f309abf55)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-07-13 06:05:44 -07:00
Łukasz Langa dfa645a65e
Python 3.8.4 2020-07-13 14:11:53 +02:00
Miss Islington (bot) 33672c0191
bpo-41175: Guard against a NULL pointer dereference within bytearrayobject (GH-21240)
The issue is triggered by the bytearray() + bytearray() operation.

Detected by GCC 10 static analysis tool.
(cherry picked from commit 61fc23ca10)

Co-authored-by: stratakis <cstratak@redhat.com>
2020-07-10 03:15:59 -07:00
Miss Islington (bot) 3d1c06e8b9
bpo-37765: Add keywords to IDLE tab completions (GH-15138)
Keywords are present in the main module tab completion lists generated by rlcompleter, which is used by REPLs on *nix. Add all keywords to IDLE's main module name list except those already added from builtins (True, False, and None) . This list may also be used by Show Completions on the Edit menu, and its hot key.

Rewrite Completions doc.

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
(cherry picked from commit bce2eb4646)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-07-09 15:54:44 -07:00
Tony Solomonik 0b6169e391
bpo-41247: asyncio.set_running_loop() cache running loop holder (#21406)
The running loop holder cache variable was always set to NULL when
calling set_running_loop.

Now set_running_loop saves the newly created running loop holder in the
cache variable for faster access in get_running_loop.
2020-07-09 10:38:46 -07:00
Miss Islington (bot) 54babbe976
bpo-41252: Fix incorrect refcounting in _ssl.c's _servername_callback() (GH-21407)
(cherry picked from commit ee96f32ca2)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-07-09 03:15:36 -07:00
Miss Islington (bot) c1c5034593
bpo-40597: Allow email.contextmanager set_content() to set a null string. (GH-20542)
(cherry picked from commit 4fa61a7732)

Co-authored-by: Mark Sapiro <mark@msapiro.net>
2020-07-08 14:18:38 -07:00
Miss Islington (bot) c8b599ff0a
closes bpo-41235: Fix the error handling in SSLContext.load_dh_params() (GH-21385)
(cherry picked from commit aebc049557)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-07-07 21:37:50 -07:00
Miss Islington (bot) 41db8ffc59
bpo-41218: Only mark async code with CO_COROUTINE. (GH-21357)
3.8.3 had a regression where compiling with
ast.PyCF_ALLOW_TOP_LEVEL_AWAIT woudl agressively mark things are
coroutine even if there were not.
(cherry picked from commit bd46174a5a)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2020-07-06 14:44:16 -07:00
Miss Islington (bot) aa7f775614
bpo-29778: Ensure python3.dll is loaded from correct locations when Python is embedded (GH-21297) (GH-21352)
Also enables using debug build of `python3_d.dll`
Reference: CVE-2020-15523
(cherry picked from commit dcbaa1b49c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-07-06 19:12:16 +02:00
scoder 8912c18245
bpo-39960: Allow heap types in the "Carlo Verre" hack check that override "tp_setattro()" (GH-21092) (GH-21339)
Backport to Py3.8.
2020-07-05 22:12:04 +02:00
Steve Dower b9e288cc1b
bpo-41162: Clear audit hooks later during finalization (GH-21222)
Co-authored-by: Konge <zkonge@outlook.com>
2020-07-04 00:04:22 +01:00
Miss Islington (bot) 53d2b715d1
bpo-41193: Ignore OSError in readline write_history() (GH-21279)
The write_history() atexit function of the readline completer now
ignores any OSError to ignore error if the filesystem is read-only,
instead of only ignoring FileNotFoundError and PermissionError.
(cherry picked from commit 0ab917e07e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-07-02 04:02:08 -07:00
Serhiy Storchaka e73896241e
[3.8] bpo-41043: Escape literal part of the path for glob(). (GH-20994). (GH-21277)
(cherry picked from commit 9355868458)
2020-07-02 10:05:35 +03:00
Łukasz Langa 26d1d1dcfd Python 3.8.4rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl76bPYACgkQsmmV4xAl
 BWjLjQ//To/nYZE1CLt2eKmCM1T1ot2FZJVunXl6en48d9T4xosDhlZNU2SvHEWM
 BU9tf47r8s0UYCihMUAKL7RzYSh0LuEdlG9/3n9X8LH8glMyQAXAXDJNOK0Zeyxz
 n63UpIBgwHXSzSbJ4HsiFViJ8m6RkBO2OH7pe8l0S5022mi1SVmfNZQ3epDsz0HC
 z4kIgB4v/q549hdME/w5HVU4gPyhIlsLsSzdikWtPxp19Y+ZEYX3q6myV8OXU6bZ
 vBEEQWCvmJkCVxDFgHqHIKiYE847BbN9K6N+XOo1YkQ9LCLKPMRwiLIvUGjlx3Mh
 wfEsfNgVfrJTHi5+o8z5EMO6gAY5+kkdmd/y3YmPBmdm/7f+jEK67RNfDnjjjPTD
 cc/ayRSpK3ffR/jMXNqBqzTRsqt13YddW7Xuy5Jm+N/1VB2D7D83y6yddlHyatUo
 FKbT6MjgEEfKh5uZOX6929DBicZLPU/nGK3X1gWE7DUSmk612ZAUWOv922g7SIWz
 GjEqmm1/+41sCJHJGyqbcuU3kaQtzY81VCNVjosT/vq9mTDLJvDG7/utni5Ii0N7
 PV4XDxo2ygOG7+SVQIG+LN168k8whIF4O+hDoHjQp1YHQoV/SW5NXx87ZIEJyhpJ
 ov7DpZbOvld3oCeL1YdqeUM6krU/gbnJcj2Ex+Isw3SHbDNhJTA=
 =fOMA
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl77Yj0QHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaI80D/9PJBQl4MZUZvLAakTU2TxH4Q5Thhd0KXya
 yMMAWqPPaY8VhVR3MUZ3urQ29NA2lLztGx7TAEn0vW5FsmyVAlqD8qHAAZaAAWP6
 0ULcuntNGq8tDMNbNnhc5ZAe8HWMUnIFbGaCY/8RBtMz+yi3xYNvUkV5/F0T7wNn
 9yOGfzExTjOVpv5QTGducoedDpvQ8y/2dIclLBBDDCchoQLBPP6wQyAnVh/exh3K
 ddgAeGhRCcp7YbVk4iHv14+4pNBOatiy5scfXu1Dkl/8id0UnAmpKsmiS0zNQn05
 ox8bx+RNJMxR0CSIFMejA2qhYKMqTbcJ8A6Y2r7tN3mNLnGSChaKGR4gdXXqTfHS
 OYsTnML68zyoo55R5Ggn0Eem1BwZT1FUD7eiV7WalfgPx4sZNqOcqUb9qN41P/Cm
 /9NYV+N4j+IUHSUPXzcSpP7iBajdUIjyfUO5E9rgIS/6MHkT5ZqDTZCWbyYCySzm
 lbdeKx3XY15ZLFiTfQnuEZw5eJ7UyQzTqphKlY6i6NGpZxiw9yZGv/P5NIqw/txz
 a4btDjUGDaxJmg/rdZ6I8TV2ZOKCHo/qpFpEULD0OaMAMBjlzPNsMAyOkcdtUAhv
 ZcJRK7OfGK7MPVQOYpws5NNmXCAnkdqFq9IgW/wV1AICoCBYrPBbsyt+ZScMjS8+
 WeB+W9F3pQ==
 =DdsK
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.4rc1' into 3.8

Python 3.8.4rc1
2020-06-30 18:03:07 +02:00
Miss Islington (bot) 00fd04b9b7
bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214)
(cherry picked from commit 2515a28230)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-29 17:39:02 -07:00
Łukasz Langa 6c38841c08
Python 3.8.4rc1 2020-06-30 00:30:11 +02:00
Miss Islington (bot) dc8ce8ead1
bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033)
The __hash__() methods of classes IPv4Interface and IPv6Interface had issue
of generating constant hash values of 32 and 128 respectively causing hash collisions.
The fix uses the hash() function to generate hash values for the objects
instead of XOR operation
(cherry picked from commit b30ee26e36)

Co-authored-by: Ravi Teja P <rvteja92@gmail.com>
2020-06-29 11:12:50 -07:00
Miss Islington (bot) 7731139b7a
bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)
(cherry picked from commit 7f569c9bc0)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
2020-06-29 05:07:41 -07:00
Serhiy Storchaka cb53b8ce9c
[3.8] bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) (GH-21200)
Fix also a resource warning when store counts and module info.
(cherry picked from commit 04cdeb7a56)
2020-06-28 17:30:08 +03:00
Miss Islington (bot) 86ef6fe2b6
bpo-41144: Fix IDLE open module error (GH-21182)
Could not open os.path.

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

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2020-06-27 23:20:13 -07:00
Guido van Rossum e653369e76
[3.8] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21023) 2020-06-27 17:35:05 -07:00
Miss Islington (bot) 027bba2ead
bpo-41100: clarify NEWS item about macOS 11 support (GH-21174)
(cherry picked from commit 2f168c6356)

Co-authored-by: Ned Deily <nad@python.org>
2020-06-27 01:52:50 -07:00
Miss Islington (bot) c4a53e48a9
BPO-41100: Support macOS 11 when building (GH-21113)
(cherry picked from commit 8ea6353f60)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-06-25 08:15:06 -07:00
Christian Heimes 8075fe199b
[3.8] bpo-41009: fix requires_OS_version() class decorator (GH-20942) (GH-20948)
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran.
(cherry picked from commit bb6ec14479)

Co-authored-by: Christian Heimes <christian@python.org>
2020-06-25 05:18:43 -07:00
Ned Deily 7318f0ab23
bpo-40204: Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. (GH-21141) (GH-21147) 2020-06-25 07:44:14 -04:00
Miss Islington (bot) 4564ebb1e6
bpo-39580: add check for CLI installation on macOS (GH-20271)
Adds a simple check for whether or not the package is being installed in the GUI or using installer on the command line. This addresses an issue where CLI-based software management tools (such as Munki) unexpectedly open Finder windows into a GUI session during installation runs.
(cherry picked from commit 5f190d2cc6)

Co-authored-by: Rick Heil <rickheil@partnersandsimons.com>
2020-06-25 03:56:14 -07:00
Miss Islington (bot) 3f4de44cf7
bpo-41074: Fix support of non-ASCII names and SQL in msilib. (GH-21126)
* Fix support of non-ASCII names in functions OpenDatabase()
  and init_database().
* Fix support of non-ASCII SQL in method Database.OpenView().
(cherry picked from commit 55939b1708)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-25 02:12:41 -07:00
Miss Islington (bot) 1813d318fd
bpo-41094: Fix decoding errors with audit when open files. (GH-21095)
(cherry picked from commit 6c6810d989)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-24 09:45:38 -07:00
Miss Islington (bot) adf8708c44
bpo-41005: Fixed perrmission error (GH-20936) (GH-21052)
* fixed issue 41005: webbrowser fails when xdg-settings cannot be executed

Co-authored-by: KrishnaSai2020 <krishnasai.chivukula@gmal.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 9e27bc0c1e)

Co-authored-by: Krishna Chivukula <63070026+KrishnaSai2020@users.noreply.github.com>

Co-authored-by: Krishna Chivukula <63070026+KrishnaSai2020@users.noreply.github.com>
2020-06-24 14:58:27 +02:00
Anthony Sottile 60cbdc81d1
[3.8] bpo-31938: Fix default-value signatures of several functions in the select module (GH-21066) (GH-21098)
(cherry picked from commit d051801052)

Automerge-Triggered-By: @vstinner
2020-06-23 15:17:02 -07:00
Miss Islington (bot) c6e24e7420
bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071)
Fix integer overflow in the :meth:`array.array.index` method on 64-bit Windows
for index larger than ``2**31``.
(cherry picked from commit 1d3dad5f96)

Co-authored-by: WildCard65 <WildCard65@users.noreply.github.com>
2020-06-23 06:40:47 -07:00
Miss Islington (bot) d7f37d1ed4
bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040)
(cherry picked from commit 36ff513f82)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-22 01:40:05 -07:00
Miss Islington (bot) b99824a8e1
bpo-40824: Do not mask errors in __iter__ in "in" and the operator module. (GH-20537)
Unexpected errors in calling the __iter__ method are no longer
masked by TypeError in the "in" operator and functions
operator.contains(), operator.indexOf() and operator.countOf().
(cherry picked from commit cafe1b6e9d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-22 01:21:04 -07:00
Miss Islington (bot) d5ee9b9940
bpo-41056: Fix reference to deallocated stack in pathconfig (Coverity) (GH-21013)
Reported by Coverity.  (CID 1457554 RETURN_LOCAL)

path0 is assigned as a pointer to this right before it goes out of scope.
(cherry picked from commit 81328f3070)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2020-06-22 00:43:41 -07:00
Miss Islington (bot) 14195597b3
bpo-41058: Use source file encoding in pdb.find_function(). (GH-21010)
(cherry picked from commit 19fcffa927)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-21 12:36:23 -07:00
Miss Islington (bot) 10bf6e4823
bpo-41056: Fix a NULL pointer dereference on MemoryError within the ssl module. (GH-21009)
Detected by Coverity.
(cherry picked from commit eb0d5c38de)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2020-06-21 12:11:29 -07:00
Victor Stinner e8056180a1
bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() (GH-20944) (GH-20962) (GH-20966)
On Linux, skip tests using multiprocessing if the current user cannot
create a file in /dev/shm/ directory. Add the
skip_if_broken_multiprocessing_synchronize() function to the
test.support module.

(cherry picked from commit ddbeb2f3e0)
(cherry picked from commit b1e7361134)
2020-06-18 18:56:43 +02:00
Victor Stinner 3d974b2fc6
bpo-41003: Fix test_copyreg when numpy is installed (GH-20935) (GH-20945) (GH-20946)
Fix test_copyreg when numpy is installed: test.pickletester now
saves/restores warnings.filters when importing numpy, to ignore
filters installed by numpy.

Add the save_restore_warnings_filters() function to the
test.support.warnings_helper module.

(cherry picked from commit 8362893e3f)
(cherry picked from commit b39d41ba1b)
2020-06-17 19:09:49 +02:00
Ned Deily e63cc2f646
bpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491) (GH-20900)
Co-authored-by: Xavier Fernandez <xav.fernandez@gmail.com>
2020-06-15 17:42:22 -04:00
Miss Islington (bot) a1d3be4623
bpo-40448: ensurepip: Do not use cache (GH-19812)
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
(cherry picked from commit 4a3a682b12)

Co-authored-by: Krzysztof Konopko <kkonopko@users.noreply.github.com>
2020-06-15 10:45:21 -07:00
Miss Islington (bot) c72b7f703e
bpo-34226: fix cgi.parse_multipart without content_length (GH-8530)
In Python 3.7 the behavior of parse_multipart changed requiring CONTENT-LENGTH
header, this fix remove this header as required and fix FieldStorage
read_lines_to_outerboundary, by not using limit when it's negative,
since by default it's -1 if not content-length and keeps substracting what
was read from the file object.

Also added a test case for this problem.
(cherry picked from commit d8cf3514dd)

Co-authored-by: roger <rogerduran@gmail.com>
2020-06-15 08:51:35 -07:00
Miss Islington (bot) 811e040b6e
bpo-40855: Fix ignored mu and xbar parameters (GH-20835) (GH-20863) 2020-06-13 16:57:17 -07:00
Miss Islington (bot) a8936fa5c0
bpo-40957: Fix refleak in _Py_fopen_obj() (GH-20827)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 9672912e8f)

Co-authored-by: Christian Heimes <christian@python.org>
2020-06-13 09:15:05 -07:00
Miss Islington (bot) 26db10a431
bpo-40834: Fix truncate when sending str object with channel (GH-20555)
(cherry picked from commit 29c117202e)

Co-authored-by: An Long <aisk@users.noreply.github.com>
2020-06-13 05:44:50 -07:00
Steve Dower 7e57c367d6
bpo-40164: Update Windows OpenSSL to 1.1.1g (GH-20834)
Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
2020-06-12 22:14:53 +01:00
Christian Heimes adce133378
bpo-40964: disable remote IMAP tests (GH-20836)
Remote host cyrus.andrew.cmu.edu is blocking incoming connections and is
causing test suite to fail.

Signed-off-by: Christian Heimes <christian@python.org>
2020-06-12 15:08:32 -04:00
Miss Islington (bot) a3d6d23a92
bpo-40626: Support HDF5 in mimetypes (GH-20042)
Add hdf5 with .h5 file extension

See 'Recommendations' section for mime types from the HDF group:  https://www.hdfgroup.org/2018/06/citations-for-hdf-data-and-software/

Patch by Mark Schwab.
(cherry picked from commit 60c2a810e3)

Co-authored-by: MARK SCHWAB <32745414+schwabm@users.noreply.github.com>
2020-06-11 12:32:37 -07:00
Miss Islington (bot) 3e499cda47
bpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-20816)
unittest.TestCase.assertWarns no longer raises a RuntimeException
when accessing a module's ``__warningregistry__`` causes importation of a new
module, or when a new module is imported in another thread.
(cherry picked from commit 46398fba4d)

Co-authored-by: kernc <kerncece@gmail.com>
2020-06-11 14:31:46 -04:00
Miss Islington (bot) 5b8e3a5335
bpo-34401: Fix test_gdb for HP GDB version string (GH-20804)
The GDB provided by HPE on HP-UX contains a modified version string. Therefore
the tests fail. Adapt the regex to match that string.

Patch by Michael Osipov.

Co-Authored-by: Michael Osipov <michael.osipov@siemens.com>
(cherry picked from commit b2dca49ca3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-06-11 07:07:39 -07:00
Miss Islington (bot) 264e4fd961
bpo-40741: Update macOS installer to use SQLite 3.32.2. (GH-20705)
(cherry picked from commit 37eed5a9ee)

Co-authored-by: Ned Deily <nad@python.org>
2020-06-07 19:43:35 -07:00
Miss Islington (bot) 83a9ba4426
bpo-40870: Invalidate usage of some constants with ast.Name (GH-20649)
(cherry picked from commit 68874a8502)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2020-06-06 10:04:47 -07:00
Shantanu f7ed4d4e83
bpo-40614: Respect feature version for f-string debug expressions (GH-20196) (GH-20466)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit c116c94ff1)
2020-06-06 11:08:48 +01:00
Miss Islington (bot) c067183605
bpo-40807: Show warnings once from codeop._maybe_compile (GH-20486)
* bpo-40807: Show warnings once from codeop._maybe_compile

* Move catch_warnings

* news

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

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2020-06-06 01:24:45 -07:00
Victor Stinner 6f7346bb39
[3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613) (GH-20616)
* bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20579)

Fix GIL usage in PyOS_Readline(): lock the GIL to set an exception.

Pass tstate to my_fgets() and _PyOS_WindowsConsoleReadline(). Cleanup
these functions.

(cherry picked from commit c353764fd5)

* bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599)

my_fgets() now calls _PyOS_InterruptOccurred(tstate) to check for
pending signals, rather calling PyOS_InterruptOccurred().

my_fgets() is called with the GIL released, whereas
PyOS_InterruptOccurred() must be called with the GIL held.

test_repl: use text=True and avoid SuppressCrashReport in
test_multiline_string_parsing().

Fix my_fgets() on Windows: fgets(fp) does crash if fileno(fp) is closed.

(cherry picked from commit fa7ab6aa0f)
2020-06-03 18:28:18 +02:00
Miss Islington (bot) 5b8787ef19
bpo-40767: Allow pure Wayland to get default XDG web browser (GH-20382)
Would be nice to backport to python 3.7+. I don't think it's worth the hassle to backport this all the way down to 3.10. But I'll let the maintainers decide.

This is hard to test because the test setup already includes this [environment variable](https://github.com/python/cpython/blob/master/Lib/test/pythoninfo.pyGH-L292)

Let me know if something doesn't match the PR guidelines. This is my first PR in the python source code.
(cherry picked from commit c822efeda9)

Co-authored-by: Jeremy Attali <jeremy.attali@gmail.com>
2020-06-03 06:02:33 -07:00
Miss Islington (bot) 9c0ff178a5
bpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397)
Fix :mod:`ssl`` code to be compatible with OpenSSL 1.1.x builds that use
``no-deprecated`` and ``--api=1.1.0``.

Note: Tests assume full OpenSSL API and fail with limited API.

Signed-off-by: Christian Heimes <christian@python.org>
Co-authored-by: Mark Wright <gienah@gentoo.org>
(cherry picked from commit a871f692b4)

Co-authored-by: Christian Heimes <christian@python.org>
2020-06-01 00:17:16 -07:00
Miss Islington (bot) 3dcccd1186
bpo-39885: Make IDLE context menu cut and copy work again (GH-18951)
Leave selection when right click within.  This exception to clearing selections when right-clicking was omitted from the previous commit, 4ca060d.  I did not realize that this completely disabled the context menu entries, and  I should have merged a minimal fix immediately.  An automated test should follow.
(cherry picked from commit 97e4e0f53d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-05-29 16:13:00 -07:00
Andrew Kuchling b86636bff4
[3.8] bpo-25872: Fix KeyError in linecache when multithreaded (GH-18007) (GH-20092)
Backporting to 3.8 and adding a NEWS item (I should have added one to the master branch -- oh well).
2020-05-29 04:59:44 -07:00
Miss Islington (bot) 6381ee077d
bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620)
* bpo-39040: Fix parsing of email headers with encoded-words inside a quoted string.

It is fairly common to find malformed mime headers (especially content-disposition
headers) where the parameter values, instead of being encoded to RFC
standards, are "encoded" by doing RFC 2047 "encoded word" encoding, and
then enclosing the whole thing in quotes.  The processing of these malformed
headers was incorrectly leaving the spaces between encoded words in the decoded
text (whitespace between adjacent encoded words is supposed to be stripped on
decoding).  This changeset fixes the encoded word processing inside quoted strings
(bare-quoted-string) to do correct RFC 2047 decoding by stripping that
whitespace.
(cherry picked from commit 21017ed904)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
2020-05-29 04:43:27 -07:00
Miss Islington (bot) 45ce0dbc4f
bpo-40795: ctypes calls unraisablehook with an exception (GH-20452)
If ctypes fails to convert the result of a callback or if a ctypes
callback function raises an exception, sys.unraisablehook is now
called with an exception set. Previously, the error was logged into
stderr by PyErr_Print().
(cherry picked from commit 10228bad04)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-05-27 15:56:36 -07:00
Miss Islington (bot) b5ecbf02e4
bpo-40025: Require _generate_next_value_ to be defined before members(GH-19763)
require `_generate_next_value_` to be defined before members
2020-05-27 13:12:08 -07:00
Miss Islington (bot) a285af7e62
bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914)
ctypes now raises an ArgumentError when a callback
is invoked with more than 1024 arguments.

The ctypes module allocates arguments on the stack in
ctypes_callproc() using alloca(), which is problematic
when large numbers of arguments are passed. Instead
of a stack overflow, this commit raises an ArgumentError
if more than 1024 parameters are passed.
(cherry picked from commit 29a1384c04)

Co-authored-by: Sean Gillespie <sean@swgillespie.me>
2020-05-27 08:53:03 -07:00
Miss Islington (bot) 75635c6095
bpo-39073: validate Address parts to disallow CRLF (GH-19007)
Disallow CR or LF in email.headerregistry.Address arguments to guard against header injection attacks.
(cherry picked from commit 614f17211c)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
2020-05-27 06:37:40 -07:00
Miss Islington (bot) 285ff63351
bpo-39244: multiprocessing return default start method first on macOS (GH-18625)
(cherry picked from commit db098bc1f0)

Co-authored-by: idomic <michael.ido@gmail.com>
2020-05-26 08:13:59 -07:00
Zackery Spytz 5ff5edfef6
[3.8] bpo-35714: Reject null characters in struct format strings (GH-16928) (GH-20419)
struct.error is now raised if there is a null character in a struct
format string.
(cherry picked from commit 3f59b55316)
2020-05-26 11:57:09 +03:00
Miss Islington (bot) 5c1d745da5
bpo-39830: Add zipfile.Path to __all__ (GH-19115) (GH-19116)
(cherry picked from commit 9a81ab107a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-05-26 02:44:57 -04:00
Miss Islington (bot) 907ee1f14a
bpo-36290: Fix keytword collision handling in AST node constructors (GH-12382)
(cherry picked from commit c73914a562)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
2020-05-24 14:31:47 -07:00
Miss Islington (bot) a64df485a4
bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311)
This was the only failure running unittest.main(test.test_idle) after imports.
(cherry picked from commit 905b3cd05f)

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
2020-05-24 04:08:04 -07:00
Batuhan Taskaya a4d219b35e
[3.8] bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156). (GH-20191)
(cherry picked from commit 2135e10dc7)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
2020-05-22 23:32:40 +01:00
Miss Islington (bot) 381ceeaa59
bpo-39631: Adds NEWS entry (GH-20227)
(cherry picked from commit 92327a9913)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-05-19 15:19:26 -07:00
Miss Islington (bot) 560d643661
bpo-40677: Define IO_REPARSE_TAG_APPEXECLINK explicitly (GH-20206)
This allows building with older versions of the Windows SDK where the value is not defined.
(cherry picked from commit 711f9e180a)

Co-authored-by: Minmin Gong <gongminmin@msn.com>
2020-05-19 05:39:06 -07:00
Miss Islington (bot) ab9d9535aa
bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137)
(cherry picked from commit f660567937)

Co-authored-by: Minmin Gong <gongminmin@msn.com>
2020-05-18 09:42:14 -07:00
Miss Islington (bot) ddd5bbdeec
bpo-40653: Move _dirnameW out of GH-ifdef HAVE_SYMLINK/GH-endif (GH-20144)
(cherry picked from commit 7f21c9ac87)

Co-authored-by: Minmin Gong <gongminmin@msn.com>
2020-05-18 09:36:02 -07:00
Miss Islington (bot) 94d9c5e5af
bpo-39148: enable ipv6 for datagrams in Proactor (GH-19121)
Ifdef is not necessary, as AF_INET6 is supported from Windows Vista, and other code in overlapped.c uses AF_INET6 and is not ifdef'd.
Change the raised exception so users are not fooled to think it comes from Windows API.

Automerge-Triggered-By: @njsmith
(cherry picked from commit 442634c42f)

Co-authored-by: Kjell Braden <afflux@pentabarf.de>
2020-05-17 23:42:25 -07:00
Miss Islington (bot) c1f1ddf30a
bpo-40597: email: Use CTE if lines are longer than max_line_length consistently (gh-20038) (gh-20084)
raw_data_manager (default for EmailPolicy, EmailMessage)
does correct wrapping of 'text' parts as long as the message contains
characters outside of 7bit US-ASCII set: base64 or qp
Content-Transfer-Encoding is applied if the lines would be too long
without it.  It did not, however, do this for ascii-only text,
which could result in lines that were longer than
policy.max_line_length or even the rfc 998  maximum.

This changeset fixes the heuristic so that if lines are longer than
policy.max_line_length, it will always apply a
content-transfer-encoding so that the lines are wrapped correctly.
(cherry picked from commit 6f2f475d5a)

Co-authored-by: Arkadiusz Hiler <arek.l1@gmail.com>
2020-05-17 20:57:42 -04:00
Miss Islington (bot) a669443dfb
bpo-40457: Support OpenSSL without TLS 1.0/1.1 (GH-19862)
OpenSSL can be build without support for TLS 1.0 and 1.1. The ssl module
now correctly adheres to OPENSSL_NO_TLS1 and OPENSSL_NO_TLS1_1 flags.

Also update multissltest to test with latest OpenSSL and LibreSSL
releases.

Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran
(cherry picked from commit 6e8cda91d9)

Co-authored-by: Christian Heimes <christian@python.org>
2020-05-16 01:33:42 -07:00
Miss Islington (bot) fcea08059f
bpo-40163: Fix multissltest download of old OpenSSL (GH-19329)
(cherry picked from commit 938717fd04)

Co-authored-by: Christian Heimes <christian@python.org>
2020-05-15 13:55:45 -07:00
Christian Heimes 387c7441f5 [3.8] bpo-40515: Require OPENSSL_THREADS (GH-19953) (GH-20119) 2020-05-15 22:36:51 +02:00
Miss Islington (bot) 5a06cf01ec
bpo-40479: Test with latest OpenSSL versions (GH-20108)
* 1.0.2u (EOL)
* 1.1.0l (EOL)
* 1.1.1g
* 3.0.0-alpha2 (disabled for now)

Build the FIPS provider and create a FIPS configuration file for OpenSSL
3.0.0.

Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran
(cherry picked from commit 62d618c06b)

Co-authored-by: Christian Heimes <christian@python.org>
2020-05-15 10:10:15 -07:00