summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.12] gh-102541: Hide traceback in help prompt (gh-102614) (gh-105778)Miss Islington (bot)2023-06-151-0/+1
| | | | | | gh-102541: Hide traceback in help prompt (gh-102614) (cherry picked from commit ba516e70c6d156dc59dede35b6fc3db0151780a5) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.12] gh-105800: Issue SyntaxWarning in f-strings for invalid escape ↵Miss Islington (bot)2023-06-151-0/+2
| | | | | | sequences (GH-105801) (#105806) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] gh-105745: Fix open method of webbrowser.Konqueror (GH-105746) (#105777)Miss Islington (bot)2023-06-141-0/+1
| | | | | | gh-105745: Fix open method of webbrowser.Konqueror (GH-105746) (cherry picked from commit e5d45b7444733861153d6e8959c34323fd361322) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-105587: Remove assertion from `_PyStaticObject_CheckRefcnt` ↵Miss Islington (bot)2023-06-141-0/+3
| | | | | | | | (GH-105638) (#105769) gh-105587: Remove assertion from `_PyStaticObject_CheckRefcnt` (GH-105638) (cherry picked from commit 6199fe3b3236748033a7ce2559aeddb5a91bbbd9) Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
* [3.12] gh-105387: Limited C API implements Py_INCREF() as func (GH-105388) ↵Miss Islington (bot)2023-06-141-0/+3
| | | | | | | | | | | | (#105763) gh-105387: Limited C API implements Py_INCREF() as func (GH-105388) In the limited C API version 3.12, Py_INCREF() and Py_DECREF() functions are now implemented as opaque function calls to hide implementation details. (cherry picked from commit b542972dc133973a7f0517aa1b61779271789111) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-104812: Run Pending Calls in any Thread (gh-104813) (gh-105752)Eric Snow2023-06-141-0/+9
| | | | For a while now, pending calls only run in the main thread (in the main interpreter). This PR changes things to allow any thread run a pending call, unless the pending call was explicitly added for the main thread to run. (cherry picked from commit 757b402)
* [3.12] gh-105603: Change the PyInterpreterConfig.own gil Field (gh-105620) ↵Miss Islington (bot)2023-06-131-0/+5
| | | | | | | | (gh-105731) We are changing it to be more flexible that a strict bool can be for possible future expanded used cases. (cherry picked from commit b97e14a806477af4225777d215ac38c0d9b845f0) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-105084: Tests: Use setuptools+wheel from ↵Miro Hrončok2023-06-131-0/+3
| | | | | | | | | | sysconfig.get_config_var('WHEEL_PKG_DIR') if set (#105056) (#105424) Includes part of the changes from afa759fb800be416f69e3e9c9b3efe68006316f5, to make this apply. Co-Authored-By: Lysandros Nikolaou <lisandrosnik@gmail.com> (cherry picked from commit bd98b65e974b7a1e086a51e7b55131582f7a0491)
* [3.12] gh-105375: Improve error handling in _Unpickler_SetInputStream() ↵Erlend E. Aasland2023-06-131-0/+2
| | | | | | | | (#105667) (#105720) Prevent exceptions from possibly being overwritten in case of multiple failures. (cherry picked from commit 217589d4f3246d67c6ef0eb0be2b1c33987cf260)
* [3.12] gh-105436: The environment block should end with two null wchar_t ↵Miss Islington (bot)2023-06-121-0/+2
| | | | | | | | values (GH-105495) (#105700) gh-105436: The environment block should end with two null wchar_t values (GH-105495) (cherry picked from commit 4f7d3b602d47d61137e82145f601dccfe6f6cd3c) Co-authored-by: Dora203 <66343334+sku2000@users.noreply.github.com>
* [3.12] gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL ↵Miss Islington (bot)2023-06-121-0/+2
| | | | | | | | (GH-105386) (GH-105697) gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386) (cherry picked from commit 2b90796be6959d5ef46b38c434a514fce25be971) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] gh-105375: Harden pyexpat initialisation (#105606) (#105669)Erlend E. Aasland2023-06-111-0/+3
| | | | | | (cherry picked from commit 20a56d8becba1a5a958b167fdb43b1a1b9228095) Add proper error handling to add_errors_module() to prevent exceptions from possibly being overwritten.
* [3.12] gh-105375: Improve error handling in the sys extension module ↵Miss Islington (bot)2023-06-111-0/+2
| | | | | | | | | | (GH-105611) (#105665) In _PySys_AddXOptionWithError() and sys_add_xoption(), bail on first error to prevent exceptions from possibly being overwritten. (cherry picked from commit 41cddc2e93a285b81fa30ac542b088bd9d0112e9) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Improve error handling in _ctypes (GH-105593) (#105663)Miss Islington (bot)2023-06-111-0/+1
| | | | | | | Prevent repeated PyLong_FromVoidPtr() from possibly overwriting the current exception. (cherry picked from commit e8998e46a7ce8ad336e0941a6da6e50cb88d1e47) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Improve error handling in PyUnicode_BuildEncodingMap() ↵Miss Islington (bot)2023-06-111-0/+2
| | | | | | | | (GH-105491) (#105661) Bail on first error to prevent exceptions from possibly being overwritten. (cherry picked from commit 555be81026fe1205d16c02f6321221381174cd07) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Improve PyErr_WarnExplicit() error handling (GH-105610) ↵Miss Islington (bot)2023-06-111-0/+2
| | | | | | | | | (#105659) Bail on first error to prevent exceptions from possibly being overwritten. (cherry picked from commit 567d6ae8e77579173510fc948ac06b2ababf3d40) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Improve posix error handling (GH-105592) (#105598)Miss Islington (bot)2023-06-111-0/+2
| | | | | | Fix a bug where an IndexError could end up being overwritten. (cherry picked from commit f668f73bc88cce0112b304d87aa998fb28013c71) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Improve error handling in the builtins extension module ↵Miss Islington (bot)2023-06-111-0/+2
| | | | | | | (GH-105585) (#105649) (cherry picked from commit d4fa52934a282df51cff800eee5caeb94a229547) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Improve _decimal error handling (GH-105605) (#105647)Miss Islington (bot)2023-06-111-0/+1
| | | | | | Fix a bug where an exception could end up being overwritten. (cherry picked from commit c932f7284977ebf813313157c52d716ba225a7ac) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Harden _datetime initialisation (GH-105604) (#105645)Miss Islington (bot)2023-06-111-0/+2
| | | | | | Improve error handling so init bails on the first exception. (cherry picked from commit 16d49680b56e00c53c00683b949138e584669fd3) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Harden _ssl initialisation (GH-105599) (#105642)Miss Islington (bot)2023-06-111-0/+2
| | | | | | | Add proper error handling to prevent reference leaks and overwritten exceptions. (cherry picked from commit 01f4230460454d4a849a5ba93320142c1a0c93a8) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Improve array.array exception handling (GH-105594) (#105644)Miss Islington (bot)2023-06-111-0/+2
| | | | | | Fix a bug where 'tp_richcompare' could end up overwriting an exception. (cherry picked from commit 35cff545db7c7912046c0ce5627db2e4d2b60f57) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Improve error handling in `zoneinfo` module (GH-105586) ↵Miss Islington (bot)2023-06-091-0/+1
| | | | | | | | | | | (#105612) Fix bugs where exceptions could end up being overwritten because of deferred error handling. (cherry picked from commit 33c92c4f15539806c8aff8574ff30a8b307e3e4d) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] Docs: fix formatting in 2023-06-09-12-59-18 NEWS item (GH-105607) ↵Miss Islington (bot)2023-06-091-2/+2
| | | | | | | (#105614) (cherry picked from commit 91441bf7cbaefbd328ee7efa59a06e661f61542e) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105549: Tokenize separately NUMBER and NAME tokens and allow ↵Miss Islington (bot)2023-06-091-0/+2
| | | | | | 0-prefixed literals (GH-105555) (#105602) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] gh-105375: Improve error handling in _elementtree (GH-105591) (#105600)Miss Islington (bot)2023-06-091-0/+1
| | | | | | Fix bugs where exceptions could end up being overwritten. (cherry picked from commit 00b599ab5a76023fa0083d7cc5d3c569342a5191) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105375: Improve errnomodule error handling (#105590) (#105596)Erlend E. Aasland2023-06-091-0/+1
| | | | | | (cherry picked from commit eede1d2f48b4fe7f7918952d9ebeb744b58668c1) Bail immediately if an exception is set, to prevent exceptions from being overwritten.
* [3.12] gh-105375: Improve _pickle error handling (#105475) (#105584)Erlend E. Aasland2023-06-091-0/+1
| | | | | | (cherry picked from commit 89aac6f6b7b3af046ec137121c90732289e79efc) Error handling was deferred in some cases, which could potentially lead to exceptions being overwritten.
* [3.12] gh-105375: Improve error handling in compiler_enter_scope() ↵Miss Islington (bot)2023-06-091-0/+1
| | | | | | | (GH-105494) (#105581) (cherry picked from commit 6c832ddcf28187f86100c790afb16a0223d945d0) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105564: Don't include artificial newlines in the line attribute of ↵Miss Islington (bot)2023-06-091-0/+2
| | | | | | tokens (GH-105565) (#105579) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348) ↵Miss Islington (bot)2023-06-091-0/+1
| | | | | | | | | | (GH-105520) * revert enum pickling from by-name to by-value (cherry picked from commit 4ff5690e591b7d11cf11e34bf61004e2ea58ab3c) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* [3.12] gh-104310: Rename the New Function in importlib.util (gh-105255) ↵Miss Islington (bot)2023-06-081-0/+7
| | | | | | | | | | | | | | | | (gh-105518) The original name wasn't as clear as it could have been. This change includes the following: * rename the function * change the default value for "disable_check" to False * add clues to the docstring that folks should probably not use the function --------- (cherry picked from commit 34c63b86d3c33a85acf55a0c5c118304754e145d) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.12] GH-104996: Defer joining of `pathlib.PurePath()` arguments. ↵Barney Gale2023-06-071-0/+2
| | | | | | | | (GH-104999) (GH-105483) Joining of arguments is moved to `_load_parts`, which is called when a normalized path is needed. (cherry picked from commit ffeaec7e60c88d585deacb10264ba7a96e5e52df)
* [3.12] gh-105435: Fix spurious NEWLINE token if file ends with comment ↵Miss Islington (bot)2023-06-071-0/+2
| | | | without a newline (GH-105442) (#105444)
* [3.12] gh-105375: Improve error handling in sqlite3 collation callback ↵Miss Islington (bot)2023-06-071-0/+2
| | | | | | | | (GH-105412) (#105440) Check for error after each call to PyUnicode_FromStringAndSize(). (cherry picked from commit a24a780d937109a0982d807473ae410cc75b0e3b) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-105390: Correctly raise TokenError instead of SyntaxError for ↵Miss Islington (bot)2023-06-071-0/+3
| | | | tokenize errors (GH-105399) (#105439)
* Merge branch '3.12' of https://github.com/python/cpython into 3.12Thomas Wouters2023-06-061-9/+0
|\
| * [3.12] gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763) (#105352)Victor Stinner2023-06-061-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763) When Python is built in debug mode (if the Py_REF_DEBUG macro is defined), the Py_INCREF() and Py_DECREF() function are now always implemented as opaque functions to avoid leaking implementation details like the "_Py_RefTotal" variable or the _Py_DecRefTotal_DO_NOT_USE_THIS() function. * Remove _Py_IncRefTotal_DO_NOT_USE_THIS() and _Py_DecRefTotal_DO_NOT_USE_THIS() from the stable ABI. * Remove _Py_NegativeRefcount() from limited C API. (cherry picked from commit 92022d8416d9e175800b65c4d71d4e4fb47adcb0)
* | Python 3.12.0b2v3.12.0b2Thomas Wouters2023-06-0651-124/+530
|/
* [3.12] GH-105162: Account for `INSTRUMENTED_RESUME` in gen.close/throw. ↵Miss Islington (bot)2023-06-061-0/+2
| | | | | | | | (GH-105187) (#105378) GH-105162: Account for `INSTRUMENTED_RESUME` in gen.close/throw. (GH-105187) (cherry picked from commit 601ae09f0c8eda213b9050892f5ce9b91f0aa522) Co-authored-by: Mark Shannon <mark@hotpy.org>
* [3.12] gh-104399: Use newer libtommath APIs when necessary (GH-104407) (#105343)Miss Islington (bot)2023-06-061-0/+4
| | | | | | gh-104399: Use newer libtommath APIs when necessary (GH-104407) (cherry picked from commit 00d73caf804c0474980e471347d6385757af975f) Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
* [3.12] gh-102304: doc: Add links to Stable ABI and Limited C API (#105345) ↵Victor Stinner2023-06-062-2/+2
| | | | | | | | | | | | | | | | | | | (#105371) * gh-102304: doc: Add links to Stable ABI and Limited C API (#105345) * Add "limited-c-api" and "stable-api" references. * Rename "stable-abi-list" reference to "limited-api-list". * Makefile: Document files regenerated by "make regen-limited-abi" * Remove first empty line in generated files: - Lib/test/test_stable_abi_ctypes.py - PC/python3dll.c (cherry picked from commit bae415ad02c79cf3a2eec4aa6969221a12e6716f) * gh-102304: Fix up Simple ABI doc (GH-105351) (cherry picked from commit 0202aa002e06acef9aa55ace0d939103df19cadd)
* [3.12] gh-105259: Ensure we don't show newline characters for trailing ↵Miss Islington (bot)2023-06-061-0/+2
| | | | NEWLINE tokens (GH-105364) (#105367)
* [3.12] gh-90005: Don't link with libbsd if not needed (#105236) (#105360)Erlend E. Aasland2023-06-061-0/+1
| | | | The regression was introduced with commit 5b946cada. Restore pre gh-29696 behaviour.
* [3.12] gh-105324: Fix tokenize module main function for stdin (GH-105325) ↵Miss Islington (bot)2023-06-051-0/+2
| | | | (#105330)
* [3.12] gh-89412: Add missing attributes (added in 3.10) to traceback module ↵Miss Islington (bot)2023-06-051-0/+2
| | | | | | | docs (GH-105046) (#105327) (cherry picked from commit a4f72fa39a9d391c7b931ba1906d81da4ae01949) Co-authored-by: Jakub Kuczys <me@jacken.men>
* [3.12] gh-105280: Ensure `isinstance([], collections.abc.Mapping)` always ↵Miss Islington (bot)2023-06-051-0/+4
| | | | | | | | evaluates to `False` (GH-105281) (#105318) gh-105280: Ensure `isinstance([], collections.abc.Mapping)` always evaluates to `False` (GH-105281) (cherry picked from commit 08756dbba647440803d2ba4545ba0ab2f0cdfe1c) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-105237: Allow calling `issubclass(X, typing.Protocol)` again ↵Miss Islington (bot)2023-06-051-0/+2
| | | | | | | | (GH-105239) (#105316) gh-105237: Allow calling `issubclass(X, typing.Protocol)` again (GH-105239) (cherry picked from commit cdfb201bfa35b7c50de5099c6d9078c806851d98) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-105164: Detect annotations inside match blocks (GH-105177) (#105313)Miss Islington (bot)2023-06-051-0/+2
| | | | | (cherry picked from commit 69d1245685cf95ddc678633e978a56673da64865) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-98963: Restore the ability to have a dict-less property. ↵Miss Islington (bot)2023-06-051-0/+4
| | | | | | | | | | | | | | | (GH-105262) (#105297) gh-98963: Restore the ability to have a dict-less property. (GH-105262) Ignore doc string assignment failures in `property` as has been the behavior of all past Python releases. (the docstring is discarded) (cherry picked from commit 418befd75d4d0d1cba83d8b81e1a7bcc9a65be8e) This fixes a behavior regression in 3.12beta1 where an AttributeError was being raised in a situation it has never been in the past. It keeps the existing unusual single situation where AttributeError does get raised. Existing widely deployed projects depend on this not raising an exception. Co-authored-by: Gregory P. Smith <greg@krypto.org>