summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-98852: Fix subscription of type aliases (GH-98920)Serhiy Storchaka2022-11-014-0/+43
| | | | | Fix subscription of type aliases containing bare generic types or types like TypeVar: for example tuple[A, T][int] and tuple[TypeVar, T][int], where A is a generic type, and T is a type variable.
* GH-98766: Modest speed-up from ChainMap.__iter__ (GH-98946)Raymond Hettinger2022-11-011-2/+2
|
* gh-98658: Add __class_getitem__ to array.array (#98661)Jelle Zijlstra2022-11-014-2/+12
| | | Closes #98658
* Rename JUMP_TO_INSTRUCTION to GO_TO_INSTRUCTION (#98934)Guido van Rossum2022-11-011-14/+14
| | | | | | This reduces confusion between jumps at the bytecode level (e.g. JUMPTO(), JUMPBY(), and various JUMP_*() opcodes) and jumps in the C code (which are 'goto' statements).
* Fix wording in Functional Programming HOWTO (GH-98939)partev2022-11-011-1/+1
|
* Missing PS1 prompt in tutorial example (GH-98921)Manuel Kaufmann2022-11-011-2/+3
|
* GH-98897: fix memory leak if `math.dist` raises exception (GH-98898)Kumar Aditya2022-11-013-3/+9
|
* gh-98692: Enable treating shebang lines as executables in py.exe launcher ↵Steve Dower2022-10-314-4/+124
| | | | (GH-98732)
* gh-98610: Adjust the Optional Restrictions on Subinterpreters (GH-98618)Eric Snow2022-10-3115-47/+220
| | | | | | | Previously, the optional restrictions on subinterpreters were: disallow fork, subprocess, and threads. By default, we were disallowing all three for "isolated" interpreters. We always allowed all three for the main interpreter and those created through the legacy `Py_NewInterpreter()` API. Those settings were a bit conservative, so here we've adjusted the optional restrictions to: fork, exec, threads, and daemon threads. The default for "isolated" interpreters disables fork, exec, and daemon threads. Regular threads are allowed by default. We continue always allowing everything For the main interpreter and the legacy API. In the code, we add `_PyInterpreterConfig.allow_exec` and `_PyInterpreterConfig.allow_daemon_threads`. We also add `Py_RTFLAGS_DAEMON_THREADS` and `Py_RTFLAGS_EXEC`.
* Fix typo in sorting HOWTO (#98888)partev2022-10-311-1/+1
|
* Doc: Fix sphinx-lint issues (GH-98911)Julien Palard2022-10-311-1/+1
| | | They were introduced right between GH-98441 and GH-98408.
* gh-98576: Fix types in dataclass.InitVar example (gh-98577)Shantanu2022-10-311-2/+2
|
* gh-98410: move getbufferproc and releasebufferproc to buffer.h (#31158)David Hewitt2022-10-315-4/+10
| | | This adds them to the Limited API.
* gh-98878: Use builtins from the bound frame when offering a suggestion (#98880)Batuhan Taskaya2022-10-313-1/+12
|
* gh-98811: use full source location to simplify __future__ imports error ↵Irit Katriel2022-10-315-69/+71
| | | | checking. This also fixes an incorrect error offset. (GH-98812)
* gh-96151: Use a private name for passing builtins to dataclass. This now ↵Shantanu2022-10-313-5/+13
| | | | allows for a field named BUILTIN (gh-98143)
* gh-98879: Remove unreachable error case from COMPARE_OP_STR_JUMP (GH-98882)Dennis Sweeney2022-10-301-3/+0
| | | Thanks to PEP 623 changes, the comparison cannot fail.
* gh-97966: Update uname docs to clarify the special nature of the platform ↵Jason R. Coombs2022-10-302-4/+10
| | | | attribute and to indicate when it became late-bound. (#97972)
* gh-96853: Restore test coverage for Py_Initialize(Ex) (GH-98212)Nick Coghlan2022-10-305-19/+57
| | | | | | | | | | | * As most of `test_embed` now uses `Py_InitializeFromConfig`, add a specific test case to cover `Py_Initialize` (and `Py_InitializeEx`) * Rename `_testembed` init helper to clarify the API used * Add a `PyConfig_Clear` call in `Py_InitializeEx` to make the code more obviously correct (it already didn't leak as none of the dynamically allocated config fields were being populated, but it's clearer if the wrappers follow the documented API usage guidelines)
* gh-98783: Fix crashes when `str` subclasses are used in `_PyUnicode_Equal` ↵Nikita Sobolev2022-10-305-3/+36
| | | | (#98806)
* gh-98793: Fix typecheck in `overlapped.c` (#98835)Charlie Zhao2022-10-304-5/+25
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* glossary.rst: Fix typo in package definition (GH-98865)ab2022-10-291-1/+1
| | | | | | This is a tiny typo fix of package definition in glossary. According to https://devguide.python.org/documentation/help-documenting/ simple typos don’t require issues of their own, but, instead, a pull request can by submitted directly. Automerge-Triggered-By: GH:AlexWaygood
* Fix typo in docs (GH-98863)Yuvi Panda2022-10-291-1/+1
|
* gh-93358: Fix python-config docs for how to embed Python (#98649)Erlend E. Aasland2022-10-291-6/+6
|
* Fix comment typos in `_operator.c` (#98853)David Buchanan2022-10-291-2/+2
|
* dataclasses docs: consistent indentation (4 spaces) in examples (#98855)FC Stegerman2022-10-291-16/+16
|
* GH-90352: fix _SelectorDatagramTransport to inherit from DatagramTransport ↵Kumar Aditya2022-10-293-1/+6
| | | | (#98844)
* gh-98744: Prevent column-level decoding crashes on traceback module (#98824)Batuhan Taskaya2022-10-293-14/+63
|
* gh-98286: handle empty filename in ZipFile/ZipInfo properly (#98346)FC Stegerman2022-10-291-2/+5
| | | effectively code modernization and a meaningful exception.
* gh-98240: Updated Path.rename docs, when it is atomic (GH-98245)Mateusz2022-10-281-0/+2
|
* gh-84538: add strict argument to pathlib.PurePath.relative_to (GH-19813)domragusa2022-10-286-21/+150
| | | | | | | | | | | | | | | | | | | | | | | By default, :meth:`pathlib.PurePath.relative_to` doesn't deal with paths that are not a direct prefix of the other, raising an exception in that instance. This change adds a *walk_up* parameter that can be set to allow for using ``..`` to calculate the relative path. example: ``` >>> p = PurePosixPath('/etc/passwd') >>> p.relative_to('/etc') PurePosixPath('passwd') >>> p.relative_to('/usr') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pathlib.py", line 940, in relative_to raise ValueError(error_message.format(str(self), str(formatted))) ValueError: '/etc/passwd' does not start with '/usr' >>> p.relative_to('/usr', strict=False) PurePosixPath('../etc/passwd') ``` https://bugs.python.org/issue40358 Automerge-Triggered-By: GH:brettcannon
* Fix typo in contextvars docs (#98823)cburroughs2022-10-281-1/+1
|
* gh-92452: Avoid race in initialization of sysconfig._CONFIG_VARSGareth Rees2022-10-282-60/+82
| | | Co-authored-by: Filipe Laíns <lains@riseup.net>
* `argparse` docs: normalize constant references (#98765)Skip Montanaro2022-10-281-5/+6
|
* gh-98776: Fix make regen-test-levenshtein for out-of-tree builds (GH-98779)Miro Hrončok2022-10-282-1/+2
| | | | | Fixes https://github.com/python/cpython/issues/98776 Automerge-Triggered-By: GH:erlend-aasland
* gh-98657: [docs] `array.typecodes` is a module-level attribute (#98729)Nikita Sobolev2022-10-281-3/+8
| | | | | * gh-98657: [docs] `array.typecodes` is a module-level attribute * Update array.rst
* gh-65002: Make note that null bytes are used to pad bytes (#98635)Stanley2022-10-281-1/+4
|
* gh-98745: Allow py.exe launcher to install 3.11 by default and 3.12 on ↵Steve Dower2022-10-282-1/+5
| | | | request (GH-98780)
* gh-98624 Add mutex to unittest.mock.NonCallableMock (#98688)noah-weingarden2022-10-282-28/+40
| | | | | | | | | | | * Added lock to NonCallableMock in unittest.mock * Add blurb * Nitpick blurb * Edit comment based on @Jason-Y-Z's review * Add link to GH issue
* gh-98789: Fix FOR_ITER assert on big-endian (GH-98792)Dennis Sweeney2022-10-281-1/+1
| | | Fix FOR_ITER assertion syntax
* gh-98739: Update libexpat from 2.4.9 to 2.5.0 (#98742)Shaun Walbridge2022-10-274-18/+36
| | | | | * Update libexpat from 2.4.9 to 2.5.0 to address CVE-2022-43680. Co-authored-by: Shaun Walbridge <shaun.walbridge@gmail.com>
* obmalloc: Remove unused variable. (GH-98770)Benjamin Peterson2022-10-271-3/+1
|
* gh-96143: Improve perf profiler docs (#96445)Erlend E. Aasland2022-10-276-48/+116
|
* GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801)Mark Shannon2022-10-2714-247/+277
| | | | Change FOR_ITER to have the same stack effect regardless of whether it branches or not. Performance is unchanged as FOR_ITER (and specialized forms jump over the cleanup code).
* gh-98586: Add vector call APIs to the Limited API (GH-98587)Wenzel Jakob2022-10-279-18/+170
| | | Expose the facilities for making vector calls through Python's limited API.
* Python documents state elsewhere that a comma is not an operator, so … ↵Gerardwx2022-10-271-1/+1
| | | | | (GH-98736) …calling it an operator here is confusing. See https://docs.python.org/3/reference/lexical_analysis.html#operators and https://docs.python.org/3/faq/programming.html#id22.
* gh-98627: Use a Switch in PyModule_FromDefAndSpec2() (gh-98734)Eric Snow2022-10-271-14/+18
| | | This helps simplify some changes in follow-up PRs. It also matches what we're doing in PyModule_ExecDef().
* gh-98703: Add tests for closing `_ProactorSocketTransport` with proactor ↵Kumar Aditya2022-10-271-0/+21
| | | | event loop (GH-98730)
* gh-98703: Fix asyncio proactor_events calling _call_connection_lost multiple ↵Ken Jin2022-10-272-0/+4
| | | | | times (GH-98704) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-94808: cover `PyFunction_GetDefaults` and `PyFunction_SetDefaults` (#98449)Nikita Sobolev2022-10-272-0/+71
|