STINNER Victor <victor.stin...@gmail.com> 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_AddIntConstant(m, "_READLINE_RUNTIME_VERSION", rl_readline_version); PyModule_AddStringConstant(m, "_READLINE_LIBRARY_VERSION", rl_library_version); readline has two famous implementations: GNU readline and editline. editline reuses GNU readline constants, but the string mentions "editline". Example on macOS El Capitain (test.pythoninfo output): readline._READLINE_LIBRARY_VERSION: EditLine wrapper readline._READLINE_RUNTIME_VERSION: 0x402 readline._READLINE_VERSION: 0x402 http://buildbot.python.org/all/builders/x86-64%20El%20Capitan%203.x/builds/871/steps/pythoninfo/logs/stdio I'm not sure that it's useful to make versions public. I suggest to start with private versions, since we only plan to use them in tests right now. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31680> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com