]> granicus.if.org Git - python/log
python
7 years agobpo-28685: Fix compiler warning (GH-5423)
Victor Stinner [Mon, 29 Jan 2018 12:47:06 +0000 (13:47 +0100)]
bpo-28685: Fix compiler warning (GH-5423)

7 years agobpo-32706: Skip test_ftplib.test_check_hostname() (#5422)
Victor Stinner [Mon, 29 Jan 2018 12:21:34 +0000 (13:21 +0100)]
bpo-32706: Skip test_ftplib.test_check_hostname() (#5422)

This test is unstable and currently prevents to make any new change
since the test always fails on Travis CI.

Skip the test to get more time to fix it.

7 years agobpo-31233, bpo-31151: Document socketserver changes (#5417)
Victor Stinner [Mon, 29 Jan 2018 11:10:22 +0000 (12:10 +0100)]
bpo-31233, bpo-31151: Document socketserver changes (#5417)

socketserver.ForkingMixIn.server_close() and
socketserver.ThreadingMixIn.server_close() now waits until all child
processes and non-daemonic threads complete.

7 years agobpo-20891: Py_Initialize() now creates the GIL (#4700)
Victor Stinner [Mon, 29 Jan 2018 10:57:45 +0000 (11:57 +0100)]
bpo-20891: Py_Initialize() now creates the GIL (#4700)

The GIL is no longer created "on demand" to fix a race condition when
PyGILState_Ensure() is called in a non-Python thread.

7 years agobpo-32705: Current Android does not have posix_spawn (#5413)
Chih-Hsuan Yen [Mon, 29 Jan 2018 09:50:35 +0000 (17:50 +0800)]
bpo-32705: Current Android does not have posix_spawn (#5413)

7 years agoFix minor markup typo (#5407)
cocoatomo [Mon, 29 Jan 2018 08:30:48 +0000 (17:30 +0900)]
Fix minor markup typo (#5407)

7 years agobpo-32591: silence deprecation warnings in test_coroutine (GH-5412)
Nathaniel J. Smith [Mon, 29 Jan 2018 07:34:26 +0000 (23:34 -0800)]
bpo-32591: silence deprecation warnings in test_coroutine (GH-5412)

7 years agobpo-23749: Make start-tls tests more stable on win7 buildbot (GH-5409)
Yury Selivanov [Mon, 29 Jan 2018 05:25:05 +0000 (00:25 -0500)]
bpo-23749: Make start-tls tests more stable on win7 buildbot (GH-5409)

To mitigate the situation when the buildbot is under load
and is unable to send/receive data fast enough:

* reduce the size of the payload
* set a generous timeout for socket ops

7 years agobpo-32251: Fix docs (#5408)
Yury Selivanov [Mon, 29 Jan 2018 04:51:08 +0000 (23:51 -0500)]
bpo-32251: Fix docs (#5408)

7 years agobpo-32650: Add an asyncgen pdb test (#5406)
Yury Selivanov [Mon, 29 Jan 2018 03:43:46 +0000 (22:43 -0500)]
bpo-32650: Add an asyncgen pdb test (#5406)

7 years agobpo-32688: Make why the line is commented out clear (GH-5405)
Xiang Zhang [Mon, 29 Jan 2018 03:32:12 +0000 (11:32 +0800)]
bpo-32688: Make why the line is commented out clear (GH-5405)

7 years agobpo-28685: Optimize sorted() list.sort() with type-specialized comparisons (#582)
embg [Mon, 29 Jan 2018 03:03:23 +0000 (20:03 -0700)]
bpo-28685: Optimize sorted() list.sort() with type-specialized comparisons (#582)

7 years agobpo-20104: Expose `posix_spawn` in the os module (GH-5109)
Pablo Galindo [Mon, 29 Jan 2018 01:56:10 +0000 (01:56 +0000)]
bpo-20104: Expose `posix_spawn` in the os module (GH-5109)

Add os.posix_spawn to wrap the low level POSIX API of the same name.

Contributed by Pablo Galindo.

7 years agoDocument the error return of PyLong_As* APIs. (#5396)
Gregory P. Smith [Mon, 29 Jan 2018 01:48:31 +0000 (17:48 -0800)]
Document the error return of PyLong_As* APIs. (#5396)

Document the error return of PyLong_As* APIs.

A frequent Python C API usage error is neglecting to check the return
value and/or PyErr_Occurred().

7 years agobpo-32650 Add support for async generators and more test for coroutines in pdb ...
Pablo Galindo [Mon, 29 Jan 2018 01:31:00 +0000 (01:31 +0000)]
bpo-32650 Add support for async generators and more test for coroutines in pdb  (#5403)

7 years agobpo-32650: Add native coroutine support to bdb when stepping over line (GH-5400)
Pablo Galindo [Mon, 29 Jan 2018 00:25:05 +0000 (00:25 +0000)]
bpo-32650: Add native coroutine support to bdb when stepping over line (GH-5400)

7 years agoFix trivial typo in test_dataclasses.py. (GH-5398)
Eric V. Smith [Mon, 29 Jan 2018 00:18:55 +0000 (19:18 -0500)]
Fix trivial typo in test_dataclasses.py. (GH-5398)

7 years agobpo-32699: Improves doc for .pth files in presense of a ._pth file (#5399)
Steve Dower [Sun, 28 Jan 2018 23:34:09 +0000 (10:34 +1100)]
bpo-32699: Improves doc for .pth files in presense of a ._pth file (#5399)

7 years agobpo-32373: Add socket.getblocking() method. (#4926)
Yury Selivanov [Sun, 28 Jan 2018 22:27:38 +0000 (17:27 -0500)]
bpo-32373: Add socket.getblocking() method. (#4926)

7 years agobpo-32251: Implement asyncio.BufferedProtocol. (#4755)
Yury Selivanov [Sun, 28 Jan 2018 21:30:26 +0000 (16:30 -0500)]
bpo-32251: Implement asyncio.BufferedProtocol. (#4755)

7 years agoRevert "bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)" (#5394)
Yury Selivanov [Sun, 28 Jan 2018 21:08:32 +0000 (16:08 -0500)]
Revert "bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)" (#5394)

This reverts commit 47c0b1f7d4115e6f15e6776c1f91d28e7d96fe0c.

7 years agobpo-32697: Definition order of kwonly params is now guaranteed preserved. (#5391)
larryhastings [Sun, 28 Jan 2018 19:13:09 +0000 (11:13 -0800)]
bpo-32697: Definition order of kwonly params is now guaranteed preserved. (#5391)

Definition order of kwonly params is now guaranteed preserved.

7 years agobpo-32327: Revert loop.run_in_executor behaviour: return a Future. (#5392)
Yury Selivanov [Sun, 28 Jan 2018 19:09:40 +0000 (14:09 -0500)]
bpo-32327: Revert loop.run_in_executor behaviour: return a Future. (#5392)

I've run some tests on 3.7 asyncio and it appears that too many
things assume that run_in_executor returns a Future.

7 years agobpo-32690: Preserve order of locals() (#5379)
Raymond Hettinger [Sun, 28 Jan 2018 17:40:24 +0000 (09:40 -0800)]
bpo-32690: Preserve order of locals() (#5379)

7 years agobpo-32228: Reset raw_pos after unwinding the raw stream (#4858)
Nitish Chandra [Sun, 28 Jan 2018 16:00:09 +0000 (21:30 +0530)]
bpo-32228: Reset raw_pos after unwinding the raw stream (#4858)

Ensure that ``truncate()`` preserves the file position (as reported by ``tell()``) after writes longer than the buffer size.

7 years agoFix PyTrace_RETURN documentation (GH-5384)
Xiang Zhang [Sun, 28 Jan 2018 14:54:42 +0000 (22:54 +0800)]
Fix PyTrace_RETURN documentation (GH-5384)

It will be triggered when propagating an exception.

7 years agoAdd example for PEP 557. (GH-5383)
Eric V. Smith [Sun, 28 Jan 2018 14:25:45 +0000 (09:25 -0500)]
Add example for PEP 557. (GH-5383)

7 years agobpo-32660: Solaris should support constants like termios' FIONREAD (#5328)
jcea [Sun, 28 Jan 2018 13:00:48 +0000 (14:00 +0100)]
bpo-32660: Solaris should support constants like termios' FIONREAD (#5328)

7 years agobpo-32659: Solaris "stat" should support "st_fstype" (#5307)
jcea [Sun, 28 Jan 2018 13:00:08 +0000 (14:00 +0100)]
bpo-32659: Solaris "stat" should support "st_fstype" (#5307)

* bpo-32659: Solaris "stat" should support "st_fstype"

* Add 'versionadded'

7 years agobpo-32685: Improve suggestion for print statement (GH-5375)
Nitish Chandra [Sun, 28 Jan 2018 10:56:02 +0000 (16:26 +0530)]
bpo-32685: Improve suggestion for print statement (GH-5375)

Better account for single-line compound statements and
semi-colon separated statements when suggesting
Py3 replacements for Py2 print statements.

Initial patch by Nitish Chandra.

7 years agobpo-32649: Add C API docs for per-opcode tracing & profiling (GH-5360)
Xiang Zhang [Sun, 28 Jan 2018 09:53:38 +0000 (17:53 +0800)]
bpo-32649: Add C API docs for per-opcode tracing & profiling (GH-5360)

Updating the C API docs was missed when the per-opcode
tracing & profiling support was initially added.

7 years agobpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (#5361)
Xiang Zhang [Sun, 28 Jan 2018 07:38:21 +0000 (15:38 +0800)]
bpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (#5361)

7 years agobpo-30306: Add missing NEWS entry (GH-5374)
Nick Coghlan [Sun, 28 Jan 2018 05:14:30 +0000 (15:14 +1000)]
bpo-30306: Add missing NEWS entry (GH-5374)

7 years agobpo-32206: Update pdb usage to include new module option (GH-5111)
Mario Corchero [Sun, 28 Jan 2018 04:58:47 +0000 (04:58 +0000)]
bpo-32206: Update pdb usage to include new module option (GH-5111)

7 years agobpo-30306: release arguments of contextmanager (GH-1500)
Martin Teichmann [Sun, 28 Jan 2018 04:17:46 +0000 (05:17 +0100)]
bpo-30306: release arguments of contextmanager (GH-1500)

The arguments to a generator function which is declared as a
contextmanager are stored inside the context manager, and
thus are kept alive, even when it is used as a regular context
manager, and not as a function decorator (where it needs
the original arguments to recreate the generator on each
call).

This is a possible unnecessary memory leak, so this changes
contextmanager.__enter__ to release the saved arguments,
as that method being called means that particular CM instance
isn't going to need to recreate the underlying generator.

Patch by Martin Teichmann.

7 years agoPep 557 What's New (GH-5371)
Eric V. Smith [Sun, 28 Jan 2018 01:30:37 +0000 (20:30 -0500)]
Pep 557 What's New (GH-5371)

Add PEP 557 Data CLasses to What's New.

7 years agobpo-32677: Optimize str.isascii() (GH-5356)
INADA Naoki [Sun, 28 Jan 2018 00:59:12 +0000 (09:59 +0900)]
bpo-32677: Optimize str.isascii() (GH-5356)

7 years agobpo-32513: Make it easier to override dunders in dataclasses. (GH-5366)
Eric V. Smith [Sun, 28 Jan 2018 00:07:40 +0000 (19:07 -0500)]
bpo-32513: Make it easier to override dunders in dataclasses. (GH-5366)

Class authors no longer need to specify repr=False if they want to provide a custom __repr__ for dataclasses. The same thing applies for the other dunder methods that the dataclass decorator adds. If dataclass finds that a dunder methods is defined in the class, it will not overwrite it.

7 years agobpo-32622: Normalize ENOTCONN to ConnectionError on macOS (GH-5369)
Yury Selivanov [Sat, 27 Jan 2018 22:22:01 +0000 (17:22 -0500)]
bpo-32622: Normalize ENOTCONN to ConnectionError on macOS (GH-5369)

On mac, sendfile throws ENOTCONN on a repeated sendfile call if
the connection is closed. Normalize it to behave like other systems.

7 years agobpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)
Коренберг Марк [Sat, 27 Jan 2018 22:20:50 +0000 (03:20 +0500)]
bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)

7 years agobpo-32622: Fix AbstractEventLoop.sendfile signature in documentation. (GH-5368)
Elvis Pranskevichus [Sat, 27 Jan 2018 22:11:10 +0000 (17:11 -0500)]
bpo-32622: Fix AbstractEventLoop.sendfile signature in documentation. (GH-5368)

7 years agoFix tests if Python compiled without SSL (#5367)
Andrew Svetlov [Sat, 27 Jan 2018 22:00:37 +0000 (00:00 +0200)]
Fix tests if Python compiled without SSL (#5367)

7 years agoFix changed file detection on Travis (GH-3129)
Ammar Askar [Sat, 27 Jan 2018 20:53:56 +0000 (15:53 -0500)]
Fix changed file detection on Travis (GH-3129)

Travis when merging changes from a pull request onto the target branch
does not perform a rebase, instead it does a simple merge which causes
the PR commits to retain their commit dates. This means that the commit
log can potentially look like:

PR merge <-- HEAD
normal master commit <- master
more commits from normal workflow
PR commit 1
another master commit
PR commit 2

Performing a git diff from PR commit 2 to master will accidentally
include files that should not be there.

Closes python/core-workflow#14

7 years agobpo-32622: Enforce sendfile fallback policy for FALLBACK transports (#5364)
Yury Selivanov [Sat, 27 Jan 2018 20:52:52 +0000 (15:52 -0500)]
bpo-32622: Enforce sendfile fallback policy for FALLBACK transports (#5364)

7 years agobpo-32622: Implement loop.sendfile() (#5271)
Andrew Svetlov [Sat, 27 Jan 2018 19:22:47 +0000 (21:22 +0200)]
bpo-32622: Implement loop.sendfile() (#5271)

7 years agobpo-32630: Use contextvars in decimal (GH-5278)
Yury Selivanov [Sat, 27 Jan 2018 18:46:46 +0000 (13:46 -0500)]
bpo-32630: Use contextvars in decimal (GH-5278)

7 years agobpo-32436: Use PyThreadState_GET() in all hot paths (GH-5363)
Yury Selivanov [Sat, 27 Jan 2018 18:24:20 +0000 (13:24 -0500)]
bpo-32436: Use PyThreadState_GET() in all hot paths (GH-5363)

7 years agoFix wrong assert in unicodeobject (GH-5340)
INADA Naoki [Sat, 27 Jan 2018 17:07:09 +0000 (02:07 +0900)]
Fix wrong assert in unicodeobject (GH-5340)

7 years agobpo-31368: Expose preadv and pwritev in the os module (#5239)
Pablo Galindo [Sat, 27 Jan 2018 16:16:37 +0000 (16:16 +0000)]
bpo-31368: Expose preadv and pwritev in the os module (#5239)

7 years agobpo-32532: Improve documentation of settrace and setprofile (#5359)
Xiang Zhang [Sat, 27 Jan 2018 15:04:47 +0000 (23:04 +0800)]
bpo-32532: Improve documentation of settrace and setprofile (#5359)

Mention in the documentation of settrace and setprofile that errors in the
registered handlers will cause themselves unset.

7 years agobpo-31399: Let OpenSSL verify hostname and IP address (#3462)
Christian Heimes [Sat, 27 Jan 2018 14:51:38 +0000 (15:51 +0100)]
bpo-31399: Let OpenSSL verify hostname and IP address (#3462)

bpo-31399: Let OpenSSL verify hostname and IP

The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and
X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses.

* Remove match_hostname calls
* Check for libssl with set1_host, libssl must provide X509_VERIFY_PARAM_set1_host()
* Add documentation for OpenSSL 1.0.2 requirement
* Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform.
* Add hostname_checks_common_name

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-31853: Replaced socket.method calls with super() in SSLSocket. (#4048)
Mads Jensen [Sat, 27 Jan 2018 12:34:28 +0000 (13:34 +0100)]
bpo-31853: Replaced socket.method calls with super() in SSLSocket. (#4048)

7 years agobpo-32454: socket closefd (#5048)
Christian Heimes [Sat, 27 Jan 2018 08:54:13 +0000 (09:54 +0100)]
bpo-32454: socket closefd (#5048)

Add close(fd) function to the socket module

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-32433: Optimized HMAC digest (#5023)
Christian Heimes [Sat, 27 Jan 2018 08:53:43 +0000 (09:53 +0100)]
bpo-32433: Optimized HMAC digest (#5023)

The hmac module now has hmac.digest(), which provides an optimized HMAC
digest for short messages. hmac.digest() is up to three times faster
than hmac.HMAC().digest().

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342)
INADA Naoki [Sat, 27 Jan 2018 05:06:21 +0000 (14:06 +0900)]
bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342)

7 years agobpo-27505: Add change notes in module attribute docs (GH-5320)
Cheryl Sabella [Sat, 27 Jan 2018 02:40:52 +0000 (21:40 -0500)]
bpo-27505: Add change notes in module attribute docs (GH-5320)

Make it clear that setting __class__ on a module has worked since 3.5,
but support for __getattr__ and __dir__ on module instances requires 3.7+

Patch by Cheryl Sabella.

7 years agobpo-32678: inspect: Import ast lazily (GH-5344)
INADA Naoki [Sat, 27 Jan 2018 01:10:06 +0000 (10:10 +0900)]
bpo-32678: inspect: Import ast lazily (GH-5344)

7 years agobpo-32521: nis libnsl (#5190)
Christian Heimes [Fri, 26 Jan 2018 22:28:46 +0000 (23:28 +0100)]
bpo-32521: nis libnsl (#5190)

The nismodule is now compatible with new libnsl and headers location

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-32436: Make PyContextVar_Get a little bit faster (#5350)
Yury Selivanov [Fri, 26 Jan 2018 22:24:52 +0000 (17:24 -0500)]
bpo-32436: Make PyContextVar_Get a little bit faster (#5350)

Since context.c is compiled with Py_BUILD_CORE, using a macro
will result in a slightly more optimal code.

7 years agobpo-32670: Enforce PEP 479. (#5327)
Yury Selivanov [Fri, 26 Jan 2018 20:24:24 +0000 (15:24 -0500)]
bpo-32670: Enforce PEP 479. (#5327)

7 years agobpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (#5337)
Nathaniel J. Smith [Fri, 26 Jan 2018 19:28:31 +0000 (11:28 -0800)]
bpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (#5337)

When an unawaited coroutine is collected very late in shutdown --
like, during the final GC at the end of PyImport_Cleanup -- then it
was triggering an interpreter abort, because we'd try to look up the
"warnings" module and not only was it missing (we were prepared for
that), but the entire module system was missing (which we were not
prepared for).

I've tried to fix this at the source, by making the utility function
get_warnings_attr robust against this in general. Note that it already
has the convention that it can return NULL without setting an error,
which is how it signals that the attribute it was asked to fetch is
missing, and that all callers already check for NULL returns.

There's a similar check for being late in shutdown at the top of
warn_explicit, which might be unnecessary after this fix, but I'm not
sure so I'm going to leave it.

7 years agoString annotations [PEP 563] (#4390)
Guido van Rossum [Fri, 26 Jan 2018 16:20:18 +0000 (08:20 -0800)]
String annotations [PEP 563] (#4390)

* Document `from __future__ import annotations`
* Provide plumbing and tests for `from __future__ import annotations`
* Implement unparsing the AST back to string form

This is required for PEP 563 and as such only implements a part of the
unparsing process that covers expressions.

7 years agobpo-18533: Avoid RecursionError from repr() of recursive dictview (#4823)
bennorth [Fri, 26 Jan 2018 15:46:01 +0000 (15:46 +0000)]
bpo-18533: Avoid RecursionError from repr() of recursive dictview (#4823)

dictview_repr(): Use a Py_ReprEnter() / Py_ReprLeave() pair to check
for recursion, and produce "..." if so.

test_recursive_repr(): Check for the string rather than a
RecursionError.  (Test cannot be any tighter as contents are
implementation-dependent.)

test_deeply_nested_repr(): Add new test, replacing the original
test_recursive_repr().  It checks that a RecursionError is raised in
the case of a non-recursive but deeply nested structure.  (Very
similar to what test_repr_deep() in test/test_dict.py does for a
normal dict.)

OrderedDictTests: Add new test case, to test behavior on OrderedDict
instances containing their own values() or items().

7 years agobpo-32571: Fix reading uninitialized memory (GH-5332)
INADA Naoki [Fri, 26 Jan 2018 07:22:51 +0000 (16:22 +0900)]
bpo-32571: Fix reading uninitialized memory (GH-5332)

Reported by Coverity Scan.

7 years agobpo-32662: Try making test_asyncio.test_server more reliable (#5338)
Yury Selivanov [Fri, 26 Jan 2018 06:30:57 +0000 (01:30 -0500)]
bpo-32662: Try making test_asyncio.test_server more reliable (#5338)

7 years agobpo-29237: Create enum for pstats sorting options (GH-5103)
mwidjaja [Fri, 26 Jan 2018 04:49:56 +0000 (20:49 -0800)]
bpo-29237: Create enum for pstats sorting options (GH-5103)

7 years agobpo-32596: Make lazy-load portable (GH-5316)
INADA Naoki [Fri, 26 Jan 2018 01:53:31 +0000 (10:53 +0900)]
bpo-32596: Make lazy-load portable (GH-5316)

Global variables should not used as import target.
Use temporary variable instead.

7 years agobpo-32304: Fix distutils upload for sdists ending with \x0d (GH-5264)
Bo Bayles [Fri, 26 Jan 2018 00:02:03 +0000 (18:02 -0600)]
bpo-32304: Fix distutils upload for sdists ending with \x0d (GH-5264)

Patch by Bo Bayles.

7 years agobpo-32574: Fix leaks in asyncio.Queue.put() and .get() (#5208)
José Melero Fernández [Thu, 25 Jan 2018 23:45:43 +0000 (23:45 +0000)]
bpo-32574: Fix leaks in asyncio.Queue.put() and .get() (#5208)

7 years agobpo-32662: Implement Server.start_serving() and Server.serve_forever() (#5312)
Yury Selivanov [Thu, 25 Jan 2018 23:08:09 +0000 (18:08 -0500)]
bpo-32662: Implement Server.start_serving() and Server.serve_forever() (#5312)

* bpo-32662: Implement Server.start_serving() and Server.serve_forever()

New methods:

* Server.start_serving(),
* Server.serve_forever(), and
* Server.is_serving().

Add 'start_serving' keyword parameter to loop.create_server() and
loop.create_unix_server().

7 years agobpo-29302: Implement contextlib.AsyncExitStack. (#4790)
Ilya Kulakov [Thu, 25 Jan 2018 20:51:18 +0000 (12:51 -0800)]
bpo-29302: Implement contextlib.AsyncExitStack. (#4790)

7 years agobpo-32436: Fix a refleak; var GC tracking; a GCC warning (#5326)
Yury Selivanov [Thu, 25 Jan 2018 19:18:55 +0000 (14:18 -0500)]
bpo-32436: Fix a refleak; var GC tracking; a GCC warning (#5326)

The refleak in question wasn't really important, as context vars
are usually created at the toplevel and live as long as the interpreter
lives, so the context var name isn't ever GCed anyways.

7 years agobpo-32667: Fix tests when $PATH contains a file (#5322)
Victor Stinner [Thu, 25 Jan 2018 18:06:05 +0000 (19:06 +0100)]
bpo-32667: Fix tests when $PATH contains a file (#5322)

Some tests failed when the PATH environment variable contained a path
to an existing file. Fix tests to ignore also NotADirectoryError, not
only FileNotFoundError and PermissionError.

7 years agoFix 3rd level node's binary representation in HAMT algorithm description (#5319)
Dmitry Alimov [Thu, 25 Jan 2018 17:54:41 +0000 (20:54 +0300)]
Fix 3rd level node's binary representation in HAMT algorithm description (#5319)

7 years agoCleanup dangling reference in get_timezone_utc_capi (#5317)
Paul Ganssle [Thu, 25 Jan 2018 13:58:07 +0000 (08:58 -0500)]
Cleanup dangling reference in get_timezone_utc_capi (#5317)

7 years agobpo-32360: Remove OrderedDict usage from json.tool (GH-5315)
INADA Naoki [Thu, 25 Jan 2018 10:52:58 +0000 (19:52 +0900)]
bpo-32360: Remove OrderedDict usage from json.tool (GH-5315)

`object_pairs_hook=OrderedDict` idiom is deprecated.

7 years ago bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code (GH...
Serhiy Storchaka [Thu, 25 Jan 2018 08:49:40 +0000 (10:49 +0200)]
 bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code (GH-5222)

Add two new private APIs: _PyObject_LookupAttr() and _PyObject_LookupAttrId()

7 years agobpo-32652: Defer pymain_set_global_config() call (#5303)
Victor Stinner [Thu, 25 Jan 2018 08:18:36 +0000 (09:18 +0100)]
bpo-32652: Defer pymain_set_global_config() call (#5303)

In Py_Main(), don't call pymain_set_global_config() early: only call
it when the whole configuration has been read.

Add an unit test to prevent future regression.

7 years agobpo-29708: Add What's New entries for SOURCE_DATE_EPOCH and py_compile (GH-5306)
Brett Cannon [Thu, 25 Jan 2018 01:13:24 +0000 (17:13 -0800)]
bpo-29708: Add What's New entries for SOURCE_DATE_EPOCH and py_compile (GH-5306)

7 years agobpo-32391: Implement StreamWriter.wait_closed() (#5281)
Andrew Svetlov [Wed, 24 Jan 2018 22:30:30 +0000 (00:30 +0200)]
bpo-32391: Implement StreamWriter.wait_closed() (#5281)

7 years agobpo-10381: Add timezone to datetime C API (#5032)
Paul Ganssle [Wed, 24 Jan 2018 22:29:30 +0000 (17:29 -0500)]
bpo-10381: Add timezone to datetime C API (#5032)

* Add timezone to datetime C API

* Add documentation for timezone C API macros

* Add dedicated tests for datetime type check macros

* Remove superfluous C API test

* Drop support for TimeZoneType in datetime C API

* Expose UTC singleton to the datetime C API

* Update datetime C-API documentation to include links

* Add reference count information for timezone constructors

7 years agobpo-29708: Setting SOURCE_DATE_EPOCH forces hash-based .pyc files (GH-5200)
Bernhard M. Wiedemann [Wed, 24 Jan 2018 21:26:18 +0000 (22:26 +0100)]
bpo-29708: Setting SOURCE_DATE_EPOCH forces hash-based .pyc files (GH-5200)

To support reproducible builds, the setting of of SOURCE_DATE_EPOCH triggers the py_compile module -- and by extension, compileall -- to forcibly compile with hash-based .pyc files. This eliminates the possibility of timestamp-based .pyc files which vary between builds.

7 years ago bpo-32248 - Implement `ResourceReader` and `get_resource_reader()` for zipimport...
Barry Warsaw [Wed, 24 Jan 2018 20:36:21 +0000 (15:36 -0500)]
 bpo-32248 - Implement `ResourceReader` and `get_resource_reader()` for zipimport (#5248)

7 years agobpo-32636: Fix two bugs in test_asyncio (#5302)
Victor Stinner [Wed, 24 Jan 2018 20:15:14 +0000 (21:15 +0100)]
bpo-32636: Fix two bugs in test_asyncio (#5302)

7 years agobpo-32636: Fix @asyncio.coroutine debug mode bug exposed by gh-5250 (#5291)
Nathaniel J. Smith [Wed, 24 Jan 2018 20:14:33 +0000 (12:14 -0800)]
bpo-32636: Fix @asyncio.coroutine debug mode bug exposed by gh-5250 (#5291)

7 years agobpo-32410: Improve sock_sendfile tests (#5294)
Andrew Svetlov [Wed, 24 Jan 2018 19:40:35 +0000 (21:40 +0200)]
bpo-32410: Improve sock_sendfile tests (#5294)

* Rename sock_sendfile test methods
* Make sock_sendfile tests more stable

7 years agobpo-32651 Recommend getpass.getuser() (#5301)
Barry Warsaw [Wed, 24 Jan 2018 17:51:29 +0000 (12:51 -0500)]
bpo-32651 Recommend getpass.getuser() (#5301)

* bpo-32651 - In the documentation for os.getlogin(), recommend getpass.getuser()

7 years agobpo-32643: Drop support for a few private Task and Future APIs. (#5293)
Yury Selivanov [Wed, 24 Jan 2018 16:31:01 +0000 (11:31 -0500)]
bpo-32643: Drop support for a few private Task and Future APIs. (#5293)

Specifically, it's not possible to subclass Task/Future classes
and override the following methods:

* Future._schedule_callbacks
* Task._step
* Task._wakeup

7 years agobpo-32030: Add _PyCoreConfig.module_search_paths (#4954)
Victor Stinner [Wed, 24 Jan 2018 16:03:28 +0000 (17:03 +0100)]
bpo-32030: Add _PyCoreConfig.module_search_paths (#4954)

_PyCoreConfig_Read() is now responsible to compute sys.path.
So sys.path is now computed before calling _Py_InitializeCore().

Changes:

* Add module_search_path, module_search_paths, executable, prefix,
  base_prefix, exec_prefix and base_exec_prefix to _PyCoreConfig.
* _PyMainInterpreterConfig_Read() now only converts wchar_t** lists
  into a Python list, it doesn't compute sys.path anymore.

7 years agobpo-28046: Remove MACHDEPPATH from Modules/Setup.dist (#5289)
Victor Stinner [Wed, 24 Jan 2018 16:02:41 +0000 (17:02 +0100)]
bpo-28046: Remove MACHDEPPATH from Modules/Setup.dist (#5289)

Makefile $MACHDEPPATH uses $PLATDIR, but this variable was removed.
So remove also $MACHDEPPATH.

Remove also $EXTRAMACHDEPPATH.

7 years agobpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (#4056)
Pablo Galindo [Wed, 24 Jan 2018 12:57:49 +0000 (12:57 +0000)]
bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (#4056)

7 years agobpo-32360: unittest.util: Use Counter instead of custom count function (GH-4994)
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) [Wed, 24 Jan 2018 07:49:58 +0000 (13:19 +0530)]
bpo-32360: unittest.util: Use Counter instead of custom count function (GH-4994)

7 years agobpo-32436: Don't use native popcount() (also fixes bpo-32641) (#5292)
Yury Selivanov [Wed, 24 Jan 2018 03:17:04 +0000 (22:17 -0500)]
bpo-32436: Don't use native popcount() (also fixes bpo-32641) (#5292)

7 years agobpo-32502: Discard 64-bit (and other invalid) hardware addresses (#5254)
Bo Bayles [Wed, 24 Jan 2018 01:11:44 +0000 (19:11 -0600)]
bpo-32502: Discard 64-bit (and other invalid) hardware addresses (#5254)

7 years agobpo-32436: Fix potential NULL dereference (#5286)
Yury Selivanov [Tue, 23 Jan 2018 21:26:07 +0000 (16:26 -0500)]
bpo-32436: Fix potential NULL dereference (#5286)

7 years agobpo-32296: Make get_running_loop() another 4-5x faster (#5277)
Yury Selivanov [Tue, 23 Jan 2018 20:10:03 +0000 (15:10 -0500)]
bpo-32296: Make get_running_loop() another 4-5x faster (#5277)

7 years ago bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (#5284)
stratakis [Tue, 23 Jan 2018 15:11:24 +0000 (16:11 +0100)]
 bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (#5284)

glibc is deprecating libcrypt in favor of libxcrypt, however python assumes
that crypt.h will always be included. This change makes the header inclusion
explicit when libxcrypt is present on the system.

7 years agobpo-32618: Fix test_mutatingdecodehandler not testing test.mutating (#5269)
Xiang Zhang [Tue, 23 Jan 2018 14:50:50 +0000 (22:50 +0800)]
bpo-32618: Fix test_mutatingdecodehandler not testing test.mutating (#5269)

* bpo-32618: Fix test_mutatingdecodehandler not testing test.mutating

It should test both test.replacing and test.mutating instead of test test.replacing twice.

7 years agobpo-20361: Remove workaround for a now fixed bug (#5283)
Victor Stinner [Tue, 23 Jan 2018 12:30:53 +0000 (13:30 +0100)]
bpo-20361: Remove workaround for a now fixed bug (#5283)

"python3 -bb -Wd" now works as expected:
"python3 -bb -Wd -Werror::BytesWarning" is no more needed.

7 years agobpo-32593: Run autoconf (#5282)
Victor Stinner [Tue, 23 Jan 2018 12:14:08 +0000 (13:14 +0100)]
bpo-32593: Run autoconf (#5282)

Update configure since configure.ac was modified to drop support for
FreeBSD 4.