Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tty to python 3.12 #10784

Merged
merged 3 commits into from
Sep 27, 2023
Merged

Update tty to python 3.12 #10784

merged 3 commits into from
Sep 27, 2023

Conversation

sobolevn
Copy link
Member

@github-actions

This comment has been minimized.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but one optional nit.

stdlib/tty.pyi Outdated
@@ -17,3 +17,12 @@ if sys.platform != "win32":
CC: int
def setraw(fd: _FD, when: int = 2) -> None: ...
def setcbreak(fd: _FD, when: int = 2) -> None: ...

if sys.version_info >= (3, 12):
__all__ += ["cfmakeraw", "cfmakecbreak"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: My quick random sampling shows me that we usually move these __all__ += constructs to the top of the file, even if it means a duplicated version/platform check. Personally, I find this better too, since you can easier spot the contents of __all__ for all branches.

@github-actions
Copy link
Contributor

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

@srittau srittau merged commit 4dad531 into main Sep 27, 2023
66 checks passed
@srittau srittau deleted the py312-tty branch September 27, 2023 09:15
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