summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43555: Report the column offset for invalid line continuation character ↵Pablo Galindo2021-03-224-6/+13
| | | | (GH-24939)
* bpo-43591: Fix error location in interactive mode for errors at the end of ↵Pablo Galindo2021-03-222-7/+17
| | | | | the line (GH-24973) Co-authored-by: Erlend Egeberg Aasland
* Revert "bpo-40521: Make dtoa bigint free list per-interpreter (GH-24821)" ↵Victor Stinner2021-03-223-39/+17
| | | | | (GH-24964) This reverts commit 5bd1059184b154d339f1bd53d23c98b5bcf14c8c.
* bpo-43575: Use PEP 590 vectorcall to speed up map() (GH-24955)Dong-hee Na2021-03-222-2/+45
|
* bpo-43551: Fix PyImport_Import() for subinterpreters (GH-24929)junyixie2021-03-221-16/+21
| | | Avoid static variables.
* bpo-35134: Add include/cpython/compile.h (GH-24922)Hai Shi2021-03-226-94/+100
| | | | Move C API excluded from the limited C API from Include/compile.h to a new Include/cpython/compile.h header file.
* bpo-43420: Simple optimizations for Fraction's arithmetics (GH-24779)Sergey B Kirpichev2021-03-224-9/+121
| | | | | | | bpo-43420: Implement standard transformations in + - * / that can often reduce the size of intermediate integers needed. For rationals with large components, this can yield dramatic speed improvements, but for small rationals can run 10-20% slower, due to increased fixed overheads in the longer-winded code. If those slowdowns turn out to be a problem, see the PR discussion for low-level implementation tricks that could cut other fixed overheads. Co-authored-by: Tim Peters <tim.peters@gmail.com> Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* bpo-43569: Add test/test_importlib/namespacedata01 to TESTSUBDIRS (GH-24952)Jason R. Coombs2021-03-211-0/+1
|
* bpo-43422: Revert _decimal C API addition (GH-24960)Antoine Pitrou2021-03-2110-1119/+20
| | | | | | | | | Stefan Krah requested the reversal of these (unreleased) changes, quoting him: > The capsule API does not meet my testing standards, since I've focused on the upstream mpdecimal in the last couple of months. > Additionally, I'd like to refine the API, perhaps together with the Arrow community. Automerge-Triggered-By: GH:pitrou
* bpo-43577: Fix deadlock with SSLContext._msg_callback and sni_callback ↵Christian Heimes2021-03-214-0/+29
| | | | | | | | | | | | (GH-24957) OpenSSL copies the internal message callback from SSL_CTX->msg_callback to SSL->msg_callback. SSL_set_SSL_CTX() does not update SSL->msg_callback to use the callback value of the new context. PySSL_set_context() now resets the callback and _PySSL_msg_callback() resets thread state in error path. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-43542: Add heif/heic formats in mimetypes (GH-24917)Ilya Stepin2021-03-202-0/+3
| | | | | | | | | | * bpo-43542: Add heif/heic formats in mimetypes Add HEIF and HEIC format to list of media types. It has IANA registration. IANA: https://www.iana.org/assignments/media-types/image/heic HEIF Github: https://github.com/nokiatech/heif Co-authored-by: Gregory P. Smith <greg@krypto.org>
* bpo-43571: Add IPPROTO_MPTCP macro (GH-24946)Rui Cunha2021-03-204-0/+10
| | | Add IPPROTO_MPTCP constant when defined in the system headers.
* bpo-43517 (followup): Install additional test directory (GH-24950)Antoine Pitrou2021-03-201-0/+1
| | | | | Should fix some CI failures on buildbots that test an installed version of Python. Automerge-Triggered-By: GH:pitrou
* bpo-43452: Micro-optimizations to PyType_Lookup (GH-24804)Dino Viehland2021-03-202-28/+24
| | | | | | | | | The common case going through _PyType_Lookup is to have a cache hit. There are some small tweaks that can make this a little cheaper: * The name field identity is used for a cache hit and is kept alive by the cache. So there's no need to read the hash code o the name - instead, the address can be used as the hash. * There's no need to check if the name is cachable on the lookup either, it probably is, and if it is, it'll be in the cache. * If we clear the version tag when invalidating a type then we don't actually need to check for a valid version tag bit.
* bpo-43517: Fix false positive in detection of circular imports (#24895)Antoine Pitrou2021-03-205-2/+81
|
* bpo-43494: Make some minor changes to lnotab notes (GH-24861)Skip Montanaro2021-03-191-6/+6
| | | | This cleanup makes no substantive changes.
* Mention that code.co_lnotab is deprecated in what's new for 3.10. (#24902)Mark Shannon2021-03-191-0/+2
|
* bpo-43244: Remove symtable.h header file (GH-24910)Victor Stinner2021-03-1915-115/+100
| | | | | | | | | | | | | | | | | | Rename Include/symtable.h to to Include/internal/pycore_symtable.h, don't export symbols anymore (replace PyAPI_FUNC and PyAPI_DATA with extern) and rename functions: * PyST_GetScope() to _PyST_GetScope() * PySymtable_BuildObject() to _PySymtable_Build() * PySymtable_Free() to _PySymtable_Free() Remove PySymtable_Build(), Py_SymtableString() and Py_SymtableStringObject() functions. The Py_SymtableString() function was part the stable ABI by mistake but it could not be used, since the symtable.h header file was excluded from the limited C API. The Python symtable module remains available and is unchanged.
* bpo-43466: Add --with-openssl-rpath configure option (GH-24820)Christian Heimes2021-03-199-7304/+5214
|
* Fix a typo in c-analyzer (GH-24468)Ikko Ashimine2021-03-191-1/+1
|
* bpo-41561: Add workaround for Ubuntu's custom security level (GH-24915)Christian Heimes2021-03-183-1/+31
| | | | | | | | | | Ubuntu 20.04 comes with a patched OpenSSL 1.1.1. Default security level 2 blocks TLS 1.0 and 1.1 connections. Regular OpenSSL 1.1.1 builds allow TLS 1.0 and 1.1 on security level 2. See: See: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1899878 See: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1917625 Signed-off-by: Christian Heimes <christian@python.org>
* bpo-43521: Allow ast.unparse with empty sets and NaN (GH-24897)Kodi Arfer2021-03-183-9/+27
| | | Automerge-Triggered-By: GH:pablogsal
* bpo-43244: Remove the PyAST_Validate() function (GH-24911)Victor Stinner2021-03-187-5/+15
| | | | | | | | | | | | Remove the PyAST_Validate() function. It is no longer possible to build a AST object (mod_ty type) with the public C API. The function was already excluded from the limited C API (PEP 384). Rename PyAST_Validate() function to _PyAST_Validate(), move it to the internal C API, and don't export it anymore (replace PyAPI_FUNC with extern). The function was added in bpo-12575 by the commit 832bfe2ebd5ecfa92031cd40c8b41835ba90487f.
* bpo-43541: Fix PyEval_EvalCodeEx() regression (GH-24918)Victor Stinner2021-03-184-6/+6
| | | | | | | | | | | * Remove an assertion which required CO_NEWLOCALS and CO_OPTIMIZED code flags. It is ok to call this function on a code with these flags set. * Fix reference counting on builtins: remove Py_DECREF(). Fix regression introduced in the commit 46496f9d12582bf11f4911ad0f23315d6f277907. Add also a comment to document that _PyEval_BuiltinsFromGlobals() returns a borrowed reference.
* bpo-43244: Fix test_peg_generators on Windows (GH-24913)Victor Stinner2021-03-182-6/+4
| | | | Don't redefine Py_DebugFlag, it's already defined in pydebug.h which is included by Python.h
* bpo-39342: Expose X509_V_FLAG_ALLOW_PROXY_CERTS in ssl module (GH-18011)Chris Burr2021-03-184-0/+15
| | | Exposes the `X509_V_FLAG_ALLOW_PROXY_CERTS` constant as `ssl.VERIFY_ALLOW_PROXY_CERTS` to allow for proxy certificate validation as described in: https://www.openssl.org/docs/man1.1.1/man7/proxy-certificates.html
* bpo-43244: Fix test_peg_generator for PyAST_Validate() (GH-24912)Victor Stinner2021-03-184-282/+14
| | | | | | | | | test_peg_generator now defines _Py_TEST_PEGEN macro when building C code to not call PyAST_Validate() in Parser/pegen.c. Moreover, it defines Py_BUILD_CORE_MODULE macro to get access to the internal C API. Remove "global_ast_state" from Python-ast.c when it's built by test_peg_generator: always get the AST state from the current interpreter.
* bpo-42128: Add 'missing :' syntax error message to match statements (GH-24733)Pablo Galindo2021-03-183-184/+368
|
* bpo-43244: Add pycore_ast.h header file (GH-24908)Victor Stinner2021-03-178-21/+37
| | | | | | | | Move _PyAST_GetDocString() and _PyAST_ExprAsUnicode() functions the internal C API: from Include/ast.h to a new Include/internal/pycore_ast.h header file. Don't export these functions anymore: replace PyAPI_FUNC() with extern. Remove also unused includes.
* bpo-43244: Rename pycore_ast.h to pycore_ast_state.h (GH-24907)Victor Stinner2021-03-178-16/+21
|
* Remove unnecessary imports in the grammar parser (GH-24904)Elisha Hollander2021-03-172-8/+2
|
* bpo-35883: Py_DecodeLocale() escapes invalid Unicode characters (GH-24843)Victor Stinner2021-03-174-69/+148
| | | | | | | | | | Python no longer fails at startup with a fatal error if a command line argument contains an invalid Unicode character. The Py_DecodeLocale() function now escapes byte sequences which would be decoded as Unicode characters outside the [U+0000; U+10ffff] range. Use MAX_UNICODE constant in unicodeobject.c.
* Add PEP 626 to what's new in 3.10. (#24892)Mark Shannon2021-03-161-0/+8
|
* bpo-43497: Emit SyntaxWarnings for assertions with tuple constants. (GH-24867)tsukasa-au2021-03-163-6/+37
| | | | | | | | | | | | | | | | | | | * bpo-43497: Emit SyntaxWarnings for assertions with tuple constants. Add a test that shows that a tuple constant (a tuple, where all of its members are also compile-time constants) produces a SyntaxWarning. Then fix this failure. * Make SyntaxWarnings also work when "optimized". * Split tests for SyntaxWarning to SyntaxError conversion SyntaxWarnings emitted by the compiler when configured to be errors are actually raised as SyntaxError exceptions. Move these tests into their own method and add a test to ensure they are raised. Previously we only tested that they were not raised for a "valid" assertion statement.
* bpo-43506: Doc: Update removal schedule for Py_UNICODE encoder APIs (GH-24885)Inada Naoki2021-03-161-11/+15
| | | See PEP 624.
* bpo-41361: Optimized argument parsing for deque_rotate (GH-24796)Dennis Sweeney2021-03-162-1/+13
|
* Minor updates to the vector demo (GH-24853)Raymond Hettinger2021-03-161-5/+25
|
* bpo-41933: Clarify wording for s * n in Common Sequence Operations (GH-22570)Chavdar Yotov2021-03-152-2/+3
|
* bpo-43285 Make ftplib not trust the PASV response. (GH-24838)Gregory P. Smith2021-03-153-3/+43
| | | | | | | | | | | | | | | bpo-43285: Make ftplib not trust the PASV response. The IPv4 address value returned from the server in response to the PASV command should not be trusted. This prevents a malicious FTP server from using the response to probe IPv4 address and port combinations on the client network. Instead of using the returned address, we use the IP address we're already connected to. This is the strategy other ftp clients adopted, and matches the only strategy available for the modern IPv6 EPSV command where the server response must return a port number and nothing else. For the rare user who _wants_ this ugly behavior, set a `trust_server_pasv_ipv4_address` attribute on your `ftplib.FTP` instance to True.
* Fix typo in the word "spaghetti" (GH-24866)Kazantcev Andrey2021-03-151-1/+1
| | | Automerge-Triggered-By: GH:Mariatta
* Mark POP_TOP at end of expression statement as artificial, to conform to PEP ↵Mark Shannon2021-03-152-0/+10
| | | | 626. (GH-24860)
* bpo-43428: Improve documentation for importlib.metadata changes. (GH-24858)Jason R. Coombs2021-03-153-3/+73
| | | | | | | * bpo-43428: Sync with importlib_metadata 3.7.3 (16ac3a95) * Add 'versionadded' for importlib.metadata.packages_distributions * Add section in what's new for Python 3.10 highlighting most salient changes and relevant backport.
* bpo-43199: Briefly explain why no goto (GH-24852)Terry Jan Reedy2021-03-142-1/+10
| | | | Answer "Why is there no goto?" in the Design and History FAQ.
* bpo-29982: Add "ignore_cleanup_errors" param to ↵CAM Gerlach2021-03-144-15/+117
| | | | tempfile.TemporaryDirectory() (GH-24793)
* bpo-39316: Make sure that attribute accesses and stores, including method ↵Mark Shannon2021-03-145-6/+70
| | | | calls, conform to PEP 626. (GH-24859)
* bpo-43410: Fix crash in the parser when producing syntax errors when reading ↵Pablo Galindo2021-03-145-31/+76
| | | | from stdin (GH-24763)
* bpo-43245: Add keyword argument support to ChainMap.new_child() (GH-24788)Kamil Turek2021-03-144-6/+18
|
* bpo-43439: Wrapt the tuple in the audit events for the gc module (GH-24836)Pablo Galindo2021-03-141-2/+2
|
* Fix some minor errors in the docs (GH-24834)Zackery Spytz2021-03-145-5/+5
|
* bpo-43427: Separte the method overview from the static method specifics. ↵Raymond Hettinger2021-03-131-2/+6
| | | | (GH-24787)