| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
sys and threading were imported twice.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The docs in `library/unittest.mock` have been updated to remove
confusing terms about submock and be explicit about the behavior
expected.
|
| |
|
|
|
|
|
| |
* Simplify the C code.
* Simplify tests and make them more strict and robust.
* Add references in the documentation.
|
| |
|
| |
|
| |
|
|
|
| |
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.
|
|
|
|
|
|
| |
(GH-9422)
Use tp_members and tp_getset instead.
|
|
|
|
| |
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`.
|
|
|
|
|
|
| |
It is now guarantied that children of xml.etree.ElementTree.Element
are Elements (at least in C implementation). Previously methods
__setitem__(), __setstate__() and __deepcopy__() could be used for
adding non-Element children.
|
| |
|
|
|
| |
This allows *from_* to be successfully set to a non-default value when calling mbox.get_string.
|
|
|
|
| |
from_splittable methods (#9865)
|
|
|
| |
This is intended to help code explorers find out more about what's defined there.
|
| |
|
| |
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
| |
According to the versionchanged note, the `strict` argument was removed in 3.3 and `policy` was added, but the name of the argument in the paragraph wasn't updated.
|
|
|
|
|
|
|
|
| |
When runnint test_logging with --huntrleaks after commit
18fb1fb943b7dbd7f8a76017ee2a67ef13effb85, test_out_of_order fails
to raise ValueError due to the fact that the new test
test_out_of_order_with_dollar_style mutates the out_of_order
dictionary. Even if the test copies the dictionary first, the mutation
is done in a very deep level so the original one is also affected.
|
| |
|
|
|
|
|
|
| |
Fix test_cmd_line_script.test_nonexisting_script(): the test must not
rely on sys.executable, since main.c uses config->program which can
be different than sys.executable in many cases (for example, on macOS
when using the framework).
|
|
|
|
| |
EchoServerClientProtocol to EchoServerProtocol (GH-9859)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
* fix dangling mention of key=str.lower in heapq doc
* Fix dangling mention of keyfunc example for sorted()
|
|
|
|
| |
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.
|
|
|
|
| |
A Windows build with _tkinter, tkinter, and idlelib
but without ctypes is unlikely but apparently possible.
|
|
|
| |
https://bugs.python.org/issue34970
|
|
|
|
| |
Covered all special cases: bytes, tuple, list, differend
kinds of iterables and iterators.
|