Commit Graph

150 Commits

Author SHA1 Message Date
Alexander Belopolsky d501dde89d Merged revisions 82547 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82547 | alexander.belopolsky | 2010-07-04 13:00:20 -0400 (Sun, 04 Jul 2010) | 3 lines

  Issue #9118: help(None) will now return NoneType doc instead of
  starting interactive help.
........
2011-01-11 15:35:23 +00:00
Senthil Kumaran aa8954523c Merged revisions 84173 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84173 | senthil.kumaran | 2010-08-19 01:02:21 +0530 (Thu, 19 Aug 2010) | 3 lines

  Fix Issue672656 - Securing pydoc server.
........
2010-08-18 19:35:53 +00:00
Georg Brandl 004c74d468 Merged revisions 83370,83372-83374,83384 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83370 | georg.brandl | 2010-07-31 23:51:48 +0200 (Sa, 31 Jul 2010) | 5 lines

  #8198: the Helper class should not save the stdin and stdout objects
  at import time, rather by default use the current streams like the
  other APIs that output help.
........
  r83372 | georg.brandl | 2010-08-01 00:05:54 +0200 (So, 01 Aug 2010) | 1 line

  #4007: remove *.a and *.so.X.Y files in "make clean".
........
  r83373 | georg.brandl | 2010-08-01 00:11:11 +0200 (So, 01 Aug 2010) | 1 line

  #5147: revert accidental indentation of header constant for MozillaCookieJar.
........
  r83374 | georg.brandl | 2010-08-01 00:32:52 +0200 (So, 01 Aug 2010) | 1 line

  #5146: handle UID THREAD command correctly.
........
  r83384 | georg.brandl | 2010-08-01 08:32:55 +0200 (So, 01 Aug 2010) | 1 line

  Build properties using lambdas.  This makes test_pyclbr pass again, because it does not think that input and output are methods anymore.
........
2010-08-01 19:06:51 +00:00
Ronald Oussoren 9545a23c7f In a number of places code still revers
to "sys.platform == 'mac'" and that is
dead code because it refers to a platform
that is no longer supported (and hasn't been
supported for several releases).

Fixes issue #7908 for the trunk.
2010-05-05 19:09:31 +00:00
Brian Curtin a01da93d85 Fix a test_pydoc failure on Neal Norwitz's buildbot. 2010-04-01 04:02:00 +00:00
Brian Curtin fe4900c0bc Correct what was intended to be a single-tuple to just be a != check.
Thanks to Éric Araujo for noticing that.
2010-03-31 17:36:09 +00:00
Brian Curtin aeb2e8295d Fix #8225. xml.etree was displaying an incorrect link when viewed in help. 2010-03-31 03:10:21 +00:00
Ezio Melotti e511fc7979 #7930: fix stripid 2010-02-16 23:26:09 +00:00
Nick Coghlan 11db64e5fd Issue #7328: don't corrupt sys.path when running pydoc with the -m switch 2009-11-15 22:36:47 +00:00
R. David Murray ef087da9e7 Fix issue 5230 by having pydoc's safeimport check to see if the import
error was thrown from itself in order to decide if the module can't be
found.  Thanks to Lucas Prado Melo for collaborating on the fix and tests.
2009-06-23 18:02:46 +00:00
R. David Murray d67ea7d4c6 fix issue #6121 by stripping spaces from the argument in the 'help'
function.
2009-05-27 20:07:21 +00:00
Georg Brandl 438192540d Move pydoc_topics module to its own subdirectory, so that no generated code is in Lib/. 2009-04-26 09:56:44 +00:00
Georg Brandl e019706862 #5698: Fix casing of !DOCTYPE to conform to W3C specs. 2009-04-10 08:20:23 +00:00
Georg Brandl c3a9803410 Patch #4739 by David Laban: add symbols to pydoc help topics,
so that ``help('@')`` works as expected.
2008-12-27 18:20:04 +00:00
Georg Brandl 5c669db194 #3707: fix inf. recursion in pydoc topic search. Rev'd by Antoine. 2008-08-30 19:03:43 +00:00
Brett Cannon aca98b0a2c Silence SyntaxWarning and DeprecationWarning in pydoc triggered by tuple
unpacking in parameter lists and using callable(). Found through -3.
2008-08-03 00:58:51 +00:00
Georg Brandl b32dea5a3e #3045: fix pydoc behavior for TEMP path with spaces. 2008-07-16 21:19:28 +00:00
Nick Coghlan c060b0e7eb Issue 3190: pydoc now hides module __package__ attributes 2008-07-02 13:09:19 +00:00
Georg Brandl 681001e11b Generate pydoc's topic help from the reST docs via Sphinx'
new text writer.
2008-06-01 20:33:55 +00:00
Brett Cannon 2ee0e8eaec Revert the renaming of repr to reprlib. 2008-05-23 05:03:59 +00:00
Georg Brandl 6634bf2919 Tkinter rename reversal: remove tkinter package, adapt imports and docs. 2008-05-20 07:13:37 +00:00
Georg Brandl ad9afeb8f0 Tkinter rename, step 2: fix imports and add stub modules. 2008-05-16 15:48:15 +00:00
Alexandre Vassalotti 50a1acb2ab Changed references to the reprlib module to use its new name. 2008-05-16 06:58:49 +00:00
Georg Brandl b169eaa917 #2133: fix HTML color spec. 2008-02-17 21:18:55 +00:00
Andrew M. Kuchling 727a59070d Update PEP URL.
(This code is duplicated between pydoc and DocXMLRPCServer; maybe it
should be refactored as a GHOP project.)

