Commit Graph

107796 Commits

Author SHA1 Message Date
Pablo Galindo 7b7aa94e51
[3.9] bpo-41840: Report module-level globals as both local and global in the symtable module (GH-22391). (GH-22528)
(cherry picked from commit fb0a4651f1)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-03 21:23:03 +01:00
Miss Skeleton (bot) e89253756c
[doc] Fix link to abc.collections.Iterable (GH-22520)
Missed this occurrence before, sorry. Also changed "the PEP" to "PEP".

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

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-03 09:13:14 -07:00
Miss Skeleton (bot) 8ca08310a8
[3.9] bpo-41867: List options for timespec in docstrings of isoformat methods (GH-22418)
(cherry picked from commit 52301312bb)

Co-authored-by: Ram Rachum <ram@rachum.com>
2020-10-03 14:42:16 +03:00
Miss Skeleton (bot) ef7b937b8f
[3.9] bpo-40833: Clarify Path.rename doc-string regarding relative paths (GH-20554)
(cherry picked from commit f97e42ef4d)

Co-authored-by: Ram Rachum <ram@rachum.com>
2020-10-03 13:44:14 +03:00
Miss Skeleton (bot) a0f2b66433
bpo-41900: C14N 2.0 serialisation failed for unprefixed attributes when a default namespace was defined. (GH-22474) (GH-22507)
(cherry picked from commit 6a412c94b6)
2020-10-03 08:41:35 +02:00
Miss Skeleton (bot) ebc8072c3d
[doc] Fix link to abc.collections.Iterable (GH-22502)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit d4b9edd505)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-02 16:36:51 -07:00
Miss Skeleton (bot) 6d40943e34
Typo fix - "mesasge" should be "message" (GH-22498)
* Correct at 2 places in email module
(cherry picked from commit 9cd01ece78)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
2020-10-02 13:43:44 -07:00
Miss Islington (bot) 6dc8e0eb9b
bpo-41802: Document 'PyDict_DelItem' can raise a 'KeyError' (GH-22291)
(cherry picked from commit 20ce62f009)

Co-authored-by: Campbell Barton <ideasman42@gmail.com>
2020-10-02 09:39:20 -07:00
Miss Islington (bot) 8fc828ec4e
Fix grammar in secrets module documentation (GH-22467)
From `In particularly,` to `In particular,`
(cherry picked from commit 63298930fb)

Co-authored-by: Max Smolens <msmolens@users.noreply.github.com>
2020-09-30 15:49:52 -07:00
Miss Islington (bot) 868c8e41eb
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:27:06 -07:00
Miss Islington (bot) cca896e13b
bpo-41875: Use __builtin_unreachable when possible (GH-22433)
(cherry picked from commit 24ba3b0df5)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-09-28 15:16:24 -07:00
Miss Islington (bot) 048f54dc75
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 13:18:47 -07:00
Miss Islington (bot) bdf46bc7e1
[doc] Leverage the fact that the actual types can now be indexed for typing (GH-22340)
This shows users that they can use the actual types. Using deprecated types is confusing.

This also prefers colections.abc.Sized instead of the alias typing.Sized. I guess the aliases were created to make it convenient to import all collections related types from the same place.

This should be backported to 3.9.

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

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-09-27 12:42:29 -07:00
Miss Islington (bot) 8b2595f68a
bpo-41858: Clarify line in optparse doc (GH-22407)
The existing line is easily read as being incomplete.
(cherry picked from commit 00eb063b66)

Co-authored-by: Emmanuel Arias <eamanu@yaerobi.com>
2020-09-26 21:03:56 -07:00
Miss Islington (bot) 4080f12ccc
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:07:49 -07:00
Łukasz Langa ca8d46dd42
[3.9] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (GH-21956) (#22397)
Closes bpo issue 41602.
(cherry picked from commit a68a2ad19c)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2020-09-24 16:34:21 +02:00
Miss Islington (bot) 57e7d5c19e
bpo-41844: Add IDLE section to What's New 3.9 (GN-22382)
(cherry picked from commit 22b7616f26)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-23 11:51:50 -04:00
Miss Islington (bot) e33fe6c3d7
bpo-33822: Update IDLE section of What's New 3.8 (GH-22383)
(cherry picked from commit 9c4eac7f02)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-23 08:37:52 -07:00
Terry Jan Reedy d7a4e5d330
[3.9] bpo-41841: Prepare IDLE News for 3.9 (GH-22380) 2020-09-23 10:07:19 -04:00
Miss Islington (bot) 64362c2e43
bpo-37062: Enum: add extended AutoNumber example (GH-22349) (GH-22370)
(cherry picked from commit 62e40d8450)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-22 20:58:32 -07:00
Miss Islington (bot) f27a1577d3
bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363) 2020-09-22 14:35:38 -04:00
Miss Islington (bot) b38ad22705
fix `EventType` bases
`StrEnum` does not exist in 3.8, so use original `(str, enum.Enum)` bases.
2020-09-22 11:31:22 -07:00
Miss Islington (bot) 6b731c4878
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:05:07 -07:00
Miss Islington (bot) 4ee30c4244
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:05:17 -07:00
Pablo Galindo 724df8325d
Fix a compiler warning in pycore_pylifecycle.h (GH-22331) 2020-09-21 11:57:22 +01:00
Miss Islington (bot) 7aa534c956
bpo-41819: Fix compiler warning in init_dump_ascii_wstr() (GH-22332)
Fix the compiler warning:

format specifies type `wint_t` (aka `int`) but the argument has type `unsigned int`
(cherry picked from commit c322948892)

Co-authored-by: Samuel Marks <807580+SamuelMarks@users.noreply.github.com>
2020-09-21 01:58:27 -07:00
Miss Islington (bot) 0e4d526de4
bpo-41811: create SortKey members using first given value (GH-22316) (GH-22325)
(cherry picked from commit ae0d2a33ec)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-19 12:56:13 -07:00
Victor Stinner 9e73cac173
bpo-35293: Travis CI uses "make venv" for the doc (GH-22307) (GH-22309)
Doc/requirements.txt becomes the reference for packages and package
versions needed to build the Python documentation.

* Doc/Makefile now uses Doc/requirements.txt
* .travis.yml now uses "make env" of Doc/Makefile
* Update Sphinx to version 2.4.4

(cherry picked from commit 8394500cca)
2020-09-18 16:53:46 +02:00
Miss Islington (bot) f3e0eceff6
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:38:41 -07:00
Miss Islington (bot) c053402927
bpo-41762: Fix usage of productionlist markup in the doc (GH-22281)
Use an unique identifier for the different grammars documented using
the Sphinx productionlist markup.

productionlist markups of the same grammar, like "expressions" or
"compound statements", use the same identifier "python-grammar".
(cherry picked from commit 8af239eacf)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-18 00:27:21 -07:00
Serhiy Storchaka 6d893bab77
[3.9] Remove duplicated words words (GH-22298). (GH-22299)
(cherry picked from commit 27201cddf3)
2020-09-18 10:13:57 +03:00
Serhiy Storchaka 234ae8fe1b
[3.9] Remove duplicated words words (GH-20413). (GH-22296)
(cherry picked from commit 1c5d1d7304)
2020-09-18 09:36:14 +03:00
Terry Jan Reedy 4daeb9eec2
[3.9] bpo-27032, bpo-37328: Document removing HTMLParser.unescape() (GH-22288)
(cherry picked from commit a33f2c2bae)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-17 20:47:22 -04:00
Łukasz Langa 1f7c99ccf6
Post 3.9.0rc2 2020-09-17 10:45:49 +02:00
Łukasz Langa 274e9cee50 Python 3.9.0rc2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl9igmMACgkQsmmV4xAl
 BWg4KxAAl14iSJW6ezGdbzJMjaR8+c94rYTSuOVqSmFdWMFdrvcR0R2CPj49aIRG
 wz/Hux0Qj/gc9GRTSaG3KAJBR9jJAV6xIczBeM9+z825ALNLTCU+Sn744Pnjrg6n
 bUboabEHU6eTQjS7dgjqYT8Zyb+YrgbGNoJxydocIrAvU0A15pq750hfp1/vRG1/
 R339Z1ZxnGK1akuDISs8PIxVHOZy0y8u7THoEtCAZB2e71k6Iy3T2ek1RGuvtTHU
 FeQw71J1E0nXeT53o/GebA3oxX1816NmmZU0Uo8AZ6ERiPY0uBbhn5YpLmWeRi9D
 i8djOVLvtg+5sD+pSmv4ouTZ0dr4WLEUAT5EJ2O+u5t5kYz4kVih78ohnei+qLYt
 PpZh/+8xoL8DmcdvmoeTziPZYlkOLL0BLC0h+QUyIzHMdTJjbVrg9wtt6NjIr5Aj
 /M76scXEG/mtON50az21niTogF47YkGx+oFjAXref2uqheTZUHSFw3/vJC2deX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tag 'v3.9.0rc2' into 3.9

