Terry J. Reedy added the comment:

The news part of the patch did not apply  -- best not to include such in posted 
patches.

After recompiliing 3.5 on Windows 10, the two tkinter test cases give the 3.3 
TypeErrors instead of crashing.  test_tcl also runs.  curses does not run on 
Windows.

I do not know enough internals to really understand #15721 or why you call the 
fix a workaround, but I do understand 'exception' (OK) versus 'crash' 
(forbidden).  Unless you think restoring the previous situation (tp_new = NUll) 
can cause a worse problem, I would apply this soon, within a week, so not 
forgotten before the June update releases.  The tcl test addition is correct.  
The fix can be improved later if you think of something better.

I initially wondered why _tkinter has classes that cannot be instantiated (from 
Python).  Then I discovered that this is normal, and that the exception is 
standard.

>>> type(iter([]))()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create 'list_iterator' instances

Is list_iterator.tp_new NULL?  Or does it raise instead of crash by other means?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23815>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to