Commit graph

17202 commits

Author SHA1 Message Date
Barry Warsaw
6870bba459 Make socket.getservbyname test optional on socket module having that
attribute.  Jython does not have this function.

Closes SF patch #403667.
2001-03-23 17:40:16 +00:00
Fred Drake
6a12d8d3b4 call_sys_exitfunc(): Remove unused variable f. 2001-03-23 17:34:02 +00:00
Andrew M. Kuchling
88b0884787 Change rfc822_escape() to ensure there's a consistent amount of whitespace
after each newline, instead of just blindly inserting a space at
   the start of each line.  (Improvement suggested by Thomas Wouters)
2001-03-23 17:30:26 +00:00
Jeremy Hylton
aa90adcfb9 Add nested scopes spec to appendix.
Add new opcodes LOAD_CLOSURE, LOAD_DEREF, STORE_DEREF, MAKE_CLOSURE to
docs for dis module.

Add docs for new function and code members in Sec. 3 of ref manual.
They're present regardless of whether nested scopes are used.

Remove description of default argument hack from Sec. 7 of the ref
manual and refer the reader to the appendix.
2001-03-23 17:23:50 +00:00
Fred Drake
7190247e0b Remove the annoying __version__ definitions. 2001-03-23 17:09:02 +00:00
Fred Drake
3e8f921fb9 Lots of small changes to make this work with the Python DOM bindings
(minidom in particular); it was using PyDOM which is now obsolete.

Only write the output file on success -- this avoids updating the timestamp
on the file on failure, which confuses "make".
2001-03-23 17:01:47 +00:00
Barry Warsaw
7519e7af42 setlocale(): In _locale-missing compatibility function, string
comparison should be done with != instead of "is not".
2001-03-23 17:00:07 +00:00
Fred Drake
2262a80fb3 Pick up the "encode" function from esistools instead of defining our own
(broken) version.

Remove Conversion.err_write() -- use dbgmsg() consistently.
2001-03-23 16:53:34 +00:00
Fred Drake
a9d0450f72 No quotes around the "future" in the first use of the term "future
statement".
2001-03-23 16:47:11 +00:00
Fred Drake
f6c115ff2f Re-write to no longer depend on an old version of PyXML. This now
implements a SAX XMLReader interface instead of the old Builder interface
used with PyDOM (now obsolete).

This only depends on the standard library, not PyXML.
2001-03-23 16:42:08 +00:00
Fred Drake
a4699a71b8 Pick the "escape" function from the standard library instead of from PyXML. 2001-03-23 16:38:12 +00:00
Fred Drake
ce19496ec1 Add conversions for more of the markup -- not all of this was around when
this file was written!
2001-03-23 16:29:06 +00:00
Fred Drake
7621fa9147 Add entry for the futures appendix in the reference manual.
Correct the comment at the top of the file.
2001-03-23 16:23:21 +00:00
Fred Drake
557c1ae150 Include the futures appendix. 2001-03-23 16:21:15 +00:00
Fred Drake
39778b705d Revise the markup so that this formats and uses markup consistently with
the rest of the documentation.
2001-03-23 16:20:46 +00:00
Barry Warsaw
dfdac1af4d Several changes for Jython portability. This closes SF patch
#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.
2001-03-23 16:13:30 +00:00
Jeremy Hylton
101651c128 flesh out __all__
remove debugging code in if __debug__:

add get_children() method on SymbolTable
2001-03-23 15:41:14 +00:00
Ka-Ping Yee
26fabb0016 Allow sys.excepthook and sys.exitfunc to quietly exit with a sys.exit().
sys.exitfunc gets the last word on the exit status of the program.
2001-03-23 15:36:41 +00:00
Ka-Ping Yee
a9c6c8dab5 Extend isclass() to work for extension classes (by looking for __bases__). 2001-03-23 15:29:59 +00:00
Jeremy Hylton
324cc6ee0e Add some initial text for the appendix on future statements and nested scopes. 2001-03-23 15:29:54 +00:00
Jeremy Hylton
2c84fc8a7d Note that assignments to __debug__ are illegal 2001-03-23 14:34:06 +00:00
Jeremy Hylton
f626db77df News items for my recent checkins 2001-03-23 14:18:27 +00:00
Ka-Ping Yee
fde8a86a4e Script for starting pydoc with a GUI in Windows. 2001-03-23 14:10:39 +00:00
Jeremy Hylton
897b82123d Make it illegal to assign to __debug__ as per Guido's request. 2001-03-23 14:08:38 +00:00
Ka-Ping Yee
e280c06d59 Browser compatibility fixes.
Show methods aliased into a class from other classes.
2001-03-23 14:05:53 +00:00
Jeremy Hylton
e702481d38 Revert to ver 1.22, which was the version before the nested scopes
docs were introduced.  This loses a few small changes, but Fred says
that's okay.
2001-03-23 14:05:16 +00:00
Ka-Ping Yee
987ec903d6 Small formatting improvements. 2001-03-23 13:35:45 +00:00
Ka-Ping Yee
3bda87991a Show inherited methods, with hyperlinks to the base class they came from.
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.
2001-03-23 13:17:50 +00:00
Fred Drake
16a0b17460 Bump version number. 2001-03-23 12:12:05 +00:00
Tim Peters
a5d7b748d9 Revert the 1.8 patch, since it's implicated in nasty blowups (see Pyhon-Dev). 2001-03-23 06:14:28 +00:00
Ka-Ping Yee
28c62bbdb2 Provide a StopTokenizing exception for conveniently exiting the loop. 2001-03-23 05:22:49 +00:00
Ka-Ping Yee
ce7298ab42 Explain the difference between NL and NEWLINE. 2001-03-23 05:22:12 +00:00
Ka-Ping Yee
c608fb6389 Give a slightly better explanation of excepthook. 2001-03-23 05:17:41 +00:00
Ka-Ping Yee
f170d7fea7 Don't have trace() skip the top frame; return them all. 2001-03-23 05:14:10 +00:00
Fred Drake
6526bf863e When creating an attribute node using createAttribute() or
createAttributeNS(), use the parallel setAttributeNode() or
setAttributeNodeNS() to add the node to the document -- do not assume
that setAttributeNode() will operate properly for both.
2001-03-23 04:39:24 +00:00
Fred Drake
5e0dfaccd1 Update to the most recent weakref changes. 2001-03-23 04:36:02 +00:00
Fred Drake
b0fefc5121 Convert the weakref test suite to PyUNIT, and add tests that exercise weak
references on function objects and both bound and unbound methods.
2001-03-23 04:22:45 +00:00
Fred Drake
84a5934f8a When the regression test is run in verbose mode, make the PyUNIT-based
tests a little noisier, providing more progress information.
2001-03-23 04:21:17 +00:00
Fred Drake
db81e8ddf8 Add support for weak references to the function and method types. 2001-03-23 04:19:27 +00:00
Fred Drake
6a1c87ddf9 Add the necessary field for weak reference support to the function and
method types.
2001-03-23 04:17:58 +00:00
Guido van Rossum
4131830c23 Fix memory leak with SyntaxError. (The DECREF was originally hidden
inside a piece of code that was deemed reduntant; the DECREF was
unfortunately *not* redundant!)
2001-03-23 04:01:07 +00:00
Andrew M. Kuchling
ac1abe0bfe Add a paragraph about obmalloc turning up bugs in extension modules
Mention the new ports
2001-03-23 03:52:46 +00:00
Tim Peters
fe0d79fbeb Add Jeremy's compiler to the Windows install. 2001-03-23 03:43:35 +00:00
Andrew M. Kuchling
ef85cc84a0 Add section for PEP 241
Add PyUnit and sys.excepthook
2001-03-23 03:29:08 +00:00
Ka-Ping Yee
b5c5132d1a Add sys.excepthook.
Update docstring and library reference section on 'sys' module.
New API PyErr_Display, just for displaying errors, called by excepthook.
Uncaught exceptions now call sys.excepthook; if that fails, we fall back
    to calling PyErr_Display directly.
Also comes with sys.__excepthook__ and sys.__displayhook__.
2001-03-23 02:46:52 +00:00
Ka-Ping Yee
37f7b38eb6 Fixes for various issues reported and discovered since Python 9:
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.
2001-03-23 00:12:53 +00:00
Fredrik Lundh
015415ed14 SRE 2.1b2: increase the chances that the sre test works on other
machines...
2001-03-22 23:48:28 +00:00
Jeremy Hylton
816e149c85 First cut at a high-level symbol table interface 2001-03-22 23:32:22 +00:00
Fredrik Lundh
987f1332fe SRE 2.1b2: forgot to update one output file (sorry, Fred!) 2001-03-22 23:29:04 +00:00
Jeremy Hylton
8bf395f1aa add DEF_BOUND constant 2001-03-22 23:10:44 +00:00