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>
* improve control flow docs
* Add also
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit d12af71047)
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
* Clarify number of scopes
* Indicate 3 or 4
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 9ed3cd8ba0)
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
It doesn't use PyUnicode_EncodeDecimal. It uses a private API instead.
(cherry picked from commit 9c84417122)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
PyUnicode_EncodeDecimal and PyUnicode_TransformDecimalToASCII
are deprecated since Python 3.3.
But Py_DEPRECATED(3.3) was commented out.
(cherry picked from commit 13c90e82b6)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* 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)
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>
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>
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>
Fix also a resource warning when store counts and module info.
(cherry picked from commit 04cdeb7a56)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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>
- 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)
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)
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>
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>