Skip to content

curses patch add color_set and wcolor_set , and addchstr family of functions #49618

Closed

Description

@steveintegrityintegratorsnet
BPO 5368
Nosy @birkenfeld, @serhiy-storchaka
Files
  • test_curses_color_set.py: The unit test.
  • curses_patch.diff: The diff file for Modules/_cursesmodule.c
  • test_curses_addchstr.py: Unit test for addchstr family.
  • lib_curses_rst.diff: Diff for Docs/library/curses.rst
  • howto_curses_rst.diff: Diff file for Docs/howto/curses.rst
  • whatsnew_2_7_rst.diff: Diff file for the Docs/whatsnew/2.7.rst file.
  • 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 = 'https://github.com/serhiy-storchaka'
    closed_at = None
    created_at = <Date 2009-02-25.17:30:28.123>
    labels = ['extension-modules', 'type-feature', '3.7']
    title = 'curses patch add color_set and wcolor_set , and addchstr family of functions'
    updated_at = <Date 2017-11-01.18:55:37.516>
    user = 'https://bugs.python.org/steveintegrityintegratorsnet'

    bugs.python.org fields:

    activity = <Date 2017-11-01.18:55:37.516>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2009-02-25.17:30:28.123>
    creator = 'steve@integrityintegrators.net'
    dependencies = []
    files = ['13175', '13194', '13195', '13204', '13206', '13207']
    hgrepos = []
    issue_num = 5368
    keywords = ['patch']
    message_count = 10.0
    messages = ['82709', '82751', '82758', '82804', '82805', '82806', '82833', '82834', '82835', '99800']
    nosy_count = 3.0
    nosy_names = ['georg.brandl', 'steve@integrityintegrators.net', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue5368'
    versions = ['Python 3.7']

    Activity

    1. steveintegrityintegratorsnet commented on Feb 25, 2009

      steveintegrityintegratorsnetmannequin
      MannequinAuthor

      Not sure what to set theType field to, this is my first patch
      submission. The attached files are a unit test
      test_curses_color_set.py and the diff color_set_diff, apparently I can
      only attach one fo thetwo files.

    2. birkenfeld commented on Feb 26, 2009

      @birkenfeld
      Member

      Why was this classified as "documentation"?

    3. added and removed
      docsDocumentation in the Doc dir
      on Feb 26, 2009
    4. steveintegrityintegratorsnet commented on Feb 26, 2009

      steveintegrityintegratorsnetmannequin
      MannequinAuthor

      According to the python.org website: http://python.org/dev/patches/

      We were to submit Documentation patches as Documentation, but it did'nt
      say what to submit other types of patches as, so I took a chance.

      How should it have been submitted?

      Best Regards,
      Steve Owens

      Georg Brandl <georg@python.org> added the comment:

      Why was this classified as "documentation"?

      ----------
      components: +Extension Modules -Documentation


      Python tracker <report@bugs.python.org>
      <http://bugs.python.org/issue5368\>


    5. added
      stdlibStandard Library Python modules in the Lib/ directory
      and removed
      stdlibStandard Library Python modules in the Lib/ directory
      on Feb 26, 2009
    6. steveintegrityintegratorsnet commented on Feb 27, 2009

      steveintegrityintegratorsnetmannequin
      MannequinAuthor

      I have also added the addchstr family of functions. The updated patch2
      should include the previos patch since it has not been applied to the
      repository as of this writing. See also the unittest for the addchstr
      method family.

      I will update the docs and add those as well, but there is quite alot of
      documentation that needs to be done and it is late, please let me know
      if this will be an acceptable patch. I'm still new.

    7. changed the title [-]curses patch add color_set and wcolor_set functions[/-] [+]curses patch add color_set and wcolor_set , and addchstr family of functions[/+] on Feb 27, 2009
    8. steveintegrityintegratorsnet commented on Feb 27, 2009

      steveintegrityintegratorsnetmannequin
      MannequinAuthor

      This is the addchstr unit test.

    9. steveintegrityintegratorsnet commented on Feb 27, 2009

      steveintegrityintegratorsnetmannequin
      MannequinAuthor

      This is a start on the documentation efforts. I have updated the
      recently modified curses.rst (how to) file. Need direction in locating
      all of the docs that are impacted by the changes I have introduced and I
      will write them up.

    10. 2 remaining items

    11. steveintegrityintegratorsnet commented on Feb 27, 2009

      steveintegrityintegratorsnetmannequin
      MannequinAuthor

      I am not familiar with the process here, but I would like to continue
      to add additional support to the _cursesmodule.c file. However, I am
      loathe to put too much functionality into any one patch. Is there any
      way I can find out when this patch will be applied so that I can get
      latest and then move forward incrementally?

    12. akuchling commented on Feb 22, 2010

      @akuchling
      Contributor

      Thanks for the patches! Two comments on the addchstr change:

      • I think that, instead of checking for a list, the method should accept any Python sequence; a tuple is perfectly reasonable, for example, and if the code is changed to use PyCurses_ConvertToChType() instead of PyInt_Check(), it will accept a list of integers, a mixed list of ints and character strings, and even just strings.

      • the documentation and error messages currently try to paper over all of the curses variants of addchstr(), waddchstr(), mvwaddchstr(), ..., covering them all up under the addchstr name. This means that your submitted documentation patch is too detailed; it should look more like the insnstr() docs, which has [y,x,] as optional, and the text says something like "Moves to y,x if specified, and then ...'.

      The color_set() changes look OK; I'm going to try to break them out into a separate patch and commit them on their own.

    13. removed their assignment
      on Nov 12, 2010
    14. transferred this issue fromon Apr 10, 2022
    15. serhiy-storchaka commented on Jun 28, 2026

      @serhiy-storchaka
      Member

      Both halves are now resolved:

      Closing as superseded.

    16. moved this from Features to Done in Curses issueson Jun 28, 2026
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Labels

    extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions