Commit graph

43198 commits

Author SHA1 Message Date
Victor Stinner
87d13ea56d Issue #21058: fix typo in a comment. Patch written by Vajrasky Kok. 2014-03-25 18:19:17 +01:00
Victor Stinner
ea7db8c78a Merge 3.4 2014-03-25 12:51:08 +01:00
Victor Stinner
b60ac7acfb Issue #21038: Use monotonic clock to compute timeout, not the system clock 2014-03-25 12:50:50 +01:00
Victor Stinner
6f20b7c473 Issue #21038: Cleanup test_epoll.py
Remove useless test and unused variables. Initial patch by Andreas Schwab.
2014-03-25 12:49:53 +01:00
Victor Stinner
75fd575402 (Merge 3.4) Issue #21058: Fix a leak of file descriptor in
tempfile.NamedTemporaryFile(), close the file descriptor if io.open() fails
2014-03-25 09:19:14 +01:00
Victor Stinner
1f99f9d5c2 Issue #21058: Fix a leak of file descriptor in tempfile.NamedTemporaryFile(),
close the file descriptor if io.open() fails
2014-03-25 09:18:04 +01:00
Charles-François Natali
1d29cc5b6c Issue #21040: socketserver: Use the selectors module. 2014-03-24 22:25:39 +00:00
Donald Stufft
17dcf7531c Merge the patch for issue #21013 into default 2014-03-23 19:12:13 -04:00
Donald Stufft
6a2ba94908 Issue #21013: Enhance ssl.create_default_context() for server side contexts
Closes #21013 by modfying ssl.create_default_context() to:

* Move the restricted ciphers to only apply when using
  ssl.Purpose.CLIENT_AUTH. The major difference between restricted and not
  is the lack of RC4 in the restricted. However there are servers that exist
  that only expose RC4 still.
* Switches the default protocol to ssl.PROTOCOL_SSLv23 so that the context
  will select TLS1.1 or TLS1.2 if it is available.
* Add ssl.OP_NO_SSLv3 by default to continue to block SSL3.0 sockets
* Add ssl.OP_SINGLE_DH_USE and ssl.OP_SINGLE_ECDG_USE to improve the security
  of the perfect forward secrecy
* Add ssl.OP_CIPHER_SERVER_PREFERENCE so that when used for a server side
  socket the context will prioritize our ciphers which have been carefully
  selected to maximize security and performance.
* Documents the failure conditions when a SSL3.0 connection is required so
  that end users can more easily determine if they need to unset
  ssl.OP_NO_SSLv3.
2014-03-23 19:05:28 -04:00
R David Murray
e1b6f97dae #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.
Previously a non-string, non-regex second argument could cause the test
to always pass.

Initial patch by Kamilla Holanda.
2014-03-23 15:08:43 -04:00
Richard Oudkerk
91e7f04fc5 Merge 3.4. 2014-03-23 18:53:53 +00:00
Richard Oudkerk
99d8dd2489 Issue #20990: Correction for 619331c67638. 2014-03-23 18:44:11 +00:00
R David Murray
2791e0d4e3 Merge #20976: remove unneeded quopri import in email.utils. 2014-03-23 14:24:44 -04:00
R David Murray
95a8dfb924 #20976: remove unneeded quopri import in email.utils. 2014-03-23 14:18:44 -04:00
Richard Oudkerk
1811687122 Merge 3.4. 2014-03-23 12:53:48 +00:00
Richard Oudkerk
c346060440 Merge 3.3. 2014-03-23 12:52:16 +00:00
Richard Oudkerk
3e952d56ea Issue #20633: Replace relative import by absolute import. 2014-03-23 12:42:28 +00:00
Richard Oudkerk
af2bdbe4f8 Merge 3.4. 2014-03-23 12:32:12 +00:00
Richard Oudkerk
80a5be1d84 Issue #20980: Stop wrapping exception when using ThreadPool. 2014-03-23 12:30:54 +00:00
Richard Oudkerk
bd153de4a4 Merge 3.4. 2014-03-23 11:57:01 +00:00
Richard Oudkerk
a40675a1a2 Issue #20990: Fix issues found by pyflakes for multiprocessing. 2014-03-23 11:54:15 +00:00
Antoine Pitrou
39b7fce82d Issue #21015: SSL contexts will now automatically select an elliptic curve for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to "prime256v1".
(should also fix a buildbot failure introduced by #20995)
2014-03-22 18:14:57 +01:00
Antoine Pitrou
0bebbc33fa Issue #21015: SSL contexts will now automatically select an elliptic curve for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to "prime256v1".
(should also fix a buildbot failure introduced by #20995)
2014-03-22 18:13:50 +01:00
Benjamin Peterson
940e207412 improve the command-line interface of json.tool (closes #21000)
A patch from Berker Peksag.
2014-03-21 23:17:29 -05:00
Donald Stufft
71b4192e15 Merge changes from 3.4 to bring in fixes for Issue #20995 2014-03-21 21:38:50 -04:00
Donald Stufft
79ccaa2cad Issue #20995: Enhance default ciphers used by the ssl module
Closes #20995 by Enabling better security by prioritizing ciphers
such that:

* Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)
* Prefer ECDHE over DHE for better performance
* Prefer any AES-GCM over any AES-CBC for better performance and security
* Then Use HIGH cipher suites as a fallback
* Then Use 3DES as fallback which is secure but slow
* Finally use RC4 as a fallback which is problematic but needed for
  compatibility some times.
* Disable NULL authentication, NULL encryption, and MD5 MACs for security
  reasons
2014-03-21 21:33:34 -04:00
Brett Cannon
33a4000374 Issue #20627: xmlrpc.client.ServerProxy is now a context manager.
Patch by Claudiu Popa.
2014-03-21 11:24:40 -04:00
Brett Cannon
5d8a2444bf Merge for issue #20884 2014-03-21 11:01:02 -04:00
Brett Cannon
a00c2407ca Issue #20884: Don't assume in importlib.__init__ that __file__ is
defined.
2014-03-21 10:58:33 -04:00
Brett Cannon
a77d0c36e5 Issue #19165: The formatter module graduates to full deprecation. 2014-03-21 10:52:33 -04:00
Ethan Furman
9ab748013b Issue19995: more informative error message; spelling corrections; use operator.mod instead of __mod__ 2014-03-21 06:38:46 -07:00
Brett Cannon
46f484ee4e merge 2014-03-21 11:02:10 -04:00
Victor Stinner
93569c2b3d asyncio: Ensure call_soon(), call_later() and call_at() are invoked on current
loop in debug mode. Raise a RuntimeError if the event loop of the current
thread is different.  The check should help to debug thread-safetly issue.
Patch written by David Foster.
2014-03-21 10:00:52 +01:00
Victor Stinner
87bbefe113 asyncio: Ensure call_soon(), call_later() and call_at() are invoked on current
loop in debug mode. Raise a RuntimeError if the event loop of the current
thread is different.  The check should help to debug thread-safetly issue.
Patch written by David Foster.
2014-03-21 10:00:52 +01:00
Benjamin Peterson
ee6bdc07d6 remove the ability of datetime.time to be considered false (closes #13936) 2014-03-20 18:00:35 -05:00
Giampaolo Rodola'
265ae86414 merge heads 2014-03-20 21:44:53 +01:00
Giampaolo Rodola'
f97e82937f Fix issue 18931: selectors module now supports /dev/poll on Solaris. 2014-03-20 21:43:41 +01:00
Andrew Kuchling
a0934b2c1b #20744: don't try running an external 'zip' in shutil.make_archive()
Instead we'll just use the stdlib zipfile module.  Patch by Derek Chiang
2014-03-20 16:11:16 -04:00
Zachary Ware
9636e98b18 Merge several minor doc fixes from 3.4 2014-03-20 11:28:16 -05:00
Zachary Ware
a22ae21db6 Fix parameter name in docs for os.makedirs and os.removedirs.
Pointed out by Colin Davis on docs@.
2014-03-20 09:42:01 -05:00
Raymond Hettinger
ad5e5ea9bb merge 2014-03-20 06:44:33 -07:00
Raymond Hettinger
d852e997f4 Clean-up docstring 2014-03-20 06:42:31 -07:00
Vinay Sajip
ab405d5575 Closes #20444: Merged fix from 3.4. 2014-03-20 13:15:23 +00:00
Vinay Sajip
b1698d4030 Issue #20444: Reduced code duplication. 2014-03-20 13:14:39 +00:00
Vinay Sajip
6d5cde6a4b Closes #20558: Improved implementation of error handling. 2014-03-20 13:06:07 +00:00
Vinay Sajip
71dcb28d1c Issue #20558: Improved implementation of error handling. 2014-03-20 13:03:17 +00:00
Victor Stinner
03ce1c013d (Merge 3.4) Issue #20976: pyflakes: Remove unused imports 2014-03-20 09:22:39 +01:00
Victor Stinner
7fa767e517 Issue #20976: pyflakes: Remove unused imports 2014-03-20 09:16:38 +01:00
Victor Stinner
a69f0f94d3 (Merge 3.4) Issue #20978: pyflakes: fix undefined names; remove last part of
OS/2 support in distutils
2014-03-20 08:51:24 +01:00
Victor Stinner
69b1e261fc Issue #20978: pyflakes: fix undefined names 2014-03-20 08:50:52 +01:00