Commit Graph

40641 Commits

Author SHA1 Message Date
Serhiy Storchaka 8ddcf3abf7 Issue #28019: itertools.count() no longer rounds non-integer step in range
between 1.0 and 2.0 to 1.
2016-09-10 09:49:24 +03:00
Victor Stinner bc6262675c Issue #18401: Fix test_pdb on Windows
* Use "with Popen" to cleanup properly the process
* Use support.temp_cwd() to properly change the working directory
* Use environ.pop() to cleanup the code
2016-09-09 23:22:09 -07:00
Victor Stinner 11ea04491d Issue #18401: Fix test_pdb if $HOME is not set
HOME is not set on Windows for example.

Use also textwrap.dedent() for the script.
2016-09-09 22:56:54 -07:00
Łukasz Langa 2eb6eca3e5 Issue #18401: pdb tests don't read ~/.pdbrc anymore
Patch by Martin Matusiak and Sam Kimbrel.
2016-09-09 22:21:17 -07:00
Victor Stinner a1fd0789ed Try to fix sizeof unit tests on dict
Issue #28056 and issue #26058.
2016-09-09 21:51:19 -07:00
Guido van Rossum e617521b0d Use raw string for regexp 2016-09-09 21:39:10 -07:00
R David Murray b067c8fdd1 #20476: Deal with the message_factory circular import differently.
It turns out we can't depend on email.message getting imported every place
message_factory is needed, so to avoid a circular import we need to special
case Policy.message_factory=None in the parser instead of using monkey
patching.  I had a feeling that was a bad idea when I did it.
2016-09-10 00:22:25 -04:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 28325749c0 Issue #25969: Update the lib2to3 grammar to handle the unpacking
generalizations added in 3.5.
2016-09-09 18:18:52 -07:00
Gregory P. Smith dbdf029a55 remove fix_callable - callable() was readded many releases ago. 2016-09-09 18:14:33 -07:00
Steve Dower 6a294a54de Issue #27932: Fixes memory leak in platform.win32_ver() 2016-09-09 18:01:25 -07:00
Victor Stinner 78601a38c2 Fix SystemError in compact dict
Issue #28040: Fix _PyDict_DelItem_KnownHash() and _PyDict_Pop(): convert
splitted table to combined table to be able to delete the item.

Write an unit test for the issue.

Patch by INADA Naoki.
2016-09-09 19:28:36 -07:00
Eric V. Smith 89e1b1aae0 Issue 27080: PEP 515: add '_' formatting option. 2016-09-09 23:06:47 -04:00
Łukasz Langa 04bedfa3ce Issue #27199: TarFile expose copyfileobj bufsize to improve throughput
Patch by Jason Fried.
2016-09-09 19:48:14 -07:00
Eric V. Smith 451d0e38fc Issue 27948: Allow backslashes in the literal string portion of f-strings, but not in the expressions. Also, require expressions to begin and end with literal curly braces. 2016-09-09 21:56:20 -04:00
Zachary Ware 80da993826 Issue #28046: Fix distutils
Why do we have two sysconfig modules again?
2016-09-09 18:29:10 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 3b822d6c89 Issue #25969: Update the lib2to3 grammar to handle the unpacking
generalizations added in 3.5.
2016-09-09 18:19:51 -07:00
Steve Dower 48c7d7518e Merge from Zach 2016-09-09 18:05:07 -07:00
Steve Dower 1588a3b377 Issue #27932: Fixes memory leak in platform.win32_ver() 2016-09-09 18:04:26 -07:00
Zachary Ware c4b53afce4 Issue #28046: Remove platform-specific directories from sys.path 2016-09-09 17:59:49 -07:00
Łukasz Langa a785c87d6e DTrace support: function calls, GC activity, line execution
Tested on macOS 10.11 dtrace, Ubuntu 16.04 SystemTap, and libbcc.

Largely based by an initial patch by Jesús Cea Avión, with some
influence from Dave Malcolm's SystemTap patch and Nikhil Benesch's
unification patch.

Things deliberately left out for simplicity:
- ustack helpers, I have no way of testing them at this point since
they are Solaris-specific
- PyFrameObject * in function__entry/function__return, this is
SystemTap-specific
- SPARC support
- dynamic tracing
- sys module dtrace facility introspection

All of those might be added later.
2016-09-09 17:37:37 -07:00
Steve Dower ff70fc2206 Issue #25758: Prevents zipimport from unnecessarily encoding a filename (patch by Eryk Sun) 2016-09-09 17:33:37 -07:00
Steve Dower 8dcc48ee3b Issue #25758: Prevents zipimport from unnecessarily encoding a filename (patch by Eryk Sun) 2016-09-09 17:27:33 -07:00
R David Murray 1319236167 Merge: #14977: Make mailcap respect the order of the lines in the mailcap file. 2016-09-09 20:09:43 -04:00
R David Murray 347dc95cd3 #14977: Make mailcap respect the order of the lines in the mailcap file.
This is required by RFC 1542, so despite the subtle behavior change we
are treating it as a bug.  Patch by Michael Lazar.
2016-09-09 20:04:23 -04:00
Gregory P. Smith 223f12c9eb Remove 2to3's fix_callable... We reintroduced the callable built-in
pretty early on in the 3.x series (3.1 or 3.2?).
2016-09-09 17:03:58 -07:00
Raymond Hettinger b7f3c944d1 Merge 2016-09-09 16:44:53 -07:00
Raymond Hettinger ae9e5f032d Issue #22450: Use "Accept: */*" in the default headers for urllib.request 2016-09-09 16:43:48 -07:00
Zachary Ware 5272868e1f Rename test_strlit -> test_string_literals 2016-09-09 16:15:03 -07:00
Davin Potts 5458647bb8 Issue #28053: Applying refactorings, docs and other cleanup to follow. 2016-09-09 18:03:10 -05:00
Raymond Hettinger f1024f7425 merge 2016-09-09 15:58:00 -07:00
R David Murray 06ed218ed0 #20476: add a message_factory policy attribute to email. 2016-09-09 18:39:18 -04:00
Christian Heimes 3aeacad561 Issue #28025: Convert all ssl module constants to IntEnum and IntFlags. 2016-09-10 00:19:35 +02:00
Serhiy Storchaka 142aee3a8e Merge heads 2016-09-10 01:14:38 +03:00
Serhiy Storchaka be9a4e5c85 Issue #433028: Added support of modifier spans in regular expressions. 2016-09-10 00:57:55 +03:00
Brett Cannon a721abac29 Issue #26331: Implement the parsing part of PEP 515.
Thanks to Georg Brandl for the patch.
2016-09-09 14:57:09 -07:00
Gregory P. Smith fa40ca811f issue27985 - fix the incorrect duplicate class name in the lib2to3
test.  call it TestVarAnnotations instead.
2016-09-09 14:48:08 -07:00
Guido van Rossum 7b3b3dc85d Merge asyncio upstream. 2016-09-09 14:26:31 -07:00
Eric Snow 50fd89806f Issue #24320: Drop an old setuptools-induced hack. 2016-09-09 13:30:54 -07:00
Guido van Rossum 7719d46431 Rename Future._blocking to _asyncio_future_blocking.
This is now an official "protected" API that can be used to write
classes that are duck-type-compatible with Future without subclassing
it.  (For that purpose I also changed isinstance(result, Future) to
check for this attribute instead.)

