summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-10-30 11:22:42 (GMT)
committerGitHub <noreply@github.com>2018-10-30 11:22:42 (GMT)
commitb232df9197a19e78d0e2a751e56e0e62547354ec (patch)
tree851cc39c2b33019a4c88cf828349eccdcb892b7f /Doc
parent3e429dcc242e48fa4cbb1a91cf7c416c37b97b4e (diff)
downloadcpython-b232df9197a19e78d0e2a751e56e0e62547354ec.zip
cpython-b232df9197a19e78d0e2a751e56e0e62547354ec.tar.gz
cpython-b232df9197a19e78d0e2a751e56e0e62547354ec.tar.bz2
bpo-31680: Add curses.ncurses_version. (GH-4217)
Use curses.ncurses_version for conditionally skipping a test.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/curses.rst13
-rw-r--r--Doc/whatsnew/3.8.rst9
2 files changed, 22 insertions, 0 deletions
diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst
index 2a2ee2b..2a4d9ce 100644
--- a/Doc/library/curses.rst
+++ b/Doc/library/curses.rst
@@ -1291,6 +1291,19 @@ The :mod:`curses` module defines the following data members:
A bytes object representing the current version of the module. Also available as
:const:`__version__`.
+
+.. data:: ncurses_version
+
+ A named tuple containing the three components of the ncurses library
+ version: *major*, *minor*, and *patch*. All values are integers. The
+ components can also be accessed by name, so ``curses.ncurses_version[0]``
+ is equivalent to ``curses.ncurses_version.major`` and so on.
+
+ Availability: if the ncurses library is used.
+
+ .. versionadded:: 3.8
+
+
Some constants are available to specify character cell attributes.
The exact constants available are system dependent.
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 758d32e..02391de 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -152,6 +152,15 @@ now return ``False`` instead of raising :exc:`ValueError` or its subclasses
characters or bytes unrepresentable at the OS level.
(Contributed by Serhiy Storchaka in :issue:`33721`.)
+
+ncurses
+-------
+
+Added a new variable holding structured version information for the
+underlying ncurses library: :data:`~curses.ncurses_version`.
+(Contributed by Serhiy Storchaka in :issue:`31680`.)
+
+
pathlib
-------