]> granicus.if.org Git - python/log
python
7 years agobpo-31766: restore 3.5 to docs version switchers (#3969)
Ned Deily [Thu, 12 Oct 2017 18:08:43 +0000 (14:08 -0400)]
bpo-31766: restore 3.5 to docs version switchers (#3969)

7 years agobpo-31567: more decorator markup fixes in docs (GH-3959) (#3966)
Éric Araujo [Thu, 12 Oct 2017 16:28:55 +0000 (12:28 -0400)]
bpo-31567: more decorator markup fixes in docs (GH-3959) (#3966)

7 years agobpo-31773: time.perf_counter() uses again double (GH-3964)
Victor Stinner [Thu, 12 Oct 2017 15:51:56 +0000 (08:51 -0700)]
bpo-31773: time.perf_counter() uses again double (GH-3964)

time.clock() and time.perf_counter() now use again C double
internally.

Remove also _PyTime_GetWinPerfCounterWithInfo(): use
_PyTime_GetPerfCounterDoubleWithInfo() instead on Windows.

7 years agobpo-31567: add or fix decorator markup in docs (#3959)
Daisuke Miyakawa [Thu, 12 Oct 2017 14:39:43 +0000 (23:39 +0900)]
bpo-31567: add or fix decorator markup in docs (#3959)

7 years agoCleanup pytime.c (#3955)
Victor Stinner [Wed, 11 Oct 2017 15:11:38 +0000 (08:11 -0700)]
Cleanup pytime.c (#3955)

* Move _PyTime_overflow() at the top
* Move assertion on numerator into _PyTime_ObjectToDenominator()
* PEP 7: add { ... } to if blocks

7 years agobpo-28157: Improvements for the time module documentation (GH-928)
Cheryl Sabella [Wed, 11 Oct 2017 13:29:14 +0000 (09:29 -0400)]
bpo-28157: Improvements for the time module documentation (GH-928)

* Separated functions and constants descriptions in sections.
* Added a note about the limitations of timezone constants.
* Removed redundant lists from the module docstring.

7 years agobpo-31537: Update readline documentation example. (GH-3925)
Brad Smith [Tue, 10 Oct 2017 21:52:58 +0000 (17:52 -0400)]
bpo-31537: Update readline documentation example. (GH-3925)

Change the code example from using `get_history_length` to `get_current_history_length`.

7 years agobpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text...
Oren Milman [Tue, 10 Oct 2017 20:26:24 +0000 (23:26 +0300)]
bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text and Element.tail (#3924)

7 years agobpo-31740: Prevent refleaks when sqlite3.Connection.__init__() is called more than...
Oren Milman [Tue, 10 Oct 2017 19:27:46 +0000 (22:27 +0300)]
bpo-31740: Prevent refleaks when sqlite3.Connection.__init__() is called more than once (GH-3944)

7 years agobpo-31415: Add _PyTime_GetPerfCounter() and use it for -X importtime (#3936)
Victor Stinner [Tue, 10 Oct 2017 09:51:50 +0000 (02:51 -0700)]
bpo-31415: Add _PyTime_GetPerfCounter() and use it for -X importtime (#3936)

* Add _PyTime_GetPerfCounter()
* Use _PyTime_GetPerfCounter() for -X importtime

7 years agoAllow configure to handle PATH elements with spaces (#3935)
Ned Deily [Mon, 9 Oct 2017 17:53:27 +0000 (13:53 -0400)]
Allow configure to handle PATH elements with spaces (#3935)

7 years agobpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929)
Victor Stinner [Mon, 9 Oct 2017 16:52:32 +0000 (09:52 -0700)]
bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929)

bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM
exceptions.

7 years agobpo-31723: Fix refleaks when zipimporter.__init__() is called more than once (GH...
Oren Milman [Mon, 9 Oct 2017 15:06:19 +0000 (18:06 +0300)]
bpo-31723: Fix refleaks when zipimporter.__init__() is called more than once (GH-3919)

7 years agobpo-27867: Add a porting guide for PySlice_GetIndicesEx(). (#1973)
Serhiy Storchaka [Sun, 8 Oct 2017 09:53:34 +0000 (12:53 +0300)]
bpo-27867: Add a porting guide for PySlice_GetIndicesEx(). (#1973)

7 years agobpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always...
Oren Milman [Sun, 8 Oct 2017 08:17:46 +0000 (11:17 +0300)]
bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always return a list (#3840)

7 years agobpo-31642: Restore blocking "from" import by setting None in sys.modules. (#3834)
Serhiy Storchaka [Sun, 8 Oct 2017 07:44:10 +0000 (10:44 +0300)]
bpo-31642: Restore blocking "from" import by setting None in sys.modules. (#3834)

7 years agobpo-31724: Skip test_xmlrpc_net (GH-3921)
Zachary Ware [Sun, 8 Oct 2017 06:31:23 +0000 (01:31 -0500)]
bpo-31724: Skip test_xmlrpc_net (GH-3921)

With the upgrade of buildbot.python.org from Buildbot 0.8.x to 0.9.x,
the xmlrpc interface has been removed.  This test is now skipped until
it can be rewritten to query a suitable substitute.

7 years agobpo-31655: Validate keyword names in SimpleNamespace constructor. (#3909)
Serhiy Storchaka [Sat, 7 Oct 2017 19:59:35 +0000 (22:59 +0300)]
bpo-31655: Validate keyword names in SimpleNamespace constructor. (#3909)

7 years agobpo-31720: msilib documentation, change MsiError into MSIError (GH-3914)
Tzu-ping Chung [Sat, 7 Oct 2017 14:55:00 +0000 (22:55 +0800)]
bpo-31720: msilib documentation, change MsiError into MSIError (GH-3914)

7 years agobpo-31709: Update importlib magic (#3906)
Yury Selivanov [Fri, 6 Oct 2017 14:18:10 +0000 (10:18 -0400)]
bpo-31709: Update importlib magic (#3906)

7 years agoDocument Py_GETENV() (#3890)
Barry Warsaw [Fri, 6 Oct 2017 13:53:48 +0000 (09:53 -0400)]
Document Py_GETENV() (#3890)

7 years agobpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API (GH-1362)
Masayuki Yamamoto [Fri, 6 Oct 2017 10:41:34 +0000 (19:41 +0900)]
bpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API (GH-1362)

See PEP 539 for details.

Highlights of changes:

- Add Thread Specific Storage (TSS) API
- Document the Thread Local Storage (TLS) API as deprecated
- Update code that used TLS API to use TSS API

7 years agobpo-31708: Allow async generator expressions in synchronous functions (#3905)
Yury Selivanov [Fri, 6 Oct 2017 06:58:28 +0000 (02:58 -0400)]
bpo-31708: Allow async generator expressions in synchronous functions (#3905)

7 years agobpo-31709: Drop support for asynchronous __aiter__. (#3903)
Yury Selivanov [Fri, 6 Oct 2017 06:08:57 +0000 (02:08 -0400)]
bpo-31709: Drop support for asynchronous __aiter__. (#3903)

7 years agoweaken pthread_getcpuclockid test (more bpo-31596) (#3904)
Benjamin Peterson [Fri, 6 Oct 2017 05:50:42 +0000 (22:50 -0700)]
weaken pthread_getcpuclockid test (more bpo-31596) (#3904)

There just isn't much we can assert in a portable way.

7 years agocloses bpo-31696: don't mention GCC in sys.version when building with clang (#3891)
Benjamin Peterson [Fri, 6 Oct 2017 04:15:14 +0000 (21:15 -0700)]
closes bpo-31696: don't mention GCC in sys.version when building with clang (#3891)

7 years agobpo-30406: Make async and await proper keywords (#1669)
Jelle Zijlstra [Fri, 6 Oct 2017 03:24:46 +0000 (20:24 -0700)]
bpo-30406: Make async and await proper keywords (#1669)

Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.

7 years agobpo-31523: Reliability improvements to the Windows build files (#3900)
Steve Dower [Thu, 5 Oct 2017 20:35:36 +0000 (13:35 -0700)]
bpo-31523: Reliability improvements to the Windows build files (#3900)

7 years agoPEP 553 built-in breakpoint() function (bpo-31353) (#3355)
Barry Warsaw [Thu, 5 Oct 2017 16:11:18 +0000 (12:11 -0400)]
PEP 553 built-in breakpoint() function (bpo-31353) (#3355)

Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests.  Closes bpo-31353

7 years agobpo-31556: asyncio.wait_for can cancel futures faster with timeout <= 0 (#3703)
Victor K [Thu, 5 Oct 2017 16:04:39 +0000 (19:04 +0300)]
bpo-31556: asyncio.wait_for can cancel futures faster with timeout <= 0 (#3703)

7 years agobpo-31178: Mock os.waitpid() in test_subprocess (#3896)
Victor Stinner [Thu, 5 Oct 2017 13:32:53 +0000 (06:32 -0700)]
bpo-31178: Mock os.waitpid() in test_subprocess (#3896)

Fix test_exception_errpipe_bad_data() and
test_exception_errpipe_normal() of test_subprocess: mock os.waitpid()
to avoid calling the real os.waitpid(0, 0) which is an unexpected
side effect of the test.

7 years agobpo-31671: re: Convert RegexFlag to int before compile (GH-3862)
INADA Naoki [Thu, 5 Oct 2017 08:19:26 +0000 (17:19 +0900)]
bpo-31671: re: Convert RegexFlag to int before compile (GH-3862)

sre_compile does bit test (e.g. `flags & SRE_FLAG_IGNORECASE`) in loop.
`IntFlag.__and__` and `IntFlag.__new__` made it slower.

So this commit convert it to normal int before passing flags to `sre_compile()`.

7 years agocloses bpo-27494: Fix 2to3 handling of trailing comma after a generator expression...
Jakub Stasiak [Thu, 5 Oct 2017 07:10:09 +0000 (09:10 +0200)]
closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (#3771)

7 years agoremove tabs from getcompiler.c (#3892)
Benjamin Peterson [Thu, 5 Oct 2017 07:09:01 +0000 (00:09 -0700)]
remove tabs from getcompiler.c (#3892)

7 years agocloses bpo-31596: Add an interface for pthread_getcpuclockid(3) (#3756)
pdox [Thu, 5 Oct 2017 07:01:56 +0000 (00:01 -0700)]
closes bpo-31596: Add an interface for pthread_getcpuclockid(3) (#3756)

7 years agoAdd self and idlelib to CODEOWNERS file. (#3889)
Terry Jan Reedy [Thu, 5 Oct 2017 02:15:11 +0000 (22:15 -0400)]
Add self and idlelib to CODEOWNERS file. (#3889)

Followed format of other entries.

7 years agobpo-30872: Update the curses docs to Python 3. (#2620)
Serhiy Storchaka [Wed, 4 Oct 2017 19:44:13 +0000 (22:44 +0300)]
bpo-30872: Update the curses docs to Python 3. (#2620)

7 years agoRefactor multiplication and division of timedelta and float. (#3656)
Serhiy Storchaka [Wed, 4 Oct 2017 17:30:09 +0000 (20:30 +0300)]
Refactor multiplication and division of timedelta and float. (#3656)

Implementations of these operations are virtually identical.

7 years agobpo-31667: Fix gettext related links. (#3860)
Serhiy Storchaka [Wed, 4 Oct 2017 17:28:20 +0000 (20:28 +0300)]
bpo-31667: Fix gettext related links. (#3860)

* Fix incorrect links.
* Remove redundant links.
* Add signatures and index entries for gettext related
functions in the locale module.

7 years agobpo-30404: The -u option now makes the stdout and stderr streams totally unbuffered...
Serhiy Storchaka [Wed, 4 Oct 2017 17:25:40 +0000 (20:25 +0300)]
bpo-30404: The -u option now makes the stdout and stderr streams totally unbuffered. (#1667)

7 years agobpo-30397: Add re.Pattern and re.Match. (#1646)
Serhiy Storchaka [Wed, 4 Oct 2017 17:09:49 +0000 (20:09 +0300)]
bpo-30397: Add re.Pattern and re.Match. (#1646)

7 years agobpo-31683: Py_FatalError() now supports long error messages (#3878)
Victor Stinner [Wed, 4 Oct 2017 16:50:12 +0000 (09:50 -0700)]
bpo-31683: Py_FatalError() now supports long error messages (#3878)

On Windows, Py_FatalError() now limits the size to 256 bytes of the
buffer used to call OutputDebugStringW(). Previously, the size
depended on the length of the error message.

7 years agobpo-31677: email: Remove re.IGNORECASE flag (GH-3868)
INADA Naoki [Wed, 4 Oct 2017 03:47:38 +0000 (12:47 +0900)]
bpo-31677: email: Remove re.IGNORECASE flag (GH-3868)

While there is not real bug in this case, using re.IGNORECASE without re.ASCII
leads unexpected behavior.
Instead of adding re.ASCII, this commit removes re.IGNORECASE flag because
it's easier and simpler.

This commit removes dead copy of the pattern in email.util module too.
While the pattern is same, it is compiled separately because it had different flags.

7 years agoRemove retired and security branches from active docs (#3879)
Ned Deily [Wed, 4 Oct 2017 02:56:19 +0000 (22:56 -0400)]
Remove retired and security branches from active docs (#3879)

7 years agobpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (#3866)
Serhiy Storchaka [Tue, 3 Oct 2017 19:39:55 +0000 (22:39 +0300)]
bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (#3866)

when pass a string larger than 2 GiB.

Decrease memory requirements for Tcl's bigmem tests.

7 years agobpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). (#3864)
Serhiy Storchaka [Tue, 3 Oct 2017 18:37:22 +0000 (21:37 +0300)]
bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). (#3864)

7 years agobpo-31657: Add test coverage for the __debug__ case (GH-3450)
diana [Tue, 3 Oct 2017 16:46:56 +0000 (10:46 -0600)]
bpo-31657: Add test coverage for the __debug__ case (GH-3450)

Update the compile tests for optimization levels to also check that
__debug__ blocks are included or excluded based on the optimization
level.
Patch by Diana Clarke.

7 years agobpo-31619: Fixed a ValueError when convert a string with large number of underscores...
Serhiy Storchaka [Tue, 3 Oct 2017 11:13:44 +0000 (14:13 +0300)]
bpo-31619: Fixed a ValueError when convert a string with large number of underscores (#3827)

to integer with binary base.

7 years agobpo-31415: Add `-X importtime` option (GH-3490)
INADA Naoki [Tue, 3 Oct 2017 10:46:34 +0000 (19:46 +0900)]
bpo-31415: Add `-X importtime` option (GH-3490)

It shows show import time of each module.
It's useful for optimizing startup time.

Typical usage: python -X importtime -c 'import requests'

7 years agobpo-31540: Allow passing multiprocessing context to ProcessPoolExecutor (#3682)
Thomas Moreau [Tue, 3 Oct 2017 09:53:17 +0000 (11:53 +0200)]
bpo-31540: Allow passing multiprocessing context to ProcessPoolExecutor (#3682)

7 years agobpo-31662: Fix typos in uploadrelease.bat script
Anselm Kruis [Mon, 2 Oct 2017 15:53:55 +0000 (17:53 +0200)]
bpo-31662: Fix typos in uploadrelease.bat script

7 years agobpo-31510: Fix multiprocessing test_many_processes() on macOS (#3857)
Victor Stinner [Mon, 2 Oct 2017 15:27:34 +0000 (08:27 -0700)]
bpo-31510: Fix multiprocessing test_many_processes() on macOS (#3857)

On macOS, a process can exit with -SIGKILL if it is killed "early"
with SIGTERM.

7 years agobpo-11063: Fix _uuid module on macOS (#3855)
Victor Stinner [Mon, 2 Oct 2017 14:57:59 +0000 (07:57 -0700)]
bpo-11063: Fix _uuid module on macOS (#3855)

On macOS, use uuid_generate_time() instead of
uuid_generate_time_safe() of libuuid, since uuid_generate_time_safe()
is not available.

7 years agobpo-31516: current_thread() should not return a dummy thread at shutdown (#3673)
Antoine Pitrou [Mon, 2 Oct 2017 14:42:15 +0000 (16:42 +0200)]
bpo-31516: current_thread() should not return a dummy thread at shutdown (#3673)

bpo-31516: current_thread() should not return a dummy thread at shutdown

7 years agobpo-31158: Fix nondeterministic read in test_pty (#3808)
Cornelius Diekmann [Mon, 2 Oct 2017 09:39:55 +0000 (11:39 +0200)]
bpo-31158: Fix nondeterministic read in test_pty (#3808)

* bpo-31158: Fix nondeterministic read in test_pty

* Reuse existing readline implementation from io.

Thx to @pitrou

* Updated comment

Ideally, this commit is fixuped into the previous commit. Since there is
already a comment on github, I won't rebase.

7 years agobpo-31659: Use simple slicing to format PEM cert (GH-3849)
INADA Naoki [Mon, 2 Oct 2017 07:33:42 +0000 (16:33 +0900)]
bpo-31659: Use simple slicing to format PEM cert (GH-3849)

DER_cert_to_PEM_cert() used textwrap.fill() to format PEM.
But it's library to wrap lines on word boundary, while PEM is
base64 encoded string.

Additionally, importing textwrap is little slow.

7 years agoremove comment about long-gone SGI modules (#3850)
Benjamin Peterson [Mon, 2 Oct 2017 06:37:57 +0000 (23:37 -0700)]
remove comment about long-gone SGI modules (#3850)

7 years agoIDLE: make filetypes a tuple constant. (#3847)
Terry Jan Reedy [Sun, 1 Oct 2017 23:01:27 +0000 (19:01 -0400)]
IDLE: make filetypes a tuple constant. (#3847)

Save a bit of code, plus non-tuples get converted anyway to tuples by tkinter for the tk call.

7 years agobpo-31336: Speed up type creation. (#3279)
scoder [Sun, 1 Oct 2017 08:37:47 +0000 (10:37 +0200)]
bpo-31336: Speed up type creation. (#3279)

Speed up class creation by 10-20% by reducing the overhead in the
necessary special method lookups.

7 years agobpo-31460: Simplify the API of IDLE's Module Browser. (#3842)
Terry Jan Reedy [Sat, 30 Sep 2017 23:54:28 +0000 (19:54 -0400)]
bpo-31460: Simplify the API of IDLE's Module Browser. (#3842)

Passing a widget instead of an flist with a root widget opens the option of
creating a browser frame that is only part of a window. Passing a full file
name instead of pieces assumed to come from a .py file opens the possibility
of browsing python files that do not end in .py.

7 years agobpo-31649: Make IDLE's _htest, _utest parameters keyword-only. (#3839)
Terry Jan Reedy [Sat, 30 Sep 2017 21:37:53 +0000 (17:37 -0400)]
bpo-31649: Make IDLE's _htest, _utest parameters keyword-only. (#3839)

7 years agobpo-31592: Fix an assertion failure in Python parser in case of a bad unicodedata...
Oren Milman [Sat, 30 Sep 2017 17:16:24 +0000 (20:16 +0300)]
bpo-31592: Fix an assertion failure in Python parser in case of a bad unicodedata.normalize(). (#3767)

7 years agobpo-31627: Make test_mailbox be lenient to empty hostname. (#3821)
Serhiy Storchaka [Sat, 30 Sep 2017 14:10:57 +0000 (17:10 +0300)]
bpo-31627: Make test_mailbox be lenient to empty hostname. (#3821)

7 years agobpo-31648: Improve ElementPath (#3835)
scoder [Sat, 30 Sep 2017 13:35:21 +0000 (15:35 +0200)]
bpo-31648: Improve ElementPath (#3835)

* Allow whitespace inside of ElementPath predicates.
* Add ElementPath predicate support for text comparison of the current node, like "[.='text']".

7 years agobpo-31581: Reduce the number of imports for functools (GH-3757)
INADA Naoki [Sat, 30 Sep 2017 07:13:02 +0000 (16:13 +0900)]
bpo-31581: Reduce the number of imports for functools (GH-3757)

7 years agobpo-30806 netrc.__repr__() is broken for writing to file (GH-2491)
James Sexton [Sat, 30 Sep 2017 07:10:31 +0000 (02:10 -0500)]
bpo-30806 netrc.__repr__() is broken for writing to file (GH-2491)

netrc file format doesn't support quotes and escapes.

See https://linux.die.net/man/5/netrc

7 years agobpo-31574: importlib dtrace (#3749)
Christian Heimes [Fri, 29 Sep 2017 22:53:19 +0000 (00:53 +0200)]
bpo-31574: importlib dtrace (#3749)

Importlib was instrumented with two dtrace probes to profile import timing.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-31641: Allow arbitrary iterables in `concurrent.futures.as_completed()` (#3830)
Łukasz Langa [Fri, 29 Sep 2017 21:33:34 +0000 (14:33 -0700)]
bpo-31641: Allow arbitrary iterables in `concurrent.futures.as_completed()` (#3830)

This was possible before.  GH-1560 introduced a regression after 3.6.2 got
released where only sequences were accepted now.  This commit addresses this
problem.

7 years agobpo-31602: Fix an assertion failure in zipimporter.get_source() in case of a bad...
Oren Milman [Fri, 29 Sep 2017 18:34:31 +0000 (21:34 +0300)]
bpo-31602: Fix an assertion failure in zipimporter.get_source() in case of a bad zlib.decompress() (GH-3784)

While a rare potential failure (it requires swapping out zlib.decompress() itself and forcing it to return a non-bytes object), this change prevents a potential C-level assertion failure and instead substitutes it with an exception.

Thanks to Oren Milman for the patch.

7 years agoTweak formatting of PR message template (#3828)
Brett Cannon [Fri, 29 Sep 2017 18:16:38 +0000 (11:16 -0700)]
Tweak formatting of PR message template (#3828)

7 years agobpo-31285: Remove splitlines identifier from Python/_warnings.c (#3803)
Oren Milman [Fri, 29 Sep 2017 18:16:02 +0000 (21:16 +0300)]
bpo-31285: Remove splitlines identifier from Python/_warnings.c (#3803)

(forgot to remove it in #3219)

7 years agobpo-31638: Add compression support to zipapp (GH-3819)
Zhiming Wang [Fri, 29 Sep 2017 17:31:52 +0000 (13:31 -0400)]
bpo-31638: Add compression support to zipapp (GH-3819)

Add optional argument `compressed` to `zipapp.create_archive`, and add
option `--compress` to the command line interface of `zipapp`.

7 years agoexplicitly list objects for the ar command (#3824)
Benjamin Peterson [Fri, 29 Sep 2017 16:26:48 +0000 (09:26 -0700)]
explicitly list objects for the ar command (#3824)

$^ is not portable.

closes bpo-31625

7 years agostop using ranlib (closes bpo-31625) (#3815)
Benjamin Peterson [Fri, 29 Sep 2017 15:42:41 +0000 (08:42 -0700)]
stop using ranlib (closes bpo-31625) (#3815)

Instead, simply pass 's' to ar.

7 years agobpo-25351: avoid activate failure on strict shells (GH-3804)
Sorin Sbarnea [Fri, 29 Sep 2017 11:48:11 +0000 (12:48 +0100)]
bpo-25351: avoid activate failure on strict shells (GH-3804)

7 years agoremove support for BSD/OS (closes bpo-31624) (#3812)
Benjamin Peterson [Fri, 29 Sep 2017 05:44:27 +0000 (22:44 -0700)]
remove support for BSD/OS (closes bpo-31624) (#3812)

7 years agobpo-11063, bpo-20519: avoid ctypes and improve import time for uuid (#3796)
Antoine Pitrou [Thu, 28 Sep 2017 21:03:06 +0000 (23:03 +0200)]
bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid (#3796)

bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid.

7 years agoFix typo in Simple Statements documentation (GH-3809)
kms70847 [Thu, 28 Sep 2017 19:54:48 +0000 (15:54 -0400)]
Fix typo in Simple Statements documentation (GH-3809)

Replace "restriction" with "restrictions".

7 years agobpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad __abs__...
Oren Milman [Thu, 28 Sep 2017 07:50:01 +0000 (10:50 +0300)]
bpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad __abs__() method. (#3596)

7 years agoTrivial readability improvement (#3791)
Barry Warsaw [Wed, 27 Sep 2017 15:12:30 +0000 (11:12 -0400)]
Trivial readability improvement (#3791)

7 years agobpo-31588: Validate return value of __prepare__() methods (GH-3764)
Oren Milman [Wed, 27 Sep 2017 14:04:37 +0000 (17:04 +0300)]
bpo-31588: Validate return value of __prepare__() methods (GH-3764)

Class execution requires that __prepare__() methods return
a proper execution namespace. Check for that immediately
after calling __prepare__(), rather than passing it through
to the code execution machinery and potentially triggering
SystemError (in debug builds) or a cryptic TypeError
(in release builds).

Patch by Oren Milman.

7 years agopoint to the module-level get_ident function rather than the one in _thread (#3782)
Benjamin Peterson [Wed, 27 Sep 2017 06:13:15 +0000 (23:13 -0700)]
point to the module-level get_ident function rather than the one in _thread (#3782)

7 years agocloses bpo-22140: Prevent double substitution of prefix in python-config.sh (#3769)
Michał Górny [Wed, 27 Sep 2017 05:45:06 +0000 (07:45 +0200)]
closes bpo-22140: Prevent double substitution of prefix in python-config.sh (#3769)

Fix the logic in python-config.sh to avoid attempting to substitute
prefix in a variable that might have already been subject to
substitution. This e.g. happened if @exec_prefix@ was defined as
"${prefix}" (which is the default of the configure script) -- in which
case the exec_prefix_build variable was initialized with
already-subtituted prefix, and then another round of substitution was
performed which might have resulted in duplicate prefix.

To avoid that, rename the variables so that the variables matching
likely configure names (prefix, exec_prefix) retain their original
values and a '_real' suffix is used for the real values of prefix.

Furthermore, replace the unnecessary prefix and exec_prefix
substitutions with direct prefix_real references since the sed
always replaced the whole string anyway by design.

7 years agobpo-31586: Use _count_element fast path for real dicts.
Oren Milman [Wed, 27 Sep 2017 03:18:21 +0000 (06:18 +0300)]
bpo-31586: Use _count_element fast path for real dicts.

7 years agobpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators...
Serhiy Storchaka [Tue, 26 Sep 2017 18:47:56 +0000 (21:47 +0300)]
bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. (#1557)

7 years agobpo-28293: Don't completely dump the regex cache when full. (#3768)
Serhiy Storchaka [Tue, 26 Sep 2017 16:47:36 +0000 (19:47 +0300)]
bpo-28293: Don't completely dump the regex cache when full. (#3768)

7 years agobpo-31579: Fixed a possible leak in enumerate() with large indices. (#3753)
Serhiy Storchaka [Tue, 26 Sep 2017 05:14:58 +0000 (08:14 +0300)]
bpo-31579: Fixed a possible leak in enumerate() with large indices. (#3753)

7 years agobpo-31571: Remove duplicated info in Lexical Analysis documentation (GH-3691)
Guilherme Caminha [Mon, 25 Sep 2017 23:16:54 +0000 (20:16 -0300)]
bpo-31571: Remove duplicated info in Lexical Analysis documentation (GH-3691)

- Remove the second mention about the `u` prefix
- Remove the second mention about numeric literals do not include a sign

7 years agobpo-30152: Reduce the number of imports for argparse. (#1269)
Serhiy Storchaka [Mon, 25 Sep 2017 21:55:55 +0000 (00:55 +0300)]
bpo-30152: Reduce the number of imports for argparse. (#1269)

7 years agobpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711)
Stefan Grönke [Mon, 25 Sep 2017 16:58:10 +0000 (18:58 +0200)]
bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711)

7 years agobpo-26491 Defer DECREFs until enumobject is in a consistent state (#3747)
Raymond Hettinger [Mon, 25 Sep 2017 09:15:53 +0000 (02:15 -0700)]
bpo-26491 Defer DECREFs until enumobject is in a consistent state (#3747)

7 years agobpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug (#3570)
Victor Stinner [Mon, 25 Sep 2017 08:27:34 +0000 (01:27 -0700)]
bpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug (#3570)

Non-regression tests for the Expat 2.2.3 UTF-8 decoder bug.

7 years agobpo-27385: Clarify docstring for groupby() (#3738)
Raymond Hettinger [Mon, 25 Sep 2017 08:21:06 +0000 (01:21 -0700)]
bpo-27385: Clarify docstring for groupby() (#3738)

7 years agobpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case...
Oren Milman [Mon, 25 Sep 2017 08:09:11 +0000 (11:09 +0300)]
bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case of a bad __dict__. (#3254)

7 years agobpo-23702: Update Descriptor-HOWTO to reflect the removal of unbound methods (#3739)
Raymond Hettinger [Mon, 25 Sep 2017 08:05:49 +0000 (01:05 -0700)]
bpo-23702: Update Descriptor-HOWTO to reflect the removal of unbound methods (#3739)

7 years agobpo-18558: Clarify glossary entry for "Iterable" (#3732)
Raymond Hettinger [Mon, 25 Sep 2017 07:52:06 +0000 (00:52 -0700)]
bpo-18558: Clarify glossary entry for "Iterable" (#3732)

7 years agoremove configure check for memmove (#3716)
Benjamin Peterson [Sun, 24 Sep 2017 19:08:40 +0000 (12:08 -0700)]
remove configure check for memmove (#3716)

Python requires C implementations provide memmove, so we shouldn't need to check for it. The only place using this configure check was expat, where we can simply always define HAVE_MEMMOVE.

7 years agobpo-30085: Improve documentation for operator (#1171)
Sanket Dasgupta [Sun, 24 Sep 2017 18:29:22 +0000 (23:59 +0530)]
bpo-30085: Improve documentation for operator (#1171)

The dunderless functions are preferred; dunder are retained for back compatilibity.
Patch by Sanket Dasgupta.

7 years agobpo-31566: Fix an assertion failure in _warnings.warn() in case of a bad __name__...
Oren Milman [Sun, 24 Sep 2017 18:28:42 +0000 (21:28 +0300)]
bpo-31566: Fix an assertion failure in _warnings.warn() in case of a bad __name__ global. (#3717)

7 years agobpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit....
Oren Milman [Sun, 24 Sep 2017 18:27:12 +0000 (21:27 +0300)]
bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (#3219)