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.
14 years ago
Brett Cannon
6c802b8491
Update importlib.h
14 years ago
Brett Cannon
a846236855
Continue the good fight to get Windows to like importlib by fixing a
variable name.
14 years ago
Brett Cannon
27f29d8483
merge
14 years ago
Brett Cannon
0d05a7698b
Have importlib look for pre-existing path separators when joining
paths.
14 years ago
Senthil Kumaran
f75822879b
merge heads
14 years ago
Senthil Kumaran
3a441c1bed
Fix Issue2193 - Allow ":" character in Cookie NAME values
14 years ago
Brett Cannon
cb165db3a3
Fix whitespace.
14 years ago
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.
14 years ago
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.
14 years ago
Brett Cannon
2f92389d5c
Don't worry about moving imp.get_tag() over to Lib/imp.py.
14 years ago
Brett Cannon
b582c923ba
merge
14 years ago
Brett Cannon
a64faf0771
Issue #13959 : Re-implement imp.source_from_cache() in Lib/imp.py.
14 years ago
Michael Foord
9cf5c9d85e
Remove incorrect comment
14 years ago
Michael Foord
3af125a4aa
Closes issue 14634. unittest.mock.create_autospec now supports keyword only arguments.
14 years ago
Michael Foord
2cd48738ba
Closes issue 14636. mock objects raise exceptions from an iterable side_effect
14 years ago
Brett Cannon
ea59dbff16
Issue #13959 : Re-implement imp.cache_from_source() in Lib/imp.py.
14 years ago
Brett Cannon
ed672d6872
Make path manipulation more robust for platforms with alternative path
separators.
14 years ago
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.
14 years ago
Brett Cannon
9e924ed1ac
Fix a cleanup.
14 years ago
Brett Cannon
5d5296d36e
Merge
14 years ago
Mark Dickinson
9a359bd97f
Issue #14630 : Merge fix from 3.2.
14 years ago
Mark Dickinson
bcc17eefd2
Issue #14630 : Fix an incorrect access of ob_digit[0] for a zero instance of an int subclass.
14 years ago
Brett Cannon
bbdc9cd3d2
Use a skipUnless decorator instead of conditional renaming.
14 years ago
Mark Dickinson
e28465482c
Issue #14339 : Improve speed of bin, oct and hex builtins. Patch by Serhiy Storchaka (with minor modifications).
14 years ago
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).
14 years ago
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.
14 years ago
Brett Cannon
3dfc22cc04
Issue #14599 : Support ImportError.path on AIX and HPUX when loading
extension modules.
14 years ago
Brett Cannon
fe3c62967b
merge
14 years ago
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.
14 years ago
Stefan Krah
9d3a5aeabe
Defensive programming: mpd_isspecial(r) already implies mpd_isspecial(q), but
this is more readable.
14 years ago
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.
14 years ago
Brett Cannon
a2898c1d79
Try to debug a Windows failure on the buildbots.
14 years ago
Brett Cannon
c33f3f2339
Issue #14629 : Mention the filename in SyntaxError exceptions from
tokenizer.detect_encoding() (when available).
14 years ago
Brett Cannon
dd9a56953e
Issue #14633 : Simplify imp.find_modue() test after fixes from issue
#14629 changed the message.
14 years ago
Brett Cannon
8ff6baf25b
Issue #14581 : Windows users are allowed to import modules w/o taking
the file suffix's case into account, even when doing a case-sensitive
import.
14 years ago
Brett Cannon
91900eaf96
Have importlib.test.regrtest clear sys.path_importer_cache to make
sure finders from importlib are used instead of _frozen_importlib.
14 years ago
Martin v. Löwis
63c39fe38e
merge 3.2: issue 14629
14 years ago
Martin v. Löwis
63674f4b52
Issue #14629 : Raise SyntaxError in tokenizer.detect_encoding
if the first two lines have non-UTF-8 characters without an encoding declaration.
14 years ago
Victor Stinner
7b17a4e117
Close #14386 : Register types.MappingProxyType as a Mapping
14 years ago
Larry Hastings
6fe20b3aee
Issue #14127 : Add st_{cma}time_ns fields to os.stat() result object.
14 years ago
Antoine Pitrou
dd5aa36f17
Issue #14308 : Fix an exception when a dummy thread is in the threading module's active list after a fork().
14 years ago
Antoine Pitrou
8e6e0fdb7f
Issue #14308 : Fix an exception when a "dummy" thread is in the threading module's active list after a fork().
14 years ago
Antoine Pitrou
bf35c156b4
Fix refleak: PyObject_GetItem returns a new reference, not a borrowed one like PyDict_GetItem.
14 years ago
Martin v. Löwis
aa2efcb0bc
Issue #14098 : New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
Patch by Stefan Behnel.
14 years ago
Nick Coghlan
e27b3608ef
Merge from 3.2
14 years ago
Nick Coghlan
10ac77d2d8
Close #14032 : fix incorrect variable reference in test_cmd_line_script
14 years ago
Ezio Melotti
dea6c21a9c
#14538 : merge with 3.2.
14 years ago
Ezio Melotti
0780b6bc58
#14538 : HTMLParser can now parse correctly start tags that contain a bare /.
14 years ago
Victor Stinner
b0b224233e
Issue #14385 : Support other types than dict for __builtins__
It is now possible to use a custom type for the __builtins__ namespace, instead
of a dict. It can be used for sandboxing for example. Raise also a NameError
instead of ImportError if __build_class__ name if not found in __builtins__.
14 years ago