Commit Graph

100109 Commits

Author SHA1 Message Date
INADA Naoki 1a87de7fcf 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'
2017-10-03 19:46:34 +09:00
Thomas Moreau e8c368df22 bpo-31540: Allow passing multiprocessing context to ProcessPoolExecutor (#3682) 2017-10-03 11:53:17 +02:00
Anselm Kruis efb560eee2 bpo-31662: Fix typos in uploadrelease.bat script 2017-10-02 08:53:55 -07:00
Victor Stinner e6cfdefa0c 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.
2017-10-02 08:27:34 -07:00
Victor Stinner 4337a0d995 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.
2017-10-02 07:57:59 -07:00
Antoine Pitrou 1023dbbcb7 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
2017-10-02 16:42:15 +02:00
Cornelius Diekmann e6f62f69f0 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.
2017-10-02 02:39:55 -07:00
INADA Naoki b75a228af8 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.
2017-10-02 16:33:42 +09:00
Benjamin Peterson edc05c5d88 remove comment about long-gone SGI modules (#3850) 2017-10-01 23:37:57 -07:00
Terry Jan Reedy 5961e7c156 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.
2017-10-01 19:01:27 -04:00
scoder 2102c78903 bpo-31336: Speed up type creation. (#3279)
Speed up class creation by 10-20% by reducing the overhead in the
necessary special method lookups.
2017-10-01 11:37:47 +03:00
Terry Jan Reedy d6bb65f378 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.
2017-09-30 19:54:28 -04:00
Terry Jan Reedy bfebfd81de bpo-31649: Make IDLE's _htest, _utest parameters keyword-only. (#3839) 2017-09-30 17:37:53 -04:00
Oren Milman 7dc46d8cf5 bpo-31592: Fix an assertion failure in Python parser in case of a bad unicodedata.normalize(). (#3767) 2017-09-30 20:16:24 +03:00
Serhiy Storchaka f4ea642cb6 bpo-31627: Make test_mailbox be lenient to empty hostname. (#3821) 2017-09-30 17:10:57 +03:00
scoder 101a5e84ac bpo-31648: Improve ElementPath (#3835)
* Allow whitespace inside of ElementPath predicates.
* Add ElementPath predicate support for text comparison of the current node, like "[.='text']".
2017-09-30 16:35:21 +03:00
INADA Naoki 9811e80fd0 bpo-31581: Reduce the number of imports for functools (GH-3757) 2017-09-30 16:13:02 +09:00
James Sexton b24cd055ec 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
2017-09-30 16:10:31 +09:00
Christian Heimes 3d2b407da0 bpo-31574: importlib dtrace (#3749)
Importlib was instrumented with two dtrace probes to profile import timing.

Signed-off-by: Christian Heimes <christian@python.org>
2017-09-29 15:53:19 -07:00
Łukasz Langa 574562c5dd 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.
2017-09-29 14:33:34 -07:00
Oren Milman 01c6a8859e 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.
2017-09-29 11:34:31 -07:00
Brett Cannon 66033733aa Tweak formatting of PR message template (#3828) 2017-09-29 11:16:38 -07:00
Oren Milman 8b4ff53c44 bpo-31285: Remove splitlines identifier from Python/_warnings.c (#3803)
(forgot to remove it in #3219)
2017-09-29 21:16:02 +03:00
Zhiming Wang d87b105ca7 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`.
2017-09-29 18:31:52 +01:00
Benjamin Peterson 6fb0e4a6d0 explicitly list objects for the ar command (#3824)
$^ is not portable.

closes bpo-31625
2017-09-29 09:26:48 -07:00
Benjamin Peterson d15108a478 stop using ranlib (closes bpo-31625) (#3815)
Instead, simply pass 's' to ar.
2017-09-29 08:42:41 -07:00
Sorin Sbarnea 90f1d98959 bpo-25351: avoid activate failure on strict shells (GH-3804) 2017-09-29 12:48:11 +01:00
Benjamin Peterson 288d1daada remove support for BSD/OS (closes bpo-31624) (#3812) 2017-09-28 22:44:27 -07:00
Antoine Pitrou a106aec2ed 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.
2017-09-28 23:03:06 +02:00
kms70847 8d59aca4a9 Fix typo in Simple Statements documentation (GH-3809)
Replace "restriction" with "restrictions".
2017-09-28 12:54:48 -07:00
Oren Milman d780b2d588 bpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad __abs__() method. (#3596) 2017-09-28 10:50:01 +03:00
Barry Warsaw db50ba7c72 Trivial readability improvement (#3791) 2017-09-27 11:12:30 -04:00
Oren Milman 5837d0418f 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.
2017-09-28 00:04:37 +10:00
Benjamin Peterson 236329ed9f point to the module-level get_ident function rather than the one in _thread (#3782) 2017-09-26 23:13:15 -07:00
Michał Górny 14086cfc5e 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.
2017-09-26 22:45:06 -07:00
Oren Milman 31aca4bf79 bpo-31586: Use _count_element fast path for real dicts. 2017-09-26 20:18:21 -07:00
Serhiy Storchaka c740e4fe8a bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. (#1557) 2017-09-26 21:47:56 +03:00
Serhiy Storchaka 114454e9f6 bpo-28293: Don't completely dump the regex cache when full. (#3768) 2017-09-26 19:47:36 +03:00
Serhiy Storchaka 0e950dd22b bpo-31579: Fixed a possible leak in enumerate() with large indices. (#3753) 2017-09-26 08:14:58 +03:00
Guilherme Caminha 4a2d00cb45 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
2017-09-25 16:16:54 -07:00
Serhiy Storchaka 81108375d9 bpo-30152: Reduce the number of imports for argparse. (#1269) 2017-09-26 00:55:55 +03:00
Stefan Grönke f1502d097c bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711) 2017-09-25 17:58:10 +01:00
Raymond Hettinger 8110dbd470 bpo-26491 Defer DECREFs until enumobject is in a consistent state (#3747) 2017-09-25 02:15:53 -07:00
Victor Stinner e6d9fcbb8d 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.
2017-09-25 01:27:34 -07:00
Raymond Hettinger 49392c63a2 bpo-27385: Clarify docstring for groupby() (#3738) 2017-09-25 01:21:06 -07:00
Oren Milman 57c2561c8c bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case of a bad __dict__. (#3254) 2017-09-25 11:09:11 +03:00
Raymond Hettinger 0d4497b9ca bpo-23702: Update Descriptor-HOWTO to reflect the removal of unbound methods (#3739) 2017-09-25 01:05:49 -07:00
Raymond Hettinger 0bf287b6e0 bpo-18558: Clarify glossary entry for "Iterable" (#3732) 2017-09-25 00:52:06 -07:00
Benjamin Peterson b1d1c422cc 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.
2017-09-24 12:08:40 -07:00
Sanket Dasgupta 5b9299d8c7 bpo-30085: Improve documentation for operator (#1171)
The dunderless functions are preferred; dunder are retained for back compatilibity.
Patch by Sanket Dasgupta.
2017-09-24 14:29:22 -04:00