]> granicus.if.org Git - python/log
python
6 years agobpo-34685: Skip posix_spawn scheduler tests on BSD (GH-9316)
Pablo Galindo [Fri, 14 Sep 2018 22:12:22 +0000 (15:12 -0700)]
bpo-34685: Skip posix_spawn scheduler tests on BSD (GH-9316)

* Skip posix_spawn scheduler tests on BSD. We were already skyping similar tests as the behaviour can depend on the implementation in some cases.

6 years agobpo-33649: Add high-level APIs cheat-sheet (GH-9319)
Yury Selivanov [Fri, 14 Sep 2018 22:11:24 +0000 (15:11 -0700)]
bpo-33649: Add high-level APIs cheat-sheet (GH-9319)

6 years agobpo-33649: Refresh asyncio docs landing page (GH-9322)
Yury Selivanov [Fri, 14 Sep 2018 21:57:39 +0000 (14:57 -0700)]
bpo-33649: Refresh asyncio docs landing page (GH-9322)

6 years agoGrammar fix (GH-9318)
Grant [Fri, 14 Sep 2018 21:37:48 +0000 (14:37 -0700)]
Grammar fix (GH-9318)

6 years agobpo-34651: Only allow the main interpreter to fork. (gh-9279)
Eric Snow [Fri, 14 Sep 2018 21:17:20 +0000 (14:17 -0700)]
bpo-34651: Only allow the main interpreter to fork. (gh-9279)

When os.fork() is called (on platforms that support it) all threads but the current one are destroyed in the child process. Consequently we must ensure that all but the associated interpreter are likewise destroyed. The main interpreter is critical for runtime operation, so we must ensure that fork only happens in the main interpreter.

https://bugs.python.org/issue34651

