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

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

ncurses does not include BUTTON5_* constants #83454

msjyoo mannequin opened this issue Jan 9, 2020 · 3 comments
3.10 stdlib type-crash


Copy link

@msjyoo msjyoo mannequin commented Jan 9, 2020

BPO 39273
Nosy @serhiy-storchaka, @NoSuck, @ZackerySpytz, @msjyoo
  • #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 = '' 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 = ''
    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', '']
    pr_nums = ['17996']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = ''
    versions = ['Python 3.10']

    Copy link
    Mannequin Author

    @msjyoo msjyoo mannequin commented Jan 9, 2020


    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:

    @msjyoo msjyoo mannequin added 3.7 3.8 type-feature 3.9 stdlib labels Jan 9, 2020
    @ZackerySpytz ZackerySpytz mannequin removed 3.7 3.8 labels Jan 14, 2020
    Copy link

    @NoSuck 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 type-crash 3.8 3.9 and removed 3.9 type-feature labels Oct 8, 2020
    Copy link

    @serhiy-storchaka serhiy-storchaka commented Jan 14, 2021

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

    @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
    3.10 stdlib type-crash
    None yet

    No branches or pull requests

    1 participant