Commit Graph

56 Commits

Author SHA1 Message Date
Antoine Pitrou 916fc7bf28 Issue #11995: test_pydoc doesn't import all sys.path modules anymore. 2013-05-19 15:44:54 +02:00
R David Murray 52dfc74080 #17476: make allmethods actually return all methods.
This fixes a regression relative to Python2.  (In 2, methods on a class were
unbound methods and matched the inspect queries being done, in 3 they are just
functions and so were missed).

This is an undocumented function that pydoc itself does not use, but
I found that numpy at least uses it in its documentation generator.

Original patch by Matt Bachmann.
2013-03-19 02:32:35 -04:00
R David Murray 9929bc543a #17476: make allmethods actually return all methods.
This fixes a regression relative to Python2.  (In 2, methods on a class were
unbound methods and matched the inspect queries being done, in 3 they are just
functions and so were missed).

This is an undocumented function that pydoc itself does not use, but
I found that numpy at least uses it in its documentation generator.

Original patch by Matt Bachmann.
2013-03-19 02:31:06 -04:00
Serhiy Storchaka 26f1166510 Issue #17041: Fix testing when Python is configured with the
--without-doc-strings.
2013-01-27 20:03:39 +02:00
Serhiy Storchaka 9d0add0c7e Issue #17041: Fix testing when Python is configured with the
--without-doc-strings.
2013-01-27 19:47:45 +02:00
Stefan Krah fb931902c8 Fix test_pydoc for build --without-doc-strings. 2013-01-26 13:57:15 +01:00
R David Murray a82c960c17 merge #14638: pydoc now treats non-str __name__ as None instead of raising
Original patch by Peter Otten.
2012-04-23 13:26:44 -04:00
R David Murray c43125a05c #14638: pydoc now treats non-str __name__ as None instead of raising
Original patch by Peter Otten.
2012-04-23 13:23:57 -04:00
Brett Cannon fd0741555b Issue #2377: Make importlib the implementation of __import__().
importlib._bootstrap is now frozen into Python/importlib.h and stored
as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
code along with sys and imp and then uses _frozen_importlib._install()
to set builtins.__import__() w/ _frozen_importlib.__import__().
2012-04-14 14:10:13 -04:00
Ned Deily f16d6771c7 Issue #13861: merge 2012-02-03 23:16:11 +01:00
Ned Deily 3429491950 Issue #13861: Prevent test_apropos* test case failures in test_pydoc. 2012-02-03 23:14:37 +01:00
Ned Deily 9403071277 merge from 3.2 2011-10-06 14:24:31 -07:00
Ned Deily 92a81a1eec Issue #7425: Refactor test_pydoc test case for '-k' behavior and add
new test cases for importing bad packages and unreadable packages dirs.
2011-10-06 14:19:03 -07:00
Ezio Melotti d8b509b192 #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). 2011-09-28 17:37:55 +03:00
Éric Araujo c473f8ceac Merge fix for #8887 from 3.2 2011-07-29 17:38:23 +02:00
Éric Araujo e64e51bfa7 Make “pydoc somebuiltin.somemethod” work (#8887) 2011-07-29 17:03:55 +02:00
Antoine Pitrou afed6ecf21 Merge from 3.2 2011-07-15 22:43:33 +02:00
Antoine Pitrou f7f54759b5 Use test.script_helper in test_pydoc 2011-07-15 22:42:12 +02:00
Antoine Pitrou a6e81a23b3 test_pydoc needs to cleanup after itself 2011-07-15 22:32:25 +02:00
Victor Stinner 319672e8a6 (merge 3.2) Issue #12451: pydoc.synopsis() now reads the encoding cookie if
available, to read the Python script from the right encoding.
2011-06-30 15:58:29 +02:00
Victor Stinner e6c910e953 Issue #12451: pydoc.synopsis() now reads the encoding cookie if available, to
read the Python script from the right encoding.
2011-06-30 15:55:43 +02:00
Victor Stinner ba8ef7a81d (Merge 3.2) test_pydoc: skip PydocServerTest if thread support is disabled 2011-05-20 02:29:55 +02:00
Victor Stinner 62a68f2dbe test_pydoc: skip PydocServerTest if thread support is disabled 2011-05-20 02:29:13 +02:00
Ezio Melotti 60811c215f #11926: merge with 3.2. 2011-04-28 07:55:29 +03:00
Ezio Melotti 44aad855dd #11926: merge with 3.1. 2011-04-28 07:51:14 +03:00
Ezio Melotti b185a04aa1 #11926: add missing keywords to help("keywords"). 2011-04-28 07:42:55 +03:00
Raymond Hettinger 007bdbd7ab Issue #11666: Teach pydoc to display full help for named tuples 2011-03-25 14:16:13 -07:00
Raymond Hettinger 1103d05775 Issue #11666: Teach pydoc to display full help for named tuples 2011-03-25 14:15:24 -07:00
Victor Stinner 98dbba5d20 Issue #3080: Use repr() to format the module name on error 2011-03-14 15:15:47 -04:00
Brett Cannon 7a54073a56 Issue #10992: make tests pass when run under coverage.
Various tests fail when run under coverage. A primary culprit is refcount tests
which fail as the counts are thrown off by the coverage code. A new decorator
-- test.support.refcount_test -- is used to decorate tests which test refcounts
and to skip them when running under coverage. Other tests simply fail because
of changes in the system (e.g., __local__ suddenly appearing).

Thanks to Kristian Vlaardingerbroek for helping to diagnose the test failures.
2011-02-22 03:04:06 +00:00
Georg Brandl d2f3857c40 #10961: fix exception handling in new pydoc server code.
Patch by Ron Adam, reviewed by Eric Araujo.
2011-01-30 08:37:19 +00:00
Nick Coghlan ecace28ef4 Handle Windows paths and don't double up on HTML header sections in new pydoc URL handler 2010-12-03 16:08:46 +00:00
Nick Coghlan 7bb30b72d8 Improve Pydoc interactive browsing (#2001). Patch by Ron Adam.
* A -b option to start an enhanced browsing session.
* Allow -b and -p options to be used together.
* Specifying port 0 will pick an arbitrary unused socket port.
* A new browse() function to start the new server and browser.
* Show Python version information in the header.
* A *Get* field which takes the same input as the help() function.
* A *Search* field which replaces the Tkinter search box.
* Links to *Module Index*, *Topics*, and *Keywords*.
* Improved source file viewing.
* An HTMLDoc.filelink() method.
* The -g option and the gui() and serve() functions are deprecated.
2010-12-03 09:29:11 +00:00
Georg Brandl d80d5f4ee8 #940286: pydoc.Helper.help() ignores input/output init parameters. 2010-12-03 07:47:22 +00:00
Alexander Belopolsky 4979b9b91e Merged revisions 86504 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86504 | alexander.belopolsky | 2010-11-17 20:52:54 -0500 (Wed, 17 Nov 2010) | 15 lines

  Issue #10446: Several changes to module documentation generated by pydoc:

  1. Online reference manual link is now version-specific and the
     'MODULE DOCS' section renamed to 'MODULE REFERENCE'.

  2. 'FILE' section is moved to the end of the file.

  3. Special names processed by pydoc such as __version__ or __credits__
     are now excluded from the DATA section.

  4. Defined __all__ to prevent pydoc from exposing undocumented details
     about itself.

  5. Removed Python 2.3 compatibility code.
........
2010-11-18 01:58:16 +00:00
Alexander Belopolsky a47bbf5a4b Issue #10446: Several changes to module documentation generated by pydoc:
1. Online reference manual link is now version-specific and the
   'MODULE DOCS' section renamed to 'MODULE REFERENCE'.

2. 'FILE' section is moved to the end of the file.

3. Special names processed by pydoc such as __version__ or __credits__
   are now excluded from the DATA section.

4. Defined __all__ to prevent pydoc from exposing undocumented details
   about itself.

5. Removed Python 2.3 compatibility code.
2010-11-18 01:52:54 +00:00
Barry Warsaw 28a691b7fd PEP 3147 2010-04-17 00:19:56 +00:00
Brian Curtin 0d8a1dd647 Merged revisions 79520 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r79520 | brian.curtin | 2010-03-30 22:19:28 -0500 (Tue, 30 Mar 2010) | 9 lines

  Merged revisions 79518 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r79518 | brian.curtin | 2010-03-30 22:10:21 -0500 (Tue, 30 Mar 2010) | 2 lines

    Fix #8225. xml.etree was displaying an incorrect link when viewed in help.
  ........
................
2010-03-31 03:22:46 +00:00
Brian Curtin 49c284c174 Merged revisions 79518 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79518 | brian.curtin | 2010-03-30 22:10:21 -0500 (Tue, 30 Mar 2010) | 2 lines

  Fix #8225. xml.etree was displaying an incorrect link when viewed in help.
........
2010-03-31 03:19:28 +00:00
Florent Xicluna 085a656c81 Fix test_pydoc when sys.modules["test"] is first imported using importlib.import_module. 2010-03-06 14:04:16 +00:00
R. David Murray 378c0cf5ab Merged revisions 78351 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78351 | r.david.murray | 2010-02-22 19:24:49 -0500 (Mon, 22 Feb 2010) | 5 lines

  Issue 6292: for the moment at least, the test suite passes if run
  with -OO.  Tests requiring docstrings are skipped.  Patch by
  Brian Curtin, thanks to Matias Torchinsky for helping review and
  improve the patch.
........
2010-02-24 01:46:21 +00:00
Ezio Melotti bf839b90f4 Merged revisions 78209 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r78209 | ezio.melotti | 2010-02-17 01:31:04 +0200 (Wed, 17 Feb 2010) | 9 lines

  Merged revisions 78207 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line

    #7930: fix stripid
  ........
................
2010-02-16 23:32:24 +00:00
Ezio Melotti 412c95a485 Merged revisions 78207 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line

  #7930: fix stripid
........
2010-02-16 23:31:04 +00:00
Benjamin Peterson 577473fe68 use assert[Not]In where appropriate
A patch from Dave Malcolm.
2010-01-19 00:09:57 +00:00
Antoine Pitrou aecd3b7718 Merged revisions 75967 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75967 | antoine.pitrou | 2009-10-30 22:41:22 +0100 (ven., 30 oct. 2009) | 3 lines

  Try to fix transient refleaks in test_pydoc.
........
2009-10-30 21:45:40 +00:00
Georg Brandl ab91fdef1f Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line

  convert old fail* assertions to assert*
........
2009-08-13 08:51:18 +00:00
Benjamin Peterson c9c0f201fe convert old fail* assertions to assert* 2009-06-30 23:06:06 +00:00
Benjamin Peterson d76c8da098 Merged revisions 73623-73624 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r73623 | benjamin.peterson | 2009-06-28 12:22:03 -0500 (Sun, 28 Jun 2009) | 58 lines

  Merged revisions 73004,73439,73496,73509,73529,73564,73576-73577,73595-73596,73605 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r73004 | jeffrey.yasskin | 2009-05-28 22:44:31 -0500 (Thu, 28 May 2009) | 5 lines

    Fix nearly all compilation warnings under Apple gcc-4.0.  Tested with OPT="-g
    -Wall -Wstrict-prototypes -Werror" in both --with-pydebug mode and --without.
    There's still a batch of non-prototype warnings in Xlib.h that I don't know how
    to fix.
  ........
    r73439 | benjamin.peterson | 2009-06-15 19:29:31 -0500 (Mon, 15 Jun 2009) | 1 line

    don't mask encoding errors when decoding a string #6289
  ........
    r73496 | vinay.sajip | 2009-06-21 12:37:27 -0500 (Sun, 21 Jun 2009) | 1 line

    Issue #6314: logging.basicConfig() performs extra checks on the "level" argument.
  ........
    r73509 | amaury.forgeotdarc | 2009-06-22 14:33:48 -0500 (Mon, 22 Jun 2009) | 2 lines

    #4490 Fix sample code run by "python -m xml.sax.xmlreader"
  ........
    r73529 | r.david.murray | 2009-06-23 13:02:46 -0500 (Tue, 23 Jun 2009) | 4 lines

    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.
  ........
    r73564 | amaury.forgeotdarc | 2009-06-25 17:29:29 -0500 (Thu, 25 Jun 2009) | 6 lines

    #2016 Fix a crash in function call when the **kwargs dictionary is mutated
    during the function call setup.

    This even gives a slight speedup, probably because tuple allocation
    is faster than PyMem_NEW.
  ........
    r73576 | benjamin.peterson | 2009-06-26 18:37:06 -0500 (Fri, 26 Jun 2009) | 1 line

    document is_declared_global()
  ........
    r73577 | benjamin.peterson | 2009-06-27 09:16:23 -0500 (Sat, 27 Jun 2009) | 1 line

    link to extensive generator docs in the reference manual
  ........
    r73595 | ezio.melotti | 2009-06-27 18:45:39 -0500 (Sat, 27 Jun 2009) | 1 line

    stmt and setup can contain multiple statements, see #5896
  ........
    r73596 | ezio.melotti | 2009-06-27 19:07:45 -0500 (Sat, 27 Jun 2009) | 1 line

    Fixed a wrong apostrophe
  ........
    r73605 | georg.brandl | 2009-06-28 07:10:18 -0500 (Sun, 28 Jun 2009) | 1 line

    Remove stray pychecker directive.
  ........
................
  r73624 | benjamin.peterson | 2009-06-28 12:32:20 -0500 (Sun, 28 Jun 2009) | 1 line

  document BufferedIOBase.raw and TextIOBase.buffer
................
2009-06-28 17:35:48 +00:00
Benjamin Peterson 0289b15820 Merged revisions 73004,73439,73496,73509,73529,73564,73576-73577,73595-73596,73605 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73004 | jeffrey.yasskin | 2009-05-28 22:44:31 -0500 (Thu, 28 May 2009) | 5 lines

  Fix nearly all compilation warnings under Apple gcc-4.0.  Tested with OPT="-g
  -Wall -Wstrict-prototypes -Werror" in both --with-pydebug mode and --without.
  There's still a batch of non-prototype warnings in Xlib.h that I don't know how
  to fix.
........
  r73439 | benjamin.peterson | 2009-06-15 19:29:31 -0500 (Mon, 15 Jun 2009) | 1 line

  don't mask encoding errors when decoding a string #6289
........
  r73496 | vinay.sajip | 2009-06-21 12:37:27 -0500 (Sun, 21 Jun 2009) | 1 line

  Issue #6314: logging.basicConfig() performs extra checks on the "level" argument.
........
  r73509 | amaury.forgeotdarc | 2009-06-22 14:33:48 -0500 (Mon, 22 Jun 2009) | 2 lines

  #4490 Fix sample code run by "python -m xml.sax.xmlreader"
........
  r73529 | r.david.murray | 2009-06-23 13:02:46 -0500 (Tue, 23 Jun 2009) | 4 lines

  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.
........
  r73564 | amaury.forgeotdarc | 2009-06-25 17:29:29 -0500 (Thu, 25 Jun 2009) | 6 lines

  #2016 Fix a crash in function call when the **kwargs dictionary is mutated
  during the function call setup.

  This even gives a slight speedup, probably because tuple allocation
  is faster than PyMem_NEW.
........
  r73576 | benjamin.peterson | 2009-06-26 18:37:06 -0500 (Fri, 26 Jun 2009) | 1 line

  document is_declared_global()
........
  r73577 | benjamin.peterson | 2009-06-27 09:16:23 -0500 (Sat, 27 Jun 2009) | 1 line

  link to extensive generator docs in the reference manual
........
  r73595 | ezio.melotti | 2009-06-27 18:45:39 -0500 (Sat, 27 Jun 2009) | 1 line

  stmt and setup can contain multiple statements, see #5896
........
  r73596 | ezio.melotti | 2009-06-27 19:07:45 -0500 (Sat, 27 Jun 2009) | 1 line

  Fixed a wrong apostrophe
........
  r73605 | georg.brandl | 2009-06-28 07:10:18 -0500 (Sun, 28 Jun 2009) | 1 line

  Remove stray pychecker directive.
........
2009-06-28 17:22:03 +00:00
R. David Murray 1f1b9d3d0d Merged revisions 72966 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72966 | r.david.murray | 2009-05-27 16:07:21 -0400 (Wed, 27 May 2009) | 4 lines

  fix issue #6121 by stripping spaces from the argument in the 'help'
  function.
........
2009-05-27 20:56:59 +00:00