6 years agobpo-33649: Refresh Tasks and Futures pages (#9314)
Yury Selivanov [Fri, 14 Sep 2018 20:32:07 +0000 (13:32 -0700)]
bpo-33649: Refresh Tasks and Futures pages (#9314)

* bpo-33649: Refresh Tasks and Futures pages

* Fixes

* Fix markup

6 years agocloses bpo-28955: Clarified comparisons between NaN and number in reference documenta...
Tony Flury [Fri, 14 Sep 2018 17:48:50 +0000 (18:48 +0100)]
closes bpo-28955: Clarified comparisons between NaN and number in reference documentation (GH-5982)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
6 years agobpo-34672: Don't pass NULL to gmtime_r. (GH-9312)
Benjamin Peterson [Fri, 14 Sep 2018 17:39:13 +0000 (10:39 -0700)]
bpo-34672: Don't pass NULL to gmtime_r. (GH-9312)

6 years agoFix "Python" casing in a few places (GH-9001)
Andrés Delfino [Fri, 14 Sep 2018 17:13:09 +0000 (14:13 -0300)]
Fix "Python" casing in a few places (GH-9001)

6 years agobpo-33649 Polish asyncio docs on queues, protocols, and subproccesses (#9306)
Carol Willing [Fri, 14 Sep 2018 17:06:55 +0000 (10:06 -0700)]
bpo-33649 Polish asyncio docs on queues, protocols, and subproccesses (#9306)

* small clarification

* edits to protocols doc

* Edit async queue doc

6 years agobpo-34672: Try to pass the C library's own timezone strings back to it. (GH-9288)
Benjamin Peterson [Fri, 14 Sep 2018 16:09:04 +0000 (09:09 -0700)]
bpo-34672: Try to pass the C library's own timezone strings back to it. (GH-9288)

6 years agoDon't run AC_STRUCT_TIMEZONE twice. (GH-9305)
Benjamin Peterson [Fri, 14 Sep 2018 15:58:57 +0000 (08:58 -0700)]
Don't run AC_STRUCT_TIMEZONE twice. (GH-9305)

6 years agobpo-34363: dataclasses.asdict() and .astuple() now handle fields which are namedtuple...
Eric V. Smith [Fri, 14 Sep 2018 15:32:16 +0000 (11:32 -0400)]
bpo-34363: dataclasses.asdict() and .astuple() now handle fields which are namedtuples. (GH-9151)

6 years agoFix compiler warning with a type cast (GH-9300)
Raymond Hettinger [Fri, 14 Sep 2018 08:35:59 +0000 (01:35 -0700)]
Fix compiler warning with a type cast (GH-9300)

6 years agoFix-up parenthesis, organization, and NULL check (GH-9297)
Raymond Hettinger [Fri, 14 Sep 2018 08:00:11 +0000 (01:00 -0700)]
Fix-up parenthesis, organization, and NULL check (GH-9297)

6 years agoNote that distinct argument patterns can be cached separately (GH-9298)
Raymond Hettinger [Fri, 14 Sep 2018 07:53:20 +0000 (00:53 -0700)]
Note that distinct argument patterns can be cached separately (GH-9298)

6 years agobpo-33073: Adding as_integer_ratio to ints. (GH-8750)
Lisa Roach [Fri, 14 Sep 2018 06:56:23 +0000 (23:56 -0700)]
bpo-33073: Adding as_integer_ratio to ints. (GH-8750)

6 years agoChange the xkcd link in comment over https. (GH-5452)
[Fri, 14 Sep 2018 05:45:00 +0000 (13:45 +0800)]
Change the xkcd link in comment over https. (GH-5452)

6 years agobpo-6721: Hold logging locks across fork() (GH-4071)
Gregory P. Smith [Fri, 14 Sep 2018 05:08:31 +0000 (22:08 -0700)]
bpo-6721: Hold logging locks across fork() (GH-4071)

bpo-6721: When os.fork() was called while another thread holds a logging lock, the child process may deadlock when it tries to log.  This fixes that by acquiring all logging locks before fork and releasing them afterwards.

A regression test that fails before this change is included.

Within the new unittest itself: There is a small _potential_ due to mixing of fork and a thread in the child process if the parent's thread happened to hold a non-reentrant library call lock (malloc?) when the os.fork() happens.  buildbots and time will tell if this actually manifests itself in this test or not.  :/  A functionality test that avoids that would be a challenge.

An alternate test that isn't trying to produce the deadlock itself but just checking that the release and acquire calls are made would be the next best alternative if so.

6 years agobpo-34674: Assume unistd.h exists on Unix. (GH-9290)
Benjamin Peterson [Fri, 14 Sep 2018 04:57:31 +0000 (21:57 -0700)]
bpo-34674: Assume unistd.h exists on Unix. (GH-9290)

6 years agobpo-34552: Clarify built-in types comparisons (GH-9035)
Windson yang [Fri, 14 Sep 2018 04:50:18 +0000 (12:50 +0800)]
bpo-34552: Clarify built-in types comparisons (GH-9035)

Some updates to ancient text about comparisons; fixes bp-34552.

6 years agoRemove wording that could be deemed to be perjorative (GH-9287)
Raymond Hettinger [Fri, 14 Sep 2018 04:17:40 +0000 (21:17 -0700)]
Remove wording that could be deemed to be perjorative (GH-9287)

6 years agobpo-33649: Polish asyncio subprocess and sync docs (GH-9285)
Carol Willing [Fri, 14 Sep 2018 01:28:19 +0000 (18:28 -0700)]
bpo-33649: Polish asyncio subprocess and sync docs (GH-9285)

Second pass for asyncio subprocess and sync docs.

https://bugs.python.org/issue33649

6 years agobpo-34666: Implement stream.awrite() and stream.aclose() (GH-9274)
Andrew Svetlov [Thu, 13 Sep 2018 23:53:49 +0000 (16:53 -0700)]
bpo-34666: Implement stream.awrite() and stream.aclose() (GH-9274)

6 years agoFix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (#8907)
Michael Felt [Thu, 13 Sep 2018 23:35:56 +0000 (01:35 +0200)]
Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (#8907)

6 years agopolish exceptions and platforms (GH-9272)
Carol Willing [Thu, 13 Sep 2018 23:14:41 +0000 (16:14 -0700)]
polish exceptions and platforms (GH-9272)

6 years agobpo-31132: Remove prlimit permission test. (GH-9280)
Benjamin Peterson [Thu, 13 Sep 2018 21:53:09 +0000 (14:53 -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

6 years agocloses bpo-34664: Only check file permission bits of newly created directories. ...
Benjamin Peterson [Thu, 13 Sep 2018 19:00:14 +0000 (12:00 -0700)]
closes bpo-34664: Only check file permission bits of newly created directories. (GH-9273)

6 years agobpo-34247: add porting note to 3.7 What's New (GH-9223)
Ned Deily [Thu, 13 Sep 2018 18:49:47 +0000 (11:49 -0700)]
bpo-34247: add porting note to 3.7 What's New (GH-9223)

6 years agobpo-34661: Fix test skipping call. (GH-9266)
Benjamin Peterson [Thu, 13 Sep 2018 17:57:23 +0000 (10:57 -0700)]
bpo-34661: Fix test skipping call. (GH-9266)

6 years agocloses bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262)
Benjamin Peterson [Thu, 13 Sep 2018 17:08:46 +0000 (10:08 -0700)]
closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262)

6 years agobpo-34653: Removed unused function PyParser_SimpleParseStringFilename. (GH-9260)
Eric V. Smith [Thu, 13 Sep 2018 16:34:55 +0000 (12:34 -0400)]
bpo-34653: Removed unused function PyParser_SimpleParseStringFilename. (GH-9260)

This function was not in any .h file and was not used by Python, so removing it is safe.

https://bugs.python.org/issue34653

6 years agobpo-34658: Fix rare subprocess prexec_fn fork error. (GH-9255)
Gregory P. Smith [Thu, 13 Sep 2018 11:30:10 +0000 (04:30 -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

6 years agoPolish doc as part of asyncio doc improvement (GH-9185)
Carol Willing [Thu, 13 Sep 2018 05:40:37 +0000 (22:40 -0700)]
Polish doc as part of asyncio doc improvement (GH-9185)

6 years agobpo-34200: Fix non-determinism of test_pkg (GH-9248)
Gregory P. Smith [Thu, 13 Sep 2018 00:58:40 +0000 (17:58 -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

6 years agobpo-34652: Remove lchmod from the big func checking block. (GH-9247)
Benjamin Peterson [Thu, 13 Sep 2018 00:22:11 +0000 (17:22 -0700)]
bpo-34652: Remove lchmod from the big func checking block. (GH-9247)

A fix for 883702ebb8bbfa749ef0040d1b58d6222bf589ee.

6 years agocloses bpo-34641: Further restrict the LHS of keyword argument function call syntax...
Benjamin Peterson [Thu, 13 Sep 2018 00:14:39 +0000 (17:14 -0700)]
closes bpo-34641: Further restrict the LHS of keyword argument function call syntax. (GH-9212)

6 years agoedit async policy doc - second pass (GH-9235)
Carol Willing [Thu, 13 Sep 2018 00:09:08 +0000 (17:09 -0700)]
edit async policy doc - second pass (GH-9235)

6 years agobpo-33649: Edit asyncio eventloop doc - second pass (GH-9233)
Carol Willing [Thu, 13 Sep 2018 00:05:17 +0000 (17:05 -0700)]
bpo-33649: Edit asyncio eventloop doc - second pass (GH-9233)

6 years agocloses bpo-34654: Tolerate + at the beginning of large years. (GH-9238)
Benjamin Peterson [Wed, 12 Sep 2018 23:21:36 +0000 (16:21 -0700)]
closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)

6 years agocloses bpo-34652: Always disable lchmod on Linux. (GH-9234)
Benjamin Peterson [Wed, 12 Sep 2018 22:52:40 +0000 (15:52 -0700)]
closes bpo-34652: Always disable lchmod on Linux. (GH-9234)

6 years agobpo-32933: Implement __iter__ method on mock_open() (GH-5974)
Tony Flury [Wed, 12 Sep 2018 22:21:16 +0000 (23:21 +0100)]
bpo-32933: Implement __iter__ method on mock_open() (GH-5974)

6 years agocloses bpo-34650: Check if sched_getscheduler returns ENOSYS before declaring it...
Benjamin Peterson [Wed, 12 Sep 2018 22:12:24 +0000 (15:12 -0700)]
closes bpo-34650: Check if sched_getscheduler returns ENOSYS before declaring it supported. (GH-9228)

musl doesn't support the scheduler API, but declares stubs that alway return ENOSYS.

6 years agobpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)
Alexey Izbyshev [Wed, 12 Sep 2018 21:05:20 +0000 (00:05 +0300)]
bpo-34649: Add missing NULL checks to _encoded_const() (GH-9225)

Reported by Svace static analyzer.

6 years agobpo-34630: Skip logging SSL certificate errors by asyncio code (GH-9169)
Andrew Svetlov [Wed, 12 Sep 2018 21:03:54 +0000 (14:03 -0700)]
bpo-34630: Skip logging SSL certificate errors by asyncio code (GH-9169)

6 years agocloses bpo-34004: Skip lock interruption tests on musl. (GH-9224)
Benjamin Peterson [Wed, 12 Sep 2018 20:48:03 +0000 (13:48 -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.

6 years agobpo-31577: Fix a crash in os.utime() in case of a bad ns argument. (GH-3752)
Oren Milman [Wed, 12 Sep 2018 19:14:35 +0000 (22:14 +0300)]
bpo-31577: Fix a crash in os.utime() in case of a bad ns argument. (GH-3752)

6 years agocloses bpo-34646: Remove PyAPI_* macros from declarations. (GH-9218)
Benjamin Peterson [Wed, 12 Sep 2018 19:06:42 +0000 (12:06 -0700)]
closes bpo-34646: Remove PyAPI_* macros from declarations. (GH-9218)

6 years agobpo-34536: raise error for invalid _missing_ results (GH-9147)
Ethan Furman [Wed, 12 Sep 2018 18:43:34 +0000 (11:43 -0700)]
bpo-34536: raise error for invalid _missing_ results (GH-9147)

* raise exception if _missing_ returns None or invalid type

6 years agobpo-34638: Store a weak reference to stream reader to break strong references loop...
Andrew Svetlov [Wed, 12 Sep 2018 18:43:04 +0000 (11:43 -0700)]
bpo-34638: Store a weak reference to stream reader to break strong references loop (GH-9201)

Store a weak reference to stream readerfor breaking strong references

It breaks the strong reference loop between reader and protocol and allows to detect and close the socket if the stream is deleted (garbage collected)

6 years agobpo-33649: Fix doc to reflect changes in 47cd10d (or bpo-23347) (GH-9219)
Bumsik Kim [Wed, 12 Sep 2018 18:31:56 +0000 (14:31 -0400)]
bpo-33649: Fix doc to reflect changes in 47cd10d (or bpo-23347) (GH-9219)

6 years agobpo-34637: Make the *start* argument for *sum()* visible as a keyword argument. ...
Raymond Hettinger [Wed, 12 Sep 2018 17:54:06 +0000 (10:54 -0700)]
bpo-34637: Make the *start* argument for *sum()* visible as a keyword argument. (GH-9208)

6 years agobpo-34282: Fix Enum._convert shadowing members named _convert (GH-8568)
orlnub123 [Wed, 12 Sep 2018 17:28:53 +0000 (20:28 +0300)]
bpo-34282: Fix Enum._convert shadowing members named _convert (GH-8568)

* Fix enum members getting shadowed by parent attributes
* Move Enum._convert to EnumMeta._convert_
* Deprecate _convert

6 years agobpo-33437: add __new__ vs __init__ example (GH-9145)
Ethan Furman [Wed, 12 Sep 2018 17:00:30 +0000 (10:00 -0700)]
bpo-33437: add __new__ vs __init__ example (GH-9145)

Improve Enum docs.

https://bugs.python.org/issue33437

6 years agocloses bpo-34640: Remove the TANH_PRESERVES_ZERO_SIGN configure check. (GH-9206)
Benjamin Peterson [Wed, 12 Sep 2018 13:51:18 +0000 (06:51 -0700)]
closes bpo-34640: Remove the TANH_PRESERVES_ZERO_SIGN configure check. (GH-9206)

6 years agoSimplified implementation of _sre.ascii_iscased(). (GH-9097)
Sergey Fedoseev [Wed, 12 Sep 2018 12:49:09 +0000 (17:49 +0500)]
Simplified implementation of _sre.ascii_iscased(). (GH-9097)

6 years agocloses bpo-25041: Document AF_PACKET socket address format. (GH-4092)
Cheryl Sabella [Wed, 12 Sep 2018 00:32:15 +0000 (20:32 -0400)]
closes bpo-25041: Document AF_PACKET socket address format. (GH-4092)

6 years agoDelete old expat comment. (GH-9197)
Benjamin Peterson [Wed, 12 Sep 2018 00:17:39 +0000 (17:17 -0700)]
Delete old expat comment. (GH-9197)

6 years agobpo-33649: Cleanup asyncio/streams and asyncio/synchronization docs (GH-9192)
Yury Selivanov [Wed, 12 Sep 2018 00:10:37 +0000 (17:10 -0700)]
bpo-33649: Cleanup asyncio/streams and asyncio/synchronization docs (GH-9192)

6 years agobpo-34605: Replace "pliant children" with "helpers" (GH-9195)
Victor Stinner [Tue, 11 Sep 2018 23:40:06 +0000 (01:40 +0200)]
bpo-34605: Replace "pliant children" with "helpers" (GH-9195)

In distutils.command.install, replace "pliant children" (previously,
it was "pliant slaves") with "helpers".

<!-- issue-number: [bpo-34605](https://www.bugs.python.org/issue34605) -->
https://bugs.python.org/issue34605
<!-- /issue-number -->

6 years agoRemove configure check LOG1P_DROPS_ZERO_SIGN. (GH-9193)
Benjamin Peterson [Tue, 11 Sep 2018 23:30:04 +0000 (16:30 -0700)]
Remove configure check LOG1P_DROPS_ZERO_SIGN. (GH-9193)

It is unused.

<!--
Thanks for your contribution!
Please read this comment in its entirety. It's quite important.

# 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.

# 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`.

-->

6 years agobpo-1621: Avoid signed integer overflow in set_table_resize(). (GH-9059)
Sergey Fedoseev [Tue, 11 Sep 2018 23:18:01 +0000 (04:18 +0500)]
bpo-1621: Avoid signed integer overflow in set_table_resize(). (GH-9059)

Address a C undefined behavior signed integer overflow issue in set object table resizing.  Our -fwrapv compiler flag and practical reasons why sets are unlikely to get this large should mean this was never an issue but it was incorrect code that generates code analysis warnings.

<!-- issue-number: [bpo-1621](https://www.bugs.python.org/issue1621) -->
https://bugs.python.org/issue1621
<!-- /issue-number -->

6 years agocloses bpo-31903: Release the GIL when calling into SystemConfiguration (GH-4178)
Max Bélanger [Tue, 11 Sep 2018 23:14:00 +0000 (16:14 -0700)]
closes bpo-31903: Release the GIL when calling into SystemConfiguration (GH-4178)

6 years agobpo-34636: Use fast path for more chars in SRE category macros. (GH-9170)
Sergey Fedoseev [Tue, 11 Sep 2018 22:47:59 +0000 (03:47 +0500)]
bpo-34636: Use fast path for more chars in SRE category macros. (GH-9170)

When handling \s, \d, or \w (and their inverse) escapes in bytes regexes this a small but measurable performance improvement.

<!-- issue-number: [bpo-34636](https://www.bugs.python.org/issue34636) -->
https://bugs.python.org/issue34636
<!-- /issue-number -->

6 years agoMake sure the line comes from the same node as the col offset. (GH-9189)
Benjamin Peterson [Tue, 11 Sep 2018 22:29:57 +0000 (15:29 -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.

# 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.

# 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`.

-->

6 years agoRevert "bpo-34595: Add %T format to PyUnicode_FromFormatV() (GH-9080)" (GH-9187)
Victor Stinner [Tue, 11 Sep 2018 22:23:25 +0000 (00:23 +0200)]
Revert "bpo-34595: Add %T format to PyUnicode_FromFormatV() (GH-9080)" (GH-9187)

This reverts commit 886483e2b9bbabf60ab769683269b873381dd5ee.

6 years agoInitialize a variable to make the compiler happy. (GH-9153)
Benjamin Peterson [Tue, 11 Sep 2018 22:11:06 +0000 (15:11 -0700)]
Initialize a variable to make the compiler happy. (GH-9153)

GCC complains:

Python/pylifecycle.c: In function ‘_Py_InitializeFromConfig’:
Python/pylifecycle.c:900:13: warning: ‘interp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         err = _Py_InitializeMainInterpreter(interp, &main_config);
         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This seems spurious since &interp is passed to _Py_InitializeCore. Anyway, we
can easily initialize to quiet the warning.

6 years agobpo-20180: convert most of itertoolsmodule.c to use Argument Clinic (GH-9164)
Tal Einat [Tue, 11 Sep 2018 21:49:13 +0000 (00:49 +0300)]
bpo-20180: convert most of itertoolsmodule.c to use Argument Clinic (GH-9164)

6 years agocloses bpo-31902: Fix the col_offset attribute for ast.Async* nodes to point to the...
guoci [Tue, 11 Sep 2018 21:45:45 +0000 (17:45 -0400)]
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".

6 years agobpo-34365: Update date object documentation (GH-8814)
Danish Prakash [Tue, 11 Sep 2018 20:59:23 +0000 (02:29 +0530)]
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 -->

6 years agocloses bpo-31608: Fix a crash in methods of a subclass of _collections.deque with...
Oren Milman [Tue, 11 Sep 2018 18:46:55 +0000 (21:46 +0300)]
closes bpo-31608: Fix a crash in methods of a subclass of _collections.deque with a bad __new__(). (GH-3788)

6 years agobpo-34613: document the correct value of limit argument of asyncio.StreamReader ...
Bram [Tue, 11 Sep 2018 18:45:26 +0000 (20:45 +0200)]
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 -->

6 years agoUpdate VSTS to Azure DevOps and simplify dependencies (GH-9168)
Steve Dower [Tue, 11 Sep 2018 17:47:46 +0000 (10:47 -0700)]
Update VSTS to Azure DevOps and simplify dependencies (GH-9168)

6 years agobpo-28617 Fixed docs inaccuracies about the types that support membership tests ...
wim glenn [Tue, 11 Sep 2018 17:44:52 +0000 (12:44 -0500)]
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 -->

6 years agobpo-29386: Pass -1 to epoll_wait() when timeout is < -1 (GH-9040)
Berker Peksag [Tue, 11 Sep 2018 17:29:48 +0000 (20:29 +0300)]
bpo-29386: Pass -1 to epoll_wait() when timeout is < -1 (GH-9040)

Although the kernel accepts any negative value for timeout, the
documented value to block indefinitely is -1.

This commit also makes the code similar to select.poll.poll().

6 years agobpo-34622: Extract asyncio exceptions into a separate module (GH-9141)
Andrew Svetlov [Tue, 11 Sep 2018 17:13:04 +0000 (10:13 -0700)]
bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)

6 years agobpo-33649: First asyncio docs improvement pass (GH-9142)
Yury Selivanov [Tue, 11 Sep 2018 16:54:40 +0000 (09:54 -0700)]
bpo-33649: First asyncio docs improvement pass (GH-9142)

Rewritten/updated sections:

* Event Loop APIs
* Transports & Protocols
* Streams
* Exceptions
* Policies
* Queues
* Subprocesses
* Platforms

6 years agocloses bpo-29832: Remove "getsockaddrarg" from error messages. (GH-3163)
Oren Milman [Tue, 11 Sep 2018 16:51:29 +0000 (19:51 +0300)]
closes bpo-29832: Remove "getsockaddrarg" from error messages. (GH-3163)

6 years agocloses bpo-32490: Fix filename duplication in subprocess exception message. (GH-9163)
Zackery Spytz [Tue, 11 Sep 2018 15:54:07 +0000 (09:54 -0600)]
closes bpo-32490: Fix filename duplication in subprocess exception message. (GH-9163)

8621bb5d93239316f97281826461b85072ff6db7 sets the filename in directly in the FileNotFoundError, so we may revert the earlier fix 5f780400572508a8179de6a6c13b58b7be417ef5.

6 years agobpo-34405: Update to OpenSSL 1.1.0i for macOS installer builds (GH-9166)
Ned Deily [Tue, 11 Sep 2018 15:52:40 +0000 (08:52 -0700)]
bpo-34405: Update to OpenSSL 1.1.0i for macOS installer builds (GH-9166)

6 years agocloses bpo-33883: Mention type checkers in the FAQ. (GH-7760)
Andrés Delfino [Tue, 11 Sep 2018 05:12:41 +0000 (02:12 -0300)]
closes bpo-33883: Mention type checkers in the FAQ. (GH-7760)

6 years agobpo-33032: Mention the implicit cache in struct.Struct() docs (GH-7700)
Zackery Spytz [Tue, 11 Sep 2018 04:37:33 +0000 (22:37 -0600)]
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.

6 years agobpo-34625: Update vendorized expat version to 2.2.6. (GH-9150)
Benjamin Peterson [Tue, 11 Sep 2018 04:04:00 +0000 (21:04 -0700)]
bpo-34625: Update vendorized expat version to 2.2.6. (GH-9150)

6 years agoFix missing line from example shell session (GH-9143)
Raymond Hettinger [Tue, 11 Sep 2018 01:43:08 +0000 (18:43 -0700)]
Fix missing line from example shell session (GH-9143)

6 years agobpo-33487: improve BZ2File Deprecation and documentation. (GH-6785)
Matthias Bussonnier [Tue, 11 Sep 2018 01:15:56 +0000 (03:15 +0200)]
bpo-33487: improve BZ2File Deprecation and documentation. (GH-6785)

Emit warning when None passed explicitly, list Python version since
deprecation in warning message and docs.

6 years agobpo-33460: remove ellipsis that look like continuation prompts (GH-7851)
Lew Kurtz [Tue, 11 Sep 2018 01:13:08 +0000 (18:13 -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.

6 years agoUse bytes.hex instead of binascii.hexlify in pbkdf2_hmac example (GH-8420)
Ville Skyttä [Tue, 11 Sep 2018 01:07:19 +0000 (04:07 +0300)]
Use bytes.hex instead of binascii.hexlify in pbkdf2_hmac example (GH-8420)

6 years agoLib/test/support: fix typo in docstring (GH-8506)
Daniel Hahler [Tue, 11 Sep 2018 01:04:33 +0000 (03:04 +0200)]
Lib/test/support: fix typo in docstring (GH-8506)

6 years agoRemove obsolete comment about latin-1 in `normalize_encoding` (GH-8739)
Anthony Sottile [Tue, 11 Sep 2018 00:54:37 +0000 (20:54 -0400)]
Remove obsolete comment about latin-1 in `normalize_encoding` (GH-8739)

This docstring has drifted since python2: https://github.com/python/cpython/blob/ca079a3ea30098aff3197c559a0e32d42dda6d84/Lib/encodings/__init__.py#L68

6 years agobpo-32270: Don't close stdin/out/err in pass_fds (GH-6242)
Gregory P. Smith [Tue, 11 Sep 2018 00:46:22 +0000 (17:46 -0700)]
bpo-32270: Don't close stdin/out/err in pass_fds (GH-6242)

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.

6 years agobpo-8110: Refactor platform detection in subprocess (GH-9053)
Zachary Ware [Mon, 10 Sep 2018 23:16:08 +0000 (16:16 -0700)]
bpo-8110: Refactor platform detection in subprocess (GH-9053)

Check for functionality via imports rather than checking sys.platform
specifically for Windows

6 years agoswitch descriptor howto to return value annotation (GH-7796)
NotAFile [Mon, 10 Sep 2018 21:35:38 +0000 (23:35 +0200)]
switch descriptor howto to return value annotation (GH-7796)

6 years agobpo-20180: itertools.groupby Argument Clinic conversion (GH-4170)
Tal Einat [Mon, 10 Sep 2018 18:33:08 +0000 (21:33 +0300)]
bpo-20180: itertools.groupby Argument Clinic conversion (GH-4170)

6 years agobpo-33217: Raise TypeError for non-Enum lookups in Enums (GH-6651)
Rahul Jha [Mon, 10 Sep 2018 18:21:04 +0000 (23:51 +0530)]
bpo-33217: Raise TypeError for non-Enum lookups in Enums (GH-6651)

* bpo-33217: Raise TypeError for non-Enum lookups in Enums

6 years agobpo-33604: Remove deprecated HMAC default value marked for removal in 3.8 (GH-7063)
Matthias Bussonnier [Mon, 10 Sep 2018 18:10:01 +0000 (20:10 +0200)]
bpo-33604: Remove deprecated HMAC default value marked for removal in 3.8 (GH-7063)

HMAC's digestmod was deprecated marked for removal, this removes it as planned.

6 years agocloses bpo-34525: Fix smtplib's authobject() documentation (GH-8965)
Sebastian Rittau [Mon, 10 Sep 2018 17:29:43 +0000 (19:29 +0200)]
closes bpo-34525: Fix smtplib's authobject() documentation (GH-8965)

6 years agobpo-26502: Implement FrameSummary.__len__() (GH-8632)
Berker Peksag [Mon, 10 Sep 2018 17:02:33 +0000 (20:02 +0300)]
bpo-26502: Implement FrameSummary.__len__() (GH-8632)

6 years agoFix misleading mentions of tp_size in comments (GH-9093)
Peter Eisentraut [Mon, 10 Sep 2018 16:46:08 +0000 (18:46 +0200)]
Fix misleading mentions of tp_size in comments (GH-9093)

Many type object initializations labeled a field "tp_size" in the
comment, but the name of that field is tp_basicsize.

6 years agobpo-34588: Fix an off-by-one error in traceback formatting. (GH-9077)
Benjamin Peterson [Mon, 10 Sep 2018 15:43:10 +0000 (08:43 -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.

6 years agobpo-30977: rework code changes according to post-merge code review (GH-9106)
Tal Einat [Mon, 10 Sep 2018 13:11:04 +0000 (16:11 +0300)]
bpo-30977: rework code changes according to post-merge code review (GH-9106)

also mention the change and its consequences in What's New