-
Notifications
You must be signed in to change notification settings - Fork 384
Open
Description
I have some tasks that use an interactive terminal however when running those tasks with Python 3.14 the keyboard inputs are not passed through.
I'm not sure my understanding of the issue is good enough to explain it but I have created an example below which should demonstrate the issue:
tasks.py
from invoke import task
@task
def run(c):
c.run("python main.py", pty=True)main.py
#!/usr/bin/env python3
def main():
result = input("Please enter some text: ")
print(f"This is what you input: {result}")
if __name__ == '__main__':
main()When I run this with Python 3.13 or older it accepts the input and prints the result:
invoke run
Please enter some text: Some text
This is what you input: Some textWhen I run this with Python 3.14, the input is not accepted and actually no keyboard inputs seem to go through including ctrl C to kill the process:
invoke run
Please enter some text: Some text
^C^C
^C^CI am using pyenv to manage the Python versions (which is 3.14.0 to be exact) and I'm on macOS Sequoia Version 15.7
vaz-ar, TheSuperiorStanislav, OttoAndrey and jamesbeith
Metadata
Metadata
Assignees
Labels
No labels