Skip to content

gh-151623: Improve curses documentation and docstrings#151625

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-docs
Jun 18, 2026
Merged

gh-151623: Improve curses documentation and docstrings#151625
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-docs

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 18, 2026

Copy link
Copy Markdown
Member

Fix errors and clarify the curses, curses.panel and curses.ascii docs against X/Open Curses and ncurses, and sync the affected docstrings.

Fix errors and clarify the curses, curses.panel and curses.ascii docs
against X/Open Curses and ncurses, and sync the affected docstrings.
@serhiy-storchaka serhiy-storchaka added docs Documentation in the Doc dir skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jun 18, 2026
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 18, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Jun 18, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33195521 | 📁 Comparing 0b15522 against main (3a03405)

  🔍 Preview build  

3 files changed
± library/curses.ascii.html
± library/curses.html
± library/curses.panel.html

@serhiy-storchaka serhiy-storchaka merged commit 65afcdd into python:main Jun 18, 2026
66 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 18, 2026
@serhiy-storchaka serhiy-storchaka deleted the curses-docs branch June 18, 2026 08:20
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 65afcdd8dfb3621ac696fce076e6282c76a04b2b 3.14

@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 65afcdd8dfb3621ac696fce076e6282c76a04b2b 3.13

@bedevere-app

bedevere-app Bot commented Jun 18, 2026

Copy link
Copy Markdown

GH-151628 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 18, 2026
@bedevere-app

bedevere-app Bot commented Jun 18, 2026

Copy link
Copy Markdown

GH-151629 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 18, 2026
@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.13 bugs and security fixes label Jun 18, 2026
@serhiy-storchaka serhiy-storchaka removed their assignment Jun 18, 2026
serhiy-storchaka added a commit that referenced this pull request Jun 18, 2026
) (GH-151628)

Fix errors and clarify the curses, curses.panel and curses.ascii docs
against X/Open Curses and ncurses, and sync the affected docstrings.
(cherry picked from commit 65afcdd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Jun 18, 2026
) (GH-151629)

Fix errors and clarify the curses, curses.panel and curses.ascii docs
against X/Open Curses and ncurses, and sync the affected docstrings.
(cherry picked from commit 65afcdd)
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Android 3.15 (tier-3) has failed when building commit 7aa41c4.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/2113/builds/207) and take a look at the build logs.
  4. Check if the failure is related to this commit (7aa41c4) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/2113/builds/207

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 31, done.        
remote: Counting objects:   3% (1/31)        
remote: Counting objects:   6% (2/31)        
remote: Counting objects:   9% (3/31)        
remote: Counting objects:  12% (4/31)        
remote: Counting objects:  16% (5/31)        
remote: Counting objects:  19% (6/31)        
remote: Counting objects:  22% (7/31)        
remote: Counting objects:  25% (8/31)        
remote: Counting objects:  29% (9/31)        
remote: Counting objects:  32% (10/31)        
remote: Counting objects:  35% (11/31)        
remote: Counting objects:  38% (12/31)        
remote: Counting objects:  41% (13/31)        
remote: Counting objects:  45% (14/31)        
remote: Counting objects:  48% (15/31)        
remote: Counting objects:  51% (16/31)        
remote: Counting objects:  54% (17/31)        
remote: Counting objects:  58% (18/31)        
remote: Counting objects:  61% (19/31)        
remote: Counting objects:  64% (20/31)        
remote: Counting objects:  67% (21/31)        
remote: Counting objects:  70% (22/31)        
remote: Counting objects:  74% (23/31)        
remote: Counting objects:  77% (24/31)        
remote: Counting objects:  80% (25/31)        
remote: Counting objects:  83% (26/31)        
remote: Counting objects:  87% (27/31)        
remote: Counting objects:  90% (28/31)        
remote: Counting objects:  93% (29/31)        
remote: Counting objects:  96% (30/31)        
remote: Counting objects: 100% (31/31)        
remote: Counting objects: 100% (31/31), done.        
remote: Compressing objects: 100% (1/1)        
remote: Compressing objects: 100% (1/1), done.        
remote: Total 16 (delta 15), reused 15 (delta 15), pack-reused 0 (from 0)        
From https://github.com/python/cpython
 * branch                    3.15       -> FETCH_HEAD
Note: switching to '7aa41c406b33ef96e92cd628825e0a70be9e3697'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 7aa41c406b3 [3.15] gh-151623: Improve curses documentation and docstrings (GH-151625) (GH-151628)
Switched to and reset branch '3.15'

configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

../../configure: line 4103: pkg-config: command not found
configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

../../Python/fileutils.c:458:1: warning: unused function 'decode_current_locale' [-Wunused-function]
  458 | decode_current_locale(const char* arg, wchar_t **wstr, size_t *wlen,
      | ^~~~~~~~~~~~~~~~~~~~~
../../Python/fileutils.c:677:1: warning: unused function 'encode_current_locale' [-Wunused-function]
  677 | encode_current_locale(const wchar_t *text, char **str,
      | ^~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
../../Modules/_localemodule.c:195:1: warning: unused function 'is_all_ascii' [-Wunused-function]
  195 | is_all_ascii(const char *str)
      | ^~~~~~~~~~~~
1 warning generated.
../../Modules/pwdmodule.c:69:16: warning: unused variable 'pwd_db_mutex' [-Wunused-variable]
   69 | static PyMutex pwd_db_mutex = {0};
      |                ^~~~~~~~~~~~
1 warning generated.
../../Modules/_hacl/Lib_Memzero0.c:66:6: warning: "Your platform does not support any safe implementation of memzero -- consider a pull request!" [-W#warnings]
   66 |     #warning "Your platform does not support any safe implementation of memzero -- consider a pull request!"
      |      ^
1 warning generated.

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  8784  100  8784    0     0  97242      0 --:--:-- --:--:-- --:--:-- 97600
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  2894  100  2894    0     0  61402      0 --:--:-- --:--:-- --:--:-- 61574
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 43504  100 43504    0     0   707k      0 --:--:-- --:--:-- --:--:--  720k
rror: closed
  + Exception Group Traceback (most recent call last):
  |   File "<frozen runpy>", line 198, in _run_module_as_main
  |   File "<frozen runpy>", line 88, in _run_code
  |   File "/Users/android/buildarea/3.15.mhsmith-android-aarch64/build/Platforms/Android/__main__.py", line 1059, in <module>
  |     main()
  |   File "/Users/android/buildarea/3.15.mhsmith-android-aarch64/build/Platforms/Android/__main__.py", line 1035, in main
  |     asyncio.run(result)
  |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
  |     return runner.run(main)
  |            ^^^^^^^^^^^^^^^^
  |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
  |     return self._loop.run_until_complete(task)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
  |     return future.result()
  |            ^^^^^^^^^^^^^^^
  |   File "/Users/android/buildarea/3.15.mhsmith-android-aarch64/build/Platforms/Android/__main__.py", line 726, in run_testbed
  |     async with asyncio.TaskGroup() as tg:
  |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/taskgroups.py", line 145, in __aexit__
  |     raise me from None
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    |     return await fut
    |            ^^^^^^^^^
    |   File "/Users/android/buildarea/3.15.mhsmith-android-aarch64/build/Platforms/Android/__main__.py", line 513, in find_pid
    |     pid = (await async_check_output(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Users/android/buildarea/3.15.mhsmith-android-aarch64/build/Platforms/Android/__main__.py", line 447, in async_check_output
    |     stdout, stderr = await process.communicate()
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/subprocess.py", line 201, in communicate
    |     stdin, stdout, stderr = await tasks.gather(stdin, stdout, stderr)
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/subprocess.py", line 181, in _read_stream
    |     output = await stream.read()
    |              ^^^^^^^^^^^^^^^^^^^
    |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/streams.py", line 706, in read
    |     block = await self.read(self._limit)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/streams.py", line 713, in read
    |     await self._wait_for_data('read')
    |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/streams.py", line 545, in _wait_for_data
    |     await self._waiter
    | asyncio.exceptions.CancelledError
    | 
    | The above exception was the direct cause of the following exception:
    | 
    | Traceback (most recent call last):
    |   File "/Users/android/buildarea/3.15.mhsmith-android-aarch64/build/Platforms/Android/__main__.py", line 542, in logcat_task
    |     pid = await wait_for(find_pid(serial), startup_timeout)
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 519, in wait_for
    |     async with timeouts.timeout(timeout):
    |   File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
    |     raise TimeoutError from exc_val
    | TimeoutError
    +------------------------------------

@hugovk

hugovk commented Jun 18, 2026

Copy link
Copy Markdown
Member

Some extra suggestions: #151635.

@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Android 3.14 (tier-3) has failed when building commit 015cc42.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1794/builds/1202) and take a look at the build logs.
  4. Check if the failure is related to this commit (015cc42) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1794/builds/1202

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 16, done.        
remote: Counting objects:  10% (1/10)        
remote: Counting objects:  20% (2/10)        
remote: Counting objects:  30% (3/10)        
remote: Counting objects:  40% (4/10)        
remote: Counting objects:  50% (5/10)        
remote: Counting objects:  60% (6/10)        
remote: Counting objects:  70% (7/10)        
remote: Counting objects:  80% (8/10)        
remote: Counting objects:  90% (9/10)        
remote: Counting objects: 100% (10/10)        
remote: Counting objects: 100% (10/10), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 16 (delta 3), reused 3 (delta 3), pack-reused 6 (from 1)        
From https://github.com/python/cpython
 * branch                    3.14       -> FETCH_HEAD
Note: switching to '015cc42bc254dd1fbfcb799869cb6e8196fd1c84'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 015cc42bc25 [3.14] gh-151623: Improve curses documentation and docstrings (GH-151625) (GH-151629)
Switched to and reset branch '3.14'

configure: WARNING: no system libmpdec found; falling back to bundled libmpdec (deprecated and scheduled for removal in Python 3.16)
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

../../configure: line 4073: pkg-config: command not found
configure: WARNING: no system libmpdec found; falling back to bundled libmpdec (deprecated and scheduled for removal in Python 3.16)
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

../../Python/fileutils.c:460:1: warning: unused function 'decode_current_locale' [-Wunused-function]
  460 | decode_current_locale(const char* arg, wchar_t **wstr, size_t *wlen,
      | ^~~~~~~~~~~~~~~~~~~~~
../../Python/fileutils.c:679:1: warning: unused function 'encode_current_locale' [-Wunused-function]
  679 | encode_current_locale(const wchar_t *text, char **str,
      | ^~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
../../Modules/_localemodule.c:195:1: warning: unused function 'is_all_ascii' [-Wunused-function]
  195 | is_all_ascii(const char *str)
      | ^~~~~~~~~~~~
1 warning generated.
../../Modules/_hacl/Lib_Memzero0.c:66:6: warning: "Your platform does not support any safe implementation of memzero -- consider a pull request!" [-W#warnings]
   66 |     #warning "Your platform does not support any safe implementation of memzero -- consider a pull request!"
      |      ^
1 warning generated.

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  8784  100  8784    0     0   204k      0 --:--:-- --:--:-- --:--:--  209k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  2894  100  2894    0     0  93075      0 --:--:-- --:--:-- --:--:-- 93354
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 43504  100 43504    0     0  2892k      0 --:--:-- --:--:-- --:--:-- 3034k
adb: device offline

serhiy-storchaka added a commit that referenced this pull request Jun 18, 2026
) (GH-151629) (GH-151630)

(cherry picked from commit 015cc42)

Fix errors and clarify the curses, curses.panel and curses.ascii docs
against X/Open Curses and ncurses, and sync the affected docstrings.
(cherry picked from commit 65afcdd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants