| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
"raw-unicode-escape" codec (GH-28944) (GH-28952)
They support now splitting escape sequences between input chunks.
Add the third parameter "final" in codecs.raw_unicode_escape_decode().
It is True by default to match the former behavior.
(cherry picked from commit 39aa98346d5dd8ac591a7cafb467af21c53f1e5d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
"unicode-escape" codec (GH-28939) (GH-28943)
They support now splitting escape sequences between input chunks.
Add the third parameter "final" in codecs.unicode_escape_decode().
It is True by default to match the former behavior.
(cherry picked from commit c96d1546b11b4c282a7e21737cb1f5d16349656d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
(cherry picked from commit 8e8f7522171ef82f2f5049940f815e00e38c6f42)
|
| |
|
|\
| |
| |
| | |
Python 3.10.0
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 8f943ca25732d548cf9f0b0393ba8d582fb93e29)
Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
_PyImport_FindExtensionObject() (GH-28594)
py2exe and PyOxidizer rely on this API.
It will be removed in Python 3.11.
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
(GH-27394) (GH-28636)
Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit 196998e220d6ca030e5a1c8ad63fcaed8e049a98)
Co-authored-by: Geoffrey Thomas <geofft@ldpreload.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
_PyImport_FindExtensionObject() (GH-28594)
py2exe and PyOxidizer rely on this API.
It will be removed in Python 3.11.
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 8f943ca25732d548cf9f0b0393ba8d582fb93e29)
Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
exception (GH-28119) (GH-28134)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
(cherry picked from commit b4b6342848ec0459182a992151099252434cc619)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* Use a private version of _PyType_GetQualName
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
| |
|
|
|
|
|
|
|
| |
(GH-28199)
Fix PyAiter_Check to only check for the `__anext__` presense (not for
`__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`,
`PyObject_GetAiter()` -> `PyObject_GetAIter()`.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Revert "bpo-41103: Remove old buffer protocol support (GH-21117)"
This reverts commit 6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed.
(cherry picked from commit ce5e1a6809b714eb0383219190a076d9f883e008)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260) (GH-27306)
* Remove code that checks Py_TPFLAGS_HAVE_VERSION_TAG
The field is always present in the type struct, as explained
in the added comment.
* Remove Py_TPFLAGS_HAVE_AM_SEND
The flag is not needed, and since it was added in 3.10 it can be removed now.
(cherry picked from commit a4760cc32d9e5dac7be262e9736eb30502cd7be3)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
|
| |
(GH-27225)
(cherry picked from commit 8f50f44592190b5a8cb115f0d58d577036e68308)
|
|
|
|
|
|
| |
(GH-27196) (GH-27219)
(cherry picked from commit 0fd27375cabd12e68a2f12cfeca11a2d5043429e)
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-26980) (GH-27207)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>.
(cherry picked from commit c45fa1a5d9b419cf13ad4b5a7cb453956495b83e)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
(GH-26808) (GH-26844)
* bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated.
(cherry picked from commit 92c2e91580521ba5c85aa3205a0211df5b48689b)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
|
| |
|
| |
|
|
|
|
|
| |
(cherry picked from commit be8b631b7a587aa781245e14c8cca32970e1be5b)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
Py_IS_TYPE() no longer uses Py_TYPE() to avoid a compiler warning:
no longer cast "const PyObject*" to "PyObject*".
(cherry picked from commit 304dfec8d3c0763734ea8b5fa2af1d9e1ce69ffa)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 31aa0dbff4c1d39c9d77c6c8f4a61d0e46c1268b)
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-26241) (GH-26353)
Py_FrozenMain was added to the Limited C API in [bpo-42591]() (3.10.0a4);
but to fix that issue it would be enough to add it to the regular C API.
The function is undocumented, tests were added very recently ([bpo-44131]()),
and most importantly, it is not present in all builds of Python, as
the linker sometimes omits it as unused.
It should be added back when these issues are fixed.
Note that this does not affect Python's regular C API.
(cherry picked from commit d16856960e33bc5f64fc5b842f132058becafa37)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-26313)
When the parser does a second pass to check for errors, these rules can
have some small side-effects as they may advance the parser more than
the point reached in the first pass. This can cause the tokenizer to ask
for extra tokens in interactive mode causing the tokenizer to show the
prompt instead of failing instantly.
To avoid this, add a new mode to the tokenizer that is activated in the
second pass and deactivates asking for new tokens when the interactive
line is finished. As the parsing should have reached the last line in
the first pass, the second pass should not need to ask for more tokens.
(cherry picked from commit bd7476dae337e905e7b1bbf33ddb96cc270fdc84)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a crash at Python exit when a deallocator function removes the
last strong reference to a heap type.
Don't read type memory after calling basedealloc() since
basedealloc() can deallocate the type and free its memory.
_PyMem_IsPtrFreed() argument is now constant.
(cherry picked from commit 615069eb08494d089bf24e43547fbc482ed699b8)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
| |
- Reformat the C API and ABI Versioning page (and extend/clarify a bit)
- Rewrite the stable ABI docs into a general text on C API Compatibility
- Add a list of Limited API contents, and notes for the individual items.
- Replace `Include/README.rst` with a link to a devguide page with the same info
(cherry picked from commit b05955d6f5f149523b5855a335444b7c6324bdb7)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Make case-swaps half the cost of any other edit
- Refactor Levenshtein code to not use memory allocator, and to bail early on no match.
- Add comments to Levenshtein distance code
- Add test cases for Levenshtein distance behind a debug macro
- Set threshold to `(name_size + item_size + 3) * MOVE_COST / 6`.
- Reasoning: similar to `difflib.SequenceMatcher.ratio()` >= 2/3:
```
"Multiset Jaccard similarity" >= 2/3
matching letters / total letters >= 2/3
(name_size - distance + item_size - distance) / (name_size + item_size) >= 2/3
1 - (2*distance) / (name_size + item_size) >= 2/3
1/3 >= (2*distance) / (name_size + item_size)
(name_size + item_size) / 6 >= distance
With rounding:
(name_size + item_size + 3) // 6 >= distance
```
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
|
|
|
| |
(GH-25854)
|
| |
|
| |
|
|
|
|
| |
curses module (GH-25768)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new Py_TPFLAGS_DISALLOW_INSTANTIATION type flag to disallow
creating type instances: set tp_new to NULL and don't create the
"__new__" key in the type dictionary.
The flag is set automatically on static types if tp_base is NULL or
&PyBaseObject_Type and tp_new is NULL.
Use the flag on the following types:
* _curses.ncurses_version type
* _curses_panel.panel
* _tkinter.Tcl_Obj
* _tkinter.tkapp
* _tkinter.tktimertoken
* _xxsubinterpretersmodule.ChannelID
* sys.flags type
* sys.getwindowsversion() type
* sys.version_info type
Update MyStr example in the C API documentation to use
Py_TPFLAGS_DISALLOW_INSTANTIATION.
Add _PyStructSequence_InitType() function to create a structseq type
with the Py_TPFLAGS_DISALLOW_INSTANTIATION flag set.
type_new() calls _PyType_CheckConsistency() at exit.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add Py_TPFLAGS_SEQUENCE and Py_TPFLAGS_MAPPING, add to all relevant standard builtin classes.
* Set relevant flags on collections.abc.Sequence and Mapping.
* Use flags in MATCH_SEQUENCE and MATCH_MAPPING opcodes.
* Inherit Py_TPFLAGS_SEQUENCE and Py_TPFLAGS_MAPPING.
* Add NEWS
* Remove interpreter-state map_abc and seq_abc fields.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Accessing the following attributes will now fire PEP 578 style audit hooks as ("object.__getattr__", obj, name):
* PyTracebackObject: tb_frame
* PyFrameObject: f_code
* PyGenObject: gi_code, gi_frame
* PyCoroObject: cr_code, cr_frame
* PyAsyncGenObject: ag_code, ag_frame
Add an AUDIT_READ attribute flag aliased to READ_RESTRICTED.
Update obsolete flag documentation.
|