2.5.2 backport candidate.
2008-02-05 16:06:57 +00:00
Georg Brandl ce8fd9d2bc Remove effectless expression statement. 2008-01-27 18:14:43 +00:00
Georg Brandl f2dae0e14a #1715: include sub-extension modules in pydoc text output. 2008-01-21 21:05:49 +00:00
Georg Brandl 0751d1ad2a Adapt pydoc to new doc URLs. 2008-01-21 17:13:03 +00:00
Ka-Ping Yee 9e0f116fac Check in the patch proposed by Ben Hayden (benjhayden) for issue
#1550: help('modules') broken by several 3rd party libraries.

Tested with Python build: trunk:54235:59936M -- the reported error
occurs with Django installed (or with any __init__.py present on
the path that raises an exception), and such errors indeed go away
when this change is applied.
2008-01-13 11:25:13 +00:00
Georg Brandl 7e2b6bb24f Patch #1194449: correctly detect unbound methods in pydoc. 2007-03-13 22:16:30 +00:00
Georg Brandl 8441f15626 Patch #1530482: add pydoc.render_doc() which returns the documentation
for a thing instead of paging it to stdout, which pydoc.doc() does.
2007-03-13 20:02:57 +00:00
Georg Brandl b6a87542b3 Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
pydoc's help keywords.
2007-03-13 10:06:48 +00:00
Georg Brandl 117a05ed50 Bug #1628895: some better tries to find HTML documentation in pydoc. 2007-03-02 14:37:12 +00:00
Ka-Ping Yee 8ef1cf30b7 Handle old-style instances more gracefully (display documentation on
the relevant class instead of documentation on <type 'instance'>).
2007-01-14 04:25:15 +00:00
Andrew M. Kuchling c911e916d4 [Patch #1600491 from Jim Jewett] Describe how to build help files on Windows 2006-12-19 15:18:12 +00:00
Barry Warsaw 00decd7835 Patch #1520294: Support for getset and member descriptors in types.py,
inspect.py, and pydoc.py.  Specifically, this allows for querying the type of
an object against these built-in C types and more importantly, for getting
their docstrings printed in the interactive interpreter's help() function.

This patch includes a new built-in module called _types which provides
definitions of getset and member descriptors for use by the types.py module.
These types are exposed as types.GetSetDescriptorType and
types.MemberDescriptorType.  Query functions are provided as
inspect.isgetsetdescriptor() and inspect.ismemberdescriptor().  The
implementations of these are robust enough to work with Python implementations
other than CPython, which may not have these fundamental types.

The patch also includes documentation and test suite updates.

I commit these changes now under these guiding principles:

1. Silence is assent.  The release manager has not said "no", and of the few
   people that cared enough to respond to the thread, the worst vote was "0".

2. It's easier to ask for forgiveness than permission.

3. It's so dang easy to revert stuff in svn, that you could view this as a
   forcing function. :)

Windows build patches will follow.
2006-07-27 23:43:15 +00:00
Phillip J. Eby ceb3087e1c Second phase of refactoring for runpy, pkgutil, pydoc, and setuptools
to share common PEP 302 support code, as described here:

http://mail.python.org/pipermail/python-dev/2006-April/063724.html

pydoc now supports PEP 302 importers, by way of utility functions in
pkgutil, such as 'walk_packages()'.  It will properly document
modules that are in zip files, and is backward compatible to Python
2.3 (setuptools installs for Python <2.5 will bundle it so pydoc
doesn't break when used with eggs.)

What has not changed is that pydoc command line options do not support
zip paths or other importer paths, and the webserver index does not
support sys.meta_path.  Those are probably okay as limitations.

Tasks remaining: write docs and Misc/NEWS for pkgutil/pydoc changes,
and update setuptools to use pkgutil wherever possible, then add it
to the stdlib.
2006-04-18 00:59:55 +00:00
Georg Brandl 26fd2e1dcc Fix pydoc.synopsis() so that it doesn't error out with an unreadable
module.
2006-03-08 09:34:53 +00:00
Georg Brandl 501dd0dd9d The names of lambda functions are now properly displayed in pydoc. 2006-02-17 09:45:40 +00:00
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