Commit Graph

107554 Commits

Author SHA1 Message Date
Steve Dower 941117aaa3
bpo-21222: Fix improperly merged change so that final hooks are called before types are cleared (GH-21304) 2020-07-03 23:34:46 +01:00
Steve Dower e1d4fdc533
bpo-41162: Clear audit hooks later during finalization (GH-21222)
Co-authored-by: Konge <zkonge@outlook.com>
2020-07-03 22:58:29 +01:00
Miss Islington (bot) 1c776541a8
bpo-41180: Audit code.__new__ when unmarshalling (GH-21271)
(cherry picked from commit d160e0f8e2)

Co-authored-by: tkmikan <36260601+tkmikan@users.noreply.github.com>
2020-07-03 14:16:23 -07:00
Łukasz Langa c1feaa5468
Post 3.9.0b4 2020-07-03 18:47:54 +02:00
Łukasz Langa b0bb791313 Python 3.9.0b4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl7+ICsACgkQsmmV4xAl
 BWjNgg//fTnAwme/3pJU6MiYy9K6nes+498B9pjqbmm08Afb7n7Jx/N8hKr7Bx7w
 QL7KzXltmGyKQwU7D9436eXCWkkkYn5wGt/snsgPAxf0wgg2T9vaJMvw48XNZatD
 zRY8Jh9fdKZMA3HNuUkFGpun6sB/IP/JyeCUK66ZKdcW0YLrU6ycWt5E6Vh8BQxQ
 YHyqJXFhsTW1XgkxbMbhSAv60DBBmHX2Wdtnhezpqu92eYlCVNI++adNc4A5v5t7
 fdxAJOsdbqiZMEcV6xwlfdlciBE3Y0Eu0DH6z1gfeKN69+2E+mrOzTOvhNJ+tZAs
 R7KRcVZZMxdiB0QMlEYjZS/zABp8XBQEDByonvEIdCcrGRS/jH7NP04+nUtnjUnB
 BT3dNimwVqJHCJkfgzUrTXjz5tPwzLB4SA/bJDjM1ifDS2Ml+lk/WcemMNe6IKv+
 ukIi8dvRJmx/W7Nrevu7EDsQnOqwkMjR9sUcwysJNA2iDQ3cePQ/GhPQHBWBgSA+
 voiem2SDC7MOBw47yxELk8P96DpoYGZ0IACDMXTrlaqQqXPOpNY27rf1ofpTR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Victor Stinner f8599279b6
[3.9] bpo-41194: The _ast module cannot be loaded more than once (GH-21290) (GH-21292)
* bpo-41194: Pass module state in Python-ast.c (GH-21284)

Rework asdl_c.py to pass the module state to functions in
Python-ast.c, instead of using astmodulestate_global.

Handle also PyState_AddModule() failure in init_types().

(cherry picked from commit 74419f0c64)

* bpo-41194: The _ast module cannot be loaded more than once (GH-21290)

Fix a crash in the _ast module: it can no longer be loaded more than
once. It now uses a global state rather than a module state.

* Move _ast module state: use a global state instead.
* Set _astmodule.m_size to -1, so the extension cannot be loaded more
  than once.

(cherry picked from commit 91e1bc18bd)
2020-07-03 16:57:19 +02:00
Miss Islington (bot) 486c256bdf
Improve code organization for the random module (GH-21161) (GH-21163) 2020-07-02 18:12:50 -07:00
Miss Islington (bot) bfec674254
bpo-39960: Allow heap types in the "Carlo Verre" hack check that override "tp_setattro()" (GH-21092)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 148f329135)

Co-authored-by: scoder <stefan_ml@behnel.de>
2020-07-02 17:28:41 -07:00
Miss Islington (bot) 32e9e17c42
Remove extraneous file from the Docs folder (GH-21286)
(cherry picked from commit 67673b08ea)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-07-02 15:15:01 -07:00
Łukasz Langa 69dec9c8d2
Python 3.9.0b4 2020-07-02 19:57:45 +02:00
Miss Islington (bot) 0b4c87ef8f
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:16 -07:00
Serhiy Storchaka ecfecc2d6c
[3.9] bpo-41043: Escape literal part of the path for glob(). (GH-20994). (GH-21275)
(cherry picked from commit 9355868458)
2020-07-02 10:05:16 +03:00
Miss Islington (bot) df59293bf0
bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks() (GH-20874)
(cherry picked from commit 004e64e805)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
2020-07-01 21:06:51 -07:00
Miss Islington (bot) fe0175f5b5
bpo-41158: IDLE: rewrite the code for handling file encoding (GH-21215)
(cherry picked from commit 694d31e714)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-07-01 08:29:30 -07:00
Lysandros Nikolaou c20e83dce0
[3.9] Add lysnikolaou to CODEOWNERS for the new parser (GH-21253) 2020-07-01 12:50:04 +03:00
Miss Islington (bot) 652585c629
Doc: Minor fix to init config C API documentation (GH-21198)
Co-authored-by: Tomer Vromen <tomer.vromen@intel.com>
(cherry picked from commit 741008a57b)

Co-authored-by: tomerv <tomerv@gmail.com>
2020-07-01 02:40:14 -07:00
Miss Islington (bot) c84d3fe6b3
bpo-41161 Add news entry for libmpdec-2.5.0 (GH-21243) (#21244)
(cherry picked from commit 1648c99932)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-30 21:07:12 +02:00
Miss Islington (bot) 083ed52832
Update FAQ release schedule and estimated users (GH-21180)
Update FAQ to include:
* The new yearly release schedule from PEP 602
* Estimated users from "tens of thousands" to "millions"
(cherry picked from commit 3fa4799c3f)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2020-06-30 02:51:12 -07:00
Inada Naoki 2ea6a9928e
bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227) 2020-06-30 15:24:06 +09:00
Miss Islington (bot) 01638ce51a
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:36:46 -07:00
Miss Islington (bot) 9a646aa82d
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:15:32 -07:00
Lysandros Nikolaou 990efe0fff
[3.9] bpo-41084: Fix test_fstring failure when using the old parser (GH-21212) 2020-06-29 13:55:57 +01:00
Miss Islington (bot) a3f2a58ef8
Update libmpdec license dates (GH-21216)
(cherry picked from commit a3ad95dd21)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-29 14:12:02 +02:00
Miss Islington (bot) 9e36b6e6c8
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:31 -07:00
Inada Naoki 02134dae44
bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205) 2020-06-29 14:26:27 +09:00
Miss Islington (bot) 119de0eba8
bpo-40874 Update the required libmpdec version for the decimal module (GH-21202)
(cherry picked from commit 8bea91b5e9)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-06-28 22:24:58 +02:00
Miss Islington (bot) d1e05e78a3
bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177)
Fix also a resource warning when store counts and module info.
(cherry picked from commit 04cdeb7a56)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-28 03:52:26 -07:00
Miss Islington (bot) 1497bf66f9
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:22:05 -07:00
Pablo Galindo 6e39999a24
[3.9] bpo-38870: Extend subject of ast.unparse warnings (GH-21053) (GH-21191)
- Mention that some compiler optimizations might not roundtrip
exactly (such as constant tuples and frozensets).

