Commit Graph

17529 Commits

Author SHA1 Message Date
Antoine Pitrou c1b78419e6 Backout e3ec6b17260c after Guido's fix 2013-10-20 02:09:08 +02:00
Antoine Pitrou d20afad7d4 Issue #19305: try to fix sporadic test_asyncio failure on FreeBSD 10.0 2013-10-20 01:51:25 +02:00
Antoine Pitrou 0d9eefda34 Try to fix test_asyncio dual stack test when creating an IPv6 socket fails 2013-10-20 01:10:52 +02:00
Benjamin Peterson 3d9e481ece give explicitly global functions and classes a global __qualname__ (closes #19301) 2013-10-19 16:01:13 -04:00
Larry Hastings f5e987bbe6 Issue #18606: Add the new "statistics" module (PEP 450). Contributed
by Steven D'Aprano.
2013-10-19 11:50:09 -07:00
Serhiy Storchaka eaea5e9107 Issue #12866: The audioop module now supports 24-bit samples. 2013-10-19 21:10:46 +03:00
Christian Heimes 0fbd94ced9 Issue #18582: skip test of _hashlib.pbkdf2_hmac if OpenSSL is not available or too old 2013-10-19 19:40:49 +02:00
Serhiy Storchaka 55e092f545 Issue #19279: UTF-7 decoder no more produces illegal strings. 2013-10-19 20:39:28 +03:00
Serhiy Storchaka 35804e4c63 Issue #19279: UTF-7 decoder no more produces illegal strings. 2013-10-19 20:38:19 +03:00
Guido van Rossum 3743711a96 Disable some subprocess tests that hang on AIX.
See http://bugs.python.org/issue19293
2013-10-19 09:10:13 -07:00
Guido van Rossum 7058dad0bd Skip the asyncio tests when threads are not available.
See http://bugs.python.org/issue19295
2013-10-19 08:47:26 -07:00
Nick Coghlan 8608d26e81 contextlib doc updates and refactoring
- explain single use, reusable and reentrant in docs
- converted suppress to a reentrant class based impl
- converted redirect_stdout to a reusable impl
- moved both suppress and redirect_stdout behind a functional
  facade
- added reentrancy tests for the updated suppress
- added reusability tests for the updated redirect_stdio
- slightly cleaned up an exception from contextmanager
2013-10-20 00:30:51 +10:00
Christian Heimes 3626a505db Issue #19254: Provide an optimized Python implementation of PBKDF2_HMAC 2013-10-19 14:12:02 +02:00
Guido van Rossum 355491dc47 Write flow control for asyncio (includes asyncio.streams overhaul). 2013-10-18 15:17:11 -07:00
Guido van Rossum 051a331488 Relax some asyncio test timeouts (http://bugs.python.org/issue19285). 2013-10-18 15:15:56 -07:00
Nadeem Vawda ee1be99e05 Issue #19222: Add support for the 'x' mode to the gzip module.
Original patch by Tim Heaney.
2013-10-19 00:11:13 +02:00
Nadeem Vawda 8a9e99cffc Issue #19223: Add support for the 'x' mode to the bz2 module.
Patch by Tim Heaney and Vajrasky Kok.
2013-10-19 00:11:06 +02:00
Nadeem Vawda 42ca98217c Issue #19201: Add support for the 'x' mode to the lzma module.
Patch by Tim Heaney and Vajrasky Kok.
2013-10-19 00:06:19 +02:00
Brett Cannon c516815353 Fix test to not consider mixin a standalone test 2013-10-18 16:55:15 -04:00
Brett Cannon 1340049f65 Issue #16803: Move test_importlib.test_util to use both frozen and
source code.
2013-10-18 15:40:11 -04:00
Brett Cannon 6a57dd8635 Issue #16803: Have test_importlib.test_locks use frozen and source
code.
2013-10-18 15:12:21 -04:00
Brett Cannon af002e6482 merge 2013-10-18 11:39:32 -04:00
Brett Cannon 27e27f7ee1 Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd
and stop importlib.machinery.FileFinder treating '' as '.'.

Previous PathFinder transformed '' into '.' which led to __file__ for
modules imported from the cwd to always be relative paths. This meant
the values of the attribute were wrong as soon as the cwd changed.
This change now means that as long as the site module is run (which
makes all entries in sys.path absolute) then all values for __file__
will also be absolute unless it's for __main__ when specified by file
path in a relative way (modules imported by runpy will have an
absolute path).

Now that PathFinder is no longer treating '' as '.' it only makes
sense for FileFinder to stop doing so as well. Now no transformation
is performed for the directory given to the __init__ method.

Thanks to Madison May for the initial patch.
2013-10-18 11:39:04 -04:00
Guido van Rossum 57497ad181 Rename Transport.pause/resume to pause_reading/pause_writing. Also relax timeout in test_call_later(). 2013-10-18 07:58:20 -07:00
Brett Cannon 40b22d0661 Issue #16803: test.test_importlib.test_api now runs under frozen and
source.
2013-10-18 10:45:59 -04:00
Nick Coghlan 3321fb8e3a Issue #16129: this should appease the buildbots 2013-10-18 23:59:58 +10:00
Richard Oudkerk 8acc3c574a Remove test_sigterm(). 2013-10-18 14:42:56 +01:00
Ethan Furman 63c141cacd Close #19030: inspect.getmembers and inspect.classify_class_attrs
Order of search is now:
  1. Try getattr
  2. If that throws an exception, check __dict__ directly
  3. If still not found, walk the mro looking for the eldest class that has
     the attribute (e.g. things returned by __getattr__)
  4. If none of that works (e.g. due to a buggy __dir__, __getattr__, etc.
     method or missing __slot__ attribute), ignore the attribute entirely.
2013-10-18 00:27:39 -07:00
Guido van Rossum fc29e0f37e Rename the logger to plain "logger". 2013-10-17 15:39:45 -07:00
Ned Deily b795aa8547 Issue #19275: Fix test_site failure on OS X due to typo. 2013-10-17 15:21:40 -07:00
Guido van Rossum 5ea7f93dcd Make asyncio tests run on Windows. 2013-10-17 14:23:17 -07:00
Guido van Rossum 27b7c7ebf1 Initial checkin of asyncio package (== Tulip, == PEP 3156). 2013-10-17 13:40:50 -07:00
Nick Coghlan 8f9571e70e Skip #16129 test until I debug cross-platform issues 2013-10-18 01:46:19 +10:00
Nick Coghlan 6508dc5f06 Try to debug overspecified test :( 2013-10-18 01:44:22 +10:00
Richard Oudkerk cc5c728513 Fix signal handler in test. 2013-10-17 15:22:10 +01:00
Nick Coghlan 240f86d7dd Close #19266: contextlib.ignore -> contextlib.suppress
Patch by Zero Piraeus.
2013-10-17 23:40:57 +10:00
Richard Oudkerk 1e2f67c05f Try doing a raw test of os.fork()/os.kill(). 2013-10-17 14:24:06 +01:00
Nick Coghlan 7d270ee05d Issue #16129: Add `Py_SetStandardStreamEncoding`
This new pre-initialization API allows embedding
applications like Blender to force a particular
encoding and error handler for the standard IO streams.

Also refactors Modules/_testembed.c to let us start
testing multiple embedding scenarios.

(Initial patch by Bastien Montagne)
2013-10-17 22:35:35 +10:00
Richard Oudkerk 26f92680da Stop trying to use strace, but add a sleep before terminate(). 2013-10-17 13:56:18 +01:00
Christian Heimes 86823a52fc Issue #19275: Fix test_site on AMD64 Snow Leopard 2013-10-17 13:40:00 +02:00
Richard Oudkerk e4508eebb4 Try strace instead of gdb to see what wedged child is doing. 2013-10-17 12:10:45 +01:00
Serhiy Storchaka a3cf1aa864 Merge heads 2013-10-17 12:48:32 +03:00
Serhiy Storchaka b5f8a5e134 Issue 19276: Fix tests for wave files on big-endian platforms.
Skip tests for 24-bit wave file on big-endian platforms.
2013-10-17 12:46:53 +03:00
Serhiy Storchaka c955291a05 Issue 19276: Fix tests for wave files on big-endian platforms.
Skip tests for 24-bit wave file on big-endian platforms.
2013-10-17 12:46:00 +03:00
Richard Oudkerk d44500affe Try to print a backtrace of wedged child process in test. 2013-10-17 10:38:37 +01:00
R David Murray 3da240fd01 #18891: Complete new provisional email API.
This adds EmailMessage and, MIMEPart subclasses of Message
with new API methods, and a ContentManager class used by
the new methods.  Also a new policy setting, content_manager.

Patch was reviewed by Stephen J. Turnbull and Serhiy Storchaka,
and reflects their feedback.

I will ideally add some examples of using the new API to the
documentation before the final release.
2013-10-16 22:48:40 -04:00
Ethan Furman 1a16288197 Close #19252: better test coverage for Enum. Thanks, CliffM 2013-10-16 19:09:31 -07:00
Richard Oudkerk b1694cf588 Issue #18999: Make multiprocessing use context objects.
This allows different parts of a program to use different methods for
starting processes without interfering with each other.
2013-10-16 16:41:56 +01:00
Serhiy Storchaka 25324971fb Issue #18468: The re.split, re.findall, and re.sub functions and the group()
and groups() methods of match object now always return a string or a bytes
object.
2013-10-16 12:46:28 +03:00
Antoine Pitrou 355dda8d17 Issue #14407: Fix unittest test discovery in test_concurrent_futures. 2013-10-15 23:24:44 +02:00