Skip to content

[curses] Revert Final for LINES and COLS#14764

Merged
srittau merged 1 commit intopython:mainfrom
donbarbos:revert-curses-final
Sep 23, 2025
Merged

[curses] Revert Final for LINES and COLS#14764
srittau merged 1 commit intopython:mainfrom
donbarbos:revert-curses-final

Conversation

@donbarbos
Copy link
Copy Markdown
Contributor

If the values ​​can be changed in one runtime, for example during a terminal resize, then this doesn't really fit the concept of Final, although I honestly haven't found an exact definition in PEP when changing value of object is no longer permissible for Final (Is it normal to have different values ​​for different builds, python runtimes, subinterpreters, or other?)

Docs: https://docs.python.org/dev/library/curses.html#curses.COLORS
Inspired by #14613 (comment)

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
Copy link
Copy Markdown
Collaborator

srittau commented Sep 23, 2025

LGTM, is there anything missing?

@donbarbos donbarbos marked this pull request as ready for review September 23, 2025 10:43
@donbarbos
Copy link
Copy Markdown
Contributor Author

donbarbos commented Sep 23, 2025

LGTM, is there anything missing?

No, I'm just not sure about COLORS and COLOR_PAIRS.
(The documentation doesn't say that they can be updated.)

@srittau
Copy link
Copy Markdown
Collaborator

srittau commented Sep 23, 2025

LGTM, is there anything missing?

No, I'm just not sure about COLORS and COLOR_PAIRS. (The documentation doesn't say that they can be updated.)

We can always change it if someone complains.

@srittau srittau merged commit 867cc01 into python:main Sep 23, 2025
63 checks passed
@donbarbos donbarbos deleted the revert-curses-final branch February 25, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants