Neal Norwitz [Wed, 9 Nov 2005 06:59:35 +0000 (06:59 +0000)]
- SF Bug #1350188, "setdlopenflags" leads to crash upon "import"
It was possible dlerror() returns a NULL pointer, use a default error
message in this case.
Armin Rigo [Mon, 7 Nov 2005 08:38:00 +0000 (08:38 +0000)]
Added proper reflection on instances of <type 'method-wrapper'>, e.g.
'[].__add__', to match what the other internal descriptor types provide:
'__objclass__' attribute, '__self__' member, and reasonable repr and
comparison.
Armin Rigo [Mon, 7 Nov 2005 07:15:48 +0000 (07:15 +0000)]
similar to SF bug 847019: a quick check in the time() constructor, which
accepts strings only for unpickling reasons. This check prevents the honest
mistake of passing a string like '2:59.0' to time() and getting an insane
object.
Ka-Ping Yee [Sat, 5 Nov 2005 05:04:41 +0000 (05:04 +0000)]
Fix SF bug #417833 (pydoc HTTP reload failure) by removing from
sys.modules all submodules of a the given module/package path
when trying to reload a module.
Brett Cannon [Wed, 2 Nov 2005 23:04:26 +0000 (23:04 +0000)]
Change time.strptime() to raise ValueError whenever there is an error in the
format string. Before exceptions generated by the internal code propagated up
to the user and were not helpful.
Tim Peters [Sat, 29 Oct 2005 02:33:18 +0000 (02:33 +0000)]
_PyUnicode_IsWhitespace(),
_PyUnicode_IsLinebreak():
Changed the declarations to match the definitions.
Don't know why they differed; MSVC warned about it;
don't know why only these two functions use "const".
Someone who does may want to do something saner ;-).
Neil Schemenauer [Tue, 25 Oct 2005 07:54:54 +0000 (07:54 +0000)]
Write a separate ast_for_testlist_gexp() function instead of overloading
ast_for_testlist(). Also, write a ast_for_class_bases() function and in
the process fix a memory leak. Add some assertions.
Neil Schemenauer [Tue, 25 Oct 2005 06:30:14 +0000 (06:30 +0000)]
Ensure that compiler_exit_scope() is called as necessary to free memory
allocated by compiler_enter_scope(). Change return type for
compiler_exit_scope() to be void.
Add convenience makefile to check the latest what's new.
The invocation of Python is MacOS-specific; not sure how to make it platform indepedent (but maybe it doesn't matter)
Neil Schemenauer [Sun, 23 Oct 2005 18:50:36 +0000 (18:50 +0000)]
Fix check_unoptimized() function. The only optimized namespaces are
in function blocks. This elimiates spurious warnings about "import *" and
related statements at the class level.
Neil Schemenauer [Sun, 23 Oct 2005 04:24:49 +0000 (04:24 +0000)]
Fix arigo's funky LOAD_NAME bug: implicit globals inside classes have
historically been looked up using LOAD_NAME, not LOAD_GLOBAL.
looked up by LOAD_NAME, not
Neal Norwitz [Sat, 22 Oct 2005 03:51:42 +0000 (03:51 +0000)]
Revert previous checkin:
According to Jeremy, the comment only made sense when
the yield was disallowed. Now it's testing that the yield
is allowed, so it's not bad and the outer finally is irrelevant.
[ 1327110 ] wrong TypeError traceback in generator expressions
by removing the code that can stomp on the users' TypeError raised by the
iterable argument to ''.join() -- PySequence_Fast (now?) gives a perfectly
reasonable message itself. Also, a couple of tests.
This should have generated a SyntaxError. Fix the Grammar so
it raises a SyntaxError and test it.
I'm uncertain whether this should be backported. It makes
something that was Syntactically valid invalid. However,
the code would either be completely broken or do the wrong thing.
Neal Norwitz [Fri, 21 Oct 2005 04:33:02 +0000 (04:33 +0000)]
Remove INT_MIN that came from the AST merge.
INT_MIN is used in Python/compile.c, but it was also used
in Objects/abstract.c Python/getargs.c. If we need it for compile.c,
we can get it from the same place as the other files.
Enhance the performance of two important Unicode character
type lookups: whitespace and linebreak.
These lookup tables are from the Python 1.6 version with the addition
of the 205F code point which was added as whitespace code point to Unicode
since then.
Neal Norwitz [Thu, 20 Oct 2005 04:50:13 +0000 (04:50 +0000)]
Fix SF bug # 1330039, patch # 1331635 from Lars Gustaebel (tarfile maintainer)
Problem: if two files are assigned the same inode
number by the filesystem, the second one will be added
as a hardlink to the first, which means that the
content will be lost.
The patched code checks if the file's st_nlink is
greater 1. So only for files that actually have several
links pointing to them hardlinks will be created, which
is what GNU tar does.