[issue31680] Expose curses library name and version on Python level

2018-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -7410 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue31680] Expose curses library name and version on Python level

2018-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b232df9197a19e78d0e2a751e56e0e62547354ec by Serhiy Storchaka in branch 'master': bpo-31680: Add curses.ncurses_version. (GH-4217) https://github.com/python/cpython/commit/b232df9197a19e78d0e2a751e56e0e62547354ec -- _

[issue31680] Expose curses library name and version on Python level

2018-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ __

[issue31680] Expose curses library name and version on Python level

2018-06-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +7410 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue31680] Expose curses library name and version on Python level

2017-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 4217 adds a named tuple curses.ncurses_version containing the three components of the ncurses library version: major, minor, and patch. >>> curses.ncurses_version curses.ncurses_version(major=6, minor=0, patch=20160625) Other curses implementation don't

[issue31680] Expose curses library name and version on Python level

2017-11-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4185 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue31680] Expose curses library name and version on Python level

2017-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No need to backport this to 3.6. The test in 3.6 can be skipped on OpenBSD, independently from the ncurses version. -- ___ Python tracker _

[issue31680] Expose curses library name and version on Python level

2017-10-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: pythoninfo seems like the right place. It is publicly readable. We just reserved the right to change it in any release as needed. (This actually is useful to other users also as long as they know.) #15037 was originally filed for 3.4 and is currently marke

[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: I suggest: curses._NCURSES_VERSION_INFO = (6, 0, 20170212) curses._NCURSES_VERSION = "6.0" curses._NCURSES_MOUSE_VERSION = 2 Similar example, the readline module uses: PyModule_AddIntConstant(m, "_READLINE_VERSION", RL_READLINE_VERSION); PyModule_AddI

[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this is what I meant. The version should be exposed as a tuple (major, minor, patch) or as a special named tuple. I don't know what to do with other implementations. NCURSES_VERSION_MAJOR is not a part of standard. One solution -- set the version to (0

[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: > The name and the version of the curses library are needed for work around > bugs in old versions or skip tests on platforms that provide broken curses > library (like OpenBSD providing ncurses 5.7). If there are known issues depending on the ncurses version

[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: On Fedora 26, /usr/include/ncurses/curses.h contains: --- /* These are defined only in curses.h, and are used for conditional compiles */ #define NCURSES_VERSION_MAJOR 6 #define NCURSES_VERSION_MINOR 0 #define NCURSES_VERSION_PATCH 20170212 /* This is defined i

[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: How can we get the ncurses version? -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list ma

[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The name and the version of the curses library are needed for work around bugs in old versions or skip tests on platforms that provide broken curses library (like OpenBSD providing ncurses 5.7). The curses and _curses modules provide the attribute "versio