summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-106320: Remove _PyDict_GetItemStringWithError() function (#108313)Victor Stinner2023-08-228-6/+12
| | | | | | | | | Remove private _PyDict_GetItemStringWithError() function of the public C API: the new PyDict_GetItemStringRef() can be used instead. * Move private _PyDict_GetItemStringWithError() to the internal C API. * _testcapi get_code_extra_index() uses PyDict_GetItemStringRef(). Avoid using private functions in _testcapi which tests the public C API.
* gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw ↵Łukasz Langa2023-08-223-1/+248
| | | | | | | | | | | | | | | | (#108315) Instances of `ssl.SSLSocket` were vulnerable to a bypass of the TLS handshake and included protections (like certificate verification) and treating sent unencrypted data as if it were post-handshake TLS encrypted data. The vulnerability is caused when a socket is connected, data is sent by the malicious peer and stored in a buffer, and then the malicious peer closes the socket within a small timing window before the other peers’ TLS handshake can begin. After this sequence of events the closed socket will not immediately attempt a TLS handshake due to not being connected but will also allow the buffered data to be read as if a successful TLS handshake had occurred. Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* gh-108303: Remove unused Lib/test/sgml_input.html (#108305)Victor Stinner2023-08-221-212/+0
| | | | | In Python 2.7, the file was used by Lib/test/test_sgmllib.py to test Lib/sgmllib.py. The sgmllib module and its tests have been removed in Python 3.0.
* gh-108253: Fix bug in func version cache (#108296)Guido van Rossum2023-08-221-22/+22
| | | | When a function object changed its version, a stale pointer might remain in the cache. Zap these whenever `func_version` changes (even when set to 0).
* gh-106016: Add Lib/test/test_module/ directory (#108293)Victor Stinner2023-08-226-18/+19
| | | | | * Move Python scripts related to test_module to this new directory: good_getattr.py and bad_getattrX.py scripts. * Move Lib/test/test_module.py to Lib/test/test_module/__init__.py.
* gh-107700: [Enum] Document that `EnumType` was added in 3.11 (GH-108260)Nikita Sobolev2023-08-221-0/+4
|
* Ignore _Py_write_noraise() result: cast to (void) (#108291)Victor Stinner2023-08-224-9/+9
| | | | Code using _Py_write_noraise() usually cannot report. Ignore errors is the least surprising behavior for users.
* gh-90791: Enable test___all__ on ASAN build (#108286)Victor Stinner2023-08-226-11/+30
| | | | | | | * Only skip modules and tests related to X11 on ASAN builds: run other tests with ASAN. * Use print(flush=True) to see output earlier when it's redirected to a pipe. * Update issue reference: replace bpo-46633 with gh-90791.
* Docs: align the param spec of sqlite3.Connection methods with the ↵Erlend E. Aasland2023-08-221-2/+2
| | | | | | implementation (#108285) - no parameters of create_aggregate() are positional-only - all parameters of create_collation() are positional-only
* gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258)Serhiy Storchaka2023-08-2227-92/+103
|
* gh-106971: Docs: Add missing issue reference (#106992)Junya Fukuda2023-08-221-1/+1
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-105539: Emit ResourceWarning if sqlite3 database is not closed explicitly ↵Erlend E. Aasland2023-08-225-0/+30
| | | | (#108015)
* gh-108179: Add error message for parser stack overflows (#108256)Dennis Sweeney2023-08-225-1063/+542
|
* gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs (#107933)Erlend E. Aasland2023-08-223-5/+55
| | | | | | | Clearly document the supported seek() operations: - Rewind to the start of the stream - Restore a previous stream position (given by tell()) - Fast-forward to the end of the stream
* Fix test_faulthandler for sanitizers (#108245)Victor Stinner2023-08-221-6/+13
| | | | | | Set environment options to ask sanitizers to not handle SIGSEGV. This change allows running test_enable_fd() and test_enable_file() with sanitizers. Previously, they were skipped.
* Define _Py_NULL as nullptr on C23 and newer (#108244)Victor Stinner2023-08-221-3/+4
| | | | C23 standard added nullptr constant: https://en.wikipedia.org/wiki/C23_(C_standard_revision)
* gh-106242: Make ntpath.realpath errors consistent with abspath when there ↵Steve Dower2023-08-223-0/+22
| | | | | | | | | | | | | are embedded nulls (GH-108248) * gh-106242: Make ntpath.realpath errors consistent with abspath when there are embedded nulls * Update 2023-08-22-00-36-57.gh-issue-106242.q24ITw.rst mention Windows and the former incorrect ValueError. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Fix test_generators: save/restore warnings filters (#108246)Victor Stinner2023-08-211-2/+2
| | | | Previously, depending on existing filters, the test could modify the warnings and so fail as "env changed".
* gh-107901: Fix missing line number on BACKWARD_JUMP at the end of a for loop ↵Irit Katriel2023-08-213-1/+16
| | | | (#108242)
* gh-107265: Fix code_hash for ENTER_EXECUTOR case (#108188)Dong-hee Na2023-08-212-21/+38
|
* gh-108223: Document --disable-gil flag in configure (#108236)Sam Gross2023-08-211-0/+9
|
* gh-108223: test.pythoninfo and libregrtest log Py_NOGIL (#108238)Victor Stinner2023-08-212-0/+6
| | | | | | | | | | | Enable with --disable-gil --without-pydebug: $ make pythoninfo|grep NOGIL sysconfig[Py_NOGIL]: 1 $ ./python -m test ... == Python build: nogil debug ...
* gh-107298: Fix C API datetime documentation (GH-108034)Serhiy Storchaka2023-08-212-15/+57
|
* gh-107211: No longer export pycore_strhex.h functions (#108229)Victor Stinner2023-08-211-2/+5
| | | | | | No longer export functions: * _Py_strhex_bytes() * _Py_strhex_with_sep()
* gh-108224: Fix asyncio doc inconsistency (#108230)temach2023-08-211-1/+1
| | | (Spawning subprocesses does not require the event loop to run in the main thread -- only signal handling does.)
* gh-108216: Cleanup #include in internal header files (#108228)Victor Stinner2023-08-2132-95/+92
| | | | | | | | | | | * Add missing includes. * Remove unused includes. * Update old include/symbol names to newer names. * Mention at least one included symbol. * Sort includes. * Update Tools/cases_generator/generate_cases.py used to generated pycore_opcode_metadata.h. * Update Parser/asdl_c.py used to generate pycore_ast.h. * Cleanup also includes in _testcapimodule.c and _testinternalcapi.c.
* gh-108223: Add --disable-gil to configure (gh-108227)Sam Gross2023-08-213-0/+49
| | | | | The `--disable-gil` flags does not do anything yet other than define the Py_NOGIL macro. This is intended to support setting up additional buildbots.
* gh-108220: Internal header files require Py_BUILD_CORE to be defined (#108221)Victor Stinner2023-08-2116-4/+65
| | | | | | | | | * pycore_intrinsics.h does nothing if included twice (add #ifndef and #define). * Update Tools/cases_generator/generate_cases.py to generate the Py_BUILD_CORE test. * _bz2, _lzma, _opcode and zlib extensions now define the Py_BUILD_CORE_MODULE macro to use internal headers (pycore_code.h, pycore_intrinsics.h and pycore_blocks_output_buffer.h).
* gh-107298: Fix references to deprecated and removed PyUnicode C API (GH-108077)Serhiy Storchaka2023-08-215-54/+54
|
* gh-108113: Make it possible to create an optimized AST (#108154)Irit Katriel2023-08-2110-14/+124
|
* docs: fix grammar in isolating-extensions.rst (#108037)David Lechner2023-08-211-1/+1
|
* gh-95065, gh-107704: Argument Clinic: support multiple '/ [from ...]' and '* ↵Serhiy Storchaka2023-08-218-104/+565
| | | | [from ...]' markers (GH-108132)
* gh-107905: Test raising `__value__` for `TypeAliasType` (#107997)Nikita Sobolev2023-08-211-0/+18
|
* Run sphinx-lint on Misc/NEWS.d/next/ (#108212)Hugo van Kemenade2023-08-2114-18/+18
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485)balmeida-nokia2023-08-213-1/+19
| | | | | | | | | | | In the stack call of: _init_read_gz() ``` _read, tarfile.py:548 read, tarfile.py:526 _init_read_gz, tarfile.py:491 ``` a try;except exists that uses `self.exception`, so it needs to be set before calling _init_read_gz().
* gh-107916: Save the error code before decoding the filename in ↵Serhiy Storchaka2023-08-212-0/+12
| | | | PyErr_SetFromErrnoWithFilename() etc (GH-107929)
* gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846)Petr Viktorin2023-08-214-9/+156
| | | | Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
* Improve references in the tutorial (GH-108069)Serhiy Storchaka2023-08-216-49/+48
| | | | | * Use full qualified names for references (even if they do not work now, they will work in future). * Silence references to examples.
* gh-105736: Sync pure python version of OrderedDict with the C version (#108098)Raymond Hettinger2023-08-213-7/+23
|
* gh-107895: Fix test_asyncio.test_runners when run it in CPython's ↵Joon Hwan 김준환2023-08-211-1/+4
| | | | "development mode" (GH-108168)
* Resolve reference warnings in faq/gui.rst (#108147)Adam Turner2023-08-212-5/+5
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-107265: Fix code_richcompare for ENTER_EXECUTOR case (gh-108165)Dong-hee Na2023-08-212-0/+28
|
* gh-107526: Fix test_module_level_callable_unrepresentable_default (gh-108187)Dong-hee Na2023-08-211-1/+1
|
* gh-107526: Revert "gh-100357: Convert several functions in bltinsmodule to ↵Nikita Sobolev2023-08-213-303/+101
| | | | AC" (#107542)
* gh-104504: cases generator: Add `--warn-unreachable` to the mypy config ↵Alex Waygood2023-08-204-28/+36
| | | | (#108112)
* Resolve reference warnings in faq/library.rst (#108149)Adam Turner2023-08-202-6/+8
| | | | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Resolve reference warnings in faq/design.rst (#108148)Adam Turner2023-08-202-3/+2
|
* Docs: document 'manager' and '_log' attrs of logging.Logging (#108145)Erlend E. Aasland2023-08-201-0/+8
| | | Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Resolve reference warnings in faq/programming.rst (#108150)Adam Turner2023-08-202-4/+3
|
* Docs: Fix Sphinx warnings in logging.rst (GH-108139)Erlend E. Aasland2023-08-202-24/+27
| | | Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>