]> granicus.if.org Git - python/log
python
24 years agoPop loop off the loop stack before handling the loop's else clause.
Jeremy Hylton [Thu, 12 Apr 2001 21:54:41 +0000 (21:54 +0000)]
Pop loop off the loop stack before handling the loop's else clause.
Otherwise, continue/break will attempt to affect the wrong loop.

A few more fiddles to get the SET_LINENOs consistent across compilers.

24 years agoUse new _implicitNameOp() to generate name op code for list comprehensions.
Jeremy Hylton [Thu, 12 Apr 2001 21:04:43 +0000 (21:04 +0000)]
Use new _implicitNameOp() to generate name op code for list comprehensions.

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.

24 years agoBecause this code was derived from Python 1.6.1 (amongst others), the
Guido van Rossum [Thu, 12 Apr 2001 20:53:31 +0000 (20:53 +0000)]
Because this code was derived from Python 1.6.1 (amongst others), the
CNRI copyright should be updated to include 2001.

24 years agoFix linking to classes (in class tree, and add links on unbound methods).
Ka-Ping Yee [Thu, 12 Apr 2001 20:39:14 +0000 (20:39 +0000)]
Fix linking to classes (in class tree, and add links on unbound methods).

24 years agoFix call to ModuleScanner from GUI search interface.
Ka-Ping Yee [Thu, 12 Apr 2001 20:27:31 +0000 (20:27 +0000)]
Fix call to ModuleScanner from GUI search interface.
Fix handling of unbound top-level methods.

24 years agoAdded warning that FancyURLopener prompts the user on the terminal when
Fred Drake [Thu, 12 Apr 2001 20:26:49 +0000 (20:26 +0000)]
Added warning that FancyURLopener prompts the user on the terminal when
basic authentication is needed.

Added documentation for FancyURLopener.prompt_user_passwd(), explaining
that subclasses should provide more appropriate behavior for the hosting
environment.

24 years agoAdd support for visitAssAttr to findOp().
Jeremy Hylton [Thu, 12 Apr 2001 20:24:26 +0000 (20:24 +0000)]
Add support for visitAssAttr to findOp().

24 years agopyassem.py:
Jeremy Hylton [Thu, 12 Apr 2001 20:21:39 +0000 (20:21 +0000)]
pyassem.py:

    Fix annoying bugs in flow graph layout code.  In some cases the
    implicit control transfers weren't honored.  In other cases,
    JUMP_FORWARD instructions jumped backwards.

    Remove unused arg from nextBlock().

pycodegen.py

    Add optional force kwarg to set_lineno() that will emit a
    SET_LINENO even if it is the same as the previous lineno.

    Use explicit LOAD_FAST and STORE_FAST to access list comp implicit
    variables.  (The symbol table doesn't know about them.)

24 years agoAdded a big new Helper class to provide interactive help!
Ka-Ping Yee [Thu, 12 Apr 2001 19:53:52 +0000 (19:53 +0000)]
Added a big new Helper class to provide interactive help!

24 years agoAdded module synopsis for the chapter summary.
Fred Drake [Thu, 12 Apr 2001 19:34:38 +0000 (19:34 +0000)]
Added module synopsis for the chapter summary.

Added documentation for TestCase.assertRaises().

Added text for "Mapping concepts to classes", and merged it into the
front matter instead of separating it into a new section.

Removed use of "assert" in examples.

Update the descriptions to reflect further changes from discussions on
the pyunit-interest list.

Added documentation for the defaultTestLoader object and the
TestLoader methods.

Added the assert*() names for the TestCase helper methods.

24 years agoBug 415514 reported that e.g.
Tim Peters [Thu, 12 Apr 2001 18:38:48 +0000 (18:38 +0000)]
Bug 415514 reported that e.g.
    "%#x" % 0
blew up, at heart because C sprintf supplies a base marker if and only if
the value is not 0.  I then fixed that, by tolerating C's inconsistency
when it does %#x, and taking away that *Python* produced 0x0 when
formatting 0L (the "long" flavor of 0) under %#x itself.  But after talking
with Guido, we agreed it would be better to supply 0x for the short int
case too, despite that it's inconsistent with C, because C is inconsistent
with itself and with Python's hex(0) (plus, while "%#x" % 0 didn't work
before, "%#x" % 0L *did*, and returned "0x0").  Similarly for %#X conversion.