- Add a warning about it might raise RecursionError on very
complex expressions due to the recursive unparsing aspect of ast.unparse
(cherry picked from commit 8df1016)
2020-06-28 02:22:30 +01:00
Pablo Galindo 6803ff28f8
[3.9] Add soft keywords to the documentation (GH-21185) (GH-21187)
(cherry picked from commit 89e82c4)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-06-28 02:10:37 +01:00
Guido van Rossum 2a1ee1d970
[3.9] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21022) 2020-06-27 17:34:30 -07:00
Pablo Galindo dab533d0ee
[3.9] bpo-41076: Pre-feed the parser with the f-string expression location (GH-21054) (GH-21190)
This commit changes the parsing of f-string expressions with the new parser. The parser gets pre-fed with the location of the expression itself (not the f-string, which was what we were doing before). This allows us to completely skip the shifting of the AST nodes after the parsing is completed..
(cherry picked from commit 1f0f4abb11)
2020-06-28 01:15:28 +01:00
Pablo Galindo 102ca529ef
[3.9] bpo-40769: Allow extra surrounding parentheses for invalid annotated assignment rule (GH-20387) (GH-21186)
(cherry picked from commit c8f29ad986)
2020-06-28 00:40:41 +01:00
Miss Islington (bot) cb0dc52d37
bpo-41084: Adjust message when an f-string expression causes a SyntaxError (GH-21084)
Prefix the error message with `fstring: `, when parsing an f-string expression throws a `SyntaxError`.
(cherry picked from commit 2e0a920e9e)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2020-06-27 12:43:49 -07:00
Lysandros Nikolaou 5193d0a665
[3.9] bpo-41132: Use pymalloc allocator in the f-string parser (GH-21173) (GH-21183)
(cherry picked from commit 6dcbc2422d)

Automerge-Triggered-By: @pablogsal
2020-06-27 11:35:18 -07:00
Miss Islington (bot) 9191eacf9e
Remove dead code from tracemalloc (GH-21029)
tracemalloc_get_frame() checked filename == NULL two times in a row.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 9cfcdb7d6e)

Co-authored-by: Christian Heimes <christian@python.org>
2020-06-27 08:39:57 -07:00
Miss Islington (bot) 1a0c581a94
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:51:56 -07:00
Lysandros Nikolaou d01a3e76ee
[3.9] bpo-41119: Output correct error message for list/tuple followed by colon (GH-21160) (GH-21172)
(cherry picked from commit 4b85e60601)
2020-06-27 00:14:12 +01:00
Serhiy Storchaka f925407a19
[3.9] bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035). (GH-21156)
(cherry picked from commit 700cfa8c90)
2020-06-25 20:39:12 +03:00
Miss Islington (bot) ad7a66731f
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:13:35 -07:00
Miss Islington (bot) c4dfcb28f7
bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138)
(cherry picked from commit aad8f0eeca)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-25 05:24:15 -07:00
Miss Islington (bot) 086b453980
bpo-41113: Fix test_warnings on non-Western locales. (GH-21143)
(cherry picked from commit 0f8ec1fff0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-25 05:21:58 -07:00
Christian Heimes cd6f911097
[3.9] bpo-41009: fix requires_OS_version() class decorator (GH-20942) (GH-20947)
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:06 -07:00
Miss Islington (bot) fdf6872f38
bpo-35773: Fix test_bdb on non-UTF-8 locales. (GH-21136)
(cherry picked from commit 94eee69e9b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-25 04:41:42 -07:00
Miss Islington (bot) 16e79a47ca
bpo-40204: Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. (GH-21141)
(cherry picked from commit 589e8fe079)

Co-authored-by: Ned Deily <nad@python.org>
2020-06-25 04:28:47 -07:00
Miss Islington (bot) bdc55eb55f
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:52 -07:00
Ned Deily e9dafe7c93
Forward port macOS installer updates from 3.7/3.8 (GH-21132) (GH-21135)
- fix installer builds when using latest versions of Python 3
- fix installer builds on newer macOS releases with SIP
- Python Launcher app factory defaults now use python3
2020-06-25 05:23:30 -04:00
Miss Islington (bot) 0ef6a3fc0e
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:58 -07:00
Miss Islington (bot) c1634ac834
bpo-40773: Fix rendering for 'retval' on the pdb page (GH-21081)
Automerge-Triggered-By: @merwok
(cherry picked from commit cf18c9e9d4)

Co-authored-by: Arisaka97 <solitaire2312@gmail.com>
2020-06-24 15:01:04 -07:00
Miss Islington (bot) 29aa8085e9
bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119)
(cherry picked from commit a7dc714701)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-06-24 10:15:59 -07:00