Commit Graph

55403 Commits

Author SHA1 Message Date
Antoine Pitrou
aaefac76dd Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels.
Patch by Serhiy Storchaka.
2012-06-16 22:48:21 +02:00
Stefan Krah
c62bd13cb2 1) State the relative errors of the power functions for integer exponents.
2) _mpd_qpow_mpd(): Abort the loop for all specials, not only infinity.

3) _mpd_qpow_mpd(): Make the function more general and distinguish between
   zero clamping and folding down the exponent. The latter case is currently
   handled by setting context->clamp to 0 before calling the function.

4) _mpd_qpow_int(): Add one to the work precision in case of a negative
   exponent. This is to get the same relative error (0.1 * 10**-prec)
   for both positive and negative exponents. The previous relative
   error for negative exponents was (0.2 * 10**-prec).

   Both errors are _before_ the final rounding to the context precision.
2012-06-16 19:45:35 +02:00
Victor Stinner
f185226244 _copy_characters(): move debug code at the top to avoid noisy #ifdef
And don't use assert() anymore if check_maxchar is set: return -1 on error
instead.
2012-06-16 16:38:26 +02:00
Eli Bendersky
6319e0fa20 Make the test more resilient to test-run order (closes #15075) 2012-06-16 06:47:44 +03:00
Victor Stinner
07621338fb Fix PyUnicode_GetSize(): Don't replace _PyUnicode_Ready() exception 2012-06-16 04:53:46 +02:00
Victor Stinner
8a8b3eaabe Fix a compiler warning in _copy_characters() and remove debug code 2012-06-16 04:53:25 +02:00
Victor Stinner
24e403bbee Oops, fix my previous change on _copy_characters() 2012-06-16 04:53:00 +02:00
Victor Stinner
81c39a88a4 get_sourcefile(): use PyUnicode_READ() to avoid the creation of a temporary
Py_UCS4 buffer
2012-06-16 03:22:05 +02:00
Victor Stinner
ca439eecea Fix unicode_adjust_maxchar(): catch PyUnicode_New() failure 2012-06-16 03:17:34 +02:00
Victor Stinner
184252ad3f Fix "%f" format of str%args if the result is not an ASCII or latin1 string 2012-06-16 02:57:41 +02:00
Victor Stinner
9a77770add Remove debug code 2012-06-16 02:44:43 +02:00
Victor Stinner
c9d369f1bf Optimize _PyUnicode_FastCopyCharacters() when maxchar(from) > maxchar(to) 2012-06-16 02:22:37 +02:00
Victor Stinner
f05e17ece9 unicodeobject.c: Remove debug code 2012-06-16 01:53:04 +02:00
Alexander Belopolsky
0831382d69 Issue #15006: Allow equality comparison between naive and aware time
or datetime objects.
2012-06-15 20:19:47 -04:00
Brett Cannon
ea0b823940 Issue #14938: importlib.abc.SourceLoader.is_package() now takes the
module name into consideration when determining whether a module is a
package or not. This prevents importing a module's __init__ module
directly and having it considered a package, which can lead to
duplicate sub-modules.

Thanks to Ronan Lamy for reporting the bug.
2012-06-15 20:00:53 -04:00
Brett Cannon
0450c9ed52 Issue #13959: Add to imp.find_module() and load_module's docstrings
that they are deprecated (previous commit documented this fact in the
module docs).
2012-06-15 19:39:06 -04:00
Brett Cannon
47b3239cc6 Closes issue #14982: Document that pkgutil's walk_packages() and
iter_modules() requires iter_modules() be defined on an importer. The
importers in importlib do not define this non-standard method.
2012-06-15 19:21:07 -04:00
Brett Cannon
24aa693c7e Merge 2012-06-15 19:04:29 -04:00
Alexander Belopolsky
016ef551a7 Removed redundant code 2012-06-15 18:15:25 -04:00
Richard Oudkerk
9125775aa6 Fix _TestListener.ALLOWED_TYPES and add sanity check 2012-06-15 21:53:34 +01:00
Antoine Pitrou
c90929624b Mention the UTF-16 encoding speedup in the whatsnew (issue #15026). 2012-06-15 22:22:18 +02:00
Antoine Pitrou
27f6a3b0bf Issue #15026: utf-16 encoding is now significantly faster (up to 10x).
Patch by Serhiy Storchaka.
2012-06-15 22:15:23 +02:00
Richard Oudkerk
3049f1243e Increase timeout used when waiting for manager to shutdown cleanly
before resorting to terminate()
2012-06-15 20:08:29 +01:00
Richard Oudkerk
0f52346e76 Fix for 2d2f206d040e so that test_multiprocessing does not depend on ctypes 2012-06-15 19:18:30 +01:00
Petri Lehtinen
a717d563d0 #15036: Make a repeated changes and flushes work with single-file mailboxes 2012-06-15 21:01:56 +03:00