Python 3.9.0rc2
2020-09-17 10:45:24 +02:00
Miss Islington (bot) f76a3889d1
bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)
* When the parameters argument is a list, correctly handle the case
  of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
  override an exception raised in ``__len__()``.
(cherry picked from commit 0b419b7910)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-17 00:57:07 -07:00
Ethan Furman a9ba8ba9a7
[3.9] bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) (GH-22282)
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:37:51 -07:00
Miss Islington (bot) 4465df6266
_auto_called cleanup (GH-22285)
(cherry picked from commit fc23a9483e)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-16 17:27:09 -07:00
Łukasz Langa 2bd31b5fde
Python 3.9.0rc2 2020-09-16 23:23:13 +02:00
Miss Islington (bot) 48f99250ff
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:35:14 -07:00
Miss Islington (bot) 6a39888c2c
bpo-41687: Fix error handling in Solaris sendfile implementation (GH-22128)
I just realized that my recent PR with sendfile on Solaris ([PR 22040](https://github.com/python/cpython/pull/22040)) has broken error handling.

Sorry for that, this simple followup fixes that.

Automerge-Triggered-By: @1st1
(cherry picked from commit fa8c9e7010)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2020-09-16 05:25:09 -07:00
Łukasz Langa 7e356f17e4
[3.9] bpo-41687: Fix sendfile implementation to work with Solaris (GH-22040) (GH-22273)
(cherry picked from commit 8c0be6fd91)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2020-09-16 13:52:26 +02:00
Ethan Furman a4677068dd
[3.9] bpo-41789: honor object overrides in Enum classes (GH-22250) (GH-22272)
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.
2020-09-16 03:58:33 -07:00
Miss Islington (bot) 95b81e2f8c
bpo-39587: Enum - use correct mixed-in data type (GH-22263) (GH-22266)
(cherry picked from commit bff01f3a3a)
2020-09-15 16:59:48 -07:00
Miss Islington (bot) 49917d576a
bpo-41780: Fix __dir__ of types.GenericAlias (GH-22262)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 2e87774df1)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2020-09-15 16:37:13 -07:00
Miss Islington (bot) 0374883734
Improve the description of difflib in the documentation (GH-22253) (#22261)
From "can produce difference information in various formats ..."
to " can produce information about file differences in various formats ..."

Automerge-Triggered-By: @Mariatta
(cherry picked from commit 5531269f69)

Co-authored-by: Mandeep <mandeep052@gmail.com>
2020-09-15 12:45:05 -07:00
Pablo Galindo 55e0836849
[3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258)
Partially revert commit ac46eb4ad6662cf6d771b20d8963658b2186c48c:
"bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)".

Using a module state per module instance is causing subtle practical
problems.

For example, the Mercurial project replaces the __import__() function
to implement lazy import, whereas Python expected that "import _ast"
always return a fully initialized _ast module.

Add _PyAST_Fini() to clear the state at exit.

The _ast module has no state (set _astmodule.m_size to 0). Remove
astmodule_traverse(), astmodule_clear() and astmodule_free()
functions..
(cherry picked from commit e5fbe0cbd4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-15 20:32:56 +02:00
Miss Islington (bot) 0cc037f8a7
bpo-41776: Revise example of "continue" in the tutorial documentation (GH-22234) (GH-22255)
Revise example of "continue" in the tutorial documentation
(cherry picked from commit 7bcc6456ad)

Co-authored-by: Neeraj Samtani <neerajjsamtani@gmail.com>

Co-authored-by: Neeraj Samtani <neerajjsamtani@gmail.com>
2020-09-15 09:56:28 -04:00
Miss Islington (bot) b502c7618d
bpo-40721: add note about enum member name case (GH-22231)
* UPPER_CASE preferred as enum members are constants
(cherry picked from commit 542e1df2b0)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-14 13:49:29 -07:00
Miss Islington (bot) bf7d4d039c
bpo-39883: Update macOS installer copy of LICENSE. (GH-22235) (GH-22236)
(cherry picked from commit 7dbbea75ce)

Co-authored-by: Ned Deily <nad@python.org>
2020-09-14 01:59:58 -04:00