Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pydoc.py: TypeError with a $LINES defined to anything #66510

Closed
arigo mannequin opened this issue Aug 31, 2014 · 3 comments
Closed

pydoc.py: TypeError with a $LINES defined to anything #66510

arigo mannequin opened this issue Aug 31, 2014 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@arigo
Copy link
Mannequin

arigo mannequin commented Aug 31, 2014

BPO 22314
Nosy @arigo, @serhiy-storchaka
Files
  • pydoc_ttypager_lines.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2014-11-27.22:55:05.990>
    created_at = <Date 2014-08-31.13:17:07.429>
    labels = ['type-bug', 'library']
    title = 'pydoc.py: TypeError with a $LINES defined to anything'
    updated_at = <Date 2014-11-27.22:55:05.989>
    user = 'https://github.com/arigo'

    bugs.python.org fields:

    activity = <Date 2014-11-27.22:55:05.989>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-11-27.22:55:05.990>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2014-08-31.13:17:07.429>
    creator = 'arigo'
    dependencies = []
    files = ['37219']
    hgrepos = []
    issue_num = 22314
    keywords = ['patch']
    message_count = 3.0
    messages = ['226177', '231310', '231785']
    nosy_count = 3.0
    nosy_names = ['arigo', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue22314'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @arigo
    Copy link
    Mannequin Author

    arigo mannequin commented Aug 31, 2014

    $ 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.

    @arigo arigo mannequin added the stdlib Python modules in the Lib dir label Aug 31, 2014
    @serhiy-storchaka
    Copy link
    Member

    Here is a patch.

    @serhiy-storchaka serhiy-storchaka added the type-bug An unexpected behavior, bug, or error label Nov 18, 2014
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 27, 2014

    New changeset 50808dffd0bb by Serhiy Storchaka in branch '2.7':
    Issue bpo-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 bpo-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 bpo-22314: pydoc now works when the LINES environment variable is set.
    https://hg.python.org/cpython/rev/c8adee8a0ccb

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant