Commit Graph

17411 Commits

Author SHA1 Message Date
Guido van Rossum 4fb60361dc Note additions to pydoc and pstats. 2001-04-13 00:46:14 +00:00
Eric S. Raymond 4f3980d3cb Added a test main to the pstats library that can help you browse profile dumps. 2001-04-13 00:23:01 +00:00
Fred Drake f4e5bd9df5 _synthesize(): Helper function: when the users passes a specific
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.
2001-04-12 22:07:27 +00:00
Jeremy Hylton bb0bae6da2 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.
2001-04-12 21:54:41 +00:00
Jeremy Hylton 13d70944cb 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.
2001-04-12 21:04:43 +00:00
Guido van Rossum 23f7aed2a7 Because this code was derived from Python 1.6.1 (amongst others), the
CNRI copyright should be updated to include 2001.
2001-04-12 20:53:31 +00:00
Ka-Ping Yee b7a48300cd Fix linking to classes (in class tree, and add links on unbound methods). 2001-04-12 20:39:14 +00:00
Ka-Ping Yee 6dcfa3884d Fix call to ModuleScanner from GUI search interface.
Fix handling of unbound top-level methods.
2001-04-12 20:27:31 +00:00
Fred Drake 47f11ce591 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.
2001-04-12 20:26:49 +00:00
Jeremy Hylton 614e87f286 Add support for visitAssAttr to findOp(). 2001-04-12 20:24:26 +00:00
Jeremy Hylton 542b11acfd 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.)
2001-04-12 20:21:39 +00:00
Ka-Ping Yee 35cf0a3f90 Added a big new Helper class to provide interactive help! 2001-04-12 19:53:52 +00:00
Fred Drake 62a26699c4 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.
2001-04-12 19:34:38 +00:00
Tim Peters fff5325078 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.
2001-04-12 18:38:48 +00:00
Jeremy Hylton bfb0cf822b Revise handling of tuple arguments so that the variables names match
those used by compile.c.  (test_grammar now depends on the names)
2001-04-12 17:33:34 +00:00
Fred Drake e20bd19f86 Convert several \seetext references to \seerfc and \seetitle versions.
These format somewhat better and include more semantic information in the
source.
2001-04-12 16:47:17 +00:00
Ka-Ping Yee 131216290b Give up trying to keep dynamically loaded extensions up to date:
the import.c machinery has soundly defeated my every attempt.
2001-04-12 13:37:39 +00:00
Ka-Ping Yee b910efe8a9 Robustify getcomments() so it doesn't crash on empty files. 2001-04-12 13:17:17 +00:00
Ka-Ping Yee fd540695e7 Remove forking. Doesn't work in Windows. 2001-04-12 12:54:36 +00:00
Fred Drake 24e7a29292 Work around the conversion of ">>" and "<<" to guillemets. Reported by
Ping on the Doc-SIG mailing list.
2001-04-12 12:37:03 +00:00
Guido van Rossum ce260d569e Update copyright to PSF. 2001-04-12 12:27:34 +00:00
Ka-Ping Yee 662469619a Typo fixes and small touches. 2001-04-12 11:59:50 +00:00
Ka-Ping Yee 9aa0d90947 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).
2001-04-12 10:50:23 +00:00
Steve Purcell 15d8927f7e - 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
2001-04-12 09:05:01 +00:00
Jeremy Hylton 5c9aad6043 Only treat an AugAssign as def if its the target is a Name.
Fixes last bug found with test_scope.py.
2001-04-12 07:06:25 +00:00
Jeremy Hylton 3f76b7e6e4 Fix unpackSequence() to use _nameOp() rather than LOAD_FAST 2001-04-12 06:52:27 +00:00
Jeremy Hylton 660cc77abb Inside a class scope always use LOAD_NAME, STORE_NAME, DEL_NAME 2001-04-12 06:49:00 +00:00
Jeremy Hylton 364f9b9e2f Preliminary support for nested scopes
XXX Still doesn't work right for classes
XXX Still doesn't do sufficient error checking
2001-04-12 06:40:42 +00:00
Jeremy Hylton 53ee2a94c7 Define constants for types of scopes 2001-04-12 06:39:24 +00:00
Fred Drake 0056a427bb 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).
2001-04-12 04:50:06 +00:00
Fred Drake c790e08ac1 Use "2.1c1" since that is what Guido used for the Python version number. 2001-04-12 04:34:26 +00:00
Fred Drake 0c14961872 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!
2001-04-12 04:26:24 +00:00
Guido van Rossum bfedde832b Prepare for release candidate 1... aka 2.1c1. 2001-04-12 04:11:51 +00:00
Fred Drake 9ad526fac3 Markup nit: use \envvar to mark environment variables. 2001-04-12 04:11:21 +00:00
Fred Drake e0197bfaeb 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.
2001-04-12 04:03:22 +00:00
Tim Peters fd09e86109 Update Windows build # and installer for 2.1c1. 2001-04-12 04:01:39 +00:00
Andrew M. Kuchling db7657d4e0 Explain popitem()
Add Unixware 7 port
Ready for RC1
Minor rewrites
2001-04-12 03:37:19 +00:00
Guido van Rossum c993272786 Note that __debug__ assignments are legal again. 2001-04-12 02:31:27 +00:00
Tim Peters 711088d9b8 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.
2001-04-12 00:35:51 +00:00
Tim Peters 4642cb9ac9 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.
2001-04-12 00:24:41 +00:00
Guido van Rossum ac6985f42f SOCKET.py and TERMIOS.py are no longer used in this release. 2001-04-11 23:43:09 +00:00
Barry Warsaw c8c1a5b7b6 (py-pdbtrack-track-stack-file): On Ken's suggestion, add "pdbtrack:"
prefix to the message lines.
2001-04-11 22:27:41 +00:00
Fred Drake b942c2f788 Fixed bug in example.
This closes SF bug #415522.

Also fix markup error in text following the example.
2001-04-11 21:33:47 +00:00
Guido van Rossum 34d37dc5d2 Noted the improved RISCOS port and the new Unixware 7 port. 2001-04-11 21:03:32 +00:00
Guido van Rossum 2242f2fbd0 Unixware 7 support by Billy G. Allie (SF patch 413011) 2001-04-11 20:58:20 +00:00
Barry Warsaw 11e89c72c1 Added news about the updated python-mode.el 2001-04-11 20:37:57 +00:00
Barry Warsaw 420d0f775c 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.
2001-04-11 20:23:24 +00:00
Barry Warsaw 4f577d2f47 intermediate 2001-04-11 20:23:17 +00:00
Barry Warsaw c3cbbaf513 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.
2001-04-11 20:12:33 +00:00
Fred Drake eedf985056 Include a synopsis for the chapter overview. 2001-04-11 19:17:11 +00:00