Commit Graph

54559 Commits

Author SHA1 Message Date
Benjamin Peterson 80d07f8251 inherit maxchar of field value where needed (closes #14648) 2012-04-23 10:55:29 -04:00
Benjamin Peterson 1cf5aa9106 merge 3.2 2012-04-23 10:08:20 -04:00
Benjamin Peterson 7a436c5a53 sleep here 2012-04-23 10:08:14 -04:00
Brett Cannon 938d44d59c Issue #14605: Expose importlib.abc.FileLoader and
importlib.machinery.(FileFinder, SourceFileLoader,
_SourcelessFileLoader, ExtensionFileLoader).

This exposes all of importlib's mechanisms that will become public on
the sys module.
2012-04-22 19:58:33 -04:00
Brett Cannon 8c5e920ae3 merge 2012-04-22 13:30:07 -04:00
Brett Cannon 410e88d5fc Change tests for imp.cache_from_source() to follow os.path.join/split
semantics.
2012-04-22 13:29:47 -04:00
Vinay Sajip 4c3f47896e Issue #14644: Increased default timeout for SMTPHandler. Note: last commit message referred to the wrong issue number. 2012-04-22 18:19:50 +01:00
Vinay Sajip 26308da174 Issue #14622: Increased default timeout for SMTPHandler. 2012-04-22 18:16:14 +01:00
Brett Cannon 6240bd11ca merge 2012-04-22 13:02:31 -04:00
Brett Cannon 5c903e6ee1 Issue #13959: Continue to try to accomodate altsep in importlib by not
ignoring altsep if it already exists on a path when doing a join.
2012-04-22 11:45:07 -04:00
Charles-François Natali 84c0ca06d2 Use os.path.samestat() instead of reinventing the wheel. 2012-04-22 15:55:43 +02:00
Nick Coghlan 243994dc21 Resolve #14026 (Merge from 3.2) 2012-04-22 17:16:39 +10:00
Nick Coghlan 37fc401188 Close issue #14026 by better testing sys.argv handling in test_cmd_line_script (patch by Jason Yeo) 2012-04-22 17:11:33 +10:00
Brett Cannon ce9bb9eaa0 Mention the backwards-incompatible change to imp.cache_from_source()/source_from_cache(). 2012-04-22 02:08:59 -04:00
Brett Cannon 5e65f66eb1 merge 2012-04-22 02:06:48 -04:00
Brett Cannon cf649958f7 Revert to os.path.join() semantics for path manipulation in importlib
which is different than what imp.cache_from_source() operates on.
2012-04-22 02:06:23 -04:00
Senthil Kumaran df7070a751 issue2193 - Update docs about the legal characters allowed in Cookie name 2012-04-22 10:31:52 +08:00
Senthil Kumaran a42665f4d4 issue2193 - Update 3.2 docs about legal characters allowed in Cookie name 2012-04-22 10:30:17 +08:00
Brett Cannon 6c802b8491 Update importlib.h 2012-04-21 21:47:08 -04:00
Brett Cannon a846236855 Continue the good fight to get Windows to like importlib by fixing a
variable name.
2012-04-21 21:46:32 -04:00
Brett Cannon 27f29d8483 merge 2012-04-21 21:21:54 -04:00
Brett Cannon 0d05a7698b Have importlib look for pre-existing path separators when joining
paths.
2012-04-21 21:21:27 -04:00
Senthil Kumaran f75822879b merge heads 2012-04-22 09:19:49 +08:00
Senthil Kumaran 3a441c1bed Fix Issue2193 - Allow ":" character in Cookie NAME values 2012-04-22 09:19:04 +08:00
Brett Cannon cb165db3a3 Fix whitespace. 2012-04-21 21:15:28 -04:00
Brett Cannon e69f0df45b Issue #13959: Re-implement imp.find_module() in Lib/imp.py.
Thanks to Eric Snow for taking an initial stab at the implementation.
2012-04-21 21:09:46 -04:00
Brett Cannon b8c0206bd4 Issue #14637: Fix the UNC import test under Windows to actually use
the UNC path. Also clean up sys.path and invalidate finder caches.

Thanks to Vinay Sajip for spotting the use of the wrong path.
2012-04-21 19:11:58 -04:00
Brett Cannon 2f92389d5c Don't worry about moving imp.get_tag() over to Lib/imp.py. 2012-04-21 18:55:51 -04:00
Brett Cannon b582c923ba merge 2012-04-21 18:53:14 -04:00
Brett Cannon a64faf0771 Issue #13959: Re-implement imp.source_from_cache() in Lib/imp.py. 2012-04-21 18:52:52 -04:00
Michael Foord 9cf5c9d85e Remove incorrect comment 2012-04-21 18:32:56 +01:00
Michael Foord 3af125a4aa Closes issue 14634. unittest.mock.create_autospec now supports keyword only arguments. 2012-04-21 18:22:28 +01:00
Michael Foord 2cd48738ba Closes issue 14636. mock objects raise exceptions from an iterable side_effect 2012-04-21 15:52:11 +01:00
Brett Cannon ea59dbff16 Issue #13959: Re-implement imp.cache_from_source() in Lib/imp.py. 2012-04-20 21:44:46 -04:00
Brett Cannon ed672d6872 Make path manipulation more robust for platforms with alternative path
separators.
2012-04-20 21:19:53 -04:00
Brett Cannon 24117a748b Issue #13959: Keep imp.get_magic() in C code, but cache in importlib
for performance. While get_magic() could move to Lib/imp.py, having to
support PyImport_GetMagicNumber() would lead to equal, if not more, C
code than sticking with the status quo.
2012-04-20 18:04:03 -04:00
Brett Cannon 9e924ed1ac Fix a cleanup. 2012-04-20 17:34:59 -04:00
Brett Cannon 5d5296d36e Merge 2012-04-20 17:19:14 -04:00
Mark Dickinson 9a359bd97f Issue #14630: Merge fix from 3.2. 2012-04-20 21:44:09 +01:00
Mark Dickinson bcc17eefd2 Issue #14630: Fix an incorrect access of ob_digit[0] for a zero instance of an int subclass. 2012-04-20 21:42:49 +01:00
Brett Cannon bbdc9cd3d2 Use a skipUnless decorator instead of conditional renaming. 2012-04-20 16:29:39 -04:00
Mark Dickinson e28465482c Issue #14339: Improve speed of bin, oct and hex builtins. Patch by Serhiy Storchaka (with minor modifications). 2012-04-20 21:21:24 +01:00
Brett Cannon 1b5123aae5 Issue #14628: Document the fact that import always returns the module
as found in sys.modules and not as what the loader returns (even
though it is required to by PEP 302).
2012-04-20 15:57:46 -04:00
Brett Cannon 1032af95ff Issue #14585: test_import now runs all tests under
importlib.test.import_ using builtins.__import__() instead of just the
relative import tests.
2012-04-20 15:52:17 -04:00
Brett Cannon 3dfc22cc04 Issue #14599: Support ImportError.path on AIX and HPUX when loading
extension modules.
2012-04-20 15:31:11 -04:00
Brett Cannon fe3c62967b merge 2012-04-20 15:23:11 -04:00
Brett Cannon f0434e647a Issue #14599: Generalize a test for ImportError.path and add support
in Python/dynload_shlibs.c.

This should fix the remaining importlib test failure on Windows.
Support in AIX and HP-UX will be in a separate checkin.
2012-04-20 15:22:50 -04:00
Stefan Krah 9d3a5aeabe Defensive programming: mpd_isspecial(r) already implies mpd_isspecial(q), but
this is more readable.
2012-04-20 21:00:31 +02:00
Stefan Krah 3c23a87e58 The divmod function for large numbers now has an ACL2 proof. Related changes:
1) Rename _mpd_qbarrett_divmod into _mpd_base_ndivmod: The function is
     only marginally related to either Barrett's algorithm or to the version
     in Hasselstrom's paper.

  2) In places where the proof assumes exact operations, use new versions of
     add/sub/multiply that set NaN/Invalid_operation if this condition is
     not met. According to the proof this cannot happen, so this should be
     regarded as an extra safety net.

  3) Raise Division_impossible for operands with a number of digits greater
     than MPD_MAX_PREC. This facilitates the audit of the function and can
     practically only occur in the 32-bit version under conditions where
     a MemoryError is already imminent.

  4) Use _mpd_qmul() in places where the result can exceed MPD_MAX_PREC in
     a well defined manner.

  5) Test for mpd_isspecial(qq) in a place where the addition of one
     can theoretically trigger a Malloc_error.

  6) Remove redundant code in _mpd_qdivmod().

  7) Add many comments.
2012-04-20 19:59:20 +02:00
Brett Cannon a2898c1d79 Try to debug a Windows failure on the buildbots. 2012-04-20 13:34:35 -04:00