Skip to content

Fix #2246 - Override builtins.input to avoid duplicating it #2254

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

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

WebReflection
Copy link
Contributor

@WebReflection WebReflection commented Nov 25, 2024

Description

This MR fixes #2246 by overriding the builtins.input apparently needed to avoid duplicated text on constrained terminal width where apparently setStdin is not enough and an extra override is needed for the builtins as we used to do in classic.

Thanks @JoshuaLowe1002 for the hint around it, this has been manually successfully tested too.

Changes

  • override builtins.input when the terminal runs in a worker
  • test everything is fine with or without code.interact() around

Checklist

  • I have checked make build works locally.
  • I have created / updated documentation for this change (if applicable).

@WebReflection
Copy link
Contributor Author

Published as https://cdn.jsdelivr.net/npm/@pyscript/core@0.6.20/dist/core.js to allow early tests before release.

Copy link
Member

@JoshuaLowe1002 JoshuaLowe1002 left a comment

Choose a reason for hiding this comment

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

Thanks for getting this up so quickly! :shipit:

@WebReflection WebReflection merged commit 796373c into pyscript:main Nov 25, 2024
2 checks passed
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.

[2024.10.2] Terminal rendering issue with long text when using input()
2 participants