| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Try to fix asyncio.Server.wait_closed() again
I identified the condition that `wait_closed()` is intended
to wait for: the server is closed *and* there are no more
active connections.
When this condition first becomes true, `_wakeup()` is called
(either from `close()` or from `_detach()`) and it sets `_waiters`
to `None`. So we just check for `self._waiters is None`; if it's
not `None`, we know we have to wait, and do so.
A problem was that the new test introduced in 3.12 explicitly
tested that `wait_closed()` returns immediately when the server
is *not* closed but there are currently no active connections.
This was a mistake (probably a misunderstanding of the intended
semantics). I've fixed the test, and added a separate test that
checks exactly for this scenario.
I also fixed an oddity where in `_wakeup()` the result of the
waiter was set to the waiter itself. This result is not used
anywhere and I changed this to `None`, to avoid a GC cycle.
* Update Lib/asyncio/base_events.py
---------
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
|
|
|
| |
unistd.h is needed by alarm() and pause() functions.
|
| |
|
| |
|
|
|
|
| |
(#111390)
|
|
|
|
|
|
|
|
| |
Fix locale.LC_CTYPE documentation to no longer mention string.lower() et al. Those functions were removed in Python 3.0:
https://docs.python.org/2/library/string.html#deprecated-string-functions
Also, fix a comment in logging about locale-specific behavior of `str.lower()`.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
| |
(gh-110163)
|
| |
|
|
|
|
|
| |
`sys.monitoring` (#111291)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#108699)
Add a guide for how to handle non-UTF-8 text encodings.
Link to that guide from the 'text_factory' docs.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Corvin <corvin@corvin.dev>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
(#111188)
|
|
|
|
| |
Remove no longer used functions run_unittest() and run_doctest() from
the test.support module.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7f316763402a7d5556deecc3acd06cb719e189b3.
The change resulted in a tautology and should not have been made. There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)
Ref: https://github.com/python/cpython/pull/108427#issuecomment-1777525740
|
| |
|
|
|
|
|
|
|
| |
It now always returns an integer if one or less counting options are specified.
Previously it could return a single count as a 1-tuple, an integer (only if
option "update" was specified) or None if no items found.
The result is now the same if wantobjects is set to 0.
|
|
|
|
| |
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
(#111110)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst`
* Update Doc/library/asyncio-eventloop.rst
* Update Doc/library/asyncio-eventloop.rst
---------
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
|
| |
|
| |
|
|
|
|
| |
(#111142)
|
|
|
|
|
| |
Document the __signature__ attribute
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
| |
On error, PyUnicode_AsUTF8AndSize() now sets the size argument to -1,
to avoid undefined value.
|
|
|
|
|
|
|
|
| |
Add PyUnicode_AsUTF8() function to the limited C API.
multiprocessing posixshmem now uses PyUnicode_AsUTF8() instead of
PyUnicode_AsUTF8AndSize(): the extension is built with the limited C
API. The function now raises an exception if the filename contains an
embedded null character instead of truncating silently the filename.
|
|
|
|
|
|
|
|
|
| |
* PyUnicode_AsUTF8() now raises an exception if the string contains
embedded null characters.
* Update related C API tests (test_capi.test_unicode).
* type_new_set_doc() uses PyUnicode_AsUTF8AndSize() to silently
truncate doc containing null bytes.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
Fix Sphinx warnings in library/tty.rst
|
|
|
|
|
|
|
| |
Build the _multiprocessing.posixshmem extension with the Limited C
API.
* Add <errno.h> include.
* Replace PyUnicode_AsUTF8() with PyUnicode_AsUTF8AndSize().
|
|
|
|
|
|
|
| |
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
Co-authored-by: Jacob Coffee <jacob@z7x.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
terminating the whole process (GH-102896)
|
| |
|
|
|
|
| |
Fix https://github.com/python/cpython/security/dependabot/4: use
urllib3 version 2.0.7.
|
| |
|
|
|
|
| |
* Replace Py_SETREF(v, NULL) with Py_CLEAR(v).
* Reformat the code.
|
|
|
|
|
|
| |
* Replace PyStructSequence_SET_ITEM() with
PyStructSequence_SetItem().
* Replace PyTuple_GET_SIZE() with PyTuple_Size().
* Replace PyTuple_GET_ITEM() with PyTuple_GetItem().
|
|
|
|
|
|
|
|
|
|
| |
The PySys_Audit() function was added in Python 3.8 by the PEP 578
"Python Runtime Audit Hooks".
Add also PySys_AuditTuple() to the limited C API, function added
to Python 3.13.
Move non-limited "PerfMap" C API from Include/sysmodule.h to
Include/cpython/sysmodule.h.
|