Commit Graph

111 Commits

Author SHA1 Message Date
Ka-Ping Yee
9a2dcf8ac1 Fix SF bug #417833 (pydoc HTTP reload failure) by removing from
sys.modules all submodules of a the given module/package path
when trying to reload a module.
2005-11-05 05:04:41 +00:00
Ka-Ping Yee
a487e4eb05 Accept patch to resolve SF bug #651124. 2005-11-05 04:49:18 +00:00
Fred Drake
db390c1ad8 fix typos, mostly in comments 2005-10-28 14:39:47 +00:00
Jeremy Hylton
3e0055f8c6 Merge ast-branch to head
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.

The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Georg Brandl
8b813db2ef bug [ 729103 ] Cannot retrieve name of super object 2005-10-01 16:32:31 +00:00
Georg Brandl
9443242463 That was one too much. 2005-07-22 21:52:25 +00:00
Georg Brandl
7eb4b7d177 Fix all wrong instances of "it's". 2005-07-22 21:49:32 +00:00
Ka-Ping Yee
bba6acc714 Use getdoc(object) instead of object.__doc__ to fix indentation problems.
Thanks to Robert Dick <dickrp@ece.northwestern.edu> for reporting this bug
and submitting a patch.

Adjust doc(object) to display useful documentation for plain values (e.g.
help([]) now shows the methods on the list instead of just printing "[]").

(This change has been tested interactively, by generating docs for the
standard library, and by running the module documentation webserver.)
2005-02-19 22:58:26 +00:00
Raymond Hettinger
dbecd93b72 Replace list of constants with tuples of constants. 2005-02-06 06:57:08 +00:00
Johannes Gijsbers
9ddb300598 Patch #936774: unify the display of data descriptors, including slots,
properties, and custom descriptors.

* removed special handling of properties

* added special handling of data descriptors - All data descriptors are grouped
  together in a section. For each item, the attribute name and doc string, if
  present, is displayed.

* disabled display of __slots__ attribute - since slots are descriptors, they
  are listed in the section described above

