Antoine Pitrou
33d15f7c85
Port import fixes from 2.7.
14 years ago
Antoine Pitrou
6f25d75f25
Remove debug output, fix assert (hopefully) and exercise signedness issues a bit more.
14 years ago
Antoine Pitrou
b744cef654
Fix temporary debug output (so, time_t is 8 bytes on some Windows builds)
14 years ago
Antoine Pitrou
11cc480ed0
Temporary debug for Windows buildbots.
14 years ago
Antoine Pitrou
0e5fd59a27
Make guard more dynamic (apparently the size of a filesystem timestamp may vary under Windows).
14 years ago
Antoine Pitrou
2be60afb7e
Issue #11235 : Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp.
14 years ago
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.
14 years ago
Antoine Pitrou
1b468af7be
Issue #13722 : Avoid silencing ImportErrors when initializing the codecs registry.
14 years ago
Antoine Pitrou
6c40eb7f42
Fix the builtin module initialization code to store the init function for future reinitialization.
14 years ago
Antoine Pitrou
2fabface50
Fix a memory leak when initializing the standard I/O streams.
14 years ago
Meador Inge
3388060127
Issue #13629 : Renumber the tokens in token.h to match the _PyParser_TokenNames indexes.
14 years ago
Jason R. Coombs
0737b7281e
Fix indentation
14 years ago
Jason R. Coombs
fa93cf8e3e
Extracted Windows directory detection from NullImporter.__init__. This greatly simplifies the code and fixes issue6727.
14 years ago
Jason R. Coombs
925ff7495b
Moved directory detection into an isdir function
14 years ago
Benjamin Peterson
0010256de4
fold into one if statement
14 years ago
Benjamin Peterson
a12d5c62f7
fix formatting
14 years ago
Benjamin Peterson
5f8d60647b
add another year to glorious PSF IP
14 years ago
Benjamin Peterson
f606e682a4
add another year to glorious PSF IP
14 years ago
Florent Xicluna
5126df602c
Remove obsolete py3k comment.
14 years ago
Amaury Forgeot d'Arc
4bf21e28df
Issue #13546 : Fixed an overflow issue that could crash the intepreter when
calling sys.setrecursionlimit((1<<31)-1).
2.7 only.
14 years ago
Benjamin Peterson
a5ae1f0c25
remove py3k warning for callable
15 years ago
Benjamin Peterson
0c0d756098
don't let a tuple msg be interpreted as arguments to AssertionError ( closes #13268 )
15 years ago
Charles-François Natali
1f3ff7bc3f
Issue #13156 : revert changeset f6feed6ec3f9, which was only relevant for native
TLS implementations, and fails with the ad-hoc TLS implementation when a thread
doesn't have an auto thread state (e.g. a thread created outside of Python
calling into a subinterpreter).
15 years ago
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).
15 years ago
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.
15 years ago
Victor Stinner
871a0fbf46
Remove unused variable if Python is build without threads
15 years ago
Antoine Pitrou
11942a58a1
Issue #7111 : Python can now be run without a stdin, stdout or stderr stream.
It was already the case with Python 2. However, the corresponding
sys module entries are now set to None (instead of an unusable file object).
14 years ago
Antoine Pitrou
d7c8fbf89e
Issue #13444 : When stdout has been closed explicitly, we should not attempt to flush it at shutdown and print an error.
This also adds a test for issue #5319 , whose resolution introduced the issue.
15 years ago
Amaury Forgeot d'Arc
5e8f810411
Issue #13436 : commit regenerated Python-ast.c
15 years ago
Charles-François Natali
a233df885b
Issue #13156 : _PyGILState_Reinit(): Re-associate the auto thread state with the
TLS key only if the thread that called fork() had an associated auto thread
state (this might not be the case for example for a thread created outside of
Python calling into a subinterpreter).
15 years ago
Antoine Pitrou
0d776b1ce8
Issue #13342 : input() used to ignore sys.stdin's and sys.stdout's unicode
error handler in interactive mode (when calling into PyOS_Readline()).
15 years ago
Amaury Forgeot d'Arc
97c1bef6a4
Issue #13343 : Fix a SystemError when a lambda expression uses a global
variable in the default value of a keyword-only argument:
(lambda *, arg=GLOBAL_NAME: None)
15 years ago
Éric Araujo
5df1108de2
Add signatures to the docstring of functions added to imp by PEP 3147
15 years ago
Antoine Pitrou
8db076cf8a
Issue #10363 : Deallocate global locks in Py_Finalize().
15 years ago
Florent Xicluna
4d46c2a722
Remove unused variable.
15 years ago
Nick Coghlan
de31b191e5
Issue 1294232: Fix errors in metaclass calculation affecting some cases of metaclass inheritance. Patch by Daniel Urban.
15 years ago
Victor Stinner
53ffdc53bf
Issue #7732 : Don't open a directory as a file anymore while importing a
module. Ignore the direcotry if its name matchs the module name (e.g.
"__init__.py") and raise a ImportError instead.
15 years ago
Barry Warsaw
916048d780
- Issue #13021 : Missing decref on an error path. Thanks to Suman Saha for
finding the bug and providing a patch.
15 years ago
Victor Stinner
1619132e5d
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.
15 years ago
Victor Stinner
0af0306396
Remove unused variable if Python is build without threads
15 years ago
Benjamin Peterson
0224d4e699
accept bytes for the AST 'string' type
This is a temporary kludge and all is well in 3.3.
15 years ago
Benjamin Peterson
4058211e8d
accept bytes for the AST 'string' type
This is a temporary kludge and all is well in 3.3.
15 years ago
Éric Araujo
6c0ba447bd
Fix style in code added by edba722f3b02
15 years ago
Antoine Pitrou
cf9d3c08c8
Issue #1813 : Fix codec lookup under Turkish locales.
15 years ago
Benjamin Peterson
180e63507d
None is ok for identifiers but not strings
15 years ago
Benjamin Peterson
efad2449fc
hardcode the old svn __version__
15 years ago
Benjamin Peterson
2193d2b72b
type check AST strings and identifiers
This is related to a21829180423 as well as #12609 and #12610 .
15 years ago
Benjamin Peterson
5afa03a72e
catch nasty exception classes with __new__ that doesn't return a exception ( closes #11627 )
Patch from Andreas Stührk.
15 years ago
Benjamin Peterson
bb4a747b69
start out this branch always with filename NULL
15 years ago
Benjamin Peterson
a55007a620
plug refleak
15 years ago