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

curses: add set_tabsize and set_escdelay #82493

Closed
asottile mannequin opened this issue Sep 29, 2019 · 5 comments
Closed

curses: add set_tabsize and set_escdelay #82493

asottile mannequin opened this issue Sep 29, 2019 · 5 comments
Labels
3.9 only security fixes extension-modules C modules in the Modules dir

Comments

@asottile
Copy link
Mannequin

asottile mannequin commented Sep 29, 2019

BPO 38312
Nosy @serhiy-storchaka, @asottile, @ammaraskar
PRs
  • bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize #16938
  • 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 2019-10-31.09:14:27.595>
    created_at = <Date 2019-09-29.01:40:08.396>
    labels = ['extension-modules', '3.9']
    title = 'curses: add `set_tabsize` and `set_escdelay`'
    updated_at = <Date 2019-10-31.09:14:27.594>
    user = 'https://github.com/asottile'

    bugs.python.org fields:

    activity = <Date 2019-10-31.09:14:27.594>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-10-31.09:14:27.595>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2019-09-29.01:40:08.396>
    creator = 'Anthony Sottile'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38312
    keywords = ['patch']
    message_count = 5.0
    messages = ['353477', '353479', '355683', '355685', '355743']
    nosy_count = 3.0
    nosy_names = ['serhiy.storchaka', 'Anthony Sottile', 'ammar2']
    pr_nums = ['16938']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue38312'
    versions = ['Python 3.9']

    @asottile
    Copy link
    Mannequin Author

    asottile mannequin commented Sep 29, 2019

    https://linux.die.net/man/3/set_escdelay
    https://linux.die.net/man/3/set_tabsize

    I'd like to help with this, but I don't even know where to start with argumentclinic -- any points would be greatly appreciated

    presumably I should also add getters for these as well to retrieve the global variable from the curses side?

    @asottile asottile mannequin added 3.9 only security fixes extension-modules C modules in the Modules dir labels Sep 29, 2019
    @ammaraskar
    Copy link
    Member

    I'd like to help with this, but I don't even know where to start with argumentclinic -- any points would be greatly appreciated

    Are you asking about argumentclinic in general or something specific to this bug? If it's something specific feel free to ignore the following:

    You can find a basic tutorial on argumentclinic here https://docs.python.org/3/howto/clinic.html#basic-concepts-and-usage

    Essentially, you'll be adding something along these lines into _cursesmodule.c

    /*[clinic input]
    _curses.set_escdelay
    size: int
    bla bla description for size.
    /

    One line description.

    Extended description. Spanning over
    multiple lines.
    [clinic start generated code]*/

    after which you can run python3 [Tools/clinic/clinic.py](https://github.com/python/cpython/blob/main/Tools/clinic/clinic.py) _cursesmodule.c which will update the file and place the stub for the method in there.

    @serhiy-storchaka
    Copy link
    Member

    There are also ncurses functions get_tabsize() and get_escdelay(). In other implementations they can be modeled by returning the TABSIZE and ESCDELAY global variables.

    @asottile
    Copy link
    Mannequin Author

    asottile mannequin commented Oct 29, 2019

    ah, I'll add those too -- I can do that in the current PR

    @serhiy-storchaka
    Copy link
    Member

    New changeset b32cb97 by Serhiy Storchaka (Anthony Sottile) in branch 'master':
    bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. (GH-16938)
    b32cb97

    @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.9 only security fixes extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants