Commit Graph

22691 Commits

Author SHA1 Message Date
Serhiy Storchaka 63dc548109 Issue #28086: Single var-positional argument of tuple subtype was passed
unscathed to the C-defined function.  Now it is converted to exact tuple.
2016-09-22 19:41:20 +03:00
Christian Heimes 5ed548715a Make Lib/test/ssltests.py more useful and faster for OpenSSL testing 2016-09-22 16:49:51 +02:00
Christian Heimes 55b196a1e4 Make Lib/test/ssltests.py more useful and faster for OpenSSL testing 2016-09-22 16:49:35 +02:00
Martin Panter 3217b1243e Merge socketserver fixes from 3.5 into 3.6 2016-09-22 10:33:51 +00:00
Martin Panter f3b0639417 Issue #27348: Merge exception formatting fix from 3.5 into 3.6 2016-09-22 10:33:21 +00:00
Martin Panter 463ef2b3cf Fix references to Python 3’s socketserver (lowercase) module 2016-09-22 09:37:56 +00:00
Martin Panter bb8b1cb6af Issue #27348: Restore “Exception: None” formatting in traceback module
This fixes a regression caused by revision 73afda5a4e4c. Also reverts the
decimal test workaround added in revision 5f3dd0a2b1ab.

Remove test_without_exception(). According to revision ecaafc32c500, this was
added in Python 2 so that print_exc() would output “None” when called with no
exception set. However print_exc() never worked like this in Python 3, and
the use case is not documented.

Restore TracebackCases class name (instead of SyntaxTracebackCases), because
the class also tests other exceptions.
2016-09-22 09:37:39 +00:00
Serhiy Storchaka e3d504090c Extend the test to lower pickle protocols. 2016-09-22 11:42:38 +03:00
Serhiy Storchaka 92bb90a9ff Extend the test to lower pickle protocols. 2016-09-22 11:39:25 +03:00
Serhiy Storchaka afd02a439f Issue #28214: Now __set_name__ is looked up on the class instead of the
instance.
2016-09-21 15:54:59 +03:00
Victor Stinner 1c56bf0bad Merge 3.5 2016-09-21 09:16:31 +02:00
Victor Stinner 0256f42839 test_asynico: fix test_sock_connect_sock_write_race()
Issue #28176: Increase timeout from 10 seconds to 60 seconds.
2016-09-21 09:15:36 +02:00
Raymond Hettinger 6692f01c91 merge 2016-09-18 21:46:08 -07:00
Raymond Hettinger 7eb1becc25 Issue #28189: dictitems_contains no longer swallows compare errors.
(Patch by Xiang Zhang)
2016-09-18 21:45:11 -07:00
Victor Stinner 254ad58c07 Fix test_huntrleaks_fd_leak() of test_regrtest
Issue #28195: Don't expect the fd leak message to be on a specific line number,
just make sure that the line is present in the output.
2016-09-19 00:11:30 +02:00
Ethan Furman 3515dcce80 issue23591: fix flag decomposition and repr 2016-09-18 13:15:41 -07:00
Berker Peksag 9a7bbb2e3f Issue #25400: RobotFileParser now correctly returns default values for crawl_delay and request_rate
Initial patch by Peter Wirtz.
2016-09-18 20:17:58 +03:00
Berker Peksag 5a5ae745ff Issue #26610: Skip test_with_pip if _ctypes is not available in OpenIndiana 2016-09-18 14:52:25 +03:00
Berker Peksag bf3c1c3235 Issue #28075: Fix test_access_denied in Python 3.5
I forgot there two variations of os.stat() in Python 3.5.
2016-09-18 13:56:29 +03:00
Berker Peksag 2a8d7f1c47 Issue #28151: Use pythontest.net in test_robotparser 2016-09-18 11:21:57 +03:00
Berker Peksag a7b1058c17 Issue #28176: Merge from 3.5 2016-09-18 01:07:30 +03:00
Berker Peksag bdcc8f9d1b Issue #28176: Increase timeout for test_sock_connect_sock_write_race 2016-09-18 01:06:50 +03:00
Steve Dower 6dd8eca4a9 Issue #28192: Adds tests for hook in isolated mode 2016-09-17 14:35:32 -07:00
Berker Peksag 5d625cff07 Issue #26384: Merge from 3.5 2016-09-17 23:23:13 +03:00
Berker Peksag bcfb35f80d Issue #26384: Fix UnboundLocalError in socket._sendfile_use_sendfile 2016-09-17 23:22:06 +03:00
Steve Dower 313523ce2d Issue #28192: Don't import readline in isolated mode 2016-09-17 12:22:41 -07:00
Berker Peksag 9a1c91a10d Fix test_access_denied in 3.5 2016-09-17 16:20:55 +03:00
Berker Peksag 052e4f18c4 Issue #28075: Merge from 3.5 2016-09-17 15:51:14 +03:00
Berker Peksag 0b4dc4846b Issue #28075: Check for ERROR_ACCESS_DENIED in Windows implementation of os.stat()
Patch by Eryk Sun.
2016-09-17 15:49:59 +03:00
Serhiy Storchaka abf275af58 Issue #22493: Warning message emitted by using inline flags in the middle of
regular expression now contains a (truncated) regex pattern.
Patch by Tim Graham.
2016-09-17 01:29:58 +03:00
Berker Peksag 7b4bcd2004 Issue #25270: Merge from 3.5 2016-09-16 17:32:06 +03:00
Berker Peksag 4a72a7b6c4 Issue #25270: Prevent codecs.escape_encode() from raising SystemError when an empty bytestring is passed 2016-09-16 17:31:06 +03:00
Berker Peksag f8479eeb34 Issue #25895: Merge from 3.5 2016-09-16 14:45:15 +03:00
Berker Peksag f676748a05 Issue #25895: Enable WebSocket URL schemes in urllib.parse.urljoin
Patch by Gergely Imreh and Markus Holtermann.
2016-09-16 14:43:58 +03:00
Martin Panter 355bbb0a2a Issue #28145: Merge spelling fixes from 3.5 into 3.6 2016-09-16 00:55:27 +00:00
Martin Panter 2dc77f0e19 Issue #28145: Spelling fixes 2016-09-16 00:46:05 +00:00
Yury Selivanov 993b6f5c7b Merge 3.5 (issue #27759) 2016-09-15 19:31:33 -04:00
Yury Selivanov 525aedc5fa Issue #27759: Fix selectors incorrectly retain invalid file descriptors.
Patch by Mark Williams.
2016-09-15 19:30:42 -04:00
Yury Selivanov 50fe7114ae Merge 3.5 (issue #28176) 2016-09-15 17:58:15 -04:00
Yury Selivanov d6c6771fc9 Issue #28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect. 2016-09-15 17:56:36 -04:00
Yury Selivanov b76968be0d Merge 3.5 (asyncio, issue #26909) 2016-09-15 16:52:41 -04:00
Yury Selivanov 4c5bf3bc52 Issue #26909: Fix slow pipes IO in asyncio.
Patch by INADA Naoki.
2016-09-15 16:51:48 -04:00
Yury Selivanov 62b81c33d1 Merge 3.5 (issue #26654) 2016-09-15 16:01:35 -04:00
Yury Selivanov 45dccdad93 Issue #26654: Inspect functools.partial in asyncio.Handle.__repr__.
Patch by iceboy.
2016-09-15 15:58:15 -04:00
Yury Selivanov 1b984ffd44 Merge 3.5 (issue #28174) 2016-09-15 15:46:16 -04:00
Yury Selivanov 5587d7c071 Issue #28174: Handle when SO_REUSEPORT isn't properly supported (asyncio)
Patch by Seth Michael Larson.
2016-09-15 15:45:07 -04:00
Yury Selivanov d070154fb5 Merge 3.5 (issue #27906) 2016-09-15 14:14:48 -04:00
Yury Selivanov a1b0e7db73 Issue #27906: Fix socket accept exhaustion during high TCP traffic.
Patch by Kevin Conway.
2016-09-15 14:13:15 -04:00
Berker Peksag 4af23d7ddd Use requires_os_func() to skip SpawnTests 2016-09-15 20:32:44 +03:00
Berker Peksag 47e7062f76 Make SpawnTest.create_args() keyword-only 2016-09-15 20:23:55 +03:00
Berker Peksag 8181646931 Issue #28114: Fix a crash in parse_envlist() when env contains byte strings
Patch by Eryk Sun.
2016-09-15 20:19:47 +03:00
Yury Selivanov 8987c9d219 Issue #26182: Raise DeprecationWarning for improper use of async/await keywords 2016-09-15 12:50:23 -04:00
Benjamin Peterson 6775231597 Unicode 9.0.0
Not completely mechanical since support for East Asian Width changes—emoji
codepoints became Wide—had to be added to unicodedata.
2016-09-14 23:53:47 -07:00
Serhiy Storchaka 62a1f024b4 Issue #27599: Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp(). 2016-09-14 16:37:34 +03:00
Serhiy Storchaka e6265e92bf Issue #27599: Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp(). 2016-09-14 16:34:37 +03:00
Victor Stinner 4659ccff70 Issue #28114: Add unit tests on os.spawn*() 2016-09-14 10:57:00 +02:00
Berker Peksag 8ee9edbf45 Issue #28131: Merge from 3.5 2016-09-14 08:10:45 +03:00
Berker Peksag 4aa74c429c Issue #28131: Fix a regression in zipimport's compile_source()
zipimport should use the same optimization level as the interpreter.
2016-09-14 08:09:48 +03:00
Victor Stinner d0ad11f6b4 Fix _PyDict_Pop() on pending key
Issue #28120: Fix dict.pop() for splitted dictionary when trying to remove a
"pending key" (Not yet inserted in split-table).

Patch by Xiang Zhang.
2016-09-13 16:56:38 +02:00
Benjamin Peterson 4ce9e7a14a merge 3.5 2016-09-12 22:09:39 -07:00
Berker Peksag ac2d1c7153 Issue #27952: Capture stderr in run_script() 2016-09-13 07:55:54 +03:00
Christian Heimes 6d6602ced2 Issue #27322: back out the commit. needs to be addressed after beta1. 2016-09-12 15:22:25 +02:00
Christian Heimes 139652100e Issue #27322: skip test_compile_path when sys.path is not writeable. 2016-09-12 15:08:32 +02:00
Christian Heimes 4d9a72902d merge 2016-09-12 10:48:55 +02:00
Christian Heimes 9017ec1ea0 Issue #28093: Check more invalid combinations of PROTOCOL_TLS_CLIENT / PROTOCOL_TLS_SERVER 2016-09-12 10:48:20 +02:00
Raymond Hettinger 0d5048cb21 Issue #17941: Add a *module* parameter to collections.namedtuple() 2016-09-12 00:18:31 -07:00
Raymond Hettinger 11fa3ffcb1 merge 2016-09-11 23:23:24 -07:00
Raymond Hettinger 076366c2a5 Issue #17582: xml.etree.ElementTree nows preserves whitespaces in attributes
(Patch by Duane Griffin.  Reviewed and approved by Stefan Behnel.)
2016-09-11 23:18:03 -07:00
Ned Deily 8a2150aae6 Issue #28095: Temporarily disable part of test_startup_imports on OS X. 2016-09-12 00:26:20 -04:00
Steve Dower a3222b8424 Fixes test_getargs2 to get the buildbots working again. 2016-09-11 19:43:51 -07:00
Yury Selivanov 966321e236 Merge 3.5 (asyncio) 2016-09-11 21:11:19 -04:00
Yury Selivanov a05a6ef1ca asyncio: Add set_protocol / get_protocol methods to Transports 2016-09-11 21:11:02 -04:00
Eric V. Smith 35a24c5a43 Add another f-string comment test, to make sure # are being caught in the right place. 2016-09-11 19:01:22 -04:00
Eric V. Smith 09835dcdbb Make an f-string error message more exact and consistent. 2016-09-11 18:58:20 -04:00
Guido van Rossum 0a6976da10 Issue #28079: Update typing and test typing from python/typing repo.
Ivan Levkivskyi (3.5 version)
2016-09-11 15:34:56 -07:00
Guido van Rossum 7ac1f7d269 Issue #28079: Update typing and test typing from python/typing repo.
Ivan Levkivskyi (3.6 version)
2016-09-11 15:31:27 -07:00
Christian Heimes 5fe668c672 Issue #28085: Add PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER for SSLContext 2016-09-12 00:01:11 +02:00
Serhiy Storchaka b72810583e Issue #27213: Fixed different issues with reworked CALL_FUNCTION* opcodes.
* BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK_WITH_CALL no longer generated with
  single tuple or dict.
* Restored more informative error messages for incorrect var-positional and
  var-keyword arguments.
* Removed code duplications in _PyEval_EvalCodeWithName().
* Removed redundant runtime checks and parameters in _PyStack_AsDict().
* Added a workaround and enabled previously disabled test in test_traceback.
* Removed dead code from the dis module.
2016-09-12 00:52:40 +03:00
R David Murray 29097d5a6a Merge: #19003: Only replace \r and/or \n line endings in email.generator. 2016-09-11 17:23:33 -04:00
R David Murray 0e0cfd7135 #19003: Only replace \r and/or \n line endings in email.generator.
This is a further restoration of backward compatibility, as well as
being correct per the RFCs.
2016-09-11 17:22:56 -04:00
Christian Heimes 727cc9337f Issue #28022: Catch another deprecation warning in imaplib 2016-09-11 22:47:02 +02:00
Xavier de Gaye fda8961115 Issue #27917: Fix test_triplet_in_ext_suffix for the 'x86' Android platform. 2016-09-11 21:39:17 +02:00
Christian Heimes e084f84a66 Issue 27744: test_aes_cbc is blocking x86-64 Ubuntu 15.10 Skylake CPU 3.x for a while. Require Kernel 4.3+ for now 2016-09-11 20:11:30 +02:00
Christian Heimes 49aed7b782 Issue #28078: Add missing colon 2016-09-11 20:03:46 +02:00
Christian Heimes 8d14abc800 Issue 28022: Catch deprecation warning in test_httplib, reported by Martin Panter 2016-09-11 19:54:43 +02:00
Christian Heimes 02b3035bc3 Issue #28078: Silence resource warnings in test_socket. Initial patch by Xiang Zhang, thanks 2016-09-11 19:49:56 +02:00
Guido van Rossum 015d874626 Issue #28076: Variable annotations should be mangled for private names.
By Ivan Levkivskyi.
2016-09-11 09:45:24 -07:00
Eric V. Smith 605bdae078 Issue 24454: Improve the usability of the re match object named group API 2016-09-11 08:55:43 -04:00
Berker Peksag a3c1728bb6 Use HTTP in testPythonOrg 2016-09-11 15:46:47 +03:00
Berker Peksag 966ad74bf9 Unskip testPythonOrg in test_robotparser
We should probably use pythontest.net for this.
2016-09-11 15:27:07 +03:00
Berker Peksag 2a9f5edeeb Wrap testPasswordProtectedSite with @reap_threads 2016-09-11 15:17:53 +03:00
Berker Peksag 4da0fd06ce Issue #25497: Rewrite test_robotparser to use a class based design 2016-09-11 14:53:16 +03:00
Serhiy Storchaka 5f1a5187f7 Use sequence repetition instead of bytes constructor with integer argument. 2016-09-11 14:41:02 +03:00
Martin Panter bdb847ae99 Issue #27952: Merge fixcid.py from 3.5 2016-09-11 10:06:38 +00:00
Serhiy Storchaka bd48d27944 Issue #22493: Inline flags now should be used only at the start of the
regular expression.  Deprecation warning is emitted if uses them in the
middle of the regular expression.
2016-09-11 12:50:02 +03:00
Martin Panter b7665386bc Issue #27952: Get fixcid.py working with the re module 2016-09-11 09:32:26 +00:00
Serhiy Storchaka 352601ca00 Issue #26885: xmlrpc now supports unmarshalling additional data types used
by Apache XML-RPC implementation for numerics and None.
2016-09-11 11:23:38 +03:00
Ethan Furman c16595e567 issue23591: add auto() for auto-generating Enum member values 2016-09-10 23:36:59 -07:00
Nick Coghlan 944368e1cc Issue #23722: Initialize __class__ from type.__new__()
The __class__ cell used by zero-argument super() is now initialized
from type.__new__ rather than __build_class__, so class methods
relying on that will now work correctly when called from metaclass
methods during class creation.

Patch by Martin Teichmann.
2016-09-11 14:45:49 +10:00
Serhiy Storchaka cc66a6528d Backported tests for issue #28070. 2016-09-11 01:39:51 +03:00
Serhiy Storchaka d65cd091e9 Issue #28070: Fixed parsing inline verbose flag in regular expressions. 2016-09-11 01:39:01 +03:00
Christian Heimes 99a6570295 Issue #19500: Add client-side SSL session resumption to the ssl module. 2016-09-10 23:44:53 +02:00
Christian Heimes d04863771b Issue #28022: Deprecate ssl-related arguments in favor of SSLContext.
The deprecation include manual creation of SSLSocket and certfile/keyfile
(or similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib.

ssl.wrap_socket() is not marked as deprecated yet.
2016-09-10 23:23:33 +02:00
Christian Heimes 358cfd426c Issue 28043: SSLContext has improved default settings
The options OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE, OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE, OP_NO_SSLv2 (except for PROTOCOL_SSLv2), and OP_NO_SSLv3 (except for PROTOCOL_SSLv3) are set by default. The initial cipher suite list contains only HIGH ciphers, no NULL ciphers and MD5 ciphers (except for PROTOCOL_SSLv2).
2016-09-10 22:43:48 +02:00
Steve Dower c5111b5b1f Closes #28059: Fixes test_platform to set PYTHONPATH for .pyd files 2016-09-10 12:25:07 -07:00
Steve Dower 109bc3aa73 Closes #28059: Fixes test_platform to set PYTHONPATH for .pyd files 2016-09-10 12:19:42 -07:00
Serhiy Storchaka b0d497c072 Issue #24693: Changed some RuntimeError's in the zipfile module to more
appropriate types. Improved some error messages and debugging output.
2016-09-10 21:28:07 +03:00
Martin Panter 99e843b48e Correct spelling in documentation and code comment 2016-09-10 10:38:28 +00:00
Victor Stinner 0fc55a234f test_platform: Save/restore os.environ on Windows 2016-09-10 06:24:47 -04:00
Nick Coghlan b161562f72 Issue #17909: Accept binary input in json.loads
json.loads (and hence json.load) now support binary input
encoded as UTF-8, UTF-16 or UTF-32.

Patch by Serhiy Storchaka.
2016-09-10 20:16:18 +10:00
Nick Coghlan 457fc9a69e Issue #27137: align Python & C implementations of functools.partial
The pure Python fallback implementation of functools.partial
now matches the behaviour of its accelerated C counterpart for
subclassing, pickling and text representation purposes.

Patch by Emanuel Barry and Serhiy Storchaka.
2016-09-10 20:00:02 +10:00
Victor Stinner eddc4b7272 Merge 3.5 (regrtest) 2016-09-10 04:27:56 -04:00
Victor Stinner c7a070e998 regrtest: accept options after test names 2016-09-10 04:27:28 -04:00
Victor Stinner c50cccfcc3 test_eintr: Fix ResourceWarning warnings 2016-09-10 04:19:48 -04:00
Serhiy Storchaka 8f9cafad3d Issue #28019: itertools.count() no longer rounds non-integer step in range
between 1.0 and 2.0 to 1.
2016-09-10 09:53:51 +03:00
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
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
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
Ł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
Zachary Ware 5272868e1f Rename test_strlit -> test_string_literals 2016-09-09 16:15:03 -07: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
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
Guido van Rossum 7b3b3dc85d Merge asyncio upstream. 2016-09-09 14:26:31 -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
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
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 6d5cf8a73e Fixes expected error when getting encoding while shutting down. 2016-09-09 09:21:01 -07: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
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
Eric Snow 4f29e75289 Issue #24254: Drop cls.__definition_order__. 2016-09-08 15:11:11 -07: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
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
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
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
Benjamin Peterson cbef66d711 suppress stderr output when checking gdb (closes #27969) 2016-09-06 10:06:31 -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 f0f1c239e4 Issue 27936: Fix inconsistent round() behavior between float and int 2016-09-03 01:55:11 -07: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 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
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
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
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
Vinay Sajip db8f46321f Added back test code lost during merge. 2016-09-08 01:37:03 +01: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