| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this revision, after the shutdown of a `BaseServer`,
the server accepted a last single request
if it was sent between the server socket polling
and the polling timeout.
This can be problematic for instance for a server restart
for which you do not want to interrupt the service,
by not closing the listening socket during the restart.
One request failed because of this behavior.
Note that only one request failed,
following requests were not accepted, as expected.
|
|
|
|
|
|
|
|
|
|
| |
Visual Studio solution: Set InlineFunctionExpansion to
OnlyExplicitInline ("/Ob1" option) on all projects (in
pyproject.props) in Debug mode on Win32 and x64 platforms to expand
functions marked as inline.
This change should make Python compiled in Debug mode a little bit
faster on Windows. On Unix, GCC uses -Og optimization level for
./configure --with-pydebug.
|
|
|
|
|
|
|
|
|
|
|
| |
isasyncgenfunction work with functools.partial (GH-9903)
inspect.isfunction() processes both inspect.isfunction(func) and
inspect.isfunction(partial(func, arg)) correctly but some other functions in the
inspect module (iscoroutinefunction, isgeneratorfunction and isasyncgenfunction)
lack this functionality. This commits adds a new check in the mentioned functions
in the inspect module so they can work correctly with arbitrarily nested partial
functions.
|
| |
|
|
|
|
| |
The MagicMock class supports many magic methods, but not __fspath__. To ease
testing with modules such as os.path, this function is now supported by default.
|
|
|
|
|
| |
(GH-10098)
https://bugs.python.org/issue35038
|
|
|
| |
Regression in b0bf51b32240369ccb736dc32ff82bb96f375402.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
tracemalloc now tries to update the traceback when an object is
reused from a "free list" (optimization for faster object creation,
used by the builtin list type for example).
Changes:
* Add _PyTraceMalloc_NewReference() function which tries to update
the Python traceback of a Python object.
* _Py_NewReference() now calls _PyTraceMalloc_NewReference().
* Add an unit test.
|
|
|
|
|
|
|
|
|
|
| |
.o generated by clang in LTO mode actually are LLVM bitcode files, which
leads to a few errors during configure/build step:
- add lto flags to the BASECFLAGS instead of CFLAGS, as CFLAGS are used
to build autoconf test case, and some are not compatible with clang LTO
(they assume binary in the .o, not bitcode)
- force llvm-ar instead of ar, as ar is not aware of .o files generated
by clang -flto
|
|
|
|
|
|
| |
(GH-2599)
They no longer cache the wchar_t* representation of string objects.
|
|
|
| |
Based on the investigation by Xiang Zhang.
|
|
|
|
|
|
|
|
| |
Raise ValueError OverflowError in case of a negative
_length_ in a ctypes.Array subclass. Also raise TypeError
instead of AttributeError for non-integer _length_.
Co-authored-by: Oren Milman <orenmn@gmail.com>
|
| |
|
|
|
| |
Constructing bytes from mutating list could cause a crash.
|
|
|
|
|
| |
For builtin types with builtin subclasses, help() on the type now shows up
to 4 of the subclasses. This partially replaces the exception hierarchy
information previously displayed in Python 2.7.
|
|
|
|
| |
If SyntaxWarning was raised as an exception, it will be replaced
with a SyntaxError for better error reporting.
|
|
|
|
|
| |
timemodule.c. (GH-9961)
Guard the `CLOCK_GETTIME` et al macros in `timemodule` based on the availability of the parent functions
|
|
|
|
| |
(GH-9051)
|
| |
|
|
|
|
| |
The symbol table was not exposing functionality to query the nonlocal symbols
in a function or to check if a particular symbol is nonlocal.
|
|
|
|
|
|
|
|
|
|
| |
truncate() (GH-5784)
path_error() uses GetLastError() on Windows, but some os functions
are implemented via CRT APIs which report errors via errno.
This may result in raising OSError with invalid error code (such
as zero).
Introduce posix_path_error() function and use it where appropriate.
|
|
|
|
|
|
|
|
|
| |
If buffering=1 is specified for open() in binary mode, it is silently
treated as buffering=-1 (i.e., the default buffer size).
Coupled with the fact that line buffering is always supported in Python 2,
such behavior caused several issues (e.g., bpo-10344, bpo-21332).
Warn that line buffering is not supported if open() is called with
binary mode and buffering=1.
|
| |
|
| |
|
|
|
| |
The reprlib code was copied here instead of importing reprlib. I'm not sure if we really need to avoid the import, but since I expect dataclasses to be more common that reprlib, it seems wise. Plus, the code is small.
|
|
|
|
| |
for invalid escape sequences in string and bytes literals.
|
|
|
|
| |
Adding `max_num_fields` to `cgi.FieldStorage` to make DOS attacks harder by
limiting the number of `MiniFieldStorage` objects created by `FieldStorage`.
|
|
|
| |
This allows *from_* to be successfully set to a non-default value when calling mbox.get_string.
|
| |
|
|
|
|
|
| |
Update the outdated install-sh file to the latest
revision from automake v1.16.1
|
|
|
|
|
| |
C implementation of xml.etree.ElementTree.Element.__setstate__()
leaked references to children when called for already initialized
element.
|
|
|
|
|
|
|
|
| |
Restores the use of pyexpatns.h to isolate our embedded copy of the expat C
library so that its symbols do not conflict at link or dynamic loading time
with an embedding application or other extension modules with their own
version of libexpat.
https://github.com/python/cpython/commit/5dc3f23b5fb0b510926012cb3732dae63cddea60#diff-3afaf7274c90ce1b7405f75ad825f545 inadvertently removed it when upgrading expat.
|
|
|
| |
On macOS, fix reading from and writing into a file with a size larger than 2 GiB.
|
|
|
|
|
|
| |
Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska.
Co-authored-by: Robert Kuska <rkuska@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
python-gdb.py now handles errors on computing the line number
of a Python frame.
Changes:
* PyFrameObjectPtr.current_line_num() now catchs any Exception on
calling addr2line(), instead of failing with a surprising "<class
'TypeError'> 'FakeRepr' object is not subscriptable" error.
* All callers of current_line_num() now handle current_line_num()
returning None.
* PyFrameObjectPtr.current_line() now also catchs IndexError on
getting a line from the Python source file.
|
|
|
|
| |
matches in logging.Formatter (GH-9703)
|
|
|
|
|
|
|
| |
(GH-9852)
bytes and bytearray constructors converted unexpected exceptions
(e.g. MemoryError and KeyboardInterrupt) to TypeError.
|
|
|
|
|
|
|
| |
Allow annotated global names in the module namespace after the symbol is
declared as global. Previously, only symbols annotated before they are declared
as global (i.e. inside a function) were allowed. This change allows symbols to be
declared as global before the annotation happens in the global scope.
|
|
|
|
| |
* Add News entry for the change in multiprocessing.reduction.recvfds
made in GH-9613.
|
|
|
|
| |
Methods find(), findtext() and findall() of xml.etree.ElementTree.Element
were not able to find chldren which are instances of Element subclasses.
|
|
|
| |
https://bugs.python.org/issue34970
|
| |
|
|
|
|
|
|
|
| |
the queue is closed. (GH-9010)
Previously, put() and get() would raise AssertionError and OSError,
respectively.
|
|
|
|
| |
(GH-9827)
|
| |
|
|
|
|
|
|
| |
Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
Original patch by Georg Brandl.
Co-Authored-By: Georg Brandl <georg@python.org>
|
| |
|
| |
|
|
|
|
|
| |
(GH-9751)
for the SHAKE algorithm in the hashlib module.
|