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

forkpty DeprecationWarning in pexpect #29

Open
javierggt opened this issue Jan 6, 2025 · 1 comment
Open

forkpty DeprecationWarning in pexpect #29

javierggt opened this issue Jan 6, 2025 · 1 comment

Comments

@javierggt
Copy link
Contributor

javierggt commented Jan 6, 2025

I have been tracking the occurrence of the forkpty warning in Ska3 regression testing. One occurrence (in agasc) can be traced back to pexpect using ptyprocess which in turn calls forkpty.

You can reproduce it with the following:

import warnings
import ska_shell
import numexpr

warnings.filterwarnings("always", category=DeprecationWarning)
ska_shell.run_shell("ls", shell="bash", importenv=None, env=None, getenv=False)

# ska_shell.shell._setup_bash_shell(None)

This warning was introduced in python/cpython#100228 (adding the link to reflect the noise to the source, just for feedback). Funny enough, one of the links back to this issue is from Marie/Sherpa.

@javierggt
Copy link
Contributor Author

Note that, in this script, you do not get the warning if you comment out the numexpr import. Who knows? Maybe they also fork somewhere.

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

No branches or pull requests

1 participant