Commit Graph

17521 Commits

Author SHA1 Message Date
Ka-Ping Yee c99e0f1862 Robustify getfile() against classes that lie about their __module__s
(such as the exceptions in _weakref and _locale!)
2001-04-13 12:10:40 +00:00
Ka-Ping Yee da79389f10 Word-wrap the list of cross-references. 2001-04-13 11:02:51 +00:00
Ka-Ping Yee 79c009d767 Another pass through the topic table to fill in cross references.
Restore Helper.__repr__ for now.
2001-04-13 10:53:25 +00:00
Ka-Ping Yee dec96e92ae Make force-loading optional; don't force-load in interactive mode.
Make synopsis() load modules as '__temp__' so they don't clobber anything.
Change "constants" section to "data" section.
Don't show __builtins__ or __doc__ in "data" section.
For Bob Weiner: don't boldface text in Emacs shells or dumb terminals.
Remove Helper.__repr__ (it really belongs in site.py, and should be                 guarded by a check for len(inspect.stack) <= 2).
2001-04-13 09:55:49 +00:00
Ka-Ping Yee 202c99b2e0 Remove duplicate type objects from isroutine() and isbuiltin().
Make getmodule() on a module return the module itself.
2001-04-13 09:15:08 +00:00
Martin v. Löwis 88ad12afac Patch #415777: new grouping strategy.
fixes bug #414940, and redoes the fix for #129417 in a different way.
It also fixes a number of other problems with locale-specific formatting:
If there is leading or trailing spaces, then no grouping should be applied
in the spaces, and the total length of the string should not be changed
due to grouping.
Also added test case which works only if the en_US locale is available.
2001-04-13 08:09:50 +00:00
Tim Peters 613b2222cf Whitespace normalization. 2001-04-13 05:37:27 +00:00
Fred Drake e1f3ed6b58 Update the helper scripts that push development docs to SourceForge;
this version avoids having to build a separate authenticated connection
to push the update-docs.sh script to SF.
2001-04-13 05:13:55 +00:00
Fred Drake 3de33697ef Add entry for ColorPicker documentation as well. 2001-04-13 04:50:01 +00:00
Fred Drake b6bdcb23df Documentation for Just's ColorPicker module, so the Mac OS guys get
something out of this documentation release as well.  ;-)
2001-04-13 04:49:30 +00:00
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