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.

classification
Title: bug in pydoc on python 2.2 release
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: ping Nosy List: gvanrossum, loewis, mmaster25, ping
Priority: normal Keywords: patch

Created on 2002-02-08 02:09 by mmaster25, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pydoc.py mmaster25, 2002-02-08 02:09 fixed file
Messages (4)
msg38887 - (view) Author: Raj Kunjithapadam (mmaster25) Date: 2002-02-08 02:09
pydoc has a bug when trying to generate html doc
more importantly it has bug in the method
writedoc()

attached is my fix.
Here is the diff between my fix and the regular dist

1338c1338
< def writedoc(thing, forceload=0):
---
> def writedoc(key, forceload=0):
1340,1346c1340,1343
<     object = thing
<     if type(thing) is type(''):
<         try:
<             object = locate(thing, forceload)
<         except ErrorDuringImport, value:
<             print value
<             return
---
>     try:
>         object = locate(key, forceload)
>     except ErrorDuringImport, value:
>         print value
1351c1348
<             file = open(thing.__name__ + '.html', 'w')
---
>             file = open(key + '.html', 'w')
1354c1351
<             print 'wrote', thing.__name__ + '.html'
---
>             print 'wrote', key + '.html'
1356c1353
<             print 'no Python documentation found for
%s' % repr(thing)
---
>             print 'no Python documentation found for
%s' % repr(key)
msg38888 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-03-01 22:45
Logged In: YES 
user_id=6380

assigned to Tim; this may be Ping's terrain but Ping is
typically not responsive.
msg38889 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-03-18 08:48
Logged In: YES 
user_id=21627

Can you please provide an example that demonstrates the problem?

Also, can you please regenerate your changes as context (-c)
or unified (-u) diffs, and attach those to this report (do
*not* paste them into the comment field)? In their current,
the patch is pretty useless: SF messed up the indentation,
and it is an old-style patch, and pydoc.py is already at 1.58.
msg38890 - (view) Author: Ka-Ping Yee (ping) * (Python committer) Date: 2002-08-11 12:27
Logged In: YES 
user_id=45338

I see that your patch changes the functionality of writedoc() so that it 
accepts other objects as well as strings, but you have not explained how 
this fixes a bug, or even what the bug is.

If you feel that the bug is "writedoc() only accepts strings", then i disagree 
that this is a bug.  The designed purpose of writedoc() is to accept a string, 
because then the filename it writes is directly predictable.
History
Date User Action Args
2022-04-10 16:04:57adminsetgithub: 36047
2002-02-08 02:09:48mmaster25create