STINNER Victor <vstin...@python.org> added the comment:
Attached cannot_deallocate.patch explains why some static types cannot be deallocated. It lists (static) types which are not cleard properly at Python exit. Simplest example: --- $ ./python -c pass Cannot clear type 'object': it still has subclasses * EncodingMap * fieldnameiterator * formatteriterator * BaseException * _io._IOBase * _io._BytesIOBuffer * _io.IncrementalNewlineDecoder --- More complete example: --- $ ./python setup.py build running build (...) Cannot clear type 'types.GenericAlias': it still has subclasses * _CallableGenericAlias Cannot clear type 'tuple': it still has subclasses * datetime.IsoCalendarDate * DecimalTuple Cannot clear type 'staticmethod': it still has subclasses * abstractstaticmethod Cannot clear type 'property': it still has subclasses * abstractproperty Cannot clear type 'list': it still has subclasses * MyList Cannot clear type 'dict': it still has subclasses * collections.defaultdict * StgDict Cannot clear type 'classmethod': it still has subclasses * abstractclassmethod Cannot clear type 'type': it still has subclasses * ABCMeta * _ctypes.PyCStructType * _ctypes.UnionType * _ctypes.PyCPointerType * _ctypes.PyCArrayType * _ctypes.PyCSimpleType * _ctypes.PyCFuncPtrType Cannot clear type 'object': it still has subclasses * type * classmethod * dict * list * property * staticmethod * tuple * types.GenericAlias * EncodingMap * fieldnameiterator * formatteriterator * BaseException * ModuleSpec * FrozenImporter * _io._IOBase * _io._BytesIOBuffer * _io.IncrementalNewlineDecoder * _LoaderBasics * FileLoader * _abc._abc_data * ABC * Hashable * Awaitable * AsyncIterable * Iterable * Sized * Container * Callable * itertools.accumulate * itertools.combinations * itertools.combinations_with_replacement * itertools.cycle * itertools.dropwhile * itertools.takewhile * itertools.islice * itertools.starmap * itertools.chain * itertools.compress * itertools.filterfalse * itertools.count * itertools.zip_longest * itertools.pairwise * itertools.permutations * itertools.product * itertools.repeat * itertools.groupby * itertools._grouper * itertools._tee * itertools._tee_dataobject * collections.deque * _collections._deque_iterator * _collections._deque_reverse_iterator * _collections._tuplegetter * _IterationGuard * WeakSet * _struct.Struct * _struct.unpack_iterator * datetime.date * datetime.time * datetime.timedelta * datetime.tzinfo * _pickle.Pdata * _pickle.PicklerMemoProxy * _pickle.UnpicklerMemoProxy * _pickle.Pickler * _pickle.Unpickler * _socket.socket * _asyncio.FutureIter * TaskStepMethWrapper * _RunningLoopHolder * _asyncio.Future * _xxsubinterpreters.ChannelID * matmulType * ipowType * awaitType * MethodDescriptorBase * GenericAlias * Generic * MethInstance * MethClass * MethStatic * _testcapi.HeapCType * _testcapi.ContainerNoGC * _curses.window * ossaudiodev.oss_audio_device * ossaudiodev.oss_mixer_device * _elementtree._element_iterator * xml.etree.ElementTree.TreeBuilder * xml.etree.ElementTree.Element * xml.etree.ElementTree.XMLParser * decimal.Decimal * decimal.Context * decimal.SignalDictMixin * decimal.ContextManager * Number * _multiprocessing.SemLock * xxlimited.Xxo * CArgObject * _ctypes.CThunkObject * _ctypes._CData * _ctypes.CField * _ctypes.DictRemover * _ctypes.StructParam_Type --- ---------- Added file: https://bugs.python.org/file50576/cannot_deallocate.patch _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46417> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com