Antoine Pitrou
284fa08eb7
Issue #14761 : Fix potential leak on an error case in the import machinery.
2012-05-09 13:24:31 +02:00
Gregory P. Smith
a72aa843b6
Fix compiler warning related to issue #14331 . harmless.
2012-04-18 16:41:56 -07:00
Gregory P. Smith
fcdf04becc
Fixes Issue #14331 : Use significantly less stack space when importing modules by
...
allocating path buffers on the heap instead of the stack.
2012-03-18 16:07:10 -07:00
Jason R. Coombs
0e17dfbdcf
Test in 6c218b9c5c4c was inadvertently converted from #ifdef to #if. Now #ifdef again.
2012-03-08 09:56:00 -05:00
Jason R. Coombs
0737b7281e
Fix indentation
2012-01-13 17:59:05 -05:00
Jason R. Coombs
fa93cf8e3e
Extracted Windows directory detection from NullImporter.__init__. This greatly simplifies the code and fixes issue6727.
2012-01-13 17:37:18 -05:00
Jason R. Coombs
925ff7495b
Moved directory detection into an isdir function
2012-01-13 17:12:25 -05:00
Antoine Pitrou
6f25d75f25
Remove debug output, fix assert (hopefully) and exercise signedness issues a bit more.
2012-01-25 15:38:32 +01:00
Antoine Pitrou
b744cef654
Fix temporary debug output (so, time_t is 8 bytes on some Windows builds)
2012-01-25 14:57:56 +01:00
Antoine Pitrou
11cc480ed0
Temporary debug for Windows buildbots.
2012-01-25 14:39:21 +01:00
Antoine Pitrou
0e5fd59a27
Make guard more dynamic (apparently the size of a filesystem timestamp may vary under Windows).
2012-01-25 03:31:39 +01:00
Antoine Pitrou
d1c818a9c0
Issue #11235 : Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp.
2012-01-24 17:44:06 +01:00
Victor Stinner
63c22fac72
Issue #7732 : Fix a crash on importing a module if a directory has the same name
...
than a Python module (e.g. "__init__.py"): don't close the file twice.
PyFile_FromFile() does also close the file if PyString_FromString() failed. It
did already close the file on fill_file_fields() error (e.g. if the file is a
directory).
2011-09-23 19:37:03 +02:00
Victor Stinner
ed36c06f1d
Fix the import machinery if there is an error on sys.path or sys.meta_path
...
find_module() now raises a RuntimeError, instead of ImportError, on an error on
sys.path or sys.meta_path because load_package() and import_submodule() returns
None and clear the exception if a ImportError occurred.
2011-09-15 19:45:53 +02:00
Victor Stinner
871a0fbf46
Remove unused variable if Python is build without threads
2011-09-02 00:21:36 +02:00
Brett Cannon
eb3cd301ae
Turned out that if you used explicit relative import syntax
...
(e.g. from .os import sep) and it failed, import would still try the implicit
relative import semantics of an absolute import (from os import sep). That's
not right, so when level is negative, only do explicit relative import
semantics.
Fixes issue #7902 . Thanks to Meador Inge for the patch.
2010-05-20 18:37:55 +00:00
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
2010-05-09 14:46:46 +00:00
Brett Cannon
b166afc17c
Fix whitespace.
2010-05-05 20:25:47 +00:00
Brett Cannon
417439e6cd
Partially revert the over-reaching r80813.
2010-05-05 20:24:30 +00:00
Brett Cannon
0b03f10afb
Remove three unneeded variable assignments.
...
Found using Clang's static analyzer.
2010-05-05 20:20:19 +00:00
Benjamin Peterson
06638735fc
make naming convention consistent
2010-03-25 23:27:16 +00:00
Victor Stinner
6664426d7c
Issue #3137 : Don't ignore errors at startup, especially a keyboard interrupt
...
(SIGINT). If an error occurs while importing the site module, the error is
printed and Python exits. Initialize the GIL before importing the site
module.
2010-03-10 22:30:19 +00:00
Gregory P. Smith
9e5d1327f8
Issue #7242 : On Solaris 9 and earlier calling os.fork() from within a
...
thread could raise an incorrect RuntimeError about not holding the import
lock. The import lock is now reinitialized after fork.
2010-03-01 01:22:39 +00:00
Alexandre Vassalotti
b646547bb4
Issue #2333 : Backport set and dict comprehensions syntax.
2010-01-11 22:36:12 +00:00
Alexandre Vassalotti
ee936a2130
Issue #2335 : Backport set literals syntax from Python 3.x.
2010-01-09 23:35:54 +00:00