Commit graph

18515 commits

Author SHA1 Message Date
Benjamin Peterson
f6e50b4a81 fix sending tuples to custom generator objects with yield from (closes #21209)
Debugged by Victor.
2014-04-13 23:52:01 -04:00
Benjamin Peterson
584f5cbf16 merge 3.3 2014-04-13 22:31:42 -04:00
Benjamin Peterson
156285c35f merge 3.2 2014-04-13 22:28:16 -04:00
Benjamin Peterson
99b5afab74 in scan_once, prevent the reading of arbitrary memory when passed a negative index
Bug reported by Guido Vranken.
2014-04-13 22:10:38 -04:00
R David Murray
d5aa487cce #21169: fix getpass to use replace error handler on UnicodeEncodeError.
If the input stream encoding couldn't encode one or more of the
non-ascii characters in the prompt, it would fail, throwing a
UnicodeEncodeError.  Now if that happens we re-encoding using the
'replace' error handler.

Patch by Kushal Das.
2014-04-13 22:07:39 -04:00
Yury Selivanov
0fceaf45e2 inspect.signautre: Fix functools.partial support. Issue #21117 2014-04-08 11:28:02 -04:00
Victor Stinner
1fd03a4a22 Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError if
path and sock are specified at the same time.
2014-04-07 11:18:54 +02:00
Benjamin Peterson
511e222e0a make temporary read-only files writable, so rmtree can remove them (#21128) 2014-04-04 13:55:56 -04:00
Benjamin Peterson
e331121e1f make sure to test UnicodeEncodeError, too 2014-04-02 15:51:38 -04:00
Benjamin Peterson
9b09ba1234 bail in unicode error's __str__ methods if the objects are not properly initialized (closes #21134) 2014-04-02 12:15:06 -04:00
Benjamin Peterson
24dfb05d4f make test name consistent with the rest of the file 2014-04-02 12:05:35 -04:00
Raymond Hettinger
31b26f637a Issue #18652: Add an itertools recipe for first_true() 2014-04-02 03:16:42 -07:00
Benjamin Peterson
9dc203fff9 merge 3.3 (#21082) 2014-04-01 19:18:48 -04:00
Benjamin Peterson
4717e2112b merge 3.2 (#21082) 2014-04-01 19:17:57 -04:00
Benjamin Peterson
ee5f1c13d1 remove directory mode check from makedirs (closes #21082) 2014-04-01 19:13:18 -04:00
Benjamin Peterson
809ee902c4 use https docs url 2014-03-31 13:50:34 -04:00
Benjamin Peterson
887cd7d981 merge 3.3 (#21115) 2014-03-31 13:46:45 -04:00
Benjamin Peterson
b25e3f9e6a merge 3.2 2014-03-31 13:46:26 -04:00
Benjamin Peterson
b4be376d16 use https docs url (#21115) 2014-03-31 13:44:53 -04:00
Victor Stinner
d2403a21e4 Issue #20668: Remove tests.txt of test_asyncio
It's useless, tests are now discovered automatically.
2014-03-31 17:40:06 +02:00
Eric Snow
f269cc6b14 Issue #21097: Move test_namespace_pkgs into test_importlib. 2014-03-29 15:57:44 -06:00
Ned Deily
e7d532fbc9 Issue #6676: Ensure a meaningful exception is raised when attempting
to parse more than one XML document per pyexpat xmlparser instance.
(Original patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with
suggested wording by David Gutteridge)
2014-03-27 16:39:58 -07:00
Yury Selivanov
2542b66bb0 inspect: Fix getcallargs() to fail correctly if more than 3 args are missing.
Patch by Jeremiah Lowin. Closes #20817.
2014-03-27 18:42:52 -04:00
Yury Selivanov
b1d060bf8b inspect: Fix getcallargs() to raise correct TypeError
... for missing keyword-only arguments. Patch by Jeremiah Lowin.
Closes #20816.
2014-03-27 18:23:03 -04:00
Yury Selivanov
00abf385ac asyncio.tests: Autodiscover asyncio tests. Patch by Vajrasky Kok. Closes #20668 2014-03-27 12:21:20 -04:00
Ned Deily
223082fc69 Issue #21069: Temporarily use www.google.com while investigating
test_urllibnet.test_fileno intermittent failures with www.example.com.
2014-03-27 01:39:28 -07:00
Ned Deily
944d597faa Issue #20939: remove stray character from comment 2014-03-26 23:43:26 -07:00
Ned Deily
5a507f0f05 Issue #20939: Use www.example.com instead of www.python.org to avoid test
failures when ssl is not present.
2014-03-26 23:31:39 -07:00
Ned Deily
e74153a436 Issue #20939: Backout test_urllib2.test_issue16464 disables:
68335b8afb1f 3.4
    ad0c75b7bd7d default
2014-03-26 23:26:03 -07:00
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
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
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
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
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
Richard Oudkerk
80a5be1d84 Issue #20980: Stop wrapping exception when using ThreadPool. 2014-03-23 12:30:54 +00: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
Victor Stinner
9a90243f8b Skip test_urllib2.test_issue16464() is the ssl module is missing 2014-03-19 17:31:20 +01:00
Benjamin Peterson
2a6053468e move SharedKeyTests to test_descr 2014-03-17 16:20:12 -05:00
Benjamin Peterson
df813791db correct the fix for #20637; allow slot descriptor inheritance to take place before creating cached keys 2014-03-17 15:57:17 -05:00
Ned Deily
7e7fb0374a Issue #20939: merge from 3.3 2014-03-15 13:19:20 -07:00
Ned Deily
b454742c64 Issue #20939: Fix test_geturl failure in test_urllibnet due to
new redirect of http://www.python.org/ to https://www.python.org.
2014-03-15 13:15:31 -07:00
R David Murray
d3b3bba2ed Merge: #20933: At least one place maps 'test' to 'localhost'...fix test. 2014-03-15 12:03:02 -04:00
R David Murray
fdbe918eb0 #20933: At least one place maps 'test' to 'localhost'...fix test.
Discovery and patch by Wenzhu Man.  University of Waterloo apparently
maps the local name 'test' to localhost, which is in the bypass list,
causing the test to fail.  So change 'test' to a name unlikely to get
mapped to localhost.
2014-03-15 12:00:14 -04:00
Benjamin Peterson
d0fc83d5eb merge 3.2 (#20896) 2014-03-12 18:10:47 -05:00
Benjamin Peterson
cf25c5caae use ssl.PROTOCOL_SSLv23 for maximum compatibility (closes #20896) 2014-03-12 18:05:53 -05:00
Benjamin Peterson
bb185ab332 use support.rmtree instead of shutil (closes #19614)
Patch by Sean Rodman.
2014-03-12 15:07:01 -05:00
Benjamin Peterson
8546e226bd merge 3.3 (#20896) 2014-03-12 18:10:57 -05:00
Benjamin Peterson
e8f3819567 merge 3.3 (#19614) 2014-03-12 15:07:22 -05:00
Benjamin Peterson
f31213cd65 Backed out changeset c13398566409 2014-03-12 13:14:19 -05:00