]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Victor Stinner [Wed, 19 Sep 2018 19:01:52 +0000 (12:01 -0700)]
Revert "[3.7] bpo-34589: Add -X coerce_c_locale option; C locale coercion off by default (GH-9379)" (GH-9416)
This reverts commit
144f1e2c6f4a24bd288c045986842c65cc289684 .
Miss Islington (bot) [Tue, 18 Sep 2018 22:09:51 +0000 (15:09 -0700)]
bpo-33649: Add a high-level section about Futures; few quick fixes (GH-9403)
Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
(cherry picked from commit
471503954a91d86cf04228c38134108c67a263b0 )
Co-authored-by: Yury Selivanov <yury@magic.io>
Miss Islington (bot) [Tue, 18 Sep 2018 18:48:22 +0000 (11:48 -0700)]
bpo-34582: Adds JUnit XML output for regression tests (GH-9210)
(cherry picked from commit
d0f49d2f5085ca68e3dc8725f1fb1c9674bfb5ed )
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Miss Islington (bot) [Tue, 18 Sep 2018 13:11:09 +0000 (06:11 -0700)]
bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146)
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue34623
(cherry picked from commit
cb5778f00ce48631c7140f33ba242496aaf7102b )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Tue, 18 Sep 2018 07:00:58 +0000 (00:00 -0700)]
bpo-33649: Fix markup; add another note that asyncio.run is 3.7+ (GH-9389)
(cherry picked from commit
b042cf10c6084d14279c55a7e0d2d7595ff4e694 )
Co-authored-by: Yury Selivanov <yury@magic.io>
Miss Islington (bot) [Tue, 18 Sep 2018 06:27:27 +0000 (23:27 -0700)]
Fix syntax error on Asyncio example in doc (GH-9387) (GH-9388)
The `gather` method requires to close the parenthesis, but it is being closed twice.
(cherry picked from commit
9c53fa6ad9cd23fb03867b4a1f74264c426c1772 )
Co-authored-by: Miguel Ángel García <magmax@users.noreply.github.com>
Miss Islington (bot) [Tue, 18 Sep 2018 06:27:07 +0000 (23:27 -0700)]
Change "set_after" reference to `say_after`. (GH-9384) (GH-9386)
(cherry picked from commit
7bfbda46f49c0b2c43e128835106cf13315b6ae8 )
Co-authored-by: Danny Hermes <daniel.j.hermes@gmail.com>
Miss Islington (bot) [Tue, 18 Sep 2018 04:12:05 +0000 (21:12 -0700)]
bpo-33649: Note that asyncio.run() calls shutdown_asyncgens() (GH-9380)
(cherry picked from commit
ac94e38d076aebc56c2ff96a249b5e40f32633ea )
Co-authored-by: Yury Selivanov <yury@magic.io>
Victor Stinner [Tue, 18 Sep 2018 01:01:39 +0000 (18:01 -0700)]
[3.7] bpo-34589: Add -X coerce_c_locale option; C locale coercion off by default (GH-9379)
* bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)
_PyCoreConfig:
* Rename coerce_c_locale to _coerce_c_locale
* Rename coerce_c_locale_warn to _coerce_c_locale_warn
These fields are now private (name prefixed by "_").
(cherry picked from commit
188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27 )
* bpo-34589: C locale coercion off by default (GH-9073)
Py_Initialize() and Py_Main() cannot enable the C locale coercion
(PEP 538) anymore: it is always disabled. It can now only be enabled
by the Python program ("python3).
test_embed: get_filesystem_encoding() doesn't have to set PYTHONUTF8
nor PYTHONCOERCECLOCALE, these variables are already set in the
parent.
(cherry picked from commit
7a0791b6992d420dc52536257f2f093851ed7215 )
* bpo-34589: Add -X coerce_c_locale command line option (GH-9378)
Add a new -X coerce_c_locale command line option to control C locale
coercion (PEP 538).
(cherry picked from commit
dbdee0073cf0b88fe541980ace1f650900f455cc )
Yury Selivanov [Mon, 17 Sep 2018 23:35:30 +0000 (19:35 -0400)]
bpo-33649: Backport asyncio docs from 'master' to 3.7 (GH-9377)
Miss Islington (bot) [Mon, 17 Sep 2018 22:42:09 +0000 (15:42 -0700)]
bpo-34717: Stop numbering stdlib titles/sections in the docs (GH-9370)
(cherry picked from commit
c62ab2862db2382808bb2228760eebdda3f608bd )
Co-authored-by: Yury Selivanov <yury@magic.io>
Miss Islington (bot) [Mon, 17 Sep 2018 22:39:18 +0000 (15:39 -0700)]
bpo-34267: Update find_python.bat to use 3.7 if available (GH-8552)
(cherry picked from commit
6750922f8d3428d84a016c34d6fcd99659e8610c )
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Miss Islington (bot) [Mon, 17 Sep 2018 21:27:59 +0000 (14:27 -0700)]
bpo-34587, test_socket: remove RDSTest.testCongestion() (GH-9277)
The test tries to fill the receiver's socket buffer and expects an
error. But the RDS protocol doesn't require that. Moreover, the Linux
implementation of RDS expects that the producer of the messages
reduces its rate, it's not the role of the receiver to trigger an
error.
The test fails on Fedora 28 by design, so remove it.
(cherry picked from commit
7484bdfd1e2e33fdd2c44dd4ffa044aacd495337 )
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Miss Islington (bot) [Mon, 17 Sep 2018 19:12:13 +0000 (12:12 -0700)]
bpo-32533: Fixed thread-safety of error handling in _ssl. (GH-7158)
(cherry picked from commit
c6fd1c1c3a65217958b68df3a4991e4f306e9b7d )
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Miss Islington (bot) [Mon, 17 Sep 2018 13:09:32 +0000 (06:09 -0700)]
bpo-33216: Improve the documentation for CALL_FUNCTION_* (GH-8338) (GH-8784)
(cherry picked from commit
5e99b56d6b249995a4fa2bc09c0bb03841f49572 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 17 Sep 2018 13:08:45 +0000 (06:08 -0700)]
bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683)
(cherry picked from commit
9bdb7be482aef8f60daa1d36606568a132dcb616 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 17 Sep 2018 12:18:23 +0000 (05:18 -0700)]
bpo-34710: fix SSL module build (GH-9347)
Include ``openssl/dh.h`` header file to fix implicit function declaration of ``DH_free()``.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(cherry picked from commit
b3a271fc0ce3e13e427be8914decfc205a220ca8 )
Co-authored-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Miss Islington (bot) [Mon, 17 Sep 2018 12:10:56 +0000 (05:10 -0700)]
bpo-34610: Fixed iterator of multiprocessing.managers.DictProxy. (GH-9113)
(cherry picked from commit
e0e5065daef36dafe10a46eaa8b7800274d73062 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 16 Sep 2018 05:53:13 +0000 (22:53 -0700)]
bpo-34603, ctypes/libffi_msvc: Fix returning structs from functions (GH-9258)
(cherry picked from commit
7843caeb909bd907e903606414e238db4082315a )
Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
Miss Islington (bot) [Sat, 15 Sep 2018 17:52:57 +0000 (10:52 -0700)]
closes bpo-34515: Support non-ASCII identifiers in lib2to3. (GH-8950)
(cherry picked from commit
10a428b64b3f224e2ccd40ff2afb141b9b3425b1 )
Co-authored-by: Monson Shao <holymonson@gmail.com>
Miss Islington (bot) [Fri, 14 Sep 2018 21:30:04 +0000 (14:30 -0700)]
bpo-32933: Implement __iter__ method on mock_open() (GH-5974)
(cherry picked from commit
2087023fdec2c89070bd14f384a3c308c548a94a )
Co-authored-by: Tony Flury <anthony.flury@btinternet.com>
Miss Islington (bot) [Fri, 14 Sep 2018 19:15:10 +0000 (12:15 -0700)]
Fix "Python" casing in a few places (GH-9001) (GH-9313)
(cherry picked from commit
271818fe279df5ab292789f97c3a52c477bd8f13 )
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
Miss Islington (bot) [Fri, 14 Sep 2018 18:05:38 +0000 (11:05 -0700)]
closes bpo-28955: Clarified comparisons between NaN and number in reference documentation (GH-5982)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
(cherry picked from commit
ad8a0004206ba7aec5a8a60fce413da718080db2 )
Co-authored-by: Tony Flury <anthony.flury@btinternet.com>
Miss Islington (bot) [Fri, 14 Sep 2018 17:47:14 +0000 (10:47 -0700)]
bpo-34363: dataclasses.asdict() and .astuple() now handle fields which are namedtuples. (GH-9151) (GH-9304)
(cherry picked from commit
9b9d97dd139a799d28ff8bc90d118b1cac190b03 )
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Miss Islington (bot) [Fri, 14 Sep 2018 16:28:07 +0000 (09:28 -0700)]
Change the xkcd link in comment over https. (GH-9293)
(cherry picked from commit
83df50ea5757816c7338d27f21fd18b1e79206f7 )
Co-authored-by: 觉 <Xdminsy@users.noreply.github.com>
Miss Islington (bot) [Fri, 14 Sep 2018 16:22:48 +0000 (09:22 -0700)]
Don't run AC_STRUCT_TIMEZONE twice. (GH-9305)
(cherry picked from commit
a4414ef20b971e6803309acebfa85b1621ac625e )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Fri, 14 Sep 2018 08:13:17 +0000 (01:13 -0700)]
Note that distinct argument patterns can be cached separately (GH-9298) (GH-9299)
(cherry picked from commit
902bcd9a1e2c73c6de5510b771c590b618c4c94e )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Andrew Svetlov [Fri, 14 Sep 2018 00:03:35 +0000 (17:03 -0700)]
[3.7] bpo-34490: Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (GH-8907) (#9286)
* [3.7] Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (GH-8907).
(cherry picked from commit
413118ebf3162418639a5c4af14b02d26571a02c )
Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
* Update test_events.py
Miss Islington (bot) [Thu, 13 Sep 2018 22:13:55 +0000 (15:13 -0700)]
bpo-31132: Remove prlimit permission test. (GH-9280)
This test is doesn't work when the test process is privledged, which is hard to detect.
https://bugs.python.org/issue34668
(cherry picked from commit
01e0afa994c2e840f85e2de103e72a2c0ddf1b1f )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Thu, 13 Sep 2018 19:42:26 +0000 (12:42 -0700)]
closes bpo-34664: Only check file permission bits of newly created directories. (GH-9273)
(cherry picked from commit
84db4a9978069a98978e9cd7951d1a01d47e5286 )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Thu, 13 Sep 2018 19:14:46 +0000 (12:14 -0700)]
bpo-34247: add porting note to 3.7 What's New (GH-9223)
(cherry picked from commit
66755cbb1e529f54c9066639ebbbac81add0affd )
Co-authored-by: Ned Deily <nad@python.org>
Miss Islington (bot) [Thu, 13 Sep 2018 18:35:18 +0000 (11:35 -0700)]
bpo-34661: Fix test skipping call. (GH-9266)
(cherry picked from commit
e78734d579439861f6d7e12f35d268836b2c1e24 )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Thu, 13 Sep 2018 17:27:52 +0000 (10:27 -0700)]
closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262)
(cherry picked from commit
a710ebd21b09efe902dde84d4862ce5c6427f7af )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Thu, 13 Sep 2018 17:11:00 +0000 (10:11 -0700)]
bpo-34658: Fix rare subprocess prexec_fn fork error. (GH-9255)
[bpo-34658](https://www.bugs.python.org/issue34658): Fix a rare interpreter unhandled exception state SystemError only
seen when using subprocess with a preexec_fn while an after_parent handler has
been registered with os.register_at_fork and the fork system call fails.
https://bugs.python.org/issue34658
(cherry picked from commit
a20b6adb5a5880fd22c099961eb9f9787739cefe )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Thu, 13 Sep 2018 05:33:02 +0000 (22:33 -0700)]
bpo-34652: Remove lchmod from the big func checking block. (GH-9247)
A fix for
883702ebb8bbfa749ef0040d1b58d6222bf589ee .
(cherry picked from commit
ed709d5699716bf7237856dc20aba321e2dfff6d )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Thu, 13 Sep 2018 01:29:08 +0000 (18:29 -0700)]
bpo-34200: Fix non-determinism of test_pkg (GH-9248)
This causes the tearDown code to only unimport the test modules specifically created as part of each test via the self.mkhier method rather than abusing test.support.modules_setup() and the scary test.support.modules_cleanup() code.
https://bugs.python.org/issue34200
(cherry picked from commit
4ae8ece5cd4c5853b625381db13429f25512108d )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Wed, 12 Sep 2018 23:54:10 +0000 (16:54 -0700)]
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
(cherry picked from commit
e1a34ceb541ef87e03bb428630097dacc9c658e5 )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Wed, 12 Sep 2018 23:36:05 +0000 (16:36 -0700)]
closes bpo-34652: Always disable lchmod on Linux. (GH-9234)
(cherry picked from commit
40caa05fa4d1810a1a6bfc34e0ec930c351089b7 )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Benjamin Peterson [Wed, 12 Sep 2018 23:00:06 +0000 (16:00 -0700)]
[3.7] closes bpo-34650: Check if sched_getscheduler returns ENOSYS before declaring it supported. (GH-9236)
musl doesn't support the scheduler API, but declares stubs that alway return ENOSYS..
(cherry picked from commit
c7042224b8a67748f125c22836862483f81a87a6 )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Wed, 12 Sep 2018 21:46:41 +0000 (14:46 -0700)]
bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)
Reported by Svace static analyzer.
(cherry picked from commit
6f82bffd2df63a4072b3f0483cdbe93ddedb87e9 )
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Miss Islington (bot) [Wed, 12 Sep 2018 21:10:56 +0000 (14:10 -0700)]
closes bpo-34004: Skip lock interruption tests on musl. (GH-9224)
Returning EINTR from pthread semaphore or lock acquisition is an optional POSIX
feature. musl does not provide this feature, so some threadsignal tests fail
when Python is built against it.
There's no good way to test for musl, so we skip if we're on Linux and not using
glibc pthreads.
Also, hedge in the threading documentation about when we can provide interrupts
from lock acquisition.
(cherry picked from commit
5b10d5111d7a855297654af9045f8907b7d3dd08 )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Wed, 12 Sep 2018 19:46:30 +0000 (12:46 -0700)]
bpo-31577: Fix a crash in os.utime() in case of a bad ns argument. (GH-3752)
(cherry picked from commit
0bd1a2dcfdf36b181385ae61361e7692f4ebb0fd )
Co-authored-by: Oren Milman <orenmn@gmail.com>
Miss Islington (bot) [Wed, 12 Sep 2018 15:37:30 +0000 (08:37 -0700)]
closes bpo-31903: Release the GIL when calling into SystemConfiguration (GH-4178)
(cherry picked from commit
4859ba0d2ce4506fddc3f55f90f8dce031b3804f )
Co-authored-by: Max Bélanger <aeromax@gmail.com>
Benjamin Peterson [Wed, 12 Sep 2018 01:46:36 +0000 (18:46 -0700)]
[3.7] closes bpo-25041: Document AF_PACKET socket address format. (GH-9207)
(cherry picked from commit
731ff68eeef58babdf2b32dc9a73b141760c2be9 )
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Miss Islington (bot) [Wed, 12 Sep 2018 01:04:33 +0000 (18:04 -0700)]
Delete old expat comment. (GH-9197)
(cherry picked from commit
b9bf9d025e659b5a1963027eb73690e57cb35dd0 )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Tue, 11 Sep 2018 23:32:52 +0000 (16:32 -0700)]
Make sure the line comes from the same node as the col offset. (GH-9189)
Followup to
90fc8980bbcc5c7dcced3627fe172b0bfd193a3b .
<!--
Thanks for your contribution!
Please read this comment in its entirety. It's quite important.
GH- Pull Request title
It should be in the following format:
```
bpo-NNNN: Summary of the changes made
```
Where: bpo-NNNN refers to the issue number in the https://bugs.python.org.
Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue.
GH- Backport Pull Request title
If this is a backport PR (PR made against branches other than `master`),
please ensure that the PR title is in the following format:
```
[X.Y] <title from the original PR> (GH-NNNN)
```
Where: [X.Y] is the branch name, e.g. [3.6].
GH-NNNN refers to the PR number from `master`.
-->
(cherry picked from commit
d13e59c1b512069d90efe7ee9b613d3913e79c56 )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Tue, 11 Sep 2018 22:21:11 +0000 (15:21 -0700)]
closes bpo-31902: Fix the col_offset attribute for ast.Async* nodes to point to the "async" keyword. (GH-4175)
Previously, col_offset points to the keyword after "async".
(cherry picked from commit
90fc8980bbcc5c7dcced3627fe172b0bfd193a3b )
Co-authored-by: guoci <zguoci@gmail.com>
Miss Islington (bot) [Tue, 11 Sep 2018 21:24:53 +0000 (14:24 -0700)]
bpo-34365: Update date object documentation (GH-8814)
Python 3.x does not fall back to comparing object addresses when comparing two `dt` objects.
<!-- issue-number: [bpo-34365](https://www.bugs.python.org/issue34365) -->
https://bugs.python.org/issue34365
<!-- /issue-number -->
(cherry picked from commit
9c223794c754408644c16349b85dd27fdba8a926 )
Co-authored-by: Danish Prakash <grafitykoncept@gmail.com>
Steve Dower [Tue, 11 Sep 2018 21:01:13 +0000 (14:01 -0700)]
Update VSTS to Azure DevOps and simplify dependencies (GH-9168)
Miss Islington (bot) [Tue, 11 Sep 2018 19:08:10 +0000 (12:08 -0700)]
closes bpo-31608: Fix a crash in methods of a subclass of _collections.deque with a bad __new__(). (GH-3788)
(cherry picked from commit
24bd50bdcc97d65130c07d6cd26085fd06c3e972 )
Co-authored-by: Oren Milman <orenmn@gmail.com>
Miss Islington (bot) [Tue, 11 Sep 2018 18:59:29 +0000 (11:59 -0700)]
bpo-34613: document the correct value of limit argument of asyncio.StreamReader (GH-9121)
The default value of asyncio.StreamReader *limit* is `_DEFAULT_LIMIT` instead of `None`.
<!-- issue-number: [bpo-34613](https://www.bugs.python.org/issue34613) -->
https://bugs.python.org/issue34613
<!-- /issue-number -->
(cherry picked from commit
b4ec36200a959da70eba94c19826446a8efdffdd )
Co-authored-by: Bram <cortex@worlddomination.be>
Miss Islington (bot) [Tue, 11 Sep 2018 18:13:33 +0000 (11:13 -0700)]
bpo-28617 Fixed docs inaccuracies about the types that support membership tests (GH-9086)
<!-- issue-number: [bpo-28617](https://www.bugs.python.org/issue28617) -->
https://bugs.python.org/issue28617
<!-- /issue-number -->
(cherry picked from commit
08bcf647d8a92e4bd47531588b284c6820b7a7ef )
Co-authored-by: wim glenn <wim.glenn@gmail.com>
Miss Islington (bot) [Tue, 11 Sep 2018 16:07:11 +0000 (09:07 -0700)]
bpo-34405: Update to OpenSSL 1.1.0i for macOS installer builds (GH-9166) (GH-9167)
(cherry picked from commit
3102e24d83315eee42a94c460956fbcb92ac510f )
Co-authored-by: Ned Deily <nad@python.org>
Miss Islington (bot) [Tue, 11 Sep 2018 05:27:00 +0000 (22:27 -0700)]
closes bpo-33883: Mention type checkers in the FAQ. (GH-7760)
(cherry picked from commit
a37825418649873a0fa971dc7e5e6d142c124574 )
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
Miss Islington (bot) [Tue, 11 Sep 2018 04:55:27 +0000 (21:55 -0700)]
bpo-34625: Update vendorized expat version to 2.2.6. (GH-9150)
(cherry picked from commit
5033aa77aacaa5505636f150e8d54baac5bdca9c )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Miss Islington (bot) [Tue, 11 Sep 2018 04:50:41 +0000 (21:50 -0700)]
bpo-33032: Mention the implicit cache in struct.Struct() docs (GH-7700)
Mention the implicit cache in struct.Struct() docs.
Consistent with the re.compile documentation note.
(cherry picked from commit
3666b3c1f695a145adab1bf644c22e564e8eb0ee )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Miss Islington (bot) [Tue, 11 Sep 2018 04:36:20 +0000 (21:36 -0700)]
bpo-32270: Don't close stdin/out/err in pass_fds (GH-6242) (GH-9148)
When subprocess.Popen() stdin= stdout= or stderr= handles are specified
and appear in pass_fds=, don't close the original fds after dup'ing them.
This implementation and unittest primarily came from @izbyshev (see the PR)
See also https://github.com/izbyshev/cpython/commit/
b89b52f28490b69142d5c061604b3a3989cec66c
This also removes the old manual p2cread, c2pwrite, and errwrite closing logic
as inheritable flags and _close_open_fds takes care of that properly today without special treatment.
This code is within child_exec() where it is the only thread so there is no
race condition between the dup and _Py_set_inheritable_async_safe call.
(cherry picked from commit
ce34410b8b67f49d8275c05d51b3ead50cf97f48 )
Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
Miss Islington (bot) [Tue, 11 Sep 2018 02:13:02 +0000 (19:13 -0700)]
Fix missing line from example shell session (GH-9143) (GH-9155)
(cherry picked from commit
2064bb6d576ff7016d59318038779f428b0f0f3f )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Miss Islington (bot) [Tue, 11 Sep 2018 01:49:39 +0000 (18:49 -0700)]
bpo-33460: remove ellipsis that look like continuation prompts (GH-7851)
Remove ellipsis that look like continuation prompts,
has a side benefit of putting rest of error message in proper text color.
(cherry picked from commit
f019579828ed62653e2d41c95278308fa076ccaf )
Co-authored-by: Lew Kurtz <37632626+lew18@users.noreply.github.com>
Miss Islington (bot) [Tue, 11 Sep 2018 00:44:57 +0000 (17:44 -0700)]
switch descriptor howto to return value annotation (GH-7796)
(cherry picked from commit
28ea4c284724283265e95d1d1716c9f1dfc2d741 )
Co-authored-by: NotAFile <notafile@gmail.com>
Miss Islington (bot) [Mon, 10 Sep 2018 18:13:13 +0000 (11:13 -0700)]
closes bpo-34525: Fix smtplib's authobject() documentation (GH-8965)
(cherry picked from commit
78deb7f33227972987722bc3fed5bcb45fae869e )
Co-authored-by: Sebastian Rittau <srittau@rittau.org>
Benjamin Peterson [Mon, 10 Sep 2018 17:22:55 +0000 (10:22 -0700)]
[3.7] Fix misleading mentions of tp_size in comments. (GH-9136)
Many type object initializations labeled a field "tp_size" in the
comment, but the name of that field is tp_basicsize..
(cherry picked from commit
0e0bc4e221f592f305d335faf5f8046484eb9238 )
Co-authored-by: Peter Eisentraut <peter@eisentraut.org>
orlnub123 [Mon, 10 Sep 2018 16:39:48 +0000 (19:39 +0300)]
[3.7] bpo-34282: Fix Enum._convert method shadowing members named _convert (GH-9034)
* Fix Enum._convert shadowing members named _convert
Miss Islington (bot) [Mon, 10 Sep 2018 16:00:08 +0000 (09:00 -0700)]
bpo-34588: Fix an off-by-one error in traceback formatting. (GH-9077)
The recursive frame pruning code always undercounted the number of elided frames
by one. That is, in the "[Previous line repeated N more times]" message, N would
always be one too few. Near the recursive pruning cutoff, one frame could be
silently dropped. That situation is demonstrated in the OP of the bug report.
The fix is to start the identical frame counter at 1.
(cherry picked from commit
d545869d084e70d4838310e79b52a25a72a1ca56 )
Co-authored-by: Benjamin Peterson <benjamin@python.org>
Tal Einat [Mon, 10 Sep 2018 15:47:29 +0000 (18:47 +0300)]
[3.7] bpo-34621: fix uuid.UUID (un)pickling compatbility with older Python versions (<3.7) (GH-9133)
Miss Islington (bot) [Mon, 10 Sep 2018 10:45:54 +0000 (03:45 -0700)]
Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052)
(cherry picked from commit
1f36bf6077d93cb43fd84bea4a8a625fa772d1fa )
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Miss Islington (bot) [Mon, 10 Sep 2018 09:13:18 +0000 (02:13 -0700)]
Revert "Fix misindented yaml in logging how to example (GH-8604)" (GH-9081)
This reverts commit
10b59f1b019cd00c940dd7f4a74c4f667a20f25f .
(cherry picked from commit
290a60bd8af7b1d7e7931aa4dd4eace60d355d76 )
Co-authored-by: Rémy HUBSCHER <hubscher.remy@gmail.com>
William Grzybowski [Sun, 9 Sep 2018 11:27:31 +0000 (08:27 -0300)]
[3.7] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) (GH-9104)
Pass the user/group name as Unicode to the formatting function,
instead of always decoding a bytes string from UTF-8..
(cherry picked from commit
28658485a54ad5f9df52ecc12d9046269f1654ec )
Co-authored-by: William Grzybowski <wg@FreeBSD.org>
Miss Islington (bot) [Sat, 8 Sep 2018 20:52:59 +0000 (13:52 -0700)]
bpo-34421 avoid unicode error in distutils logging (GH-8799)
This caused installation errors in some cases on Windows.
Patch by Julien Malard.
(cherry picked from commit
0afada163c7ef25c3a9d46ed445481fb69f2ecaf )
Co-authored-by: Julien Malard <julien.malard@mail.mcgill.ca>
Miss Islington (bot) [Fri, 7 Sep 2018 22:29:27 +0000 (15:29 -0700)]
bpo-34246: Use no mutable default args in smtplib (GH-8554)
Some methods of the SMTP class use mutable default arguments. Specially
`send_message` is affected as it mutates one of the args by appending items
to it, which has side effects on further calls.
(cherry picked from commit
d5fbe9b1a3d65ceeb9159c5ba999ee966a945f76 )
Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
Miss Islington (bot) [Fri, 7 Sep 2018 22:15:30 +0000 (15:15 -0700)]
bpo-23855: Add missing NULL checks for malloc() in _msi.c (GH-9038)
(cherry picked from commit
4e519377b1b84c9414a360961276993d24198825 )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Zackery Spytz [Fri, 7 Sep 2018 16:17:32 +0000 (10:17 -0600)]
[3.7] bpo-34594: Don't hardcode errno values in the tests. (GH-9094)
(cherry picked from commit
b03c2c51909e3b5b5966d86a2829b5ddf2d496aa )
Miss Islington (bot) [Fri, 7 Sep 2018 09:59:00 +0000 (02:59 -0700)]
Doc: Missing 'f' in an f-string. (GH-9074) (GH-9095)
(cherry picked from commit
25fa141487e61b94f15289619cb3af764cf65e58 )
Co-authored-by: Julien Palard <julien@palard.fr>
Miss Islington (bot) [Fri, 7 Sep 2018 07:50:35 +0000 (00:50 -0700)]
bpo-25750: fix refcounts in type_getattro() (GH-6118)
When calling tp_descr_get(self, obj, type), make sure that
we own a strong reference to "self".
(cherry picked from commit
8f735485acf2e35a75d2fa019feb8f905598c4e5 )
Co-authored-by: jdemeyer <jdemeyer@cage.ugent.be>
Miss Islington (bot) [Thu, 6 Sep 2018 13:13:24 +0000 (06:13 -0700)]
bpo-34542: Update test certs and keys (GH-8997) (GH-9007)
Update all test certs and keys to use future proof crypto settings:
* 3072 bit RSA keys
* SHA-256 signature
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit
e6dac0077996b1e1f886f036d6f2606237fa4c85 )
Miss Islington (bot) [Wed, 5 Sep 2018 06:45:03 +0000 (23:45 -0700)]
closes bpo-34581 : Conditionalize use of __pragma in Modules/socketmodule.c. (GH-9067)
(cherry picked from commit
874809ea389e6434787e773a6054a08e0b81f734 )
Co-authored-by: Erik Janssens <erik.janssens@conceptive.be>
Miss Islington (bot) [Tue, 4 Sep 2018 19:39:54 +0000 (12:39 -0700)]
bpo-34563: Fix for invalid assert on big output of multiprocessing.Process (GH-9027) (GH-9064)
Fix for invalid assert on big output of multiprocessing.Process.
(cherry picked from commit
266f4904a222a784080e29aad0916849e507515d )
Co-authored-by: Alexander Buchkovsky <olex.buchkovsky@gmail.com>
Serhiy Storchaka [Tue, 4 Sep 2018 14:31:18 +0000 (17:31 +0300)]
[3.7] bpo-26544: Get rid of dependence from distutils in platform. (GH-8356). (GH-8970)
(cherry picked from commit
7d81e8f5995df6980a1a02923e224a481375f130 )
Miss Islington (bot) [Tue, 4 Sep 2018 09:19:13 +0000 (05:19 -0400)]
bpo-34530: Fix distutils find_executable() (GH-9049)
distutils.spawn.find_executable() now falls back on os.defpath if the
PATH environment variable is not set.
(cherry picked from commit
39487196c87e28128ea907a0d9b8a88ba53f68d5 )
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Miss Islington (bot) [Mon, 3 Sep 2018 22:24:17 +0000 (18:24 -0400)]
bpo-26901: Fix the Argument Clinic test suite (GH-8879) (GH-9048)
* Fix Tools/clinic/clinic_test.py: add missing
FakeClinic.destination_buffers attribute and pass a file argument
to Clinic().
* Rename Tools/clinic/clinic_test.py to Lib/test/test_clinic.py:
add temporary Tools/clinic/ to sys.path to import the clinic
module.
Co-Authored-By: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit
65fc98e7b1f62c2e621f04780a3a77c3498cc195 )
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Victor Stinner [Mon, 3 Sep 2018 20:17:07 +0000 (22:17 +0200)]
_Py_CoerceLegacyLocale() restores LC_CTYPE on fail (GH-9044) (GH-9046)
bpo-34544: If _Py_CoerceLegacyLocale() fails to coerce the C locale,
restore the LC_CTYPE locale to the its previous value.
(cherry picked from commit
8ea09110d413829f71d979d8c7073008cb87fb03 )
Miss Islington (bot) [Sun, 2 Sep 2018 02:13:34 +0000 (22:13 -0400)]
Fix struct sequence glossary entry grammar (GH-9030)
... by removing a superfluous "either".
Reported by Никита Люшненко on docs@.
(cherry picked from commit
98b976a2f82ba5f50cf6846338f644ca6c64f47d )
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
Miss Islington (bot) [Sat, 1 Sep 2018 22:30:44 +0000 (18:30 -0400)]
closes bpo-34555: Fix incorrectly nested test for HAVE_LINUX_VM_SOCKETS_H (GH-9016)
(cherry picked from commit
2d7102e726e973ab2d307aa9748c7ec433677877 )
Co-authored-by: Thomas Herzog <thomas@mcduke.net>
Miss Islington (bot) [Sat, 1 Sep 2018 09:15:40 +0000 (05:15 -0400)]
Fix typo in typing.py module docstring (GH-9014)
"explicitelly" → "explicitly"
(cherry picked from commit
5265b3a98b376684e361b62d0728483b26f493f2 )
Co-authored-by: Tim McNamara <code@timmcnamara.co.nz>
Miss Islington (bot) [Sat, 1 Sep 2018 02:46:32 +0000 (22:46 -0400)]
bpo-34558: Add missing parentheses in _aix.py (GH-9017)
p.wait()
(cherry picked from commit
172a71f19bb5e9624651850b315f403c460b9699 )
Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
Miss Islington (bot) [Fri, 31 Aug 2018 22:47:20 +0000 (18:47 -0400)]
bpo-34007: Skip traceback tests if the Program Counter is not available. (GH-9018)
Sometimes some versions of the shared libraries that are part of the
traceback are compiled in optimised mode and the Program Counter (PC)
is not present, not allowing gdb to walk the frames back. When this
happens, the Python bindings of gdb raise an exception, making the
test impossible to succeed.
(cherry picked from commit
f2ef51f8bec525b21e52988880c8a029642795ed )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Fri, 31 Aug 2018 15:32:22 +0000 (11:32 -0400)]
bpo-34062: Add missing launcher argument and make behavior consistent between short and long arguments (GH-8827)
Added previously missing "--list" argument.
Made "--list" and "--list-paths" behavior consistent with the corresponding "-0" and "-0p" arguments.
(cherry picked from commit
aada63b20ec64bbfc4f2fb0718fc563eedbdd36a )
Co-authored-by: Brendan Gerrity <brerrity@gmail.com>
Steve Dower [Fri, 31 Aug 2018 15:17:36 +0000 (08:17 -0700)]
Add VSTS status badge to readme (GH-8958)
Victor Stinner [Wed, 29 Aug 2018 09:01:33 +0000 (11:01 +0200)]
[3.7] bpo-34485: stdout uses surrogateescape on POSIX locale (GH-8986) (GH-8987)
* bpo-34485: stdout uses surrogateescape on POSIX locale (GH-8986)
Standard streams like sys.stdout now use the "surrogateescape" error
handler, instead of "strict", on the POSIX locale (when the C locale is not
coerced and the UTF-8 Mode is disabled).
Add tests on sys.stdout.errors with LC_ALL=POSIX.
Fix the error handler of standard streams like sys.stdout:
PYTHONIOENCODING=":" is now ignored instead of setting the error handler to
"strict".
(cherry picked from commit
315877dc361d554bec34b4b62c270479ad36a1be )
Victor Stinner [Tue, 28 Aug 2018 23:13:29 +0000 (01:13 +0200)]
bpo-34485: Fix _Py_InitializeCore() for C locale coercion (GH-8979) (GH-8981)
* _Py_InitializeCore() now sets the LC_CTYPE locale to the user
preferred locale before checking if the C locale should be coerced
or not in _PyCoreConfig_Read().
* Fix pymain_read_conf(): remember if the C locale has been coerced
when the configuration should be read again if the encoding has
changed.
(cherry picked from commit
2c8ddcf4f14f3e4c87a6fe6678ab5ad09130c6ab )
Victor Stinner [Tue, 28 Aug 2018 11:51:20 +0000 (13:51 +0200)]
bpo-34527: POSIX locale enables the UTF-8 Mode (GH-8972) (GH-8974)
* The UTF-8 Mode is now also enabled by the "POSIX" locale, not only
by the "C" locale.
* On FreeBSD, Py_DecodeLocale() and Py_EncodeLocale() now also forces
the ASCII encoding if the LC_CTYPE locale is "POSIX", not only if
the LC_CTYPE locale is "C".
* test_utf8_mode.test_cmd_line() checks also that the command line
arguments are decoded from UTF-8 when the the UTF-8 Mode is enabled
with POSIX locale or C locale.
(cherry picked from commit
5cb258950ce9b69b1f65646431c464c0c17b1510 )
Miss Islington (bot) [Tue, 28 Aug 2018 08:41:43 +0000 (04:41 -0400)]
bpo-34171: Fix test_trace. (GH-8940) (GH-8951)
Remove "trace.cover" left from previous test runs before testing
that it is no longer created.
(cherry picked from commit
b44a1d4f71daf4edb948b9878f82a60891e4a2e1 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 27 Aug 2018 22:37:18 +0000 (18:37 -0400)]
bpo-33635: Handling Bad file descriptor in Path.is_file and related. (GH-8542)
(cherry picked from commit
216b745eafa7cd4a683a8405dcfbd7f5567f504c )
Co-authored-by: Przemysław Spodymek <przemyslaw@spodymek.com>
Miss Islington (bot) [Mon, 27 Aug 2018 10:58:56 +0000 (06:58 -0400)]
bpo-34434: Update doc for bool(), float() and int() arguments (GH-8834)
(cherry picked from commit
3fe89dac42809a7741d50ebf595be98833b79b97 )
Co-authored-by: Louis Sautier <sautier.louis@gmail.com>
Miss Islington (bot) [Mon, 27 Aug 2018 00:32:48 +0000 (20:32 -0400)]
Remove AIX workaround test_subprocess (GH-8939)
An old apparent AIX behavior workaround in test_subprocess's
test_undecodable_env is no longer needed.
(cherry picked from commit
89d79b1449750b14ded0149dcdd1e39247f2c65d )
Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
Miss Islington (bot) [Sun, 26 Aug 2018 17:13:47 +0000 (13:13 -0400)]
bpo-34503: Fix refleak in PyErr_SetObject() (GH-8934)
(cherry picked from commit
a2eefa67542c25617a58c03a27c17fd48e2a0856 )
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Miss Islington (bot) [Sun, 26 Aug 2018 00:03:48 +0000 (20:03 -0400)]
closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (GH-8935)
Reported by Svace static analyzer.
(cherry picked from commit
b57b4ac042b977e0b42a2f5ddb30ca7edffacfa9 )
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Miss Islington (bot) [Sat, 25 Aug 2018 19:11:29 +0000 (15:11 -0400)]
closes bpo-34501: PyType_FromSpecWithBases: Check spec->name before dereferencing it. (GH-8930)
Reported by Svace static analyzer.
(cherry picked from commit
5f79b50763d687aeeed8edcb4efcc7ac9f8fa186 )
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Miss Islington (bot) [Sat, 25 Aug 2018 18:36:18 +0000 (14:36 -0400)]
closes bpo-34502: Remove a note about utf8_mode from sys.exit() docs. (GH-8928)
(cherry picked from commit
44838be9f79870ff3c9e04b7398a1dc3d56d53ed )
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Alexey Izbyshev [Sat, 25 Aug 2018 16:46:58 +0000 (19:46 +0300)]
[3.7] bpo-34492: Modules/main.c: Fix copy_wstrlist() (GH-8910) (GH-8922)
* Add missing NULL check reported by Svace static analyzer.
* Fix clear_wstrlist() call on a wrong list.
(cherry picked from commit
eb746dbae8b320758ee08f811316d7f283435cc0 )
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>