This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients corona10, erlendaasland, kumaraditya, miss-islington, petr.viktorin, phsilva, shihai1991, vstinner
Date 2022-01-22.19:05:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642878332.0.0.927894707956.issue46417@roundup.psfhosted.org>
In-reply-to
Content
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
---
History
Date User Action Args
2022-01-22 19:05:32vstinnersetrecipients: + vstinner, phsilva, petr.viktorin, corona10, miss-islington, shihai1991, erlendaasland, kumaraditya
2022-01-22 19:05:32vstinnersetmessageid: <1642878332.0.0.927894707956.issue46417@roundup.psfhosted.org>
2022-01-22 19:05:31vstinnerlinkissue46417 messages
2022-01-22 19:05:31vstinnercreate