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: a couple of documentation issues
Type: crash Stage:
Components: Documentation, Windows Versions: Python 3.0
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: JosephArmbruster, christian.heimes, loewis
Priority: normal Keywords:

Created on 2007-12-18 17:46 by JosephArmbruster, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg58751 - (view) Author: Joseph Armbruster (JosephArmbruster) Date: 2007-12-18 17:46
I added an option to msi.py (and a support script) that allows the user
to optionally decompile the python30.chm post installation.  In doing
so, I was testing out help() from the interpreter and stumbled upon a
few things that I think are issues.  One of the ways I experimented, was
by typing the following commands at the interpreter, to see what I could
pull up on the global statement:
   help()
   keywords
   global

I had run into the following issues on my way.  Additional eyes /
insight would definitely be helpful.  Just a couple forewords:
- os.environ.get("PYTHONDOCS") returns 'C:\\Python30\\Doc'
- my version of the installer decompiled the Python30.chm as dictated by
pydoc.  So that, c:\Python30\Doc has folders c-api, data, distutils, etc..

If I missed anything basic with these, my apologies in advanced. 

Issue 1: PYTHONDOCS does not appear to be respected.

  * I generated python-3.0.13865.msi and installed
  * post-install I set PYTHONDOCS to C:\python30\doc
  * I fired up a new command prompt
  * Fire up Python3k interpreter and attempt the help() session listed
above.
  * I had to hack at pydoc.py, since the #windows statement never gets
reached.

        join = os.path.join
        if sys.platform=='win32':           #hack
            self.docdir=join(execdir,'doc') #...
        else:                               #...
            for dir in [os.environ.get('PYTHONDOCS'),
                    homedir and os.path.join(homedir, 'doc'),
                    join(execdir, 'doc'), # for Windows

Issue 2: pydoc.py class Helper member keywords contain several invalid
paths.  For instance:

        'global': ('ref/global', 'NAMESPACES'),

Most of the keywords appear to have the ref/ prefixes.

Issue 3:  formatter.py will throw an exception within push_margin /
pop_margin on the lines where a len(fstack) is attempted.  The two lines
look like this:

        self.writer.new_margin(margin, len(fstack))

I do not have a patch for this, since i'm still wandering about through
the whole installer generation stuffs.  When I get home, I will examine
further.

Thoughts?
msg58752 - (view) Author: Joseph Armbruster (JosephArmbruster) Date: 2007-12-18 17:51
I left out some important info and made a typo:

url: http://svn.python.org/projects/python/branches/py3k
rev: 59543

For Issue 1:  The two test ifs at lines 1674 and 1678 never are
satisfied, not the #windows statement never gets reached...
msg58773 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-12-18 21:25
I think it's bad to mix separate issues in a single report, as it makes
it difficult to track which of them had been resolved.

As for the paths - I am not surprised it is broken now, as pydoc hasn't
been updated ever since the documentation had been switched to rst (AFAICT).

As for uncompressing the documentation at installation time - I think
this is a bad idea. Instead, pydoc should properly open the chm file so
that it navigates to the right position directly. If you uncompresses,
it more-than-doubles the space, and you need to deal with removing the
files at uninstallation time.
msg58782 - (view) Author: Joseph Armbruster (JosephArmbruster) Date: 2007-12-18 22:26
>I think it's bad to mix separate issues in a single report, as it makes
>it difficult to track which of them had been resolved.

Martin, agreed.  Please close this issue and I will generate new issues
(with patches) for each item as encountered.

> As for the paths - I am not surprised it is broken now, as pydoc 
> hasn't been updated ever since the documentation had been switched to 
> rst (AFAICT).

I will generate a new issues for these as well.

> As for uncompressing the documentation at installation time - I think
> this is a bad idea. Instead, pydoc should properly open the chm file 
> so that it navigates to the right position directly. If you
> uncompresses, it more-than-doubles the space, and you need to deal 
> with removing the files at un-installation time.

Ok, I just figured rather than the user go through the whole hh utility
manually, this could alleviate that.  Seems like your approach would
definitely save some space.
msg58788 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-12-19 02:00
Closing as requested.
History
Date User Action Args
2022-04-11 14:56:29adminsetgithub: 45994
2007-12-19 02:00:04loewissetstatus: open -> closed
resolution: out of date
messages: + msg58788
2007-12-18 22:26:34JosephArmbrustersetmessages: + msg58782
2007-12-18 21:25:18loewissetmessages: + msg58773
2007-12-18 17:51:03JosephArmbrustersetmessages: + msg58752
2007-12-18 17:46:38JosephArmbrustercreate