STINNER Victor <vstin...@python.org> added the comment:
Status in Python 3.9. 5 types allow instantiation whereas they must not: BUG!!! * _tkinter.Tcl_Obj * _tkinter.tkapp * _tkinter.tktimertoken * zlib.Compress * zlib.Decompress Example of bug: $ python3.9 Python 3.9.4 >>> import zlib >>> obj=zlib.compressobj() >>> obj2=type(obj)() >>> obj2.copy() Erreur de segmentation (core dumped) --- The remaining types disallow instantiation with different ways. Static type with tp_base=NULL and tp_new=NULL: * _dbm.dbm * _gdbm.gdbm * _multibytecodec.MultibyteCodec * _sre.SRE_Scanner * _thread._localdummy * _thread.lock * _winapi.Overlapped * _xxsubinterpretersmodule.ChannelID * array.arrayiterator * functools.KeyWrapper * functools._lru_list_elem * pyexpat.xmlparser * re.Match * re.Pattern * unicodedata.UCD * _xxsubinterpreters.ChannelID Heap type setting tp_new to NULL after type creation: * _curses_panel.panel Static type setting tp_new to NULL after type creation: * _curses.ncurses_version type * sys.flags type * sys.getwindowsversion() type * sys.version_info type Define a tp_new or tp_init function which always raise an exception: * PyStdPrinter_Type * _hashlib.HASH * _hashlib.HASHXOF * _hashlib.HMAC * os.DirEntry * os.ScandirIterator * select.poll ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43916> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com