This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2004年04月22日 20:11 by tws5, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| helpredirect.diff | bkad, 2010年11月21日 22:03 | patch for issue 940286 | review | |
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 8390 | merged | berker.peksag, 2018年07月22日 05:05 | |
| PR 8402 | merged | miss-islington, 2018年07月23日 05:37 | |
| PR 8403 | merged | miss-islington, 2018年07月23日 05:38 | |
| Messages (15) | |||
|---|---|---|---|
| msg60481 - (view) | Author: Maxim Krikun (tws5) | Date: 2004年04月22日 20:11 | |
The ourput of pydoc.Helper help() method is always sent
to sys.stdout, even if Helper was supplied with
different input/output streams at initialization. Other
methods: listtopics etc. work as expected.
Example:
########################
import sys, pydoc
from StringIO import StringIO
buf=StringIO()
H=pydoc.Helper(sys.stdin,buf)
H.listtopics()
H.help("pydoc")
#at this point help on pydoc is printed to stdout
H.listtopics()
ss=buf.getvalue()
print ss
#at this point the list of topics is printed twice
########################
sys.version:
'2.3 (#46, Aug 11 2003, 09:34:05) [MSC v.1200 32 bit
(Intel)]'
The problem persists in pydoc.py version 1.90 from CVS.
The reason for such behaviour is a call to global (in
module scope) function doc() at line 1628 in pydoc.py 1.90.
which doesn't care about Helper.input Helper.output
settings.
|
|||
| msg82047 - (view) | Author: Daniel Diniz (ajaksu2) * (Python triager) | Date: 2009年02月14日 13:53 | |
Confirmed. Is it relevant? |
|||
| msg122002 - (view) | Author: Kevin Le (bkad) | Date: 2010年11月21日 22:03 | |
This patch redirects output from Helper.help to whatever output stream is passed to the Helper constructor. If no output stream is specified, the fault behavior is to pass the output to the OS pager. |
|||
| msg122004 - (view) | Author: Kevin Le (bkad) | Date: 2010年11月21日 22:31 | |
Created a rietveld review http://codereview.appspot.com/3202042 |
|||
| msg122009 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月21日 22:48 | |
Thanks for the patch. I commented there. |
|||
| msg122599 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月28日 02:11 | |
Patchset 3 on codereview looks good. I’d like another review, so I’m adding the latest developers who touched pydoc. |
|||
| msg123198 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2010年12月03日 07:47 | |
Looks good; committed in r86957. |
|||
| msg127840 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年02月04日 00:32 | |
I just added another comment on Rietveld because I thought this was not fixed :) Demo session: $ pydoc3.2 nonlocal # will launch my pager, then print to stdout Related help topics: global, NAMESPACES Kevin Le, would you like to write a failing test to confirm my bug? |
|||
| msg128199 - (view) | Author: Kevin Le (bkad) | Date: 2011年02月08日 23:24 | |
confirmed, I'll take a closer look |
|||
| msg190051 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2013年05月26日 02:59 | |
One commit already so presumably not too much effort needed to close this one. |
|||
| msg322131 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2018年07月22日 05:12 | |
I just noticed the same bug described by Éric in msg127840. PR 8390 should fix it. Unfortunately, it wasn't easy to create a test case, so I skipped that part. I'm open to suggestions if you have an idea on how to write a simple test that reproduces the bug. Éric, could you confirm that the attached PR fixes the bug? |
|||
| msg322173 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2018年07月23日 03:08 | |
Patch works! |
|||
| msg322175 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2018年07月23日 05:37 | |
New changeset d04f46c59f1d07d9bcc0ba910741296ac88d370d by Berker Peksag in branch 'master': bpo-940286: Fix pydoc to show cross refs correctly (GH-8390) https://github.com/python/cpython/commit/d04f46c59f1d07d9bcc0ba910741296ac88d370d |
|||
| msg322183 - (view) | Author: miss-islington (miss-islington) | Date: 2018年07月23日 06:51 | |
New changeset e9e6495eedd7fb588964ffa50e8bf2c5ce9c6051 by Miss Islington (bot) in branch '3.6': bpo-940286: Fix pydoc to show cross refs correctly (GH-8390) https://github.com/python/cpython/commit/e9e6495eedd7fb588964ffa50e8bf2c5ce9c6051 |
|||
| msg322184 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2018年07月23日 06:51 | |
New changeset 14f58f0ff823ba71e3f21803c509d348626b6089 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-940286: Fix pydoc to show cross refs correctly (GH-8390) https://github.com/python/cpython/commit/14f58f0ff823ba71e3f21803c509d348626b6089 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:03 | admin | set | github: 40177 |
| 2018年07月23日 06:53:53 | berker.peksag | set | status: open -> closed stage: patch review -> resolved |
| 2018年07月23日 06:51:57 | berker.peksag | set | messages: + msg322184 |
| 2018年07月23日 06:51:30 | miss-islington | set | nosy:
+ miss-islington messages: + msg322183 |
| 2018年07月23日 05:38:57 | miss-islington | set | pull_requests: + pull_request7929 |
| 2018年07月23日 05:37:59 | miss-islington | set | pull_requests: + pull_request7928 |
| 2018年07月23日 05:37:50 | berker.peksag | set | messages: + msg322175 |
| 2018年07月23日 03:08:54 | eric.araujo | set | assignee: eric.araujo -> berker.peksag messages: + msg322173 |
| 2018年07月22日 05:12:18 | berker.peksag | set | versions:
+ Python 3.6, Python 3.7, Python 3.8, - Python 3.1, Python 2.7, Python 3.2 nosy: + berker.peksag messages: + msg322131 keywords: - easy |
| 2018年07月22日 05:05:47 | berker.peksag | set | pull_requests: + pull_request7918 |
| 2014年02月03日 17:13:36 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2013年05月26日 02:59:01 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg190051 |
| 2011年06月14日 15:46:02 | eric.araujo | link | issue10457 superseder |
| 2011年02月08日 23:24:43 | bkad | set | nosy:
georg.brandl, belopolsky, ajaksu2, tws5, eric.araujo, bkad messages: + msg128199 |
| 2011年02月06日 18:48:23 | eric.araujo | set | status: closed -> open nosy: georg.brandl, belopolsky, ajaksu2, tws5, eric.araujo, bkad |
| 2011年02月04日 00:32:46 | eric.araujo | set | nosy:
georg.brandl, belopolsky, ajaksu2, tws5, eric.araujo, bkad messages: + msg127840 |
| 2010年12月03日 07:47:28 | georg.brandl | set | status: open -> closed resolution: fixed messages: + msg123198 |
| 2010年11月28日 02:11:16 | eric.araujo | set | nosy:
+ georg.brandl, belopolsky messages: + msg122599 |
| 2010年11月28日 01:59:47 | eric.araujo | set | assignee: eric.araujo versions: - Python 2.6 |
| 2010年11月22日 13:37:15 | eric.araujo | set | stage: test needed -> patch review versions: + Python 3.1, Python 2.7 |
| 2010年11月21日 22:48:22 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg122009 |
| 2010年11月21日 22:31:01 | bkad | set | messages: + msg122004 |
| 2010年11月21日 22:03:44 | bkad | set | files:
+ helpredirect.diff versions: + Python 3.2 nosy: + bkad messages: + msg122002 keywords: + patch |
| 2009年04月22日 17:16:39 | ajaksu2 | set | keywords:
+ easy stage: test needed |
| 2009年02月14日 13:53:53 | ajaksu2 | set | type: behavior messages: + msg82047 nosy: + ajaksu2 versions: + Python 2.6, - Python 2.3 |
| 2004年04月22日 20:11:10 | tws5 | create | |