| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
(GH-25996)
Automerge-Triggered-By: GH:pablogsal
|
|
|
| |
The error string on VxWorks is "no such file or directory" for FileNotFoundError. That is, the 1st letter of the error string has lower case.
|
| |
|
|
|
|
|
|
|
| |
A C function accessible by the default exception handler, but not by python code,
finds the existing name closest to the name causing a name or attribute error. For
such errors, call the default handler after capturing stderr and retrieve its message line.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
|
| |
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
|
|
|
|
|
|
|
|
| |
"Zero cost" exception handling.
* Uses a lookup table to determine how to handle exceptions.
* Removes SETUP_FINALLY and POP_TOP block instructions, eliminating (most of) the runtime overhead of try statements.
* Reduces the size of the frame object by about 60%.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove deprecated `Py_UNICODE` APIs: `PyUnicode_Encode`,
`PyUnicode_EncodeUTF7`, `PyUnicode_EncodeUTF8`,
`PyUnicode_EncodeUTF16`, `PyUnicode_EncodeUTF32`,
`PyUnicode_EncodeLatin1`, `PyUnicode_EncodeMBCS`,
`PyUnicode_EncodeDecimal`, `PyUnicode_EncodeRawUnicodeEscape`,
`PyUnicode_EncodeCharmap`, `PyUnicode_EncodeUnicodeEscape`,
`PyUnicode_TransformDecimalToASCII`, `PyUnicode_TranslateCharmap`,
`PyUnicodeEncodeError_Create`, `PyUnicodeTranslateError_Create`.
See :pep:`393` and :pep:`624` for reference.
|
|
|
|
| |
`convertitem()` raises `SystemError` when '#' is used without `PY_SSIZE_T_CLEAN`.
This commit makes `skipitem()` raise it too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
301s (GH-25705)
* Set content-length for simple http server 301s
When http.server.SimpleHTTPRequestHandler sends a 301 (Moved
Permanently) due to a missing file, it does not set a Content-Length
of 0. Unfortunately, certain clients can be left waiting for the
connection to be closed in this circumstance, even though no body
will be sent. At time of writing, both curl and Firefox demonstrate
this behavior.
* Test Content-Length on simple http server redirect
When serving a redirect, the SimpleHTTPRequestHandler will now send
`Content-Length: 0`. Several tests for http.server already cover
various behaviors and checks including redirection. This change only
adds one check for the expected Content-Length on the simplest case
for a redirect.
* Add news entry for SimpleHTTPRequestHandler fix
* Clarify the specific kind of 301
Co-authored-by: Senthil Kumaran <skumaran@gatech.edu>
|
|
|
| |
Automerge-Triggered-By: GH:gpshead
|
|
|
|
| |
(GH-25922)
|
| |
|
|
|
|
| |
(GH-25921)
|
|
|
|
|
|
|
| |
Continue (GH-25916)
Fixes http.client potential denial of service where it could get stuck reading lines from a malicious server after a 100 Continue response.
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
|
| |
Ignore objects that inspect.unwrap throws due to
too many wrappers. This is a very rare case, however
it can easily be surfaced when a module under doctest
imports unitest.mock.call into its namespace.
We simply skip any object that throws this exception.
This should handle the majority of cases.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The address tuple for CAN_RAW no longer returns the address family
after the introduction of CAN ISO-TP support in a30f6d45ac3. However,
updating test_socket.CANTest.testSendFrame was missed as part of the
change, so the test incorrectly attempts to index past the last tuple
item to retrieve the address family.
This removes the now-redundant check for equality against socket.AF_CAN,
as the tuple will not contain the address family.
|
| |
|
|
|
| |
parantheses -> parentheses
|
|
|
|
|
|
| |
This adds IO, TextIO, BinaryIO, Match, and Pattern.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-25095)
Since WPAR and LPAR both have a builddate for teh fileset bos.rte
The name of the fileset checked is modified.
To prevent a similiar situation (no builddate in ODM) a value
sufficient for pep425 activity if retrieved buildate is zero or NULL
Patch by M Felt.
|
|
|
|
|
|
|
| |
The code was updated in
https://github.com/python/cpython/commit/0ec88b33d093db00ec68b220247681354a650f0c
but the docstring was left untouched.
=> updated the docstring to reflect the code changes
|
|
|
|
| |
- Enum warning in test_faulthandler
- backslash warning in test_ipaddress
|
|
|
|
| |
raising parser exceptions (GH-25866)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Make case-swaps half the cost of any other edit
- Refactor Levenshtein code to not use memory allocator, and to bail early on no match.
- Add comments to Levenshtein distance code
- Add test cases for Levenshtein distance behind a debug macro
- Set threshold to `(name_size + item_size + 3) * MOVE_COST / 6`.
- Reasoning: similar to `difflib.SequenceMatcher.ratio()` >= 2/3:
```
"Multiset Jaccard similarity" >= 2/3
matching letters / total letters >= 2/3
(name_size - distance + item_size - distance) / (name_size + item_size) >= 2/3
1 - (2*distance) / (name_size + item_size) >= 2/3
1/3 >= (2*distance) / (name_size + item_size)
(name_size + item_size) / 6 >= distance
With rounding:
(name_size + item_size + 3) // 6 >= distance
```
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
|
|
|
|
| |
(GH-25850)
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
| |
This reverts commit 5fb06edbbb769561e245d0fe13002bab50e2ae60 and all
subsequent dependent commits.
|
| |
|
| |
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
class (GH-25841)
bpo-44015: Raise a TypeError if KW_ONLY is specified more than once.
|
| |
|
|
|
|
|
|
| |
Left click and drag to select lines. With selection, right click for context menu with copy and copy-with-prompts.
Also add copy-with-prompts to the text-box context menu.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
|
|
| |
Only complain if the config target is >= 10.3 and the current target is
< 10.3. The check was originally added to ensure that incompatible
LDSHARED flags are not used, because -undefined dynamic_lookup is
used when building for 10.3 and later, and is not supported on older OS
versions. Apart from that, there should be no problem in general
with using an older target.
Authored-by: Joshua Root <jmr@macports.org>
|
|
|
|
| |
correctly. (GH-25813)
|
| |
|
|
|
|
| |
(GH-25818)
|
|
|
|
|
|
|
|
|
| |
* bpo-43926: Cleaner metadata with PEP 566 JSON support.
* Add blurb
* Add versionchanged and versionadded declarations for changes to metadata.
* Use descriptor for PEP 566
|
| |
|
|
|
|
|
|
|
|
|
| |
Reverts commit e653d4d8e820a7a004ad399530af0135b45db27a and makes
parsing even more strict. Like socket.inet_pton() any leading zero
is now treated as invalid input.
Signed-off-by: Christian Heimes <christian@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
| |
Embedded nulls would cause a ValueError to be raised. Thanks go to
Eryk Sun for their analysis.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|