summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* gh-106320: Remove _PyInterpreterState_Get() alias (#106321)Victor Stinner2023-07-011-0/+3
| | | | Replace calls to the (removed) slow _PyInterpreterState_Get() with fast inlined _PyInterpreterState_GET() function.
* gh-102541: Fix Helper.help("mod") for non-existent mod (#105934)Kirill Podoprigora2023-07-011-0/+1
| | | | | | If the output arg to Helper() is a stream rather than the default None, which means 'page to stdout', the ImportError from pydoc.resolve is currently not caught in pydoc.doc. The same error is caught when output is None. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-106316: Remove pytime.h header file (#106317)Victor Stinner2023-07-011-0/+2
| | | | | | | | | | | | | | | | | Remove the "cpython/pytime.h" header file: it only contained private functions. Move functions to the internal pycore_time.h header file. Move tests from _testcapi to _testinternalcapi. Rename also test methods to have the same name than tested C functions. No longer export these functions: * _PyTime_Add() * _PyTime_As100Nanoseconds() * _PyTime_FromMicrosecondsClamp() * _PyTime_FromTimespec() * _PyTime_FromTimeval() * _PyTime_GetPerfCounterWithInfo() * _PyTime_MulDiv()
* gh-106232: Make timeit doc command lines compatible with Windows. (#106296)Terry Jan Reedy2023-07-011-0/+2
| | | | | | Command Prompt (CMD Shell) and older versions of PowerShell require double quotes and single quotes inside the string. This form also works on linux and macOS.
* gh-105486: Change the `repr` of `ParamSpec` list of args in `GenericAlias` ↵Nikita Sobolev2023-07-011-0/+1
| | | | (#105488)
* gh-106145: Make `end_{lineno,col_offset}` required on `type_param` nodes ↵Nikita Sobolev2023-06-301-0/+2
| | | | (#106224)
* gh-106023: Remove _PyObject_FastCall() function (#106265)Victor Stinner2023-06-301-0/+2
|
* gh-106182: sys: Intern getfilesystemencoding() and ↵Inada Naoki2023-06-301-0/+2
| | | | | getfilesystemencodeerrors() (#106183) sys: Intern getfilesystemencoding() and getfilesystemencodeerrors()
* gh-106210 Remove Emscripten import trampoline (#106211)Hood Chatham2023-06-301-0/+1
| | | | | It's no longer necessary. Co-authored-by: Brett Cannon <brett@python.org>
* GH-106152: Add PY_THROW event to cProfile (GH-106161)Tian Gao2023-06-291-0/+1
|
* GH-106008: Make implicit boolean conversions explicit (GH-106003)Brandt Bucher2023-06-291-0/+5
|
* gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)hms2023-06-291-0/+1
| | | | | | This enables super-instruction formation, removal of checks for uninitialized variables, and frees up an instruction.
* gh-101006: Improve error handling when read marshal data (GH-101007)Serhiy Storchaka2023-06-291-0/+1
| | | | | | | | * EOFError no longer overrides other errors such as MemoryError or OSError at the start of the object. * Raise more relevant error when the NULL object occurs as a code object component. * Minimize an overhead of calling PyErr_Occurred().
* gh-106118: Add O_CLOEXEC preprocessor guard (#106120)Erlend E. Aasland2023-06-281-0/+2
|
* gh-101634: regrtest reports decoding error as failed test (#106169)Victor Stinner2023-06-281-0/+3
| | | | | When running the Python test suite with -jN option, if a worker stdout cannot be decoded from the locale encoding report a failed testn so the exitcode is non-zero.
* gh-106168: PyTuple_SET_ITEM() now checks the index (#106164)Victor Stinner2023-06-281-0/+5
| | | | | | | | | | | | | PyTuple_SET_ITEM() and PyList_SET_ITEM() now check the index argument with an assertion if Python is built in debug mode or is built with assertions. * list_extend() and _PyList_AppendTakeRef() now set the list size before calling PyList_SET_ITEM(). * PyStructSequence_GetItem() and PyStructSequence_SetItem() now check the index argument: must be lesser than REAL_SIZE(op). * PyStructSequence_GET_ITEM() and PyStructSequence_SET_ITEM() are now aliases to PyStructSequence_GetItem() and PyStructSequence_SetItem().
* gh-104584: Baby steps towards generating and executing traces (#105924)Guido van Rossum2023-06-271-0/+1
| | | | | Added a new, experimental, tracing optimizer and interpreter (a.k.a. "tier 2"). This currently pessimizes, so don't use yet -- this is infrastructure so we can experiment with optimizing passes. To enable it, pass ``-Xuops`` or set ``PYTHONUOPS=1``. To get debug output, set ``PYTHONUOPSDEBUG=N`` where ``N`` is a debug level (0-4, where 0 is no debug output and 4 is excessively verbose). All of this code is likely to change dramatically before the 3.13 feature freeze. But this is a first step.
* Revert "GH-96145: Add AttrDict to JSON module for use with object_hook ↵Łukasz Langa2023-06-261-0/+1
| | | | | (#96146)" (#105948) This reverts commit 1f0eafa844bf5a380603d55e8d4b42d8c2a3439d.
* GH-105793: Add follow_symlinks argument to `pathlib.Path.is_dir()` and ↵Barney Gale2023-06-261-0/+2
| | | | | | | `is_file()` (GH-105794) Brings `pathlib.Path.is_dir()` and `in line with `os.DirEntry.is_dir()`, which will be important for implementing generic path walking and globbing. Likewise `is_file()`.
* gh-105927: Deprecate PyWeakref_GetObject() function (#106006)Victor Stinner2023-06-261-0/+3
| | | Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
* gh-104527: zippapp will now avoid appending an archive to itself. (gh-106076)Gabriel Venberg2023-06-261-0/+1
| | | zippapp will now avoid appending an archive to itself.
* gh-106075: add `asyncio.taskgroups.__all__` to `asyncio.__all__` (#106090)James Webber2023-06-262-0/+2
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-106084: Remove old PyObject call aliases (#106085)Victor Stinner2023-06-261-0/+13
| | | | | | | | | | | | | | Remove old aliases which were kept backwards compatibility with Python 3.8: * _PyObject_CallMethodNoArgs() * _PyObject_CallMethodOneArg() * _PyObject_CallOneArg() * _PyObject_FastCallDict() * _PyObject_Vectorcall() * _PyObject_VectorcallMethod() * _PyVectorcall_Function() Update code which used these aliases to use new names.
* gh-106046: Improve error message from `os.fspath` if `__fspath__` is set to ↵Alex Waygood2023-06-251-0/+2
| | | | `None` (#106082)
* gh-105987: Fix reference counting issue in `_asyncio._swap_current_task` ↵chgnrdv2023-06-241-0/+1
| | | | (#105989)
* gh-105730: support more callables in ExceptionGroup.split() and subgroup() ↵Irit Katriel2023-06-231-0/+2
| | | | (#106035)
* gh-105974: Revert unintentional behaviour change for protocols with ↵Alex Waygood2023-06-231-0/+6
| | | | non-callable members and custom `__subclasshook__` methods (#105976)
* gh-105979: Fix exception handling in `unmarshal_frozen_code` ↵chgnrdv2023-06-221-0/+1
| | | | (`Python/import.c`) (#105980)
* gh-101538: Add experimental wasi-threads build (#101537)YAMAMOTO Takashi2023-06-221-0/+1
| | | | Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-98931: Add custom error messages to invalid import/from with multiple ↵Pablo Galindo Salgado2023-06-221-0/+2
| | | | | | targets (#105985) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-89812: Add `pathlib.UnsupportedOperation` (GH-105926)Barney Gale2023-06-221-0/+2
| | | | | | | This new exception type is raised instead of `NotImplementedError` when a path operation is not supported. It can be raised from `Path.readlink()`, `symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a future version of pathlib, it will be raised by `AbstractPath` for these methods and others, such as `AbstractPath.mkdir()` and `unlink()`.
* GH-91095: Specialize calls to normal Python classes. (GH-99331)Mark Shannon2023-06-221-0/+11
|
* gh-105927: Add PyWeakref_GetRef() function (#105932)Victor Stinner2023-06-212-0/+5
| | | | Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(), PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
* gh-105922: Add PyImport_AddModuleRef() function (#105923)Victor Stinner2023-06-202-0/+5
| | | | | | * Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and PyImport_AddModuleObject(). * pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with PyImport_AddModuleRef(name).
* gh-105908: fix `barry_as_FLUFL` future import (#105909)Crowthebird2023-06-191-0/+1
|
* GH-105808: Fix a regression introduced in GH-101251 (#105910)T. Wouters2023-06-191-0/+1
| | | | Fix a regression introduced in pythonGH-101251, causing GzipFile.flush() to not flush the compressor (nor pass along the zip_mode argument).
* gh-105875: Require SQLite 3.15.2 or newer (#105876)Erlend E. Aasland2023-06-181-0/+2
| | | SQLite 3.15.2 was released 2016-11-28.
* gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and ↵Irit Katriel2023-06-171-0/+4
| | | | replace by their new versions (#105865)
* GH-105840: Fix assertion failures when specializing calls with too many ↵Brandt Bucher2023-06-161-0/+2
| | | | __defaults__ (GH-105847)
* gh-104799: PEP 695 backward compatibility for ast.unparse (#105846)Jelle Zijlstra2023-06-161-0/+3
|
* GH-103124: Multiline statement support for pdb (GH-103125)Tian Gao2023-06-151-0/+1
|
* GH-105588: Add missing error checks to some obj2ast_* converters (GH-105589)Brandt Bucher2023-06-151-0/+2
|
* gh-105831: Fix NEWS blurb from gh-105828 (#105833)Lysandros Nikolaou2023-06-151-1/+3
|
* gh-105820: Fix tok_mode expression buffer in file & readline tokenizer (#105828)Lysandros Nikolaou2023-06-151-0/+1
|
* gh-105800: Issue SyntaxWarning in f-strings for invalid escape sequences ↵Pablo Galindo Salgado2023-06-151-0/+2
| | | | (#105801)
* GH-77273: Better bytecodes for f-strings (GH-6132)Mark Shannon2023-06-141-0/+3
|
* gh-105570: Deprecate unusual ways of creating empty TypedDicts (#105780)Alex Waygood2023-06-141-0/+5
| | | Deprecate two methods of creating typing.TypedDict classes with 0 fields using the functional syntax: `TD = TypedDict("TD")` and `TD = TypedDict("TD", None)`. Both will be disallowed in Python 3.15. To create a TypedDict class with 0 fields, either use `class TD(TypedDict): pass` or `TD = TypedDict("TD", {})`.
* GH-100987: Allow objects other than code objects as the "executable" of an ↵Mark Shannon2023-06-141-0/+4
| | | | | | | | | | internal frame. (GH-105727) * Add table describing possible executable classes for out-of-process debuggers. * Remove shim code object creation code as it is no longer needed. * Make lltrace a bit more robust w.r.t. non-standard frames.
* gh-105566: Deprecate unusual ways of creating `typing.NamedTuple` classes ↵Alex Waygood2023-06-141-0/+10
| | | | | | | (#105609) Deprecate creating a typing.NamedTuple class using keyword arguments to denote the fields (`NT = NamedTuple("NT", x=int, y=str)`). This will be disallowed in Python 3.15. Use the class-based syntax or the functional syntax instead. Two methods of creating `NamedTuple` classes with 0 fields using the functional syntax are also deprecated, and will be disallowed in Python 3.15: `NT = NamedTuple("NT")` and `NT = NamedTuple("NT", None)`. To create a `NamedTuple` class with 0 fields, either use `class NT(NamedTuple): pass` or `NT = NamedTuple("NT", [])`.
* gh-104873: Add typing.get_protocol_members and typing.is_protocol (#104878)Jelle Zijlstra2023-06-141-0/+3
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>