24 years agoRevise handling of tuple arguments so that the variables names match
Jeremy Hylton [Thu, 12 Apr 2001 17:33:34 +0000 (17:33 +0000)]
Revise handling of tuple arguments so that the variables names match
those used by compile.c.  (test_grammar now depends on the names)

24 years agoConvert several \seetext references to \seerfc and \seetitle versions.
Fred Drake [Thu, 12 Apr 2001 16:47:17 +0000 (16:47 +0000)]
Convert several \seetext references to \seerfc and \seetitle versions.
These format somewhat better and include more semantic information in the
source.

24 years agoGive up trying to keep dynamically loaded extensions up to date:
Ka-Ping Yee [Thu, 12 Apr 2001 13:37:39 +0000 (13:37 +0000)]
Give up trying to keep dynamically loaded extensions up to date:
    the import.c machinery has soundly defeated my every attempt.

24 years agoRobustify getcomments() so it doesn't crash on empty files.
Ka-Ping Yee [Thu, 12 Apr 2001 13:17:17 +0000 (13:17 +0000)]
Robustify getcomments() so it doesn't crash on empty files.

24 years agoRemove forking. Doesn't work in Windows.
Ka-Ping Yee [Thu, 12 Apr 2001 12:54:36 +0000 (12:54 +0000)]
Remove forking.  Doesn't work in Windows.

24 years agoWork around the conversion of ">>" and "<<" to guillemets. Reported by
Fred Drake [Thu, 12 Apr 2001 12:37:03 +0000 (12:37 +0000)]
Work around the conversion of ">>" and "<<" to guillemets.  Reported by
Ping on the Doc-SIG mailing list.

24 years agoUpdate copyright to PSF.
Guido van Rossum [Thu, 12 Apr 2001 12:27:34 +0000 (12:27 +0000)]
Update copyright to PSF.

24 years agoTypo fixes and small touches.
Ka-Ping Yee [Thu, 12 Apr 2001 11:59:50 +0000 (11:59 +0000)]
Typo fixes and small touches.

24 years agoProperly qualify methods inherited from classes in other modules.
Ka-Ping Yee [Thu, 12 Apr 2001 10:50:23 +0000 (10:50 +0000)]
Properly qualify methods inherited from classes in other modules.
Fix so that docother() doesn't blow up.
Eliminate man() function since doc() and man() did nearly the same thing.
Various other code cleanup and refactoring to reduce duplication.
Simplify and rewrite freshimport() so modules are always up to date,
    even within packages (where reload() doesn't work).
Add finalization callback to the server (so that if the server fails to
    start for some reason, the main thread isn't left hanging).

24 years ago- New fail*() methods, and comprehensive set of assert*() synonyms
Steve Purcell [Thu, 12 Apr 2001 09:05:01 +0000 (09:05 +0000)]
- New fail*() methods, and comprehensive set of assert*() synonyms
- TestCase.failureException defines the exception that indicates a test failure
- Docstrings for TestLoader class
- Added exc_info() hack back in

24 years agoOnly treat an AugAssign as def if its the target is a Name.
Jeremy Hylton [Thu, 12 Apr 2001 07:06:25 +0000 (07:06 +0000)]
Only treat an AugAssign as def if its the target is a Name.
Fixes last bug found with test_scope.py.

24 years agoFix unpackSequence() to use _nameOp() rather than LOAD_FAST
Jeremy Hylton [Thu, 12 Apr 2001 06:52:27 +0000 (06:52 +0000)]
Fix unpackSequence() to use _nameOp() rather than LOAD_FAST

24 years agoInside a class scope always use LOAD_NAME, STORE_NAME, DEL_NAME
Jeremy Hylton [Thu, 12 Apr 2001 06:49:00 +0000 (06:49 +0000)]
Inside a class scope always use LOAD_NAME, STORE_NAME, DEL_NAME

24 years agoPreliminary support for nested scopes
Jeremy Hylton [Thu, 12 Apr 2001 06:40:42 +0000 (06:40 +0000)]
Preliminary support for nested scopes

XXX Still doesn't work right for classes
XXX Still doesn't do sufficient error checking

24 years agoDefine constants for types of scopes
Jeremy Hylton [Thu, 12 Apr 2001 06:39:24 +0000 (06:39 +0000)]
Define constants for types of scopes

24 years agoAdded a lot of text from Steve Purcell's HTML documentation.
Fred Drake [Thu, 12 Apr 2001 04:50:06 +0000 (04:50 +0000)]
Added a lot of text from Steve Purcell's HTML documentation.

Updated reference material substantially based on discussions on the
pyunit-interest mailing list (not all changes are in the code in CVS
yet).

24 years agoUse "2.1c1" since that is what Guido used for the Python version number.
Fred Drake [Thu, 12 Apr 2001 04:34:26 +0000 (04:34 +0000)]
Use "2.1c1" since that is what Guido used for the Python version number.

24 years agoUpdate to reflect the new string repr -- \n instead of \012. This is the
Fred Drake [Thu, 12 Apr 2001 04:26:24 +0000 (04:26 +0000)]
Update to reflect the new string repr -- \n instead of \012.  This is the
only documentation file that appears to be affected by the change!

24 years agoPrepare for release candidate 1... aka 2.1c1.
Guido van Rossum [Thu, 12 Apr 2001 04:11:51 +0000 (04:11 +0000)]
Prepare for release candidate 1...  aka 2.1c1.

24 years agoMarkup nit: use \envvar to mark environment variables.
Fred Drake [Thu, 12 Apr 2001 04:11:21 +0000 (04:11 +0000)]
Markup nit:  use \envvar to mark environment variables.

24 years agoWhen forming the <A> tag for a \seepep or \seerfc, make sure we strip
Fred Drake [Thu, 12 Apr 2001 04:03:22 +0000 (04:03 +0000)]
When forming the <A> tag for a \seepep or \seerfc, make sure we strip
HTML markup from the string used as the title in the TITLE attribute.

This fixes formatting in the "What's New in Python 2.1" document.

24 years agoUpdate Windows build # and installer for 2.1c1.
Tim Peters [Thu, 12 Apr 2001 04:01:39 +0000 (04:01 +0000)]
Update Windows build # and installer for 2.1c1.

24 years agoExplain popitem()
Andrew M. Kuchling [Thu, 12 Apr 2001 03:37:19 +0000 (03:37 +0000)]
Explain popitem()
Add Unixware 7 port
Ready for RC1
Minor rewrites

24 years agoNote that __debug__ assignments are legal again.
Guido van Rossum [Thu, 12 Apr 2001 02:31:27 +0000 (02:31 +0000)]
Note that __debug__ assignments are legal again.

24 years agoFix for SF bug #415514: "%#x" % 0 caused assertion failure/abort.
Tim Peters [Thu, 12 Apr 2001 00:35:51 +0000 (00:35 +0000)]
Fix for SF bug #415514: "%#x" % 0 caused assertion failure/abort.
http://sourceforge.net/tracker/index.php?func=detail&aid=415514&group_id=5470&atid=105470
For short ints, Python defers to the platform C library to figure out what
%#x should do.  The code asserted that the platform C returned a string
beginning with "0x".  However, that's not true when-- and only when --the
*value* being formatted is 0.  Changed the code to live with C's inconsistency
here.  In the meantime, the problem does not arise if you format a long 0 (0L)
instead.  However, that's because the code *we* wrote to do %#x conversions on
longs produces a leading "0x" regardless of value.  That's probably wrong too:
we should drop leading "0x", for consistency with C, when (& only when) formatting
0L.  So I changed the long formatting code to do that too.

24 years agoReverting the "unixware7" patch: atan2(0, 1) should be 0, regardless of
Tim Peters [Thu, 12 Apr 2001 00:24:41 +0000 (00:24 +0000)]
Reverting the "unixware7" patch:  atan2(0, 1) should be 0, regardless of
platform.  If it returns pi on the unixware7 platform, they have a bug in
their libm atan2.

24 years agoSOCKET.py and TERMIOS.py are no longer used in this release.
Guido van Rossum [Wed, 11 Apr 2001 23:43:09 +0000 (23:43 +0000)]
SOCKET.py and TERMIOS.py are no longer used in this release.

24 years ago(py-pdbtrack-track-stack-file): On Ken's suggestion, add "pdbtrack:"
Barry Warsaw [Wed, 11 Apr 2001 22:27:41 +0000 (22:27 +0000)]
(py-pdbtrack-track-stack-file): On Ken's suggestion, add "pdbtrack:"
prefix to the message lines.

24 years agoFixed bug in example.
Fred Drake [Wed, 11 Apr 2001 21:33:47 +0000 (21:33 +0000)]
Fixed bug in example.
This closes SF bug #415522.

Also fix markup error in text following the example.

24 years agoNoted the improved RISCOS port and the new Unixware 7 port.
Guido van Rossum [Wed, 11 Apr 2001 21:03:32 +0000 (21:03 +0000)]
Noted the improved RISCOS port and the new Unixware 7 port.

24 years agoUnixware 7 support by Billy G. Allie (SF patch 413011)
Guido van Rossum [Wed, 11 Apr 2001 20:58:20 +0000 (20:58 +0000)]
Unixware 7 support by Billy G. Allie (SF patch 413011)

24 years agoAdded news about the updated python-mode.el
Barry Warsaw [Wed, 11 Apr 2001 20:37:57 +0000 (20:37 +0000)]
Added news about the updated python-mode.el

24 years agoBumping to version 4.0 since we now support only XEmacs 21.1 and Emacs
Barry Warsaw [Wed, 11 Apr 2001 20:23:24 +0000 (20:23 +0000)]
Bumping to version 4.0 since we now support only XEmacs 21.1 and Emacs
20.7, although not all of the compatibility code for older Emacsen has
been removed.  Specifically, the old "make sure we have a current
custom.el library" stuff is removed, as is the hack-around for an
NTEmacs 19.34.6 make-temp-name bug.

Updated much of the Commentary section in the initial comments.

Much more importantly, I've integrated Ken Manheimer's pdbtrack stuff,
which is way cool.  When enabled (as by default), this turns on the
overlay arrow when pdb is entered, either in the shell buffer or in
the *Python* buffer.  Specifically:

(py-mode-map): Added C-c C-d to toggle pdb tracking.

(py-pdbtrack-do-tracking-p): New user customizable variable to control
whether overlay arrow tracking is enabled or not.  This variable is
buffer local and is turned on by default.

(py-pdbtrack-minor-mode-string): The string that's added to the minor
mode alist when actually doing pdb overlay arrow tracking.  User
customizable.

(py-pdbtrack-toggle-stack-tracking, turn-on-pdbtrack,
turn-off-pdbtrack): New commands to control pdb tracking.

(py-pdbtrack-is-tracking-p): Helper variable used to control the
display of py-pdbtrack-minor-mode-string.  Set to true when the
overlay arrow is enabled, and false when it's disabled.

(py-pdbtrack-stack-entry-regexp, py-pdbtrack-input-prompt,
py-pdbtrack-track-range): Inherited from pdbtrack.el and renamed.

(py-pdbtrack-overlay-arrow, py-pdbtrack-track-stack-file): New
functions which actually do the tracking.

(py-shell): Add py-pdbtrack-track-stack-file to
comint-output-filter-functions.

Finally, add py-pdbtrack-track-stack-file to
comint-output-filter-functions at the file level.  This and the
py-shell addition should ensure that pdb tracking is installed
regardless of the order of operation.

Also, add py-pdbtrack-minor-mode-string to minor-mode-alist.

24 years agointermediate
Barry Warsaw [Wed, 11 Apr 2001 20:23:17 +0000 (20:23 +0000)]
intermediate

24 years agoAdded some additional documentation describing how BabylMailbox
Barry Warsaw [Wed, 11 Apr 2001 20:12:33 +0000 (20:12 +0000)]
Added some additional documentation describing how BabylMailbox
actually works (it returns a message containing the visible headers,
not the original headers).  Doc change approved by Fred; closes SF bug
#412230.

24 years agoInclude a synopsis for the chapter overview.
Fred Drake [Wed, 11 Apr 2001 19:17:11 +0000 (19:17 +0000)]
Include a synopsis for the chapter overview.

24 years agotypo
Jeremy Hylton [Wed, 11 Apr 2001 16:43:13 +0000 (16:43 +0000)]
typo

24 years ago[finishing fix from earlier checkins]
Jeremy Hylton [Wed, 11 Apr 2001 16:36:25 +0000 (16:36 +0000)]
[finishing fix from earlier checkins]

Call set_lineno() in visitDiscard(), which will generate linenos for
discard statements, e.g. the statement "1/0"

Fixes SF bug #409587

24 years agoAdd support for extra (*) arguments to preorder.
Jeremy Hylton [Wed, 11 Apr 2001 16:26:05 +0000 (16:26 +0000)]
Add support for extra (*) arguments to preorder.
Change default dispatch to use extended call syntax in place of apply.

24 years agoGenerate docstrings.
Jeremy Hylton [Wed, 11 Apr 2001 16:24:30 +0000 (16:24 +0000)]
Generate docstrings.

Fixes SF buf #217004

Add method fixDocstring() to CodeGenerator.  It converts the Discard
node containing the docstring into an assignment to __doc__.

24 years agoAdd lineno attributes to Discard nodes
Jeremy Hylton [Wed, 11 Apr 2001 16:22:26 +0000 (16:22 +0000)]
Add lineno attributes to Discard nodes

24 years agoMake sure the docstring is always entered as the first element in the
Jeremy Hylton [Wed, 11 Apr 2001 16:21:51 +0000 (16:21 +0000)]
Make sure the docstring is always entered as the first element in the
consts, even if it is None.

Simplify _lookupName() by removing lots of redundant tests.

24 years agoTest cases for examples of ext call error handling.
Jeremy Hylton [Wed, 11 Apr 2001 13:53:35 +0000 (13:53 +0000)]
Test cases for examples of ext call error handling.
Fix to SF bug #414743 based on Michael Hudson's patch #414750.

24 years agoFix exception handling for non-PyFunction objects, SF bug 414743.
Jeremy Hylton [Wed, 11 Apr 2001 13:52:29 +0000 (13:52 +0000)]
Fix exception handling for non-PyFunction objects, SF bug 414743.
Fix based on patch #414750 by Michael Hudson.

New functions get_func_name() and get_func_desc() return reasonable
names and descriptions for all objects.  XXX Even objects that aren't
actually callable.

24 years agoIdiotic braino caused HTTP openers to ignore proxies.
Moshe Zadka [Wed, 11 Apr 2001 07:44:53 +0000 (07:44 +0000)]
Idiotic braino caused HTTP openers to ignore proxies.
This fixes 413135

24 years agoFixing bug 405999 -- clarifying differences between Python's
Moshe Zadka [Wed, 11 Apr 2001 07:33:08 +0000 (07:33 +0000)]
Fixing bug 405999 -- clarifying differences between Python's
getopt and GNU getopt -- Python is like classical UNIX getopt.

24 years agoBased on a comment by Konrad Hinsen on python-list:
Fred Drake [Wed, 11 Apr 2001 04:38:34 +0000 (04:38 +0000)]
Based on a comment by Konrad Hinsen on python-list:
Change "EOF" to "end-of-file", on the premise that it is easier for
new programmers to understand (at least a little).

This does not attempt to explain "file or device attached to standard
input."

24 years agoAdd a close_request method to the BaseServer so that the TCPServer class
Ka-Ping Yee [Wed, 11 Apr 2001 04:02:05 +0000 (04:02 +0000)]
Add a close_request method to the BaseServer so that the TCPServer class
can close the request connection when it's done handling it.

24 years agoUse INSTALL_SCRIPT to install script files. INSTALL_PROGRAM may try to
Neil Schemenauer [Tue, 10 Apr 2001 23:03:35 +0000 (23:03 +0000)]
Use INSTALL_SCRIPT to install script files.  INSTALL_PROGRAM may try to
strip them.  Closes patch #406287.

24 years agoAdded definition of "test fixture".
Fred Drake [Tue, 10 Apr 2001 22:25:06 +0000 (22:25 +0000)]
Added definition of "test fixture".

Added description of optional parameter to the TestSuite constructor.

Added descriptions of the TestLoader and TextTestRunner classes.

Added method descriptions for the TestCase class.

24 years agoSome new names.
Guido van Rossum [Tue, 10 Apr 2001 22:22:52 +0000 (22:22 +0000)]
Some new names.

24 years agoUpdated version of RISCOS support. SF patch 411213 by Dietmar Schwertberger
Guido van Rossum [Tue, 10 Apr 2001 22:07:43 +0000 (22:07 +0000)]
Updated version of RISCOS support. SF patch 411213 by Dietmar Schwertberger

24 years agoCompletely revamped BeOS notes, by Donn Cave (SF patch 411834).
Guido van Rossum [Tue, 10 Apr 2001 21:51:29 +0000 (21:51 +0000)]
Completely revamped BeOS notes, by Donn Cave (SF patch 411834).

24 years agoThis is for BeOS users who want to build all the modules. It's
Guido van Rossum [Tue, 10 Apr 2001 21:50:09 +0000 (21:50 +0000)]
This is for BeOS users who want to build all the modules. It's
modified from setup.py version "1.37" to support BeOS build.

Contributed by Donn Cave (SF patch 411830).

24 years agoThe lower() and tkraise() methods were calling the Canvas widget
Guido van Rossum [Tue, 10 Apr 2001 21:13:06 +0000 (21:13 +0000)]
The lower() and tkraise() methods were calling the Canvas widget
wrongly.  Fixed this.

This closes SF bug #412682.

24 years agoTypo: "BuildApple" --> "BuildApplet"
Fred Drake [Tue, 10 Apr 2001 20:32:16 +0000 (20:32 +0000)]
Typo:  "BuildApple" --> "BuildApplet"

Added reference to the webbrowser module from the nsremote description.

24 years agoBump version numbers for upcoming release candidate.
Fred Drake [Tue, 10 Apr 2001 20:19:25 +0000 (20:19 +0000)]
Bump version numbers for upcoming release candidate.

24 years agoUpdate the XML conversion specification.
Fred Drake [Tue, 10 Apr 2001 19:59:31 +0000 (19:59 +0000)]
Update the XML conversion specification.

24 years agoRemove the mapping() function from the documentation.
Fred Drake [Tue, 10 Apr 2001 19:57:58 +0000 (19:57 +0000)]
Remove the mapping() function from the documentation.

Add a description of the ReferenceError exception.

24 years agoAdd note that difflib was added in Python 2.1.
Fred Drake [Tue, 10 Apr 2001 19:56:09 +0000 (19:56 +0000)]
Add note that difflib was added in Python 2.1.

24 years agoInclude py_curses.h *after* defining _XOPEN_SOURCE_EXTENDED.
Guido van Rossum [Tue, 10 Apr 2001 19:53:37 +0000 (19:53 +0000)]
Include py_curses.h *after* defining _XOPEN_SOURCE_EXTENDED.

Michael Hudson suggested this fox for the Tru64 problem (SF bug
232597).  It looks reasonable, it works on Tru64, and it doesn't beak
anything on Linux, so I say go for it.

24 years agomapping(): Remove this function since it does not add anything to the API.
Fred Drake [Tue, 10 Apr 2001 19:11:23 +0000 (19:11 +0000)]
mapping():  Remove this function since it does not add anything to the API.

24 years agoUse the WeakKeyDictionary and WeakValueDictionary classes directly
Fred Drake [Tue, 10 Apr 2001 19:09:35 +0000 (19:09 +0000)]
Use the WeakKeyDictionary and WeakValueDictionary classes directly
instead of using the mapping() function.

24 years agoSince bdist_wininst.py contains the installer executable, it had to be
Thomas Heller [Tue, 10 Apr 2001 18:57:07 +0000 (18:57 +0000)]
Since bdist_wininst.py contains the installer executable, it had to be
rebuild.

24 years agoNormalize tabs to spaces.
Fred Drake [Tue, 10 Apr 2001 18:49:09 +0000 (18:49 +0000)]
Normalize tabs to spaces.

Update the attribution for the "Curses Programming with Python" How-To.

Change the way the reference to the Demo/curses/ directory is marked up.

24 years agoAdd reference to the DDJ article discussing a similar algorithm.
Fred Drake [Tue, 10 Apr 2001 18:41:16 +0000 (18:41 +0000)]
Add reference to the DDJ article discussing a similar algorithm.

24 years agoAdd corresponding support for the alltt environment to the HTML generator.
Fred Drake [Tue, 10 Apr 2001 17:13:39 +0000 (17:13 +0000)]
Add corresponding support for the alltt environment to the HTML generator.

24 years agoImport the alltt package and wrap that environment in a similar way to
Fred Drake [Tue, 10 Apr 2001 15:53:06 +0000 (15:53 +0000)]
Import the alltt package and wrap that environment in a similar way to
the way we handle verbatim, so that it picks up the same indentation and
minipage behavior.

24 years agoFix two unqualified except: clauses.
Guido van Rossum [Tue, 10 Apr 2001 15:44:33 +0000 (15:44 +0000)]
Fix two unqualified except: clauses.

This came out of SF bug #411881.

24 years agoFix an unqualified except:.
Guido van Rossum [Tue, 10 Apr 2001 15:42:02 +0000 (15:42 +0000)]
Fix an unqualified except:.

This came out of SF bug #411881.

24 years agoTry an except: after an import into "except ImportError".
Guido van Rossum [Tue, 10 Apr 2001 15:37:12 +0000 (15:37 +0000)]
Try an except: after an import into "except ImportError".

This came out of SF bug #411881.

Note that there's another unqualified except: still.

24 years agoAdd documentation for getmoduleinfo() and getmodulename().
Fred Drake [Tue, 10 Apr 2001 15:12:34 +0000 (15:12 +0000)]
Add documentation for getmoduleinfo() and getmodulename().

24 years agoSome other tests, when failing, don't always remove their TESTFN file.
Guido van Rossum [Tue, 10 Apr 2001 15:01:20 +0000 (15:01 +0000)]
Some other tests, when failing, don't always remove their TESTFN file.
Try to do it for them, so our mkdir() operation doesn't fail.

24 years agoWhen doing the quick test to see whether large files are supported,
Guido van Rossum [Tue, 10 Apr 2001 14:50:51 +0000 (14:50 +0000)]
When doing the quick test to see whether large files are supported,
catch IOError as well as OverflowError.  I found that on Tru64 Unix
this was raised; probably because the OS (or libc) doesn't support
large files but the architecture is 64 bits!

24 years agoWhen zlib can't be imported, zipfile raises RuntimeError, which causes
Guido van Rossum [Tue, 10 Apr 2001 14:46:39 +0000 (14:46 +0000)]
When zlib can't be imported, zipfile raises RuntimeError, which causes
the test to be marked as failing rather than skipped.  Add an explicit
"import zlib" to prevent this.

24 years agoFix typo in instantiation of ErrorDuringImport.
Ka-Ping Yee [Tue, 10 Apr 2001 12:22:01 +0000 (12:22 +0000)]
Fix typo in instantiation of ErrorDuringImport.

24 years agoFix synopsis() so it can handle binary module files.
Ka-Ping Yee [Tue, 10 Apr 2001 11:46:02 +0000 (11:46 +0000)]
Fix synopsis() so it can handle binary module files.
Avoid ever using popen on Windows, since it's broken there.
Factor out the business of getting the summary line into splitdoc().
Use the modulename() routine in inspect.
Show all members of modules and classes rather than filtering on leading '_'.
Small typo and formtating fixes.
Don't show warnings when running "pydoc -k".

24 years agoAdd getmodulename() and getmoduleinfo() routines to inspect filenames.
Ka-Ping Yee [Tue, 10 Apr 2001 11:43:00 +0000 (11:43 +0000)]
Add getmodulename() and getmoduleinfo() routines to inspect filenames.

24 years agoIn the typeset versions, the legal notices had grown past the one-page
Fred Drake [Tue, 10 Apr 2001 05:26:29 +0000 (05:26 +0000)]
In the typeset versions, the legal notices had grown past the one-page
size.  This constrains them to fit in one page again.

24 years agotest_pickle works on sizeof(long)==8 boxes again.
Tim Peters [Tue, 10 Apr 2001 05:02:52 +0000 (05:02 +0000)]
test_pickle works on sizeof(long)==8 boxes again.
pickle.py
    The code implicitly assumed that all ints fit in 4 bytes, causing all
    sorts of mischief (from nonsense results to corrupted pickles).
    Repaired that.
marshal.c
    The int marshaling code assumed that right shifts of signed longs
    sign-extend.  Repaired that.

24 years agoAck -- this module mixes tabs and spaces, and what appears to be a mix
Tim Peters [Tue, 10 Apr 2001 04:35:28 +0000 (04:35 +0000)]
Ack -- this module mixes tabs and spaces, and what appears to be a mix
of 2-space and 4-space indents.  Whatever, when I saw the checkin diff it
was clear that what my editor thinks a tab means didn't match this module's
belief.  Removed all the tabs from the lines I added and changed, left
everything else alone.

24 years agoOn a sizeof(long)==8 machine, ints in range(2**31, 2**32) were getting
Tim Peters [Tue, 10 Apr 2001 04:22:00 +0000 (04:22 +0000)]
On a sizeof(long)==8 machine, ints in range(2**31, 2**32) were getting
pickled into the signed(!) 4-byte BININT format, so were getting unpickled
again as negative ints.  Repaired that.
Added some minimal docs at the top about what I've learned about the pickle
format codes (little of which was obvious from staring at the code,
although that's partly because all the size-related bugs greatly obscured
the true intent of the code).
Happy side effect:  because save_int() needed to grow a *proper* range
check in order to fix this bug, it can now use the more-efficient BININT1,
BININT2 and BININT formats when the long's value is small enough to fit
in a signed 4-byte int (before this, on a sizeof(long)==8 box it always
used the general INT format for negative ints).
test_cpickle works again on sizeof(long)==8 machines.  test_pickle is
still busted big-time.

24 years agoTest full range of native ints. This exposes two more binary pickle
Tim Peters [Tue, 10 Apr 2001 03:41:41 +0000 (03:41 +0000)]
Test full range of native ints.  This exposes two more binary pickle
bugs on sizeof(long)==8 machines.  pickle.py has no idea what it's
doing with very large ints, and variously gets things right by accident,
computes nonsense, or generates corrupt pickles.  cPickle fails on
cases 2**31 <= i < 2**32:  since it *thinks* those are 4-byte ints
(the "high 4 bytes" are all zeroes), it stores them in the (signed!) BININT
format, so they get unpickled as negative values.

24 years agoCorrect the header over the string of licenses -- it's "PYTHON", not
Guido van Rossum [Tue, 10 Apr 2001 03:37:31 +0000 (03:37 +0000)]
Correct the header over the string of licenses -- it's "PYTHON", not
"Python 1.6.1".

24 years agoAppend the revision number for each file to the output.
Guido van Rossum [Tue, 10 Apr 2001 03:31:27 +0000 (03:31 +0000)]
Append the revision number for each file to the output.

(Yes, this is a new feature right before the 2.1 release.  No, I can't
imagine this would seriously break anybody's code.  In fact, most
users of this script are probably *happy* to see this addition.)

24 years agoMechanical fiddling for easier reading: every "if" test was enclosed in
Tim Peters [Tue, 10 Apr 2001 02:48:53 +0000 (02:48 +0000)]
Mechanical fiddling for easier reading:  every "if" test was enclosed in
parens, but no "while" test.  Removed the former.

24 years agoCritical fix: if cPickle on a sizeof(long)==8 box is used to read a
Tim Peters [Tue, 10 Apr 2001 01:54:42 +0000 (01:54 +0000)]
Critical fix:  if cPickle on a sizeof(long)==8 box is used to read a
binary pickle, and the latter contains a pickle of a negative Python
int i written on a sizeof(long)==4 box (and whether by cPickle or
pickle.py), it's read incorrectly as i + 2**32.  The patch repairs that,
and allows test_cpickle.py (to which I added a relevant test case earlier
today) to work again on sizeof(long)==8 boxes.
There's another (at least one) sizeof(long)==8 binary pickle bug, but in
pickle.py instead.  That bug is still there, and test_pickle.py doesn't
catch it yet (try pickling and unpickling, e.g., 1 << 46).

24 years agoMake on Alpha Tru64 5.1 (as installed on the SF compile farm) doesn't
Guido van Rossum [Mon, 9 Apr 2001 22:23:22 +0000 (22:23 +0000)]
Make on Alpha Tru64 5.1 (as installed on the SF compile farm) doesn't
think that a command starting with '#' is a comment, so move the one
comment in such a position (in the rule for building $(LIBRARY)) to a
harmless position.

24 years agoAdd globals to list of names returned by get_names().
Jeremy Hylton [Mon, 9 Apr 2001 20:11:59 +0000 (20:11 +0000)]
Add globals to list of names returned by get_names().
Fix func arg processing to handle args in tuples.
In test code, skip names beginning with '.'.