| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
`arg` is misspelled as `agr`. I noticed this when playing with https://bugs.python.org/issue34871
https://bugs.python.org/issue34871
|
|
|
| |
Use tp_members and tp_getset instead.
|
|
|
| |
Use tp_members and tp_getset instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C implementation of asyncio.Task currently fails to perform the
cancellation cleanup correctly in the following scenario.
async def task1():
async def task2():
await task3 # task3 is never cancelled
asyncio.current_task().cancel()
await asyncio.create_task(task2())
The actuall error is a hardcoded call to `future_cancel()` instead of
calling the `cancel()` method of a future-like object.
Thanks to Vladimir Matveev for noticing the code discrepancy and to
Yury Selivanov for coming up with a pathological scenario.
|
|
|
|
|
| |
formatfloat() was not checking if PyBytes_FromStringAndSize()
failed, which could lead to a null pointer dereference in
_PyBytes_FormatEx().
|
|
|
|
|
| |
assertWarns/assertWarnsRegex/assertRaisesRegex is keyword-only. (GH-9680)
A follow up to be4e5b89204283a62e369439025f00362d0424f6.
|
|
|
| |
Fix a reference issue inside multiprocessing.Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly.
|
| |
|
| |
|
|
|
|
|
|
| |
POSIX_SPAWN_SETSCHEDULER. (GH-9658)
Fixes broken build on OpenBSD-current.
|
| |
|
|
|
|
| |
type specifier. (GH-9666)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
property_descr_get() uses a "cached" tuple to optimize function
calls. But this tuple can be discovered in debug mode with
sys.getobjects(). Remove the optimization, it's not really worth it
and it causes 3 different crashes last years.
Microbenchmark:
./python -m perf timeit -v \
-s "from collections import namedtuple; P = namedtuple('P', 'x y'); p = P(1, 2)" \
--duplicate 1024 "p.x"
Result:
Mean +- std dev: [ref] 32.8 ns +- 0.8 ns -> [patch] 40.4 ns +- 1.3 ns: 1.23x slower (+23%)
|
| |
|
|
|
| |
Patch by Serhiy Storchaka (in PR #9642).
|
|
|
|
|
|
|
|
|
|
| |
* Compiling a string annotation containing a lambda with keyword-only
argument without default value caused a crash.
* Remove the final "*" (it is incorrect syntax) in the representation of
lambda without *args and keyword-only arguments when compile from AST.
* Improve the representation of lambda without arguments.
|
|
|
|
|
|
|
|
|
|
| |
(GH-9641)
The waiting is pretty normal for any asyncio program, logging its time just adds
a noise to logs without any useful information provided.
https://bugs.python.org/issue34849
|
| |
|
|
|
| |
Switch "list" with "iterable" to match with the implementation.
|
|
|
| |
Support for threadless builds was removed in a6a4dc81.
|
| |
|
|
|
|
| |
_pickle.Unpickler.__init__() should return -1 if Pdata_New() fails, not 1.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since ProactorEventLoop is now the default in 3.8, remove examples
using it explicitly on Windows.
https://bugs.python.org/issue34687
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CMSG_SPACE (GH-9613)
After some failures in AMD64 FreeBSD CURRENT Debug 3.x buildbots
regarding tests in test_multiprocessing_spawn and after examining
similar failures in test_socket, some errors in the calculation of
ancillary data buffers were found in multiprocessing.reduction.
CMSG_LEN() can often be used as the buffer size for recvmsg() to
receive a single item of ancillary data, but RFC 3542 requires portable
applications to use CMSG_SPACE() and thus include space for padding,
even when the item will be the last in the buffer.
The failures we experience are due to the usage of CMSG_LEN() instead of
CMSG_SPACE().
|
|
|
|
|
|
|
|
| |
Improvements:
1. Include the number of valid data characters in the error message.
2. Mention "number of data characters" rather than "length".
https://bugs.python.org/issue34736
|
|
|
|
|
|
| |
Report the filename to the exception when raising {gdbm,dbm.ndbm}.error in
dbm.gnu.open() and dbm.ndbm.open() functions, so it gets printed when the
exception is raised, and can also be obtained by the filename attribute of the
exception object.
|
| |
|
|
|
| |
This fixes various compiler warnings.
|
| |
|
|
|
|
|
|
|
| |
(GH-9599)
Use a monotonic clock to compute timeouts in :meth:`Executor.map` and :func:`as_completed`, in order to prevent timeouts from deviating when the system clock is adjusted.
This may not be sufficient on all systems. On POSIX for example, the actual waiting (e.g. in ``sem_timedwait``) is specified to rely on the CLOCK_REALTIME clock.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After some failures in AMD64 FreeBSD CURRENT Debug 3.x buildbots
regarding tests in test_socket that are using
testFDPassSeparateMinSpace(), FreeBDS revision 337423 was pointed
out to be the reason the test started to fail.
A close examination of the manpage for cmsg_space(3) reveals that
the number of file descriptors needs to be taken into account when
using CMSG_LEN().
This commit fixes tests in test_socket to use correctly CMSG_LEN, taking
into account the number of FDs.
|
| |
|
|
|
|
|
|
| |
Currently, the docs state that when doing `Type[X]`, X is only allowed to
be a class, a union of classes, and Any. This pull request amends
that sentence to clarify X may also be a typevar (or a union involving
classes, Any, and TypeVars).
|
|
|
|
|
|
| |
The AF_QIPCRTR address family was introduced in Linux v4.7.
Co-authored-by: Bjorn Andersson <bjorn.andersson@linaro.org>
|
|
|
|
|
|
|
| |
When dict subclass overrides order (`__iter__()`, `keys()`, and `items()`), `dict(o)`
should use it instead of dict ordering.
https://bugs.python.org/issue34320
|
| |
|
| |
|
|
|
| |
* bpo-5950: Support reading zips with comments in zipimport
|
|
|
|
| |
(GH-9543)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fix test_socket.SendmsgSCTPStreamTest: catch ENOMEM error.
testSendmsgTimeout() and testSendmsgDontWait() randomly fail on
Travis CI with: "OSError: [Errno 12] Cannot allocate memory".
|
| |
|