Weak*Dictionary.update(): No longer create a temporary list to hold the
things that will be stuffed into the underlying dictionary. This had
been done so that if any of the objects used as the weakly-held value
was not weakly-referencable, no updates would take place (TypeError
would be raised). With this change, TypeError will still be raised
but a partial update could occur. This is more like other .update()
implementations.
Thoughout, use of the name "ref" as a local variable has been removed. The
original use of the name occurred when the function to create a weak
reference was called "new"; the overloaded use of the name could be
confusing for someone reading the code. "ref" used as a variable name
has been replaced with "wr" (for 'weak reference').
The changes cause compilation failures in any file in the Python
installation lib directory to cause the install to fail. It looks
like compileall.py intended to behave this way, but a change to
py_compile.py and a separate bug defeated it.
Fixes SF bug #412436
This change affects the test suite, which contains several files that
contain intentional errors. The solution is to extend compileall.py
with the ability to skip compilation of selected files.
NB compileall.py is changed so that compile_dir() returns success only
if all recursive calls to compile_dir() also check success.
The changes cause compilation failures in any file in the Python
installation lib directory to cause the install to fail. It looks
like compileall.py intended to behave this way, but a change to
py_compile.py and a separate bug defeated it.
Fixes SF bug #412436
This change affects the test suite, which contains several files that
contain intentional errors. The solution is to extend compileall.py
with the ability to skip compilation of selected files.
In the test suite, rename nocaret.py and test_future[3..7].py to start
with badsyntax_nocaret.py and badsyntax_future[3..7].py. Update the
makefile to skip compilation of these files. Update the tests to use
the name names for imports.
NB compileall.py is changed so that compile_dir() returns success only
if all recursive calls to compile_dir() also check success.
file was deleted by a previous call to the visitor function.
This used to be the behavior in 1.5.2 and before, but a patch to avoid
making two stat() calls accidentally broke this in 2.0.
Moshe, this would be a good one for 2.0.1 too!
its first return statement returns a single value while its caller
always expects it to return a tuple of two items. Fix this by
returning (s, 0) instead.
This won't make the locale test on Irix succeed, but now it will fail
because of a bug in the platform's en_US locale rather than because of
a bug in the locale module.
than from module pickletester. Using the latter turned out to cause
the test to break when invoked as "import test.test_pickle" or "import
test.autotest".
cut-and-paste copy of the seek() method on the _Subfile class, but it
didn't make one bit of sense: it sets self.pos, which is not used in
this class or its subclasses, and it uses self.start and self.stop,
which aren't defined on this class or its subclasses. This is purely
my own fault -- I added this in rev 1.4 and apparently never tried to
use it. Since it's not documented, and of very questionable use given
that there's no tell(), I'm ripping it out.
This resolves SF bug 416199 by Andrew Dalke: mailbox.py seek problems.
ZipFile.close() method that should be part of the preceding 'if'
block. On some platforms (Mark noticed this on FreeBSD 4.2) doing a
flush() on a file open for reading is not allowed.
now raises NameError instead of UnboundLocalError, because the var in
question is definitely not local. (This affects test_scope.py)
Also update the recent fix by Ping using get_func_name(). Replace
tests of get_func_name() return value with call to get_func_desc() to
match all the other uses.
Make synopsis() load modules as '__temp__' so they don't clobber anything.
Change "constants" section to "data" section.
Don't show __builtins__ or __doc__ in "data" section.
For Bob Weiner: don't boldface text in Emacs shells or dumb terminals.
Remove Helper.__repr__ (it really belongs in site.py, and should be guarded by a check for len(inspect.stack) <= 2).
fixes bug #414940, and redoes the fix for #129417 in a different way.
It also fixes a number of other problems with locale-specific formatting:
If there is leading or trailing spaces, then no grouping should be applied
in the spaces, and the total length of the string should not be changed
due to grouping.
Also added test case which works only if the en_US locale is available.
value for the 'using' parameter of the get() function
or the BROWSER environment variable, if the thing
passed in is a path (as seems to be the case with KDE)
instead of a short name, examine the available
controllers to see if we can synthesize one based on a
pre-registered controller that shares the same base
name.
get(): If the user specifies a browser we don't know about, use
_synthesize() to attempt to create a usable controller.
Some small adjustments were needed in some of the browser classes to
support this.
Always emit a SET_LINENO 0 at the beginning of the module. The
builtin compiler does this, and it's much easier to compare bytecode
generated by the two compilers if they both do.
Move the SET_LINENO inside the FOR_LOOP block for list
comprehensions. Also for compat. with builtin compiler.