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
Stefan Krah
472d280d8b
Issue #13002 : Fix Visual Studio warning (not enough actual parameters).
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
9561d7c526
import.c: remove now useless arbitrary limit
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
Benjamin Peterson
ea281a54f3
include header with PyAST_Validate
15 years ago
Benjamin Peterson
832bfe2ebd
add a AST validator ( closes #12575 )
15 years ago
Benjamin Peterson
e249841903
add a asdl bytes type, so Bytes.s be properly typechecked
15 years ago
Benjamin Peterson
405f32c14c
plug refleak
15 years ago
Benjamin Peterson
4f921c2e06
bytes -> bytearray
15 years ago
Benjamin Peterson
ce071ca4e7
bytes should be verboten in sum() ( fixes #12654 )
15 years ago
Eli Bendersky
906b88fb2a
Issue #12380 : PyArg_ParseTuple now accepts a bytearray for the 'c' format.
As a side effect, this now allows the rjust, ljust and center methods of
bytes and bytearray to accept a bytearray argument.
Patch by Petri Lehtinen
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
Charles-François Natali
f23339a7bb
Issue 12620: Make pendingbusy flag static to Py_MakePendingCalls().
15 years ago
Benjamin Peterson
180e63507d
None is ok for identifiers but not strings
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
efad2449fc
hardcode the old svn __version__
15 years ago
Benjamin Peterson
76f7f4d979
excise the remains of STOP_CODE, which hasn't done anything useful for years
15 years ago
Brett Cannon
52a7d98273
Make warnings accept a callable for showwarnings instead of
restricting itself to just functions and methods (which allows
built-in functions to be used, etc.).
Closes issue #10271 . Thanks to lekma for the bug report.
15 years ago
Benjamin Peterson
0bd152cd67
remove ast.__version__ ( closes #12273 )
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
Victor Stinner
ecf4fdad50
Py_BuildValue("C") supports non-BMP characters on narrow build
Py_BuildValue("C") doesn't have to check the code point,
PyUnicode_FromOrdinal() checks its input and now supports non-BMP characters
(range U+10000-U+10FFFF).
15 years ago
Antoine Pitrou
370092071b
Issue #11863 : Remove support for legacy systems deprecated in Python 3.2
(following PEP 11). These systems are systems using Mach C Threads,
SunOS lightweight processes, GNU pth threads and IRIX threads.
15 years ago
Antoine Pitrou
022ae22cc6
Issue #11863 : remove unused file Python/thread_wince.h
15 years ago
Benjamin Peterson
bb4a747b69
start out this branch always with filename NULL
15 years ago
Victor Stinner
87e78ce1c6
Issue #12469 : partial revert of 024827a9db64, freebsd6 thread initialization
* Don't create a thread at startup anymore to initialize the pthread library:
it changes the behaviour of many functions related to signal handling like
sigwait()
* Reenable test_sigtimedwait_poll() on FreeBSD 6
15 years ago
Victor Stinner
99b9538636
Issue #9642 : Uniformize the tests on the availability of the mbcs codec
Add a new HAVE_MBCS define.
15 years ago
Victor Stinner
d64e8a75e5
Issue #9642 : Fix filesystem encoding initialization: use the ANSI code page on
Windows if the mbcs codec is not available, and fail with a fatal error if we
cannot get the locale encoding (if nl_langinfo(CODESET) is not available)
instead of using UTF-8.
15 years ago
Benjamin Peterson
a55007a620
plug refleak
15 years ago
Victor Stinner
b1b25f0ffd
Issue #12467 : warnings: fix a race condition if a warning is emitted at
shutdown, if globals()['__file__'] is None.
15 years ago
Victor Stinner
8b0508ed4e
Issue #12467 : warnings: fix a race condition if a warning is emitted at
shutdown, if globals()['__file__'] is None.
15 years ago
Benjamin Peterson
9bfd0dee9b
no one passes NULL here (or should anyway)
15 years ago
Benjamin Peterson
878802435d
convert generator exc state functions into static functions
15 years ago
Benjamin Peterson
ac91341333
never retain a generator's caller's exception state on the generator after a yield/return
This requires some trickery to properly save the exception state if the
generator creates its own exception state.
15 years ago
Benjamin Peterson
83195c3f0c
restore a generator's caller's exception state both on yield and (last) return
This prevents generator exception state from leaking into the caller.
Closes #12475 .
15 years ago
Vinay Sajip
aac0f75b3b
Correct uninitialized data problem in marshal code.
15 years ago
Vinay Sajip
623e8b86af
Removed some unused local variables.
15 years ago
Vinay Sajip
3232284391
Removed breaking typo accidentally introduced during merge with 3.2.
15 years ago
Vinay Sajip
5bdae3bb7c
Closes #12291 : Fixed bug which was found when doing multiple loads from one stream.
15 years ago
Benjamin Peterson
9d872e19aa
fix possibily uninitialized memory usage ( closes #12474 )
15 years ago
Benjamin Peterson
609da58ae5
store the current scope on the stack right away
15 years ago
Benjamin Peterson
c2575d55cd
remove VISIT_*_IN_BLOCK macros
These are pointless because on error, all blocks will be finalized by
symtable_dealloc.
15 years ago
Benjamin Peterson
9003760991
map cells to arg slots at code creation time ( closes #12399 )
This removes nested loops in PyEval_EvalCodeEx.
15 years ago
Victor Stinner
e71db4450c
Issue #12392 : fix thread initialization on FreeBSD 6
On FreeBSD6, pthread_kill() doesn't work on the main thread before the creation
of the first thread. Create therefore a dummy thread (no-op) a startup to
initialize the pthread library.
Add also a test for this use case, test written by Charles-François Natali.
15 years ago
Benjamin Peterson
e109c70860
give the names of missing positional or keyword-only arguments ( closes #12356 )
15 years ago
Benjamin Peterson
b7149cad04
fix indentation
15 years ago