because "getaddrinfo()" behaves different on AIX
https://bugs.python.org/issue35545
(cherry picked from commit 32dda263e4)
Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
Fix MSVC warning:
objects\codeobject.c(285): warning C4244: '=':
conversion from 'Py_ssize_t' to 'unsigned char',
possible loss of data
(cherry picked from commit 376ce9852e)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-29505: Enable fuzz testing of the json module, enforce size limit on int(x) fuzz and json input size to avoid timeouts.
Contributed by by Ammar Askar for Google.
(cherry picked from commit a6e190e94b)
Co-authored-by: Ammar Askar <aaskar@google.com>
Python 3.6 changed the size of bytecode instruction, while the documentation for `EXTENDED_ARG` was not updated accordingly.
(cherry picked from commit 405f648db7)
Co-authored-by: Yao Zuo <laike9m@users.noreply.github.com>
Mock the HTTPConnection.close() method in a few unit tests to avoid
logging "Exception ignored in: ..." messages.
(cherry picked from commit eb976e47e2)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
(A single int is still allowed, but undocumented.)
https://bugs.python.org/issue35766
(cherry picked from commit 10b55c1643)
Co-authored-by: Guido van Rossum <guido@python.org>
* [bpo-36520](https://bugs.python.org/issue36520): reset the encoded word offset when starting a new
line during an email header folding operation
* 📜🤖 Added by blurb_it.
* [bpo-36520](https://bugs.python.org/issue36520): add an additional test case, and provide descriptive
comments for the test_folding_with_utf8_encoding_* tests
* [bpo-36520](https://bugs.python.org/issue36520): fix whitespace issue
* [bpo-36520](https://bugs.python.org/issue36520): changes per reviewer request -- remove extraneous
backslashes; add whitespace between terminating quotes and
line-continuation backslashes; use "bpo-" instead of
"issue GH-" in comments
(cherry picked from commit f6713e84af)
Co-authored-by: websurfer5 <49998481+websurfer5@users.noreply.github.com>
https://bugs.python.org/issue36520
If internal tasks weak set is changed by another thread during iteration.
https://bugs.python.org/issue36607
(cherry picked from commit 65aa64fae8)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
If preadv2 is not available, preadv will raise NotImplementedError.
(cherry picked from commit 44867bb937)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
This test "works" if things are run in the right order, so it's better to use @skip than @expectedFailure here.
(cherry picked from commit 910b3fcb01)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
When the line is uncommented, the equals character causes it to be incorrectly interpreted
as a macro definition by makesetup. This results in invalid Makefile output.
The expat code only requires XML_POOR_ENTROPY to be defined; the value is unnecessary.
(cherry picked from commit 408a2ef1ac)
Co-authored-by: aaronpaulhurst <aaronpaulhurst@gmail.com>
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue37215
(cherry picked from commit 8a8b59c979)
Co-authored-by: Christian Heimes <christian@python.org>
Fix an unintended ValueError from :func:`subprocess.run` when checking for
conflicting `input` and `stdin` or `capture_output` and `stdout` or `stderr` args
when they were explicitly provided but with `None` values within a passed in
`**kwargs` dict rather than as passed directly by name.
(cherry picked from commit 8cc605acdd)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
Currently, inspect.getfile(str) will report nonsense:
```pytb
>>> inspect.getfile(str)
TypeError: <module 'builtins' (built-in)> is a built-in class
```
This fixes that
https://bugs.python.org/issue37173
(cherry picked from commit d407d2a726)
Co-authored-by: Philipp A <flying-sheep@web.de>
There is a possibility that someone (like me) accidentally will omit parentheses with `FileType` arguments after `FileType`, and parser will contain wrong file until someone will try to use it.
Example:
```python
parser = argparse.ArgumentParser()
parser.add_argument('-x', type=argparse.FileType)
```
https://bugs.python.org/issue37150
(cherry picked from commit 03d5831a2d)
Co-authored-by: zygocephalus <grrrr@protonmail.com>
* Change from Dummy_Editwin to DummyEditwin to match other tests.
(cherry picked from commit 7f8a38a7c4)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Replace two Python function calls with a single one to ensure that no
memory allocation is done between the invalid object is created and
when _PyObject_IsFreed() is called.
(cherry picked from commit 3bf0f3ad20)
This avoids the search dialogs being hidden behind the editor window.
(cherry picked from commit 554450fb4e)
Co-authored-by: Tal Einat <taleinat@gmail.com>
Based on the source code 4a686504eb/Lib/multiprocessing/pool.pyGH-L755 AsyncResult.successful() raises a ValueError, not an AssertionError.
(cherry picked from commit d4cf099dff)
Co-authored-by: Benjamin Yeh <bentyeh@users.noreply.github.com>
This PR deprecate explicit loop parameters in all public asyncio APIs
This issues is split to be easier to review.
Second step: streams.py
https://bugs.python.org/issue36373
(cherry picked from commit 6d64a8f49e)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
Add it to the end of the first line if there is room. Tests were reworked.
(cherry picked from commit 949fe976d5)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-30835: email: Fix AttributeError when parsing invalid Content-Transfer-Encoding
Parsing an email containing a multipart Content-Type, along with a
Content-Transfer-Encoding containing an invalid (non-ASCII-decodable) byte
will fail. email.feedparser.FeedParser._parsegen() gets the header and
attempts to convert it to lowercase before comparing it with the accepted
encodings, but as the header contains an invalid byte, it's returned as a
Header object rather than a str.
Cast the Content-Transfer-Encoding header to a str to avoid this.
Found using the AFL fuzzer.
Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Andrew Donnellan <andrew@donnellan.id.au>
* Add email and NEWS entry for the bugfix.