Fix com_NEWLINE() so that is accepts arguments, which occurs for lines like:
stmt; # note trailing semicolon
Add XXX about checking for assignment to list comps
http://groups.yahoo.com/group/medusa/message/333
It's clear that Medusa should not be checking for an empty buffer
via "buf is ''". The patch merely changes "is" to "==". However,
there's a mystery here all the same: Python attempts to store null
strings uniquely, so it's unclear why "buf is ''" ever returned
false when buf actually was empty. *Some* string operations produce
non-unique null strings, e.g.
>>> "abc"*0 is "abc"*0
0
>>>
but they're rare, and I don't see any such operations in asynchat.
add a self-test using doctest. Results:
- The docstring needs to be a raw string because it uses \"...\".
- The oreo example was broken: the Set-Cookie output doesn't add
quotes around "doublestuff".
- I had to change the example that prints the class of a Cookie.Cookie
instance to avoid incorporating an arbitrary object address in the
test output.
Pretty good score for both doctest and the doc string, I'd say!
define COLORS or COLOR_PAIRS until after start_color() is called,
but they were never added to the curses module. Fixed by adding
a wrapper around start_color(), similar to the wrapper around initscr().
This applies the patch Fred Drake created to fix it.
I'm checking it in since I had to apply the patch anyway in order
to test its behavior on Windows.
used by Jython. The tests in this module expect C locale, so be
explicit about setting that (for CPython). However, in Jython, there
is no C locale, so instead be explicit about setting the US locale.
Closes the patch.
Change 1: Not all 'modules' in sys.modules have a
sensible __file__ attribute. Some of our java package
can have the __file__ attribute set to None.
Change 2: In jython we have the jython license file in
<root> and the CPython license file in <root>/Lib. By
reversing the search sequence jython will find and
show the jython license file before the CPython file.
Closes SF patch #405853.
#403666. Specifically,
In codestr, force `c' to be global. It's unclear what the semantics
should be for a code object compiled at module scope, but bound and
run in a function. In CPython, `c' is global (by accident?) while in
Jython, `c' is local. The intent of the test clearly is to make `c'
global, so let's be explicit about it.
Jython also does not have a __builtins__ name in the module's
namespace, so we use a more portable alternative (though I'm not sure
why the test requires "__builtins__" in the g namespace).
Finally, skip the new.code() test if the new module doesn't have a
`code' attribute. Jython will never have this.
Font adjustment to improve viewing in Windows (the default monospaced font,
Courier New, seems to have no reasonable size in IE!)
Improve error handling. Try very hard to distinguish between failure to
find a module and failure during the module importing process.
Improve reloading behaviour. (Still needs some work.)
Add '.' to sys.path when running as a script at the command-line.
Don't automatically assume '-g' based on the platform. We'll just have
the batch file supply -g.
createAttributeNS(), use the parallel setAttributeNode() or
setAttributeNodeNS() to add the node to the document -- do not assume
that setAttributeNode() will operate properly for both.
Factor description of import errors into DocImportError.__str__.
Add "docother" and "fail" methods to Doc class.
Factor formatting of constants into "docother".
Increase max string repr limit to 100 characters.
Factor page generation into HTMLDoc.page.
Handle aliasing of names (objects appearing under an attribute
name different from their intrinsic __name__) by passing the
attribute name into each doc* method.
Handle methods at top level of modules (e.g. in random).
Try to do reloading efficiently.
Important fixes still to do:
Module reloading is broken by the unfortunate property that
failed imports leave an incomplete module in sys. Still
need to think of a good solution.
Can't document modules in the current directory, due to the
other unfortunate property that sys.path gets '.' when
you run 'python' but it gets the script directory when
you run a script. Need to ponder to find a solution.
The synopsis() routine does not work on .so modules.
Aliases cause duplicate copies of documentation to appear.
This is easy to fix, just more work.
Classes appear as their intrinsic name, not their attribute name,
in the class hierarchy. This should be fixed.
Inherited methods should be listed in class descriptions.
# 409287, ssl fix when using _socketobject, by Robin Dunn.
I took the opportunity to improve the way it deals with reload(socket)
for the socket function as well.
cmd.py uses raw_input(); eats SIGCLD:
I discovered a rather nasty side effect of the standard cmd.py
library today. If it's sitting inside raw_input(), any SIGCLDs that
get sent to your application get silently eaten and ignored. I'm
assuming that this is something that readline is thoughtfully doing
for me.
This patch adds an instance attr that allows the user to select to
not use raw_input(), but instead use sys.stdin.readline()
[Changed slightly to catch EOFError only for raw_input().]
along with options to print them.
Add a finalize_options() method to Distribution to do final processing
on the platform and keyword attributes
Add DistributionMetadata.write_pkg_info() method to write a PKG-INFO file
into the release tree.
This makes verbose-mode output easier to dig thru, and removes an accidental
dependence on the order of dict.items() (made visible by recent changes to
dictobject.c).
of another list comp. This caused crashes reported as SF bugs 409230
and 407800.
Note that the new tests are in a function so that the name lookup code
isn't affected by how many *other* list comprehensions are in the same
scope.
before this get forgotten again.
Should probably be set to 1.0.2 before final release of python 2.1
Does someone still release distutils separate from python?
has been changed to include an uninstaller.
I forgot to mention in the uninstaller checkin that the logfile
name (used for uninstalling) has been changed from
<module>.log to <module>-wininst.log. This should prevent
conflicts with a distutils logfile serving the same purpose.
The short form of the --bdist-dir (-d) option has been removed
because it caused conflicts with the short form of the --dist-dir
option.
for backward compatibility.
Add support for SGML declaration syntax (<!....>) to some reasonable
degree. This does not support everything allowed in SGML, but should
work with "real" HTML (internal subset in a DOCTYPE is not handled).
The content of the declaration is passed to the .handle_decl() method,
which can be overridden by subclasses.
good doc strings.)
Fix silly argument handling; was using *args but really wanted 1
optional arg.
XXX Should profile.doc be merged into the documentation and removed
from the Lib directory?