Hopefully Amber Brown can use this to make Twisted.Deferred compatible
with asyncio.Future.

Tests and docs are TBD. (Also there are more isinstance() checks to fix.)
2016-09-09 12:58:15 -07:00
Zachary Ware 724f6a67f2 Rename test_pep####.py files 2016-09-09 12:55:37 -07:00
Zachary Ware a0154c0f0e Fix running test_tokenize directly 2016-09-09 12:55:14 -07:00
Guido van Rossum 1140a03426 Rename Future._blocking to _asyncio_future_blocking.
This is now an official "protected" API that can be used to write
classes that are duck-type-compatible with Future without subclassing
it.  (For that purpose I also changed isinstance(result, Future) to
check for this attribute instead.)

Hopefully Amber Brown can use this to make Twisted.Deferred compatible
with asyncio.Future.

Tests and docs are TBD.
2016-09-09 12:54:54 -07:00
R David Murray 94a7927cc6 #28047: Fix calculation of base64 line length.
This is buggy in the old email code as well, but it doesn't affect anything
there because only the default line length is ever used there.
2016-09-09 15:00:09 -04:00
Victor Stinner f9b760f48a Rework CALL_FUNCTION* opcodes
Issue #27213: Rework CALL_FUNCTION* opcodes to produce shorter and more
efficient bytecode:

* CALL_FUNCTION now only accepts position arguments
* CALL_FUNCTION_KW accepts position arguments and keyword arguments, but keys
  of keyword arguments are packed into a constant tuple.
* CALL_FUNCTION_EX is the most generic, it expects a tuple and a dict for
  positional and keyword arguments.

CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW opcodes have been removed.

2 tests of test_traceback are currently broken: skip test, the issue #28050 was
created to track the issue.

Patch by Demur Rumed, design by Serhiy Storchaka, reviewed by Serhiy Storchaka
and Victor Stinner.
2016-09-09 10:17:08 -07:00
Steve Dower 2a2becc1d1 Merge with 3.5 2016-09-09 12:09:07 -07:00
Eric Snow 06aed90a1f Issue #27576: Fix call order in OrderedDict.__init__(). 2016-09-09 11:59:08 -07:00
Zachary Ware cce02f8b82 Remove Lib/test/test_pep247.py
This test file is a holdover from the days before hashlib, and doesn't seem to
have anything of value in it.
2016-09-09 11:38:38 -07:00
Yury Selivanov d04e417b1e tests: use subTest in test_unparse.test_files 2016-09-09 11:14:59 -07:00
Yury Selivanov 52c4e7cc84 Issue #28008: Implement PEP 530 -- asynchronous comprehensions. 2016-09-09 10:36:01 -07:00
Steve Dower 41519b2ca8 Issue #26513: Fixes platform module detection of Windows Server 2016-09-09 09:46:56 -07:00
Guido van Rossum 6cff8744a0 Issue #27999: Make "global after use" a SyntaxError, and ditto for nonlocal.
Patch by Ivan Levkivskyi.
2016-09-09 09:36:26 -07:00
Steve Dower 7bcf7931fc Issue #26513: Fixes platform module detection of Windows Server 2016-09-09 09:47:09 -07:00
Steve Dower 6d5cf8a73e Fixes expected error when getting encoding while shutting down. 2016-09-09 09:21:01 -07:00
Steve Dower 4db86bc1b4 Changes pyvenv.cfg trick into an actual sys.path file. 2016-09-09 09:17:35 -07:00
Donald Stufft 783c9ef84d Merge 3.5 2016-09-09 12:15:07 -04:00
Donald Stufft 6bde454f9e Merge 3.4 2016-09-09 12:14:43 -04:00
Donald Stufft 16d7d5941d Upgrade setuptools to 27.1.2 2016-09-09 12:08:53 -04:00
Guido van Rossum deed5a18ca Issue #28038: Remove Tools/parser/com2ann.py and its unit test.
Development is moving to https://github.com/ilevkivskyi/com2ann
2016-09-09 09:06:11 -07:00
Steve Dower 18591e4189 Revert #27959: ImportError within an encoding module should also skip the encoding 2016-09-09 08:56:37 -07:00
Donald Stufft 722b685dc1 Merge 3.5 2016-09-09 11:36:59 -04:00
Donald Stufft 621333d227 Merge 3.4 2016-09-09 11:35:43 -04:00
Donald Stufft d25d9dc1fc Upgrade setuptools to 27.1.1 2016-09-09 11:35:02 -04:00
Martin Panter 2b9b70b43b Issue #27106: Add test for configparser.__all__
Patch by Jacek Kołodziej. The Error class is deliberately omitted because it
is a generic name and of limited use.
2016-09-09 06:46:48 +00:00
Yury Selivanov eb6364557f Issue #28003: Implement PEP 525 -- Asynchronous Generators. 2016-09-08 22:01:51 -07:00
Victor Stinner b96ef55d49 regrtest: log FS and locale encodings 2016-09-08 21:46:56 -07:00
Yury Selivanov f8cb8a16a3 Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations.
Patch by Ivan Levkivskyi.
2016-09-08 20:50:03 -07:00
R David Murray f03bcfd168 Merge: #27630: Be consistent in how _XXX/_encoded_XXX vars are initialized. 2016-09-08 22:27:39 -04:00
R David Murray eaab1ca558 #27630: Be consistent in how _XXX/_encoded_XXX vars are initialized. 2016-09-08 22:21:27 -04:00
Eric Snow 4f29e75289 Issue #24254: Drop cls.__definition_order__. 2016-09-08 15:11:11 -07:00
R David Murray 301edfa579 Add policy keyword to email.generator.DecodedGenerator. 2016-09-08 17:57:06 -04:00
Raymond Hettinger 4c483ad52b Merge 2016-09-08 14:45:40 -07:00
Raymond Hettinger 262b6793e0 Issue #26020: Fix evaluation order for set literals 2016-09-08 14:40:36 -07:00
Steve Dower 33df0c3fb6 More lenient skipping of console tests. 2016-09-08 14:36:18 -07:00
Steve Dower f09e2fa2e9 Skips console open_fd tests when we don't have real consoles. 2016-09-08 14:34:24 -07:00
Senthil Kumaran 10427f4485 [merge from 3.5] - Issue28010 - Make http.client.HTTPConnection.putrequest
documentation consistent with the code.
2016-09-08 14:29:23 -07:00
Senthil Kumaran 5dc504c3c9 Issue28010 - Make http.client.HTTPConnection.putrequest documentation consistent with the code. 2016-09-08 14:28:01 -07:00
Davin Potts 37156a70b9 Issue #21201: Improves readability of multiprocessing error message from server to client for certain exceptions 2016-09-08 14:40:36 -05:00
Berker Peksag 2b2a9be913 Issue #27445: Don't pass str(_charset) to MIMEText.set_payload()
Patch by Claude Paroz.
2016-09-08 19:40:30 +03:00
Senthil Kumaran 82733fac8d Issue11551 - Increase the test coverage of _dummy_thread module to 100%.
Initial patch contributed by Denver Coneybeare.
2016-09-08 02:46:22 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 9719161858 Fix indentation (reindent.py). 2016-09-08 00:48:07 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) dd1c638b92 lib2to3.pgen3.driver.load_grammar() now creates a stable cache file
between runs given the same Grammar.txt input regardless of the hash
randomization setting.
2016-09-08 00:40:07 +00:00
Vinay Sajip d61910c598 Fixes #27930: improved QueueListener behaviour. 2016-09-08 01:13:39 +01:00
Martin Panter 0f0eac431f Issue #27993: Fix problems with plural objects in docs and comments 2016-09-07 11:04:41 +00:00
Martin Panter 0be894b2f6 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
Martin Panter be8da9c990 Issue #27570: Avoid zero-length memcpy() calls with null source pointers 2016-09-07 11:04:41 +00:00
R David Murray dc1650ca06 #22233: Only split headers on \r and/or \n, per email RFCs.
Original patch by Martin Panter, new policy fixes by me.
2016-09-07 17:44:34 -04:00
R David Murray c2e2473bc2 27988: Make sure iter_attachments does not mutate the payload list. 2016-09-07 13:39:36 -04:00
Benjamin Peterson 48c88307d8 capture stderr to silence output during test_coroutines (closes #27968) 2016-09-07 09:00:48 -07:00
Senthil Kumaran 32d374215a [backport to 3.5] - issue26896 - Disambiguate uses of "importer" with "finder". 2016-09-07 00:52:20 -07:00
Berker Peksag 4bf580d6d5 Issue #21250: Add tests for SQLite's ON CONFLICT clause
Initial patch by Alex LordThorsen.
2016-09-07 02:04:34 +03:00
Christian Heimes 1c03abd026 Issue #27691: Fix ssl module's parsing of GEN_RID subject alternative name fields in X.509 certs. 2016-09-06 23:25:35 +02:00
Christian Heimes 03d13c0cbf Issues #27850 and #27766: Remove 3DES from ssl default cipher list and add ChaCha20 Poly1305. 2016-09-06 20:06:47 +02:00
Benjamin Peterson cbef66d711 suppress stderr output when checking gdb (closes #27969) 2016-09-06 10:06:31 -07:00
Jason R. Coombs 1f5fd648b1 Issue #27960: Revert state to 675e20c38fdac6, backing out all changes by developed for Issue #12885. 2016-09-05 22:24:01 -04:00
Senthil Kumaran 4672060d86 Update pkgutil docs to reference appropriate finder and loader object documentation.
Initial patch contributed by Jaysinh shukla.
2016-09-05 17:11:51 -07:00
Zachary Ware f4a7381719 Issue #27748: Backed out changeset f845e24d794e
Apparently the test succeeds on XP.
2016-09-05 18:08:27 -05:00
Zachary Ware 9ed756bc21 Issue #27748: strengthen test_alias_nofallback
This test should always raise RuntimeError.
2016-09-05 17:19:35 -05:00
Christian Heimes 598894ff48 Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0. 2016-09-05 23:19:05 +02:00
Zachary Ware b3b7a5a16b Issue #27748: Simplify test_winsound.
The tests no longer attempt to figure out if a soundcard or particular
system sounds are available.  Instead, it just tries everything and
accepts RuntimeError as a flavor of success.
2016-09-05 16:06:56 -05:00
Benjamin Peterson 2f40ed4b94 do not allow _PyGen_Finalize to fail (closes #27811)
Patch from Armin Rigo.
2016-09-05 10:14:54 -07:00
Terry Jan Reedy fb5ce7eea1 Issue #27918# test.resource.is_gui_available no longer flashes tk window.
Also, don't run it if 'gui' is not requested.  Patch by Xiang Zhang.
2016-09-05 00:01:34 -04:00
Raymond Hettinger 16eb827b33 Improve docs for random.seed() 2016-09-04 11:17:28 -07:00
Vinay Sajip ab7b0a03b5 Fixes #27937: optimise code used in all logging calls. 2016-09-03 16:50:09 +01:00
Raymond Hettinger f0f1c239e4 Issue 27936: Fix inconsistent round() behavior between float and int 2016-09-03 01:55:11 -07:00
Jason R. Coombs 79ae9671ff Issue #12885: Revert commits in 3.4 branch which is security-only fixes. 2016-09-01 23:27:45 -04:00
Jason R. Coombs b44c849de4 Merge backout for test suite fix 2016-09-01 21:59:46 -04:00
Jason R. Coombs 8ac147d6ee Backed out changeset cc86e9e102e8 2016-09-01 21:55:22 -04:00
Jason R. Coombs 65e3319283 Issue #12285: Merge with 3.4 2016-09-01 21:15:04 -04:00
Serhiy Storchaka 2891492d23 Issue #27881: Fixed possible bugs when setting sqlite3.Connection.isolation_level.
Based on patch by Xiang Zhang.
2016-09-01 22:18:03 +03:00
Terry Jan Reedy 00b1e0f7ea Issue #27922: IDLE tests no longer flash tk widgets. 2016-08-31 21:03:16 -04:00
Raymond Hettinger c7bab7cbf5 Issue #27706: Fix regression in random.seed(somestr, version=1) 2016-08-31 15:01:08 -07:00
Guido van Rossum 4786787c07 Fix ordering issues in UNIX read/write pipe transport constructors.
Upstream https://github.com/python/asyncio/pull/408 by Ron Frederick.
2016-08-31 09:42:38 -07:00
Guido van Rossum 8b7918a7e2 Don't select for read on character devices in _UnixWritePipeTransport.
Upstream https://github.com/python/asyncio/pull/374 by Ron Frederick.
2016-08-31 09:40:18 -07:00
Guido van Rossum 09c22adadf Issue #27907: variable rename. (Ville Skyttä) 2016-08-31 09:08:41 -07:00
Steve Dower 3929499914 Issue #1602: Windows console doesn't input or print Unicode (PEP 528)
Closes #17602: Adds a readline implementation for the Windows console
2016-08-30 21:22:36 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) a68c1bca7b Remove legacy "from __future__ import with_statement" lines. 2016-09-08 13:47:41 -07:00
Victor Stinner 3b6a6b4215 Add a new private version to the builtin dict type
Issue #26058: Add a new private version to the builtin dict type, incremented
at each dictionary creation and at each dictionary change.

Implementation of the PEP 509.
2016-09-08 12:51:24 -07:00
Davin Potts 70897ec54c Issue #21201: Improves readability of multiprocessing error message from server to client for certain exceptions 2016-09-08 14:47:23 -05:00
R David Murray 110b6fecbb #27364: Deprecate invalid escape strings in str/byutes.
Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter.
2016-09-08 15:34:08 -04:00
Zachary Ware 20737cc91e Issue #28027: Remove Lib/plat-* files 2016-09-08 11:38:46 -07:00
Eric Snow f3fd06a2e4 Issue #28026: Raise ImportError when exec_module() exists but create_module() is missing. 2016-09-08 11:12:31 -07:00
Steve Dower e58571b7ea Fixes tests broken by issue #27781. 2016-09-08 11:11:13 -07:00
R David Murray 44b548dda8 #27364: fix "incorrect" uses of escape character in the stdlib.
And most of the tools.

Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
2016-09-08 13:59:53 -04:00
Steve Dower cc16be85c0 Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529) 2016-09-08 10:35:16 -07:00
Victor Stinner 742da040db Implement compact dict
Issue #27350: `dict` implementation is changed like PyPy. It is more compact
and preserves insertion order.

_PyDict_Dummy() function has been removed.

Disable test_gdb: python-gdb.py is not updated yet to the new structure of
compact dictionaries (issue #28023).

Patch written by INADA Naoki.
2016-09-07 17:40:12 -07:00
Berker Peksag d8b7770a0e Issue #27445: Merge from 3.5 2016-09-08 19:42:11 +03:00
Benjamin Peterson 47ff0734b8 more PY_LONG_LONG to long long 2016-09-08 09:15:54 -07:00
Serhiy Storchaka c49a516ae9 Remove old typo.
Initially (e0b7e34b5971) it should be \udef0, but after 52a77ef069cd
(issue #3672) lone surrogates are not accepted and should be removed.
2016-09-08 15:47:27 +03:00
Senthil Kumaran 9dda0c9569 [merge from 3.5] Issue11551 - Increase the test coverage of _dummy_thread module to 100%.
Initial patch contributed by Denver Coneybeare.
2016-09-08 02:47:52 -07:00
Christian Heimes 81188246fa Issue 26798: fetch OSError and HTTPException like other tests that use open_urlresource. 2016-09-08 10:53:40 +02:00
Brett Cannon 035a100382 Issue #26667: Add path-like object support to importlib.util. 2016-09-07 18:39:18 -07:00
Eric Snow d5f9223981 Issue #17211: Yield a namedtuple in pkgutil.
Patch by Ramchandra Apte.
2016-09-07 18:37:17 -07:00
R David Murray 29d1bc0842 #24277: The new email API is no longer provisional.
This is a wholesale reorganization and editing of the email documentation to
make the new API the standard one, and the old API the 'legacy' one.  The
default is still the compat32 policy, for backward compatibility.  We will
change that eventually.
2016-09-07 21:15:59 -04:00
Steve Dower 4cf7e482a0 Fix expected error message in PyTextIOWrapperTest 2016-09-07 17:51:30 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 627b7556e8 Fix indentation (reindent.py). 2016-09-08 00:48:22 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 08c24c79a5 merge heads 2016-09-08 00:46:58 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 0c578d62fc lib2to3.pgen3.driver.load_grammar() now creates a stable cache file
between runs given the same Grammar.txt input regardless of the hash
randomization setting.
2016-09-08 00:46:26 +00:00
Vinay Sajip db8f46321f Added back test code lost during merge. 2016-09-08 01:37:03 +01:00
Steve Dower ef37dfcd84 Issue #28005: Allow ImportErrors in encoding implementation to propagate. 2016-09-07 17:27:33 -07:00
Vinay Sajip 93e6b3314d Closes #27930: Merged fix from 3.5. 2016-09-08 01:24:12 +01:00
Eric Snow 46f97b85a8 Issue #15767: Use ModuleNotFoundError. 2016-09-07 16:56:15 -07:00
Eric Snow c943265ba5 Issue #15767: Add ModuleNotFoundError. 2016-09-07 15:42:32 -07:00
Davin Potts 86a7668426 Fixes issue #6766: Updated multiprocessing Proxy Objects to support nesting 2016-09-07 18:48:01 -05:00
Martin Panter 1aa642f6bd Issue #27993: Merge plural fixes from 3.5 2016-09-07 23:36:43 +00:00
Martin Panter 1c748f3830 Issue #27570: Merge null pointer fixes from 3.5 2016-09-07 23:31:39 +00:00
Benjamin Peterson 46d3a595fd fix expected layout of code objects 2016-09-07 14:56:15 -07:00
R David Murray 1badd28163 Merge: #22233: Only split headers on \r and/or \n, per email RFCs. 2016-09-07 17:46:55 -04:00
R David Murray 56b1f1b4d5 #27331: add policy keyword argument to all MIME subclasses.
Patch by Berker Peksag.
2016-09-07 16:48:35 -04:00
R David Murray 91afe7ec9f Merge: 27988: Make sure iter_attachments does not mutate the payload list. 2016-09-07 13:41:06 -04:00
Steve Dower fe8f4c9e87 Issue #27959: Prevent ImportError from escaping codec search function 2016-09-07 09:31:52 -07:00
Benjamin Peterson c75abff533 merge 3.5 (closes #27968) 2016-09-07 09:00:57 -07:00
Benjamin Peterson e2ffe29738 new and exciting shutdown error on windows 2016-09-07 08:54:35 -07:00
Christian Heimes 6fe2a75b64 Issue #16113: Add SHA-3 and SHAKE support to hashlib module. 2016-09-07 11:58:24 +02:00
Serhiy Storchaka 680cb152c5 Issue #26032: Optimized globbing in pathlib by using os.scandir(); it is now
about 1.5--4 times faster.
2016-09-07 10:58:05 +03:00
Raymond Hettinger 28aa4a0684 Rename weighted_choices() to just choices() 2016-09-07 00:08:44 -07:00
Serhiy Storchaka c98b26a6ac Issue #25596: Falls back to listdir in glob for bytes paths on Windows. 2016-09-07 09:49:42 +03:00
Benjamin Peterson 437df90537 get skipIf from the right place 2016-09-06 20:22:41 -07:00
Steve Dower 050acaed99 Issue #6135: Adds encoding and errors parameters to subprocess 2016-09-06 20:16:17 -07:00
Victor Stinner 173a1f3dc7 Fix test_os.GetRandomTests()
Issue #27778: Skip getrandom() tests if getrandom() fails with ENOSYS.
2016-09-06 19:57:40 -07:00
Steve Dower f5aba58480 Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec lookup 2016-09-06 19:42:27 -07:00
Steve Dower 22d0698d3b Adds test.support.PGO and skips tests that are not useful for PGO. 2016-09-06 19:38:15 -07:00
Brett Cannon a571120410 Issue #27182: Add support for path-like objects to PyUnicode_FSDecoder(). 2016-09-06 19:36:01 -07:00
Christian Heimes 32a2ceead7 Bypass __get_openssl_constructor() and always use our own blake2 implementation 2016-09-07 02:35:13 +02:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) cd14d5d299 Correct a comment in the test referencing the wrong issue number (issue3100
is correct, not 3110).
2016-09-07 00:22:22 +00:00
Raymond Hettinger e8f1e002c6 Issue #18844: Add random.weighted_choices() 2016-09-06 17:15:29 -07:00
Victor Stinner e66987e626 os.urandom() now blocks on Linux
Issue #27776: The os.urandom() function does now block on Linux 3.17 and newer
until the system urandom entropy pool is initialized to increase the security.

This change is part of the PEP 524.
2016-09-06 16:33:52 -07:00
Christian Heimes 59a0464af4 Download hashlib test vectors from pythontest.net 2016-09-07 01:21:14 +02:00
Brett Cannon eaecc692df Issue #27974: Remove importlib._bootstrap._ManageReload.
Class was dead code. Thanks to Xiang Zhang for the patch.
2016-09-06 16:20:46 -07:00
Victor Stinner 9b1f474df6 Add os.getrandom()
Issue #27778: Expose the Linux getrandom() syscall as a new os.getrandom()
function.

This change is part of the PEP 524.
2016-09-06 16:18:52 -07:00
Berker Peksag 3580b03352 Issue #21250: Merge from 3.5 2016-09-07 02:05:16 +03:00
Brett Cannon ec6ce879c7 Issue #26027: Support path-like objects in PyUnicode-FSConverter().
This is to add support for os.exec*() and os.spawn*() functions. Part
of PEP 519.
2016-09-06 15:50:29 -07:00
Zachary Ware c401881d68 Closes #27982: Allow keyword arguments to winsound functions 2016-09-06 16:32:43 -05:00
Christian Heimes fe3c9c1ee9 Issue #27691: Fix ssl module's parsing of GEN_RID subject alternative name fields in X.509 certs. 2016-09-06 23:27:06 +02:00
Serhiy Storchaka 90493ab30c Issue #25761: Improved error reporting about truncated pickle data in
C implementation of unpickler.  UnpicklingError is now raised instead of
AttributeError and ValueError in some cases.
2016-09-06 23:55:11 +03:00
Christian Heimes 121b9487d1 Issue #26798: Add BLAKE2 (blake2b and blake2s) to hashlib. 2016-09-06 22:03:25 +02:00
Serhiy Storchaka 28ab634fa6 Issue #25596: Optimized glob() and iglob() functions in the
glob module; they are now about 3--6 times faster.
2016-09-06 22:33:41 +03:00
Serhiy Storchaka ea525a2d1a Issue #27078: Added BUILD_STRING opcode. Optimized f-strings evaluation. 2016-09-06 22:07:53 +03:00
Christian Heimes 39093e9e68 Issue #27928: Add scrypt (password-based key derivation function) to hashlib module (requires OpenSSL 1.1.0). 2016-09-06 20:22:28 +02:00
Christian Heimes ac041c0aa7 Issues #27850 and #27766: Remove 3DES from ssl default cipher list and add ChaCha20 Poly1305. 2016-09-06 20:07:58 +02:00
Benjamin Peterson 45c7514de4 merge 3.5 (#27969) 2016-09-06 10:06:51 -07:00
Christian Heimes 582282b7d0 Issue 27866: relax get_cipher() test even more. Gentoo buildbot has no ECDHE 2016-09-06 11:27:25 +02:00
Christian Heimes 407380f63f Issue 27744: skip test if AF_ALG socket bind fails 2016-09-06 11:14:09 +02:00
Christian Heimes ea9b2dc9e3 Issue 27866: relax test case for set_cipher() and allow more cipher suites 2016-09-06 10:45:44 +02:00
Martin Panter b745f920c9 Issue #27355: Import no longer needed 2016-09-06 02:18:16 +00:00
Benjamin Peterson ed4aa83ff7 require a long long data type (closes #27961) 2016-09-05 17:44:18 -07:00
Senthil Kumaran 56b4872ff5 [merge from 3.5] - Update pkgutil docs to reference appropriate finder and loader object documentation.
Initial patch contributed by Jaysinh shukla.
2016-09-05 17:16:06 -07:00
Zachary Ware 7eacdcc3b8 Issue #27748: Merge with 3.5 2016-09-05 18:10:32 -05:00
Christian Heimes 04960a21fb Issue 27744: AES-CBC and DRBG need Kernel 3.19+ 2016-09-06 00:58:47 +02:00
Benjamin Peterson a9ab165cd2 os.access does not allow a fd 2016-09-05 15:40:59 -07:00
Christian Heimes 4837141def Issue 27744: Check for AF_ALG support in Kernel 2016-09-06 00:37:46 +02:00
Zachary Ware cefebf3cbe Issue #27748: Merge with 3.5 2016-09-05 17:24:45 -05:00
Larry Hastings 10108a7b9a Issue #27355: Removed support for Windows CE. It was never finished,
and Windows CE is no longer a relevant platform for Python.
2016-09-05 15:11:23 -07:00
Christian Heimes 25bfcd5d9e Issue #27866: Add SSLContext.get_ciphers() method to get a list of all enabled ciphers. 2016-09-06 00:04:45 +02:00
Christian Heimes dffa3949c7 Issue #27744: Add AF_ALG (Linux Kernel crypto) to socket module. 2016-09-05 23:54:41 +02:00
Eric Snow 92a6c170e6 Issue #24254: Preserve class attribute definition order. 2016-09-05 14:50:11 -07:00
Christian Heimes 01113faef9 Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0. 2016-09-05 23:23:24 +02:00
Zachary Ware ae8298bfb7 Closes #11620: Fix support for SND_MEMORY in winsound.PlaySound.
Based on a patch by Tim Lesher.
2016-09-05 16:31:21 -05:00
Zachary Ware 0e76e67246 Closes #27748: Merge with 3.5 2016-09-05 16:15:20 -05:00
Benjamin Peterson ff79396c83 fix skipping #27921 for windows 2016-09-05 11:13:07 -07:00
Benjamin Peterson 98020812e6 merge 3.5 (closes #27811) 2016-09-05 10:16:31 -07:00
Terry Jan Reedy 4847f3194d Merge with 3.5 2016-09-05 00:01:47 -04:00
Ethan Furman 27682d2698 issue23591: more docs; slight change to repr 2016-09-04 11:39:01 -07:00
Raymond Hettinger 6579502c7e Merge 2016-09-04 11:17:48 -07:00
Mark Dickinson 31ba1c3de8 Issue #27427: Additional tests for the math module. Thanks Francisco Couzo. 2016-09-04 12:29:14 +01:00
Mark Dickinson 85746542ea Issue #27953: skip failing math and cmath tests for tan on OS X 10.4. 2016-09-04 09:58:51 +01:00
Mark Dickinson 96f774d824 Issue #26040: Improve test_math and test_cmath coverage and rigour. Thanks Jeff Allen. 2016-09-03 19:30:22 +01:00
Eric V. Smith 06cf601e4f Issue 27921: Remove backslash from another f-string. I'll revert this change before beta 2. I also need to look in to why test_tools/test_unparse fails with the files that are now being skipped. 2016-09-03 12:33:38 -04:00
Mark Dickinson 7c4e409d07 Issue #11734: Add support for IEEE 754 half-precision floats to the struct module. Original patch by Eli Stevens. 2016-09-03 17:21:29 +01:00
Vinay Sajip 2500c98278 Closes #27935: returned numeric value for 'FATAL' logging level. 2016-09-03 17:04:36 +01:00
Vinay Sajip 44ac3c5fe9 Merge upstream change. 2016-09-03 16:55:35 +01:00
Eric V. Smith 1b8f7b818f Issue 27921: Remove backslash from another f-string. I'll revert this change before beta 2. 2016-09-03 11:01:53 -04:00
Vinay Sajip 0a7b7e30ff Fixes #27937: optimise code used in all logging calls. 2016-09-03 15:56:07 +01:00
Eric V. Smith 6e025608a2 Issue 27921: Remove backslash from another f-string. 2016-09-03 10:43:20 -04:00
Eric V. Smith 6a4efce7a5 Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts. 2016-09-03 09:18:34 -04:00
Raymond Hettinger 3b09cd64e0 Merge 2016-09-03 01:55:39 -07:00
Ethan Furman 25d94bbf05 issue23591: bool(empty_flags) == False; more docs & tests 2016-09-02 16:32:32 -07:00
Ethan Furman 0443953067 issue23591: optimize _high_bit() 2016-09-02 15:50:21 -07:00
Victor Stinner 1a05d6c04d PEP 7 style for if/else in C
Add also a newline for readability in normalize_encoding().
2016-09-02 12:12:23 +02:00
Ethan Furman 65a5a47d79 issue23591: add docs; code cleanup; more tests 2016-09-01 23:55:19 -07:00
Jason R. Coombs 9650b19212 Merge backout for test suite fix 2016-09-01 22:00:03 -04:00
Jason R. Coombs 75fbf87d73 Issue #12885: Merge with 3.5 2016-09-01 21:16:32 -04:00
Serhiy Storchaka af0628e045 Issue #27881: Fixed possible bugs when setting sqlite3.Connection.isolation_level.
Based on patch by Xiang Zhang.
2016-09-01 22:21:05 +03:00
Jason R. Coombs 5c071c1ff4 Issue #27919: Deprecate extra_path option in distutils. 2016-09-01 13:55:33 -04:00
Raymond Hettinger 2f9cc7ab0c Minor beautification (turn nested-if into a conjunction). 2016-08-31 23:00:32 -07:00
Terry Jan Reedy 5f30f79357 Issue #27922: IDLE tests no longer flash tk widgets (Merge 3.5). 2016-08-31 21:09:02 -04:00
Terry Jan Reedy a3623c864b Improve idlelib.textview comments. 2016-08-31 19:45:39 -04:00
Terry Jan Reedy 83a1045200 Issue #27891: Tweak new idlelib README entry. 2016-08-31 19:37:28 -04:00
Raymond Hettinger 112835cb3e Merge 2016-08-31 15:01:28 -07:00
Guido van Rossum 898ac56fc2 Merge asyncio from 3.5 2016-08-31 09:47:08 -07:00
Guido van Rossum 7309421502 Issue #27907: variable rename. (Ville Skyttä) (Merge 3.5->3.6) 2016-08-31 09:09:04 -07:00
R David Murray 8890bb2264 #27904: fix distutils tests.
Patch by Ville Skyttä.
2016-08-31 11:39:35 -04:00
Vinay Sajip dd917f84e3 Closes #27904: Improved logging statements to defer formatting until needed. 2016-08-31 08:22:29 +01:00
Ethan Furman ee47e5cf8a issue23591: add Flags, IntFlags, and tests 2016-08-31 00:12:15 -07:00
Terry Jan Reedy bfbaa6b206 Issue #27891: Consistently group and sort imports within idlelib modules. 2016-08-31 00:50:55 -04:00
Terry Jan Reedy da0288725f Issue #17642: add larger font sizes for classroom projection. 2016-08-30 20:19:13 -04:00
Terry Jan Reedy 82f954691f Merge with 3.5 2016-08-30 16:58:27 -04:00
Terry Jan Reedy 3399e1e38c ? Working Directory ? 2016-08-30 16:58:01 -04:00
Raymond Hettinger 8ca35707c0 Issue #27895: Strengthen the dict reader tests. 2016-08-30 12:57:26 -07:00
Raymond Hettinger 43ca452887 Issue #27842: The csv.DictReader now returns rows of type OrderedDict. 2016-08-30 12:35:50 -07:00
Raymond Hettinger 15f44ab043 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-08-30 10:47:49 -07:00
Zachary Ware 613debcf0a Merge with 3.5 2016-08-30 10:03:32 -05:00
Zachary Ware 5cf1c6cb62 Skip test_tools.test_i18n when pygettext.py is missing 2016-08-30 10:00:26 -05:00
Mark Dickinson 82a95277b8 Issue #27870: A left shift of zero by a large integer no longer attempts to allocate large amounts of memory. 2016-08-29 19:27:06 +01:00
Mark Dickinson 84e6311dee Issue 23229: add cmath.inf, cmath.nan, cmath.infj and cmath.nanj. 2016-08-29 13:56:58 +01:00
Serhiy Storchaka 8631da64bb Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory
creates not a cursor.  Patch by Xiang Zhang.
2016-08-29 15:11:52 +03:00
Serhiy Storchaka ef113cd4cc Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory
creates not a cursor.  Patch by Xiang Zhang.
2016-08-29 14:29:55 +03:00
Berker Peksag d0f5bab21b Issue #26027: Fix test_path_t_converter on Windows 2016-08-27 21:26:35 +03:00
Brett Cannon 3ce2fd484b Don't test for path-like bytes paths on Windows 2016-08-27 09:42:40 -07:00
Martin Panter 1b6c6da85d Issue #27506: Support bytes/bytearray.translate() delete as keyword argument
Patch by Xiang Zhang.
2016-08-27 08:35:02 +00:00
Martin Panter aac9b71632 Issue #19884: Merge Readline updates from 3.5 2016-08-27 04:03:26 +00:00
Martin Panter c427b8d517 Issue #19884: Avoid spurious output on OS X with Gnu Readline
Also adjust the test condition, because enable-meta-key was only added in
6.1, not 6.0.
2016-08-27 03:23:11 +00:00
Martin Panter ef91bb2660 Issue #12319: Always send file request bodies using chunked encoding
The previous attempt to determine the file’s Content-Length gave a false
positive for pipes on Windows.

Also, drop the special case for sending zero-length iterable bodies.
2016-08-27 01:39:26 +00:00
Brett Cannon 8f96a30630 Issue #26027: Don't test for bytearray in path_t as that's now
deprecated.
2016-08-26 19:30:11 -07:00
Brett Cannon 3f9183b5ac Issue #26027, #27524: Add PEP 519/__fspath__() support to os and
os.path.

Thanks to Jelle Zijlstra for the initial patch against posixmodule.c.
2016-08-26 14:44:48 -07:00
Berker Peksag 6ed442c48d Issue #10513: Merge from 3.5 2016-08-26 22:08:51 +03:00
Berker Peksag cc9afa9b51 Issue #10513: Fix a regression in Connection.commit()
Statements should not be reset after a commit.

Backported from 029050896b
2016-08-26 22:07:51 +03:00
Raymond Hettinger f74c33ad5c Merge 2016-08-25 21:12:16 -07:00
Raymond Hettinger 7ea386e56e Issue 19504: Change "customise" to "customize" American spelling. 2016-08-25 21:11:50 -07:00
Terry Jan Reedy 8f2ee0d5ff Add version to title of IDLE help window. 2016-08-25 20:05:30 -04:00
Terry Jan Reedy 39e9af6bb3 Add version to title of IDLE help window. 2016-08-25 20:04:14 -04:00
Terry Jan Reedy 664759cf19 Merge with 3.5 2016-08-25 01:22:44 -04:00
Terry Jan Reedy 1f8cc33f88 Issue #25564: Mention exec and __builtins__ in IDLE-console difference section. 2016-08-25 01:22:30 -04:00
Terry Jan Reedy 5acf4e563f Issue #27821: Fix bug in idlelib.comfig function and add new tests. 2016-08-24 22:08:01 -04:00
Berker Peksag 208536132b Fix typo in test name
Noticed by Xiang Zhang.
2016-08-25 01:13:34 +03:00
Martin Panter 3c0d0baf2b Issue #12319: Support for chunked encoding of HTTP request bodies
When the body object is a file, its size is no longer determined with
fstat(), since that can report the wrong result (e.g. reading from a pipe).
Instead, determine the size using seek(), or fall back to chunked encoding
for unseekable files.

Also, change the logic for detecting text files to check for TextIOBase
inheritance, rather than inspecting the “mode” attribute, which may not
exist (e.g. BytesIO and StringIO).  The Content-Length for text files is no
longer determined ahead of time, because the original logic could have been
wrong depending on the codec and newline translation settings.

Patch by Demian Brecht and Rolf Krahl, with a few tweaks by me.
2016-08-24 06:33:33 +00:00
Steven D'Aprano a790fe7ff8 Remove expected failure from test of _product internal function. 2016-08-24 13:54:31 +10:00
Steven D'Aprano d6ea3011c5 Remove support for nth root of negative numbers with odd powers.
Although nth roots of negative numbers are real for odd n, the
statistics module doesn't make use of this. Remove support for
negative roots from the private _nth_root function, which
simplifies the test suite.
2016-08-24 12:48:12 +10:00
Steven D'Aprano e5803d9d2f Add geometric_mean to __all__ 2016-08-24 12:17:00 +10:00
Guido van Rossum efa798d1ba A new version of typing.py from https://github.com/python/typing. 2016-08-23 11:01:50 -07:00
Guido van Rossum 83f5a3846c In asyncio.locks.Lock.acquire(): Avoid deadlock when a cancelled future is in self._waiters. 2016-08-23 09:39:03 -07:00
Mark Dickinson f428521481 Backed out changeset 1017215f5492 2016-08-23 20:00:49 +01:00
Alexander Belopolsky 7c7c14696b Issue #27834: Avoid overflow error in ZoneInfo.invert(). 2016-08-23 14:44:51 -04:00
Terry Jan Reedy ffcb022738 Issue #27787: No longer call deleted test_main(). 2016-08-23 14:20:37 -04:00
Guido van Rossum 1f5beb7a6e A new version of typing.py from https://github.com/python/typing. (Merge 3.5->3.6) 2016-08-23 11:06:30 -07:00
Guido van Rossum f0666949fd Issue 27598: Add Collections to collections.abc.
Patch by Ivan Levkivskyi, docs by Neil Girdhar.
2016-08-23 10:47:07 -07:00
Steven D'Aprano 9ff4fb3619 Automated merge with ssh://hg.python.org/cpython 2016-08-24 02:40:31 +10:00
Steven D'Aprano 0a21c729eb Re-licence statistics.py under the standard Python licence. 2016-08-24 02:40:03 +10:00
Guido van Rossum f06c7b6f37 In asyncio.locks.Lock.acquire(): Avoid deadlock when a cancelled future is in self._waiters. (Merge 3.5->3.6) 2016-08-23 09:39:26 -07:00
Mark Dickinson 4fe9f163af Issue #26040 (part 1): add new testcases to cmath_testcases.txt. Thanks Jeff Allen. 2016-08-23 17:33:54 +01:00
Steven D'Aprano 6877ed3560 Issue #27573 make the exit message configurable. 2016-08-24 01:42:15 +10:00
Mark Dickinson 7caf908c64 Issue #27832: Make _normalize parameter to Fraction.__init__ keyword-only. 2016-08-23 16:16:52 +01:00
Martin Panter 1fa6915427 Issue #27787: Remove test_main() and hard-coded list of test classes
The @reap_threads decorator made the test wait (for up to 1 s) until
background threads have finished.  Calling join() with a timeout should be
equivalent.
2016-08-23 09:01:43 +00:00
Vinay Sajip 9ae505041f Issue #12713: reverted fix pending further discussion. 2016-08-23 08:43:16 +01:00
Victor Stinner ad7b6c3720 Issue #27829: libregrtest.save_env: flush stderr
Use flush=True to try to get a warning which is missing in buildbots.

Use also f-string to make the code shorter.
2016-08-22 14:29:54 +02:00
Victor Stinner ab98367747 Cleanup libregrtest
* main.py: remove unused import
* runtest: simplify runtest_inner() parameters, reuse ns parameter
2016-08-22 14:28:52 +02:00
Mark Dickinson b820d7f631 Issue #27792: force int return type for modulo operations involving bools. 2016-08-22 12:24:46 +01:00
Mark Dickinson 0add84b9b8 Issue #27539: Merge from 3.5. 2016-08-22 10:56:06 +01:00
Mark Dickinson 844796530a Issue #27539: Fix unnormalised Fraction.__pow__ result for negative exponent and base. Thanks Vedran Čačić. 2016-08-22 10:50:53 +01:00
Raymond Hettinger dc65c68524 Remove main section that was only used during testing and development 2016-08-21 20:52:26 -07:00
Serhiy Storchaka 54cd1969ea Issue #26984: int() now always returns an instance of exact int. 2016-08-21 20:03:08 +03:00
Berker Peksag d7f3cdd07d Issue #21718: Merge from 3.5 2016-08-21 19:41:38 +03:00
Berker Peksag 6afe85827c Issue #21718: cursor.description is now available for queries using CTEs
According to PEP 249, cursor.description must be
available for any SELECT statements, such as those
that use CTEs.

Backported from f67fa9c898

Additional test cases added by me.
2016-08-21 19:38:47 +03:00
Nick Coghlan cbcd221de4 Merge #27782 fix from 3.5 2016-08-21 17:43:58 +10:00
Nick Coghlan 8682f578c1 Issue #27782: Fix m_methods handling in multiphase init
Multi-phase extension module import now correctly allows the
``m_methods`` field to be used to add module level functions
to instances of non-module types returned from ``Py_create_mod``.

Patch by Xiang Zhang.
2016-08-21 17:41:56 +10:00
Martin Panter f9ed528faf Issue #27487: Merge runpy warning from 3.5 2016-08-21 05:07:35 +00:00
Terry Jan Reedy 49dcf9d858 Fix typo in IDLE News. 2016-08-21 00:20:35 -04:00
Terry Jan Reedy 9f957705d6 Fix typo in IDLE News. 2016-08-21 00:18:55 -04:00
Martin Panter 9c8aa9bffe Issue #27487: Warn if submodule already imported before runpy execution
Also try to clarify the find_spec() error message.
2016-08-21 04:07:58 +00:00
Terry Jan Reedy 97c463dcfb Add 3.6.0a4 IDLE NEWS and idlelib/NEWS.txt items. 2016-08-20 21:43:00 -04:00
Terry Jan Reedy d3fb55797b Add 3.5.3 IDLE NEWS and idlelib/NEWS.txt items. 2016-08-20 21:41:03 -04:00
Terry Jan Reedy e194e87f1f Issue #27714: Remove unneeded non-idempotent call that fails on retest. 2016-08-20 21:08:50 -04:00
Terry Jan Reedy f7ac36837a Issue #27714: Remove unneeded non-idempotent call that fails on retest. 2016-08-20 21:07:38 -04:00
Jason R. Coombs a47ca08a36 Issue #27819: Simply default to gztar for sdist formats by default on all platforms. 2016-08-20 17:31:07 -04:00
Ethan Furman e8e61277ff issue26981: add _order_ compatibility shim to enum.Enum 2016-08-20 07:19:31 -07:00
Martin Panter 4bf6ed556d Issue #27614: Merge test_docxmlrpc from 3.5 2016-08-20 07:39:15 +00:00
Martin Panter 051b2201a7 Issue #27787: Merge regrtest fixup from 3.5 2016-08-20 07:38:21 +00:00
Ethan Furman 332dbc7325 Issue26988: remove AutoEnum 2016-08-20 00:00:52 -07:00
Martin Panter d874c05547 Issue #27614: Avoid race in test_docxmlrpc server setup 2016-08-20 06:50:58 +00:00
Martin Panter 68c1f1ed03 Issue #27787: Clean up weak references before checking for dangling threads 2016-08-20 06:50:14 +00:00
Victor Stinner f2abf5c11a regrtest: replace "Result:" with "Tests result:" 2016-08-19 17:54:25 +02:00
Berker Peksag 53926f19cd Issue #27801: Skip test_update_lines_cols when update_lines_cols() is not available 2016-08-19 17:59:01 +03:00
Berker Peksag fa46aa7899 Issue #27801: Merge from 3.5 2016-08-19 17:59:31 +03:00
Berker Peksag 3f015a64b8 Issue #27157: Make only type() itself accept the one-argument form
Patch by Eryk Sun and Emanuel Barry.
2016-08-19 11:04:07 +03:00
R David Murray c199603853 Merge: #2466: ismount now recognizes mount points user can't access. 2016-08-18 21:31:13 -04:00
R David Murray 750018b91a #2466: ismount now recognizes mount points user can't access.
Patch by Robin Roth, reviewed by Serhiy Storchaka, comment wording
tweaked by me.
2016-08-18 21:27:48 -04:00
Vinay Sajip ef948cd058 Closes #12713: Allowed abbreviation of subcommands in argparse. 2016-08-18 21:23:48 +01:00
Guido van Rossum 97c1adf393 Anti-registration of various ABC methods.
- Issue #25958: Support "anti-registration" of special methods from
  various ABCs, like __hash__, __iter__ or __len__.  All these (and
  several more) can be set to None in an implementation class and the
  behavior will be as if the method is not defined at all.
  (Previously, this mechanism existed only for __hash__, to make
  mutable classes unhashable.)  Code contributed by Andrew Barnert and
  Ivan Levkivskyi.
2016-08-18 09:22:23 -07:00
Victor Stinner 0a6996d87d Merge 3.5 (fix raise) 2016-08-18 18:14:15 +02:00
Victor Stinner eec9331b20 Fix SystemError in "raise" statement
Issue #27558: Fix a SystemError in the implementation of "raise" statement.
In a brand new thread, raise a RuntimeError since there is no active
exception to reraise.

Patch written by Xiang Zhang.
2016-08-18 18:13:10 +02:00
Serhiy Storchaka 989df09db2 Issue #16764: Move NEWS entry to correct section and remove too strict test. 2016-08-18 09:14:47 +03:00
Alexander Belopolsky e09594d5eb Issue #24773: Include Tallinn 1999-10-31 transition in tests.
Does not appear to be a problem anymore and I cannot figure
out why it was skipped in the first place.
2016-08-17 19:56:17 -04:00
Vinay Sajip 82df3b3071 Closes #9998: Allowed find_library to search additional locations for libraries. 2016-08-17 16:20:07 +01:00
Victor Stinner 636860354e regrtest: add a summary of the summary, "Result: xxx"
It's sometimes hard to check quickly if tests succeeded, failed or something
bad happened. I added a final "Result: xxx" line which summarizes all outputs
into a single line, written at the end (it should always be the last line of
the output).
2016-08-17 16:12:16 +02:00
Victor Stinner c5a01f8551 regrtest: set interrupted to True if re-run is interrupted 2016-08-17 16:00:12 +02:00
Victor Stinner 8f00319294 regrtest: add newlines in output for readability 2016-08-17 15:42:21 +02:00
Victor Stinner 72f25c8bc0 Merge 3.5 (socket.__all__) 2016-08-17 14:40:45 +02:00
Victor Stinner 3da57436ba Issue #27698: Add socketpair to socket.__all__ on Windows 2016-08-17 14:40:08 +02:00
Victor Stinner 798d7fbad4 Merge 3.5 (script_helper) 2016-08-17 12:38:35 +02:00
Victor Stinner 7e6977a8bc script_helper: kill the subprocess on error
If Popen.communicate() raises an exception, kill the child process to not leave
a running child process in background and maybe create a zombi process.

This change fixes a ResourceWarning in Python 3.6 when unit tests are
interrupted by CTRL+c.
2016-08-17 12:29:58 +02:00
Victor Stinner 435eaf4422 regrtest: nicer output for durations
Use milliseconds and minutes units, not only seconds.
2016-08-17 12:22:52 +02:00
Victor Stinner 6c44619ece regrtest: rename --slow option to --slowest
Thanks to optparse, --slow syntax still works ;-)
2016-08-17 11:25:43 +02:00
Victor Stinner 717a32b755 Fix typo in test_time.py 2016-08-17 11:07:21 +02:00
Raymond Hettinger 8579a8fd63 Minor readability tweak 2016-08-17 00:46:48 -07:00
Victor Stinner e3f1e8a9d3 Issue #27181: Skip tests known to fail until a fix is found 2016-08-16 22:22:21 +02:00
Raymond Hettinger 6538b430cf Issue #25628: Make namedtuple "rename" and "verbose" parameters keyword-only. 2016-08-16 10:55:43 -07:00
Gregory P. Smith c35a32fe85 Issue #26750: use inspect.isdatadescriptor instead of our own
_is_data_descriptor().
2016-08-15 23:56:32 -07:00
Gregory P. Smith d4583d7fea Issue #26750: use inspect.isdatadescriptor instead of our own
_is_data_descriptor().
2016-08-15 23:23:40 -07:00
Terry Jan Reedy f050a33ce2 Merge with 3.5 2016-08-16 01:44:31 -04:00
Terry Jan Reedy 22ba01ea55 Issue #27611: Don't import volatile attribute. 2016-08-16 01:44:12 -04:00
Benjamin Peterson cc2e80be64 merge 3.5 2016-08-15 21:44:06 -07:00
Benjamin Peterson b1c6bdc76a merge 3.4 2016-08-15 21:43:57 -07:00
Benjamin Peterson 432ea4ff37 fail when negative values are passed to instr() 2016-08-15 21:40:14 -07:00
Terry Jan Reedy f35bb9e1e9 Issue #27611, #24137: Only change tkinter when easily restored. 2016-08-16 00:10:14 -04:00
Ned Deily 46b0a3247d Update pydoc topics for 3.6.0a4 2016-08-15 16:12:59 -04:00
Guido van Rossum 0a891d70de Issue #12345: Add mathemathcal constant tau to math and cmath.
Patch by Lisa Roach. See also PEP 628.
2016-08-15 09:12:52 -07:00
Serhiy Storchaka 15f3228b7c Issue #16764: Support keyword arguments to zlib.decompress(). Patch by
Xiang Zhang.
2016-08-15 10:06:16 +03:00
Nick Coghlan d00342347e Issue #26823: Abbreviate recursive tracebacks
Large sections of repeated lines in tracebacks are now abbreviated as
"[Previous line repeated {count} more times]" by both the traceback
module and the builtin traceback rendering.

Patch by Emanuel Barry.
2016-08-15 13:11:34 +10:00
Donald Stufft 704813f1ad merge 3.5 2016-08-14 16:10:31 -04:00
Donald Stufft 80a3ba90fd merge 3.4 2016-08-14 16:10:17 -04:00
Donald Stufft 5e4aafa258 Update setuptools/pip to 25.2.0/8.1.2 2016-08-14 16:09:56 -04:00