| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
(GH-8878)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use _PyUnicode_Copy in sanitize_isoformat_str
* Use repr in fromisoformat error message
This reverses commit 67b74a98b2 per Serhiy Storchaka's suggestion:
I suggested to use %R in the error message because including the raw
string can be confusing in the case of empty string, or string
containing trailing whitespaces, invisible or unprintable characters.
We agree that it is better to change both the C and pure Python versions
to use repr.
* Retain non-sanitized dtstr for error printing
This does not create an extra string, it just holds on to a reference to
the original input string for purposes of creating the error message.
* PEP 7 fixes to from_isoformat
* Separate handling of Unicode and other errors
In the initial implementation, errors other than encoding errors would
both raise an error indicating an invalid format, which would not be
true for errors like MemoryError.
* Drop needs_decref from _sanitize_isoformat_str
Instead _sanitize_isoformat_str returns a new reference, even to the
original string.
|
|
|
| |
The assignment of i/2 to nk is redundant because on this code path, nk is already the size of the dictionary, and i is already twice the size of the dictionary. I've replaced the store with an assertion that i/2 is nk.
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Previous to commit ee171a2 the logline was working because of self.info() (now
deprecated) defaults to an empty message.
|
|
|
|
| |
(GH-9874)
|
|
|
| |
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
|
|
|
| |
Fixes doc build breakage from 890a4b92933be8e7c554222d99ef829c88fa8637.
|
| |
|
|
|
|
|
|
|
|
| |
http.server.rst (#10005)
* bpo-34576 - Fix the formatting for security considerations in http.server.rst
* Address review comment.
|
|
|
|
| |
This should reduce false failure reports to the Zulip 'core/test runs'
stream from Travis failures on private forks.
|
|
|
| |
https://bugs.python.org/issue35032
|
| |
|
|
|
|
| |
(GH-9051)
|
| |
|
|
|
| |
Set SRCDIR as the current directory for git.
|
|
|
|
| |
The symbol table was not exposing functionality to query the nonlocal symbols
in a function or to check if a particular symbol is nonlocal.
|
|
|
|
| |
Simplify the pickling of set and dictionary objects iterators by consuming
the iterator into a list with PySequence_List.
|
|
|
|
|
|
|
|
| |
docs (#5621)
Add restriction on the offset parameter for mmap.flush.
Explain that ALLOCATIONGRANULARITY is the same as PAGESIZE in Unix.
|
|
|
| |
Initial patch by Chandan Kumar.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
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.
|