summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45410: regrtest replaces print_warning.orig_stderr (GH-28926)Victor Stinner2021-10-133-3/+53
| | | | | | When running Python tests with -W, runtest() now replaces support.print_warning.orig_stderr to preserve the messages order. Add an unit test.
* bpo-45434: Mark the PyTokenizer C API as private (GH-28924)Victor Stinner2021-10-137-48/+40
| | | | | | | | | | | | | | Rename PyTokenize functions to mark them as private: * PyTokenizer_FindEncodingFilename() => _PyTokenizer_FindEncodingFilename() * PyTokenizer_FromString() => _PyTokenizer_FromString() * PyTokenizer_FromFile() => _PyTokenizer_FromFile() * PyTokenizer_FromUTF8() => _PyTokenizer_FromUTF8() * PyTokenizer_Free() => _PyTokenizer_Free() * PyTokenizer_Get() => _PyTokenizer_Get() Remove the unused PyTokenizer_FindEncoding() function. import.c: remove unused #include "errcode.h".
* bpo-45256: Fix cleanup of stolen locals for Python-to-Python calls (GH-28905)Pablo Galindo Salgado2021-10-131-10/+24
|
* bpo-45434: Remove pystrhex.h header file (GH-28923)Victor Stinner2021-10-1322-63/+93
| | | | | | | | | | | | | | | Move Include/pystrhex.h to Include/internal/pycore_strhex.h. The header file only contains private functions. The following C extensions are now built with Py_BUILD_CORE_MODULE macro defined to get access to the internal C API: * _blake2 * _hashopenssl * _md5 * _sha1 * _sha3 * _ssl * binascii
* bpo-45340: Don't create object dictionaries unless actually needed (GH-28802)Mark Shannon2021-10-1318-400/+721
| | | | | | | | | | | | | | * Never change types' cached keys. It could invalidate inline attribute objects. * Lazily create object dictionaries. * Update specialization of LOAD/STORE_ATTR. * Don't update shared keys version for deletion of value. * Update gdb support to handle instance values. * Rename SPLIT_KEYS opcodes to INSTANCE_VALUE.
* bpo-45434: Move _Py_BEGIN_SUPPRESS_IPH to pycore_fileutils.h (GH-28922)Victor Stinner2021-10-1310-42/+44
|
* pycore_pystate.h no longer redefines PyThreadState_GET() (GH-28921)Victor Stinner2021-10-1323-77/+87
| | | | | | | | | | | | | | | | | | | | | | Redefining the PyThreadState_GET() macro in pycore_pystate.h is useless since it doesn't affect files not including it. Either use _PyThreadState_GET() directly, or don't use pycore_pystate.h internal C API. For example, the _testcapi extension don't use the internal C API, but use the public PyThreadState_Get() function instead. Replace PyThreadState_Get() with _PyThreadState_GET(). The _PyThreadState_GET() macro is more efficient than PyThreadState_Get() and PyThreadState_GET() function calls which call fail with a fatal Python error. posixmodule.c and _ctypes extension now include <windows.h> before pycore header files (like pycore_call.h). _PyTraceback_Add() now uses _PyErr_Fetch()/_PyErr_Restore() instead of PyErr_Fetch()/PyErr_Restore(). The _decimal and _xxsubinterpreters extensions are now built with the Py_BUILD_CORE_MODULE macro defined to get access to the internal C API.
* bpo-45410: regrtest -W leaves stdout/err FD unchanged (GH-28915)Victor Stinner2021-10-137-82/+19
| | | | | | | | | | | | support.print_warning() now stores the original value of sys.__stderr__ and uses it to log warnings. libregrtest uses the same stream to log unraisable exceptions and uncaught threading exceptions. Partially revert commit dbe213de7ef28712bbfdb9d94a33abb9c33ef0c2: libregrtest no longer replaces sys.__stdout__, sys.__stderr__, and stdout and stderr file descriptors. Remove also a few unused imports in libregrtest.
* bpo-20692: Add Programming FAQ entry for 1.__class__ error. (GH-28918)Terry Jan Reedy2021-10-132-0/+23
| | | To avoid error, add either space or parentheses.
* bpo-45453: Fix test_embed.StdPrinterTests (GH-28916)Victor Stinner2021-10-131-8/+4
| | | | | | | test_embed.StdPrinterTests now always use the file descriptor 1 for stdout, rather than using sys.__stdout__.fileno(). PyFile_NewStdPrinter() does crash if the argument is not 1 or 2. Fix also a few pyflakes warnings: remove unused import and variables.
* bpo-45434: bytearrayobject.h no longer includes <stdarg.h> (GH-28913)Victor Stinner2021-10-135-6/+3
| | | | bytearrayobject.h and _lzmamodule.c don't use va_list and so don't need to include <stdarg.h>.
* bpo-45434: Convert Py_GETENV() macro to a function (GH-28912)Victor Stinner2021-10-132-1/+9
| | | Avoid calling directly getenv() in the header file.
* bpo-45405: Prevent ``internal configure error`` when running ``configure`` ↵David Bohman2021-10-133-6/+12
| | | | | | | | with recent versions of non-Apple clang. (#28845) Change the configure logic to function properly on macOS when the compiler outputs a platform triplet for option --print-multiarch. Co-authored-by: Ned Deily <nad@python.org>
* bpo-45410: Enhance libregrtest -W/--verbose3 option (GH-28908)Victor Stinner2021-10-123-15/+72
| | | | | | | | | | | libregrtest -W/--verbose3 now also replace sys.__stdout__, sys.__stderr__, and stdout and stderr file descriptors (fd 1 and fd 2). support.print_warning() messages are now logged in the expected order. The "./python -m test test_eintr -W" command no longer logs into stdout if the test pass.
* Fix spelling in Misc (GH-28858)1809092021-10-121-1/+1
|
* bpo-45421: Remove dead code from html.parser (GH-28847)Alberto Mardegan2021-10-121-7/+0
| | | | | Support for HtmlParserError was removed back in 2014 with commit 73a4359eb0eb624c588c5d52083ea4944f9787ea, however this small block was missed.
* bpo-44991: Normalise function and collation callback naming (GH-28209)Erlend Egeberg Aasland2021-10-121-7/+5
|
* bpo-45441: Update some moved URLs in documentation (GH-28861)1809092021-10-124-6/+6
|
* Slight correct grammar (GH-28860)nobodyatandnothing2021-10-121-1/+1
|
* Fix format string in _PyImport_LoadDynamicModuleWithSpec() (GH-28863)Serhiy Storchaka2021-10-121-1/+1
|
* bpo-45439: Move _PyObject_CallNoArgs() to pycore_call.h (GH-28895)Victor Stinner2021-10-1238-64/+89
| | | | | | | * Move _PyObject_CallNoArgs() to pycore_call.h (internal C API). * _ssl, _sqlite and _testcapi extensions now call the public PyObject_CallNoArgs() function, rather than _PyObject_CallNoArgs(). * _lsprof extension is now built with Py_BUILD_CORE_MODULE macro defined to get access to internal _PyObject_CallNoArgs().
* bpo-45433: Do not link libpython against libcrypt (GH-28881)Mike Gilbert2021-10-114-0/+9
| | | | Save/restore LIBS when calling AC_SEARCH_LIBS(..., crypt). This avoid linking libpython with libcrypt.
* bpo-45439: Rename _PyObject_CallNoArg() to _PyObject_CallNoArgs() (GH-28891)Victor Stinner2021-10-1137-73/+73
| | | | | Fix typo in the private _PyObject_CallNoArg() function name: rename it to _PyObject_CallNoArgs() to be consistent with the public function PyObject_CallNoArgs().
* bpo-45439: _PyObject_Call() only checks tp_vectorcall_offset once (GH-28890)Victor Stinner2021-10-112-23/+37
| | | | | | Add _PyVectorcall_Call() helper function. Add "assert(PyCallable_Check(callable));" to PyVectorcall_Call(), similar check than PyVectorcall_Function().
* bpo-45412: Move copysign() define to pycore_pymath.h (GH-28889)Victor Stinner2021-10-112-52/+49
| | | | | Move definitions of copysign(), round(), hypot(), fmod(), etc. from pymath.h to pycore_pymath.h. These functions are not exported by libpython and so must not be part of the C API.
* bpo-41123: Remove Py_UNICODE_COPY() and Py_UNICODE_FILL() (GH-28887)Victor Stinner2021-10-113-13/+9
|
* bpo-45434: Python.h no longer includes <stdlib.h> (GH-28888)Victor Stinner2021-10-113-1/+7
|
* bpo-45412: Move _Py_SET_53BIT_PRECISION_START to pycore_pymath.h (GH-28882)Victor Stinner2021-10-115-90/+113
| | | | | | | | | | | | | | | Move the following macros , to pycore_pymath.h (internal C API): * _Py_SET_53BIT_PRECISION_HEADER * _Py_SET_53BIT_PRECISION_START * _Py_SET_53BIT_PRECISION_END PEP 7: add braces to if and "do { ... } while (0)" in these macros. Move also _Py_get_387controlword() and _Py_set_387controlword() definitions to pycore_pymath.h. These functions are no longer exported. pystrtod.c now includes pycore_pymath.h.
* bpo-45412: Update _Py_ADJUST_ERANGE1() comment (GH-28884)Victor Stinner2021-10-111-2/+9
| | | Copy the comment from the removed Py_OVERFLOWED() function.
* bpo-45410: Add test.support.flush_std_streams() (GH-28885)Victor Stinner2021-10-113-9/+20
| | | support.print_warning() now flushs sys.stdout.
* bpo-45434: Cleanup Python.h header file (GH-28883)Victor Stinner2021-10-112-52/+39
| | | | | | * Move limits.h include and UCHAR_MAX checks to pyport.h. * Move sanitizers macros to pyport.h. * Remove comment about <assert.h>: C extensions are built with NDEBUG automatically by Python.
* bpo-45412: Remove Py_SET_ERRNO_ON_MATH_ERROR() macro (GH-28820)Victor Stinner2021-10-118-113/+99
| | | | | | | | | | | | | | | | | | | | | | Remove the following math macros using the errno variable: * Py_ADJUST_ERANGE1() * Py_ADJUST_ERANGE2() * Py_OVERFLOWED() * Py_SET_ERANGE_IF_OVERFLOW() * Py_SET_ERRNO_ON_MATH_ERROR() Create pycore_pymath.h internal header file. Rename Py_ADJUST_ERANGE1() and Py_ADJUST_ERANGE2() to _Py_ADJUST_ERANGE1() and _Py_ADJUST_ERANGE2(), and convert these macros to static inline functions. Move the following macros to pycore_pymath.h: * _Py_IntegralTypeSigned() * _Py_IntegralTypeMax() * _Py_IntegralTypeMin() * _Py_InIntegralTypeRange()
* bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)Olaf van der Spek2021-10-111-2/+2
|
* Handle error when PyUnicode_GetLength returns a negative value. (GH-28859)Dong-hee Na2021-10-111-0/+3
|
* bpo-20028: Empty escapechar/quotechar is not allowed for csv.Dialect (GH-28833)Dong-hee Na2021-10-114-10/+22
|
* bpo-45411: Update mimetypes.py (GH-28792)Josephine-Marie2021-10-112-0/+3
| | | .vtt and .srt files are common subtitle files, used by browsers.
* bpo-42253: Update xml.dom.minidom.rst (GH-23126)Jens Diemer2021-10-111-0/+8
| | | | Document that the "standalone" parameter was added in Python 3.9. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Restore PEP 523 functionality. (GH-28871)Mark Shannon2021-10-113-6/+15
|
* Fix a leak in _PyImport_LoadDynamicModuleWithSpec() after failing ↵Serhiy Storchaka2021-10-111-1/+1
| | | | PySys_Audit() (GH-28862)
* bpo-45401: Fix a resource warning in test_logging (GH-28864)Serhiy Storchaka2021-10-111-0/+1
|
* bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)Joongi Kim2021-10-103-15/+59
| | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-45401: Change shouldRollover() methods to only rollover regular f… ↵Vinay Sajip2021-10-102-4/+25
| | | | | | | (GH-28822) …iles. Also changed some historical return values from 1 -> True and 0 -> False.
* Fix class pattern docs to refer to class patterns (GH-28849)Christophe Nanteuil2021-10-101-1/+1
|
* Remove repeated 'the' in docs (GH-28852)1809092021-10-102-3/+3
|
* bpo-29410: Change the default hash algorithm to SipHash13. (GH-28752)Inada Naoki2021-10-1011-26/+123
| | | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Christian Heimes <christian@python.org>
* Fix EncodingWarning in test_tools. (GH-28846)Inada Naoki2021-10-107-25/+29
|
* bpo-45353: Remind sys.modules users to copy when iterating. (GH-28842)Gregory P. Smith2021-10-091-1/+5
| | | | | | | | This is true of all dictionaries in Python, but this one tends to catch people off guard as they don't realize when sys.modules might change out from underneath them as a hidden side effect of their code. Copying it first avoids the RuntimeError. An example when this happens in single threaded code are codecs being loaded which are an implicit time of use import that most need not think about.
* Fix dataclassses spelling (GH-28837)Landon Yarrington2021-10-093-3/+3
|
* Fix the "Finding all Adverbs" example (GH-21420)Rim Chatti2021-10-091-2/+2
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-45256: Small cleanups for the code that inlines Python-to-Python calls ↵Pablo Galindo Salgado2021-10-091-11/+22
| | | | in ceval.c (GH-28836)