summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-46417: Py_Finalize() clears static types (GH-30743)Victor Stinner2022-01-214-85/+144
| | | | | | | Add _PyTypes_FiniTypes() best-effort function to clear static types: don't deallocate a type if it still has subclasses. remove_subclass() now sets tp_subclasses to NULL when removing the last subclass.
* bpo-46417: Call _PyDebug_PrintTotalRefs() later (GH-30744)Victor Stinner2022-01-212-6/+9
| | | | | | | | "python -X showrefcount" now shows the total reference count after clearing and destroyed the main Python interpreter. Previously, it was shown before. Py_FinalizeEx() now calls _PyDebug_PrintTotalRefs() after finalize_interp_delete().
* bpo-46426: Improve tests for the dir_fd argument (GH-30668)Serhiy Storchaka2022-01-213-230/+208
| | | | | | | Ensure that directory file descriptors refer to directories different from the current directory, and that src_dir_fd and dst_dir_fd refer to different directories. Add context manager open_dir_fd() in test.support.os_helper.
* bpo-30512: Add CAN Socket support for NetBSD (GH-30066)Thomas Klausner2022-01-218-6/+26
|
* bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283)andrei kulakov2022-01-213-1/+22
|
* bpo-46425: Fix direct invocation of `test_contextlib` (GH-30681)Nikita Sobolev2022-01-211-4/+10
|
* bpo-46417: signal uses PyStructSequence_NewType() (GH-30735)Victor Stinner2022-01-211-7/+9
| | | | | | The signal module now creates its struct_siginfo type as a heap type using PyStructSequence_NewType(), rather than using a static type. Add 'siginfo_type' member to the global signal_state_t structure.
* bpo-46417: _curses uses PyStructSequence_NewType() (GH-30736)Victor Stinner2022-01-2110-19/+40
| | | | | | | | The _curses module now creates its ncurses_version type as a heap type using PyStructSequence_NewType(), rather than using a static type. * Move _PyStructSequence_FiniType() definition to pycore_structseq.h. * test.pythoninfo: log curses.ncurses_version.
* bpo-46417: time module uses PyStructSequence_NewType() (GH-30734)Victor Stinner2022-01-211-37/+81
| | | | | | | | | | The time module now creates its struct_time type as a heap type using PyStructSequence_NewType(), rather than using a static type. * Add a module state to the time module: add traverse, clear and free functions. * Use PyModule_AddType(). * Remove the 'initialized' variable.
* bpo-46417: _thread uses PyStructSequence_NewType() (GH-30733)Victor Stinner2022-01-211-12/+14
| | | | | The _thread module now creates its _ExceptHookArgs type as a heap type using PyStructSequence_NewType(), rather than using a static type.
* bpo-46417: _testembed.c avoids Py_SetProgramName() (GH-30732)Victor Stinner2022-01-212-31/+33
| | | | | | * _testembed_Py_Initialize() now uses the PyConfig API, rather than deprecated Py_SetProgramName(). * Reduce INIT_LOOPS from 16 to 4: test_embed now takes 8.7 seconds rather than 14.7 seconds.
* bpo-46417: Finalize structseq types at exit (GH-30645)Victor Stinner2022-01-2117-2/+230
| | | | | | | | | | | | | | | | | | Add _PyStructSequence_FiniType() and _PyStaticType_Dealloc() functions to finalize a structseq static type in Py_Finalize(). Currrently, these functions do nothing if Python is built in release mode. Clear static types: * AsyncGenHooksType: sys.set_asyncgen_hooks() * FlagsType: sys.flags * FloatInfoType: sys.float_info * Hash_InfoType: sys.hash_info * Int_InfoType: sys.int_info * ThreadInfoType: sys.thread_info * UnraisableHookArgsType: sys.unraisablehook * VersionInfoType: sys.version * WindowsVersionType: sys.getwindowsversion()
* bpo-41857: mention timeout argument units in select.poll() and ↵Zane Bitter2022-01-202-3/+15
| | | | select.depoll() doc-strings (GH-22406)
* bpo-46080: fix argparse help generation exception in edge case (GH-30111)Felix Fontein2022-01-203-3/+9
| | | | | Fix an uncaught exception during help text generation when argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS and help is specified.
* bpo-46441: Add a boilerplate to test syntax errors in interactive mode ↵Batuhan Taskaya2022-01-201-0/+33
| | | | (GH-30720)
* bpo-46316: optimize `pathlib.Path.iterdir()` (GH-30501)Barney Gale2022-01-202-3/+1
| | | | `os.listdir()` doesn't return entries for `.` or `..`, so we don't need to check for them here.
* bpo-40280: Misc fixes for wasm32-emscripten (GH-30722)Christian Heimes2022-01-209-6/+34
|
* bpo-46429: Merge all deepfrozen files into one (GH-30572)Kumar Aditya2022-01-206-243/+120
|
* Fix the caret position in some syntax errors in interactive mode (GH-30718)Pablo Galindo Salgado2022-01-201-2/+3
|
* bpo-46409: Make generators in bytecode (GH-30633)Mark Shannon2022-01-2018-204/+235
| | | | | | | | | | | | * Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes. * Trim frame and generator by word each. * Minor refactor of frame.c * Update test.test_sys to account for smaller frames. * Treat generator functions as normal functions when evaluating and specializing.
* no-issue: Fix documentation typos. (GH-30576)Piotr Fusik2022-01-202-2/+2
|
* bpo-46443: deepfreeze: use small ints and singleton zero bytes (GH-30715)Kumar Aditya2022-01-202-0/+6
|
* bpo-46437: remove useless `hasattr` from `test_typing` (#30704)Nikita Sobolev2022-01-191-9/+7
|
* doc: Clarify os.urandom return type (#30282)Florian Bruhin2022-01-191-1/+1
| | | Other descriptions in the same file also use 'bytestring' to refer to bytes objects
* docs: correct outdated MappingProxyType docstrings (#30281)Joshua Bronson2022-01-191-3/+3
| | | | | The docstrings for MappingProxyType's keys(), values(), and items() methods were never updated to reflect the changes that Python 3 brought to these APIs, namely returning views rather than lists.
* Update documentation in datetime module strftime-and-strptime-behavior fix ↵Evan2022-01-191-5/+5
| | | | | | | typo in '%W' format code description (GH-30232) A small change to the documentation of datetime module , in the format codes section of stftime and strptime. Changed the description of format code '%W' from 'as a decimal number' to 'a zero padded decimal number' so it's in line with the example having leading zeros. Similar to the format code '%U' above. Automerge-Triggered-By: GH:pganssle
* Mark all clinic headers as generated (GH-30679)Erlend Egeberg Aasland2022-01-191-5/+2
|
* bpo-45680: Minor formatting fix in stdtypes.rst (GH-30690)Ken Jin2022-01-191-1/+1
| | | Makes quotation consistent with rest of docs in commit 0eae9a2a2db6cc5a72535f61bb988cc417011640.
* bpo-46413: properly test `__{r}or__` code paths in `_SpecialGenericAlias` ↵Nikita Sobolev2022-01-191-0/+8
| | | | | (GH-30640) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335)Alex Waygood2022-01-191-33/+84
| | | | | | | | | | | | | | | The documentation on ``GenericAlias`` objects implies at multiple points that only container classes can define ``__class_getitem__``. This is misleading. This PR proposes a rewrite of the documentation to clarify that non-container classes can define ``__class_getitem__``, and to clarify what it means when a non-container class is parameterized. See also: initial discussion of issues with this piece of documentation in GH-29308, and previous BPO issue [42280](https://bugs.python.org/issue42280). Also improved references in glossary and typing docs. Fixed some links. Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-46416: Allow direct invocation of `Lib/test/test_typing.py` (GH-30641)Nikita Sobolev2022-01-191-3/+3
| | | Use `__name__`
* bpo-22039: [doc] clarify that there are no plans to disable deleting an ↵Irit Katriel2022-01-191-2/+3
| | | | attribute via PyObject_SetAttr (GH-30639)
* bpo-43869: Time Epoch is the same on all platforms (GH-30664)Victor Stinner2022-01-193-17/+20
|
* bpo-45535: [Enum] include special dunders in dir() (GH-30677)Ethan Furman2022-01-182-44/+42
| | | | | | | | | Include the `__dunders__` in `dir()` that make `Enum` special: - `__contains__` - `__getitem__` - `__iter__` - `__len__` - `__members__`
* bpo-45554: Document multiprocessing.Process.exitcode values (GH-30142)John Marshall2022-01-182-2/+10
| | | | | This addresses [bpo-45554]() by expanding the `exitcode` documentation to also describe what `exitcode` will be in cases of normal termination, `sys.exit()` called, and on uncaught exceptions. Automerge-Triggered-By: GH:pitrou
* bpo-44024: Improve the TypeError message in getattr and hasattr (GH-25863)Géry Ogam2022-01-183-14/+16
| | | | | | Use common error message for non-string attribute name in the builtin functions getattr and hasattr. The special check no longer needed since Python 3.0.
* bpo-46045: Do not use POSIX semaphores on NetBSD (GH-30047)Thomas Klausner2022-01-183-0/+8
| | | This fixes hanging tests test_compileall,, test_multiprocessing_fork and test_concurrent_futures.
* bpo-20823: Clarify copyreg.pickle() documentation (GH-30230)Kumar Aditya2022-01-181-2/+2
|
* bpo-46425: Fix direct invocation of multiple test modules (GH-30666)Nikita Sobolev2022-01-186-9/+8
|
* bpo-43869: Improve epoch docs (GH-25777)Miguel Brito2022-01-181-1/+1
|
* bpo-46028: Calculate base_executable by resolving symlinks in a venv (GH-30144)Steve Dower2022-01-183-1/+47
|
* bpo-46424: [typing] cover `Annotation[arg]` invalid usage in tests (GH-30663)Nikita Sobolev2022-01-181-0/+4
|
* bpo-46402: Promote SQLite URI tricks in `sqlite3` docs (GH-30660)Erlend Egeberg Aasland2022-01-181-8/+22
| | | | | Provide some examples of URI parameters in sqlite connect(). Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* bpo-46339: Include clarification on assert in ↵Pablo Galindo Salgado2022-01-181-0/+3
| | | | 'get_error_line_from_tokenizer_buffers' (#30545)
* bpo-42161: Hoist the _PyLong_GetOne() call out of the inner loop. (GH-30656)Raymond Hettinger2022-01-182-3/+5
|
* bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)Irit Katriel2022-01-186-16/+14
|
* bpo-44934: Add optional feature AppendPath to Windows MSI installer (GH-27889)bneuburg2022-01-1811-6/+107
| | | The option must be enabled from the command line
* Restore MSIX signing and ensure expired certificates are not selected (GH-30649)Steve Dower2022-01-172-4/+6
| | | Reverts the change in d6c6e6b and applies a better fix.
* bpo-46418: [Enum] simplify `MODULE` declaration in tests (GH-30647)Nikita Sobolev2022-01-171-1/+1
|
* Skip signing side-loadable MSIX for Windows (GH-30644)Steve Dower2022-01-171-1/+3
| | | | We currently do not release these files, and so there's nothing lost by signing them. Our code signing certificate is somehow incompatible with signing MSIX files. We may be able to re-enable this when we next renew, or if Microsoft updates their signing tool to work with our certificate.