-
Notifications
You must be signed in to change notification settings - Fork 30
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
setupterm exit silently on Python 3.12 #50
Comments
I am running on windows 10 with the Cpython 3.12 downloaded from python.org |
can you speed up to deal with this issue? It impacts my software development. |
in the curses module of cpython 3.12, the function initscr() will call setupterm which quit silently on my machine. cat d:\Python312\Lib\curses\init.py `def initscr():
|
same issue, work all right on my python3.11, exit silently on python3.12 |
@gschizas would you have any insights? |
@stephanosio isn't it a bug? Is this project still active? |
@irvinren Hi. The original author of this project is no longer active and this project is more or less on life support. I currently lack the bandwidth to look into this issue at the moment -- any help from a third party would be greatly appreciated. |
Is there anything I can do to help you? To be frank, I could support it to some degree if it doesn't cause too much effort. |
Hello all. I am the author of Leo. Leo's There is an easy workaround. The cursesGui2 plugin contains only one call to if 1: # Call our own version of curses.initscr().
import _curses
# This crashes on Python 3.12.
# setupterm(term=_os.environ.get("TERM", "unknown"),
# fd=_sys.__stdout__.fileno())
stdscr = _curses.initscr()
for key, value in _curses.__dict__.items():
if key[0:4] == 'ACS_' or key in ('LINES', 'COLS'):
setattr(curses, key, value)
# return stdscr
else:
stdscr = curses.initscr() If your program calls I tested this hack on Python 3.9, 3.11, 3.12. HTH. |
The Probably a bad build somehow. |
I don't know if this is for sure the culprit, but it's possible that the generated argument clinic code should be regenerated, since the error is a memory access violation in |
Seems like I was right. With a small patch, I was able to build a new working 3.12 wheel after running clinic.py to regenerate the clinic headers.
The current clinic header for _cursesmodule.c was manually modified to include that change, so this just slips it into the source instead. |
@stephanosio I could put in a PR, if that's desired? |
That would be greatly appreciated. |
Leaving this issue open until it is confirmed to be fixed by others. |
v2.3.3a1 worked for me running python 3.12.2 |
v2.3.3, which fixes this issue, has been released. |
after pip install windows-curses==2.3.2 setupterm failed, python process exit silently.
from _curses import setupterm
setupterm(term="xterm",fd=1)
The text was updated successfully, but these errors were encountered: