summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] bpo-45467: Fix IncrementalDecoder and StreamReader in the ↵Serhiy Storchaka2021-10-141-0/+9
| | | | | | | | | | | "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>
* [3.10] bpo-45461: Fix IncrementalDecoder and StreamReader in the ↵Miss Islington (bot)2021-10-141-1/+9
| | | | | | | | | | | | "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>
* [3.10] Fix typos in the Include directory (GH-28745) (GH-28789)Christian Clauss2021-10-076-7/+7
| | | (cherry picked from commit 8e8f7522171ef82f2f5049940f815e00e38c6f42)
* Post 3.10.0Pablo Galindo2021-10-041-1/+1
|
* Merge tag 'v3.10.0' into 3.10Pablo Galindo2021-10-041-3/+3
|\ | | | | | | Python 3.10.0
| * Python 3.10.0v3.10.0Pablo Galindo2021-10-041-3/+3
| |
| * [3.10] Remove trailing spaces (GH-28709)Serhiy Storchaka2021-10-031-1/+1
| |
| * [3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511)Łukasz Langa2021-09-292-2/+2
| | | | | | | | | | | | | | | | | | 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>
| * [3.10] bpo-45307: Restore private C API function ↵Serhiy Storchaka2021-09-291-0/+3
| | | | | | | | | | | | | | | | _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>
* | [3.10] Remove trailing spaces (GH-28709)Serhiy Storchaka2021-10-031-1/+1
| |
* | closes bpo-44751: Move crypt.h include from public header to _cryptmodule ↵Miss Islington (bot)2021-09-291-13/+0
| | | | | | | | | | | | | | | | (GH-27394) (GH-28636) Automerge-Triggered-By: GH:benjaminp (cherry picked from commit 196998e220d6ca030e5a1c8ad63fcaed8e049a98) Co-authored-by: Geoffrey Thomas <geofft@ldpreload.com>
* | [3.10] bpo-45307: Restore private C API function ↵Serhiy Storchaka2021-09-281-0/+3
| | | | | | | | | | | | | | | | _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>
* | [3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511)Łukasz Langa2021-09-212-2/+2
| | | | | | | | | | | | | | | | 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>
* | [3.10] bpo-45083: Include the exception class qualname when formatting an ↵Miss Islington (bot)2021-09-081-0/+2
|/ | | | | | | | | | | | 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>
* Post 3.10.0rc2Pablo Galindo2021-09-071-1/+1
|
* Python 3.10.0rc2v3.10.0rc2Pablo Galindo2021-09-071-2/+2
|
* bpo-45123: PyAiter_Check and PyObject_GetAiter fix & rename. (GH-28194) ↵Miss Islington (bot)2021-09-071-2/+2
| | | | | | | (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()`.
* Post 3.10.0rc1Pablo Galindo2021-08-021-1/+1
|
* Python 3.10.0rc1v3.10.0rc1Pablo Galindo2021-08-021-3/+3
|
* bpo-41103: Resurrect the old buffer protocol. (GH-27437) (GH-27441)Miss Islington (bot)2021-07-291-0/+47
| | | | | | | | 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>
* bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make ↵Miss Islington (bot)2021-07-231-14/+12
| | | | | | | | | | | | | | | 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>
* [3.10] bpo-44654: Do not export the union type related symbols (GH-27223). ↵Serhiy Storchaka2021-07-181-3/+3
| | | | | | (GH-27225) (cherry picked from commit 8f50f44592190b5a8cb115f0d58d577036e68308)
* [3.10] bpo-44654: Refactor and clean up the union type implementation ↵Miss Islington (bot)2021-07-171-3/+4
| | | | | | (GH-27196) (GH-27219) (cherry picked from commit 0fd27375cabd12e68a2f12cfeca11a2d5043429e)
* [3.10] bpo-44490: Add __parameters__ and __getitem__ to types.Union ↵Serhiy Storchaka2021-07-171-0/+3
| | | | | | | | | | | (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>
* Post 3.10.0b4Pablo Galindo2021-07-101-1/+1
|
* Python 3.10.0b4v3.10.0b4Pablo Galindo2021-07-101-2/+2
|
* bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. ↵Miss Islington (bot)2021-06-221-1/+1
| | | | | | | | (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>
* Post 3.10.0b3Pablo Galindo2021-06-171-1/+1
|
* Python 3.10.0b3v3.10.0b3Pablo Galindo2021-06-171-2/+2
|
* [3.10] Add more const modifiers. (GH-26691). (GH-26692)Serhiy Storchaka2021-06-121-3/+3
| | | | | (cherry picked from commit be8b631b7a587aa781245e14c8cca32970e1be5b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-44378: Fix a compiler warning in Py_IS_TYPE() (GH-26644)Miss Islington (bot)2021-06-111-1/+3
| | | | | | | 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>
* bpo-44363: Get test_capi passing with address sanitizer (GH-26639)Miss Islington (bot)2021-06-101-1/+10
| | | | | (cherry picked from commit 31aa0dbff4c1d39c9d77c6c8f4a61d0e46c1268b) Co-authored-by: Mark Shannon <mark@hotpy.org>
* Post 3.10.0b2Pablo Galindo2021-05-311-1/+1
|
* Python 3.10.0b2v3.10.0b2Pablo Galindo2021-05-311-2/+2
|
* bpo-43795: Remove Py_FrozenMain from the Limited API & Stable ABI ↵Miss Islington (bot)2021-05-252-3/+4
| | | | | | | | | | | | | | | | | | (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>
* bpo-44201: Avoid side effects of "invalid_*" rules in the REPL (GH-26298) ↵Miss Islington (bot)2021-05-221-0/+1
| | | | | | | | | | | | | | | | | | (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>
* bpo-44184: Fix subtype_dealloc() for freed type (GH-26274) (GH-26290)Miss Islington (bot)2021-05-211-1/+1
| | | | | | | | | | | | | | 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>
* bpo-43795: PEP 652 user documentation (GH-25668) (GH-26034)Miss Islington (bot)2021-05-141-61/+5
| | | | | | | | | | | - 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>
* Post 3.10.0b1Pablo Galindo2021-05-031-1/+1
|
* Python 3.10.0b1v3.10.0b1Pablo Galindo2021-05-031-3/+3
|
* bpo-38530: Refactor and improve AttributeError suggestions (GH-25776)Dennis Sweeney2021-05-031-0/+2
| | | | | | | | | | | | | | | | | | | | - 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>
* bpo-43916: Move the _PyStructSequence_InitType function to the internal API ↵Pablo Galindo2021-05-032-4/+21
| | | | (GH-25854)
* bpo-42725: Render annotations effectless on symbol table with PEP 563 (GH-25583)Batuhan Taskaya2021-05-031-1/+1
|
* bpo-43754: Eliminate bindings for partial pattern matches (GH-25229)Brandt Bucher2021-05-021-0/+1
|
* bpo-43916: Export the _PyStructSequence_InitType to fix build errors in the ↵Pablo Galindo2021-05-011-3/+1
| | | | curses module (GH-25768)
* bpo-43667: Fix broken Unicode encoding in non-UTF locales on Solaris (GH-25096)Jakub Kulík2021-04-301-0/+12
|
* bpo-43916: Add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag (GH-25721)Victor Stinner2021-04-302-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* bpo-43977: Use tp_flags for collection matching (GH-25723)Mark Shannon2021-04-302-4/+7
| | | | | | | | | | | | | * 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.
* bpo-42800: Rename AUDIT_READ to PY_AUDIT_READ (GH-25736)Steve Dower2021-04-301-1/+1
|
* bpo-42800: add audit hooks for f_code and tb_frame (GH-24182)Ryan Hileman2021-04-291-0/+1
| | | | | | | | | | 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.