Thanks to John Belmonte for the patch!
2005-01-08 20:16:43 +00:00
Raymond Hettinger
ed2dbe3f33 SF patch #1094007: Remove witty comment in pydoc.py
(Removed at Ping's request.)
2005-01-01 07:51:01 +00:00
Martin v. Löwis
6fe8f1928f Back out rev 1.96; see #1009389. 2004-11-14 10:21:04 +00:00
Johannes Gijsbers
8de645a176 Patch #1061931 / bug #971872: factor out part of spillproperties, so
properties are also documented if help(Class.<property>) is called
instead of help(Class).
2004-11-07 19:16:05 +00:00
Johannes Gijsbers
4c11f6088a Patch #934356: if a module defines __all__, believe that rather than using
heuristics for filtering out imported names.
2004-08-30 14:13:04 +00:00
Martin v. Löwis
e09bd93685 Patch #997284: Allow pydoc to work with XP Themes (.manifest file)
Will backport to 2.3.
2004-08-22 16:13:26 +00:00
Martin v. Löwis
ac37f3d001 Patch #1009389: Make __credits__ a Unicode object. 2004-08-22 16:08:04 +00:00
Johannes Gijsbers
e7691d36b7 Use readline/raw_input() in pydoc.Helper.interact if available and self.input
is sys.stdin. Based on a patch (#726204) by Dmitry Vasiliev and a comment from
Guido in an older patch (#549901).
2004-08-17 13:21:53 +00:00
Brett Cannon
84601f14a3 Change pydoc.stripid() be able to match against 64-bit addresses by having
regex match from 6 to 16 characters.
2004-06-19 01:22:48 +00:00
Brett Cannon
c6c1f478d9 pydoc.stripid() is now case-insensitive for its regex to support platforms that
have pointer addresses in uppercase.

Closes bug #934282.  Thanks Robin Becker.
2004-06-19 01:02:51 +00:00
Skip Montanaro
a5616d2255 Respect a module's __all__ attribute. Closes #969938. 2004-06-11 04:46:12 +00:00
Skip Montanaro
f2134842b4 correct name error caught by Neal Norwitz with pychecker 2004-06-07 02:40:05 +00:00
Raymond Hettinger
756b3f3c15 * Move collections.deque() in from the sandbox
* Add unittests, newsitem, and whatsnew
* Apply to Queue.py mutex.py threading.py pydoc.py and shlex.py
* Docs are forthcoming
2004-01-29 06:37:52 +00:00
Martin v. Löwis
f9b08b8e60 Patch #785689: Use basename in usage. Backported to 2.3. 2003-10-31 13:05:21 +00:00
Raymond Hettinger
6b59f5f3fd Let library modules use the new keyword arguments for list.sort(). 2003-10-16 05:53:16 +00:00
Skip Montanaro
4997a69fe4 display link to module docs when it looks like the object module is a core
module
2003-09-10 16:47:51 +00:00
Skip Montanaro
0fe8fce7e3 (HTML|Text)Repr.repr1: Guard against objects whos types have no __name__
attribute. Patch and bug report from Geoff Talvola. Closes patch #672855.
2003-06-27 15:45:41 +00:00
Martin v. Löwis
b8c084e82c Support keyword and topics help in cli(). Fixes #715782. 2003-06-14 09:03:46 +00:00
Brett Cannon
28a4f0f965 Have pydoc try handling an object as "other" if the object does not act the way
it expects based on what inspect classifies it as.

Closes bug #729103 .
2003-06-11 23:38:55 +00:00
Neal Norwitz
54f871e193 Fix SF bug #735694, Pydoc.py fixes links
Modified the patch some.  Fixed invalid link in UNICODE (to STRING).
Also updates some references.
2003-05-26 13:49:54 +00:00
Martin v. Löwis
e59e2bab8f Patch #711902: Cause pydoc to show data descriptor __doc__ strings. 2003-05-03 09:09:02 +00:00
Neal Norwitz
742dde4ddd SF patch #706338, Fix a few broken links in pydoc by Greg Chapman 2003-03-30 20:31:34 +00:00
Ka-Ping Yee
d9e213eeca Hide private names beginning with _ (but don't hide __special__ names).
Clean up section headings; make the bars on the left less fat.
Adjust the display of properties slightly.
Don't show stuff inherited from the base 'object' type.
2003-03-28 16:35:51 +00:00
Neal Norwitz
4f959d2c73 Fix SF patch #695581, "returnself" -> "return self" 2003-03-01 15:22:41 +00:00
Guido van Rossum
68468eba63 Get rid of many apply() calls. 2003-02-27 20:14:51 +00:00
Guido van Rossum
97dede0202 Fix for SF 686380, from SF patch 686771 by Ping. (errors trying to
get help on os attributes)
2003-02-16 01:12:32 +00:00
Neal Norwitz
f98159c376 Fix SF bug #642168, help() fails for some builtin topics
Fix pydoc when doing help for:  and, or, not, UNICODE.

Will backport.
2003-02-07 20:49:40 +00:00
Tim Peters
550e4e5583 SF bug 666444: 'help' makes linefeed only under Win32.
Reverting one of those irritating "security fixes".  fdopen() opens
files in binary mode.  That makes pydoc skip the \r\n on Windows that's
need to make the output readable in the shell.  Screw it.
2003-02-07 01:53:46 +00:00
Martin v. Löwis
5b26abb37a Gracefully delay runtime error up to 1s. Add .willdispatch(). 2002-12-28 09:23:09 +00:00
Raymond Hettinger
4f759d8504 Correct erroneous parenthesis placement in the delta from 1.63 to 1.64. 2002-11-02 02:02:46 +00:00
Tim Peters
fb05c4e5bb SF bug 630824: pydoc Helper keywords missing 'yield'
Wow, what a brittle subsystem!  Fixed, maybe, provided Fred doesn't
shuffle the docs around.

Bugfix candidate.
2002-10-30 05:21:00 +00:00
Raymond Hettinger
fca3bb6a29 Explicitly use floor division 2002-10-21 04:44:11 +00:00
Skip Montanaro
d404bee2e2 try executing 'less' in a parenthesized subshell - prevents systems like
Solaris from squawking if less isn't available.  See
http://python.org/sf/612111 for details.
2002-09-26 21:44:57 +00:00
Jack Jansen
b2628b0f37 Added the standard MacOSX location for documentation inside a framework
to the list of places where pydoc looks for HTML documents.
2002-08-23 08:40:42 +00:00
Ka-Ping Yee
45daeb093f Extend stripid() to handle strings ending in more than one '>'.
Add resolve() to handle looking up objects and names (fix SF bug 586931).
Add a nicer error message when given a filename that doesn't exist.
2002-08-11 15:11:33 +00:00
Guido van Rossum
3b0a3293c3 Massive changes from SF 589982 (tempfile.py rewrite, by Zack
Weinberg).  This changes all uses of deprecated tempfile functions to
the recommended ones.
2002-08-09 16:38:32 +00:00
Guido van Rossum
fce538c31e Add a coding cookie, because of the møøse quote. 2002-08-06 17:29:38 +00:00
Raymond Hettinger
32200aeac6 Replaced obsolete stat module constants with equivalent attributes 2002-06-01 19:51:15 +00:00
Raymond Hettinger
54f0222547 SF 563203. Replaced 'has_key()' with 'in'. 2002-06-01 14:18:47 +00:00
Guido van Rossum
5e355b244f In both spilldata() functions, pretend that the docstring for
non-callable objects is always None.  This makes for less confusing
output and fixes the problem reported in SF patch #550290.
2002-05-21 20:56:15 +00:00
Guido van Rossum
8ca162f417 Partial introduction of bools where appropriate. 2002-04-07 06:36:23 +00:00