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?
can be called from a start tag handler. When the corresponding end
tag is read the flag is cleared. However, it didn't get cleared when
the start tag was for an empty element of the type <tag .../>. This
modification fixes the problem.
- addition of a DocumentFragment implementation and createDocumentFragment method
- proper setting of ownerDocument for all nodes
- setting of namespaceURI to None in Element as a class attribute
- addition of setAttributeNodeNS and removeAttributeNodeNS as aliases
for setAttributeNode and removeAttributeNode
- support for inheriting from DOMImplementation to extend it with
additional features (to override the Document class)
in pulldom:
- support for nodes (comment and PI) that occur before he document element;
that became necessary as pulldom now delays creation of the document
until it has the document element.
UNIX style fork/execve/wait are not fully compatible with thread
support on BeOS. For Python, that means neither fork() from import
nor import from a fork work reliably. os._execvpe() does the latter,
importing tempfile to set up a tantalizing target for hackers. This
patch replaces both the tempfile name generation and the exec that
uses it, in case we're on BeOS. Need this for
setup:distutils:execvp(); symptoms are random crashes and internal
BeOS error messages about th name, in case we're on BeOS. It's an
issue because setup.py + distutils calls os.execvp(); symptoms are
random crashes during setup.py, and internal BeOS error messages
about thread IDs.
as long as the filename also doesn't end in a suffix that indicates
a binary file (according to the flags in imp.get_suffixes()).
Shrink try...except clauses and replace some of them with explicit checks.
Add checks for .pyo and .pyd.
Collapse docfunction, docmethod, docbuiltin into the one method docroutine.
Small formatting fixes.
Link the segments of a package path in the title.
Link to the source file only if it exists.
Allow modules (e.g. repr.py) to take precedence over built-ins (e.g. repr()).
Add interruptible synopsis scanner (so we can do searches in the background).
Make HTTP server quit.
Add small GUI for controlling the server and launching searches (like -k).
(Tested on Win2k, Win98, and Linux.)
Handle <... at 001B6378> like <... at 0x120f80> (%p is platform-dependent).
Fix RCS version tag handling.
Move __main__ behaviour into a function, pydoc.cli().
to the class namespace.
Allow FTP.close() to be called more than once without tossing cookies.
(This seems to be a fairly common idiom for .close() methods, so let's
try to be consistent.)
warn_explicit(message, category, filename, lineno, module, registry)
The regular warn() call calculates a bunch of values and calls
warn_explicit() with these.
This will be used to issue better syntax warnings.
header and central directory structures, and use them as appropriate.
The point being to make it easier to tell what is getting pulled out
where; magic numbers are evil!
Change the computation of the ZipInfo.file_offset field to use the
length of the relevant "extra" field -- there are two different ones,
and the wrong one had been used. ;-(
This closes SF tracker patch #403276, but more verbosely than the
proposed patch.
ZipFile.__del__() when there was an IOError opening the underlying
file in ZipFile.__init__().
This is an odd test: since the exception is in the __del__() method,
it is not propogated. This test will trigger it but regrtest.py
does not detect the failure (not sure why); we are dependent on it
actually being noticed by a user to get a new bug report if it ever
fails. ;-(
On the other hand, this makes sure that code gets exercised, so
a failure could be noticed!
the Cygwin-specific compiler class.
(According to Jason Tishler, cygwinccompiler needs some work to
handle the differences in Cygwin- and MSVC-Python. Makefile and
config files are currently ignored by cygwinccompiler, as it was
written to support cygwin for extensions which are intended to be
used with the standard MSVC built Python.)
compile.h: #define NESTED_SCOPES_DEFAULT 0 for Python 2.1
__future__ feature name: "nested_scopes"
symtable.h: Add st_nested_scopes slot. Define flags to track exec and
import star.
Lib/test/test_scope.py: requires nested scopes
compile.c: Fiddle with error messages.
Reverse the sense of ste_optimized flag on
PySymtableEntryObjects. If it is true, there is an optimization
conflict.
Modify get_ref_type to respect st_nested_scopes flags.
Refactor symtable_load_symbols() into several smaller functions,
which use struct symbol_info to share variables. In new function
symtable_update_flags(), raise an error or warning for import * or
bare exec that conflicts with nested scopes. Also, modify handle
for free variables to respect st_nested_scopes flag.
In symtable_init() assign st_nested_scopes flag to
NESTED_SCOPES_DEFAULT (defined in compile.h).
Add preliminary and often incorrect implementation of
symtable_check_future().
Add symtable_lookup() helper for future use.
- func.__dict__ is None until the first attribute is assigned
- del func.__dict__ is equivalent to func.__dict__ = None
- disallowing assignment to function attribute through unbound method
(it was always illegal to assign through bound method).
- verifying that setting attribute explicitly on underlying function
via meth.im_func is okay.
will not have been done, and applications need to know that. Also, do
not print a message about it; the exception is the right thing.
This closes SF bug #133717.
NamedNodeMap.setNamedItem(). Martin, should I sync the PyXML tree, too,
or do you want to do it? (I don't know if you're wrapping the 0.6.4
release right now.)