classification
Title: pydoc.py: TypeError with a $LINES defined to anything
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.5, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: arigo, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2014-08-31 13:17 by arigo, last changed 2014-11-27 22:55 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
pydoc_ttypager_lines.patch serhiy.storchaka, 2014-11-18 09:43 review
Messages (3)
msg226177 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2014-08-31 13:17
$ LINES=20 python Lib/test/test_pydoc.py

...
  File ".../Lib/pydoc.py", line 1448, in ttypager
    r = inc = os.environ.get('LINES', 25) - 1
TypeError: unsupported operand type(s) for -: 'str' and 'int'

duh.
msg231310 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-11-18 09:43
Here is a patch.
msg231785 - (view) Author: Roundup Robot (python-dev) Date: 2014-11-27 22:15
New changeset 50808dffd0bb by Serhiy Storchaka in branch '2.7':
Issue #22314: pydoc now works when the LINES environment variable is set.
https://hg.python.org/cpython/rev/50808dffd0bb

New changeset c6182a7e75fa by Serhiy Storchaka in branch '3.4':
Issue #22314: pydoc now works when the LINES environment variable is set.
https://hg.python.org/cpython/rev/c6182a7e75fa

New changeset c8adee8a0ccb by Serhiy Storchaka in branch 'default':
Issue #22314: pydoc now works when the LINES environment variable is set.
https://hg.python.org/cpython/rev/c8adee8a0ccb
History
Date User Action Args
2014-11-27 22:55:05serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2014-11-27 22:15:52python-devsetnosy: + python-dev
messages: + msg231785
2014-11-18 09:43:25serhiy.storchakasetfiles: + pydoc_ttypager_lines.patch

type: behavior
versions: + Python 3.4, Python 3.5
keywords: + patch
nosy: + serhiy.storchaka

messages: + msg231310
stage: patch review
2014-08-31 13:17:07arigocreate