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

ncurses does not include BUTTON5_* constants #83454

Closed
msjyoo mannequin opened this issue Jan 9, 2020 · 3 comments
Closed

ncurses does not include BUTTON5_* constants #83454

msjyoo mannequin opened this issue Jan 9, 2020 · 3 comments
Labels
3.10 only security fixes stdlib Python modules in the Lib dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@msjyoo
Copy link
Mannequin

msjyoo mannequin commented Jan 9, 2020

BPO 39273
Nosy @serhiy-storchaka, @NoSuck, @ZackerySpytz, @msjyoo
PRs
  • bpo-39273: Expose BUTTON5_* constants in the curses module if available #17996
  • 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 2021-01-14.09:40:58.297>
    created_at = <Date 2020-01-09.06:59:01.409>
    labels = ['library', '3.10', 'type-crash']
    title = 'ncurses does not include BUTTON5_* constants'
    updated_at = <Date 2021-01-14.09:40:58.295>
    user = 'https://github.com/msjyoo'

    bugs.python.org fields:

    activity = <Date 2021-01-14.09:40:58.295>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-01-14.09:40:58.297>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2020-01-09.06:59:01.409>
    creator = 'michael.yoo@akunacapital.com'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39273
    keywords = ['patch']
    message_count = 3.0
    messages = ['359657', '378252', '385065']
    nosy_count = 4.0
    nosy_names = ['serhiy.storchaka', 'IronGrid', 'ZackerySpytz', 'michael.yoo@akunacapital.com']
    pr_nums = ['17996']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue39273'
    versions = ['Python 3.10']

    @msjyoo
    Copy link
    Mannequin Author

    msjyoo mannequin commented Jan 9, 2020

    Hi,

    Recently I was working with ncurses, and when handling the mouse scroll events, I noticed that the curses library does not include the BUTTON5_* macros provided by ncurses. On my system, BUTTON5 corresponds to the mouse down event.

    Is there a reason for this, or has it just not been updated? If so, the expectation is that it exists.

    Relevant source location: https://github.com/python/cpython/blob/2bc3434/Modules/_cursesmodule.c#L4668

    @msjyoo msjyoo mannequin added 3.7 (EOL) end of life 3.8 only security fixes type-feature A feature request or enhancement 3.9 only security fixes stdlib Python modules in the Lib dir labels Jan 9, 2020
    @ZackerySpytz ZackerySpytz mannequin removed 3.7 (EOL) end of life 3.8 only security fixes labels Jan 14, 2020
    @NoSuck
    Copy link
    Mannequin

    NoSuck mannequin commented Oct 8, 2020

    This baffled me, as well. Does the reason involve bit-field width?

    By the way, look at what my Python installation does when just pressing button 5 (mouse wheel down) after calling curses.mousemask():

    _curses.error: getmouse() returned ERR
    

    The curses program then crashes with an exit code of 1.

    $ uname -srvmo
    Linux 5.4.51-v7l+ python/cpython#45674 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux
    $ python3 -V
    Python 3.7.3
    

    @NoSuck NoSuck mannequin added 3.7 (EOL) end of life type-crash A hard crash of the interpreter, possibly with a core dump 3.8 only security fixes 3.9 only security fixes and removed 3.9 only security fixes type-feature A feature request or enhancement labels Oct 8, 2020
    @serhiy-storchaka
    Copy link
    Member

    New changeset 14cfa32 by Zackery Spytz in branch 'master':
    bpo-39273: Expose BUTTON5_* constants in the curses module if available (GH-17996)
    14cfa32

    @serhiy-storchaka serhiy-storchaka added 3.10 only security fixes and removed 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Jan 14, 2021
    @serhiy-storchaka serhiy-storchaka added 3.10 only security fixes and removed 3.7 (EOL) end of life labels Jan 14, 2021
    @serhiy-storchaka serhiy-storchaka removed 3.8 only security fixes 3.9 only security fixes labels Jan 14, 2021
    @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
    3.10 only security fixes stdlib Python modules in the Lib dir type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant