# coding: utf-8 # AUTO-GENERATED FILE -- DO NOT EDIT """ This module provides access to the garbage collector for reference cycles. enable() -- Enable automatic garbage collection. disable() -- Disable automatic garbage collection. isenabled() -- Returns true if automatic collection is enabled. collect() -- Do a full collection right now. get_count() -- Return the current collection counts. get_stats() -- Return list of dictionaries containing per-generation stats. set_debug() -- Set debugging flags. get_debug() -- Get debugging flags. set_threshold() -- Set the collection thresholds. get_threshold() -- Return the current the collection thresholds. get_objects() -- Return a list of all objects tracked by the collector. is_tracked() -- Returns true if a given object is tracked. is_finalized() -- Returns true if a given object has been already finalized. get_referrers() -- Return the list of objects that refer to an object. get_referents() -- Return the list of objects that an object refers to. freeze() -- Freeze all tracked objects and ignore them for future collections. unfreeze() -- Unfreeze all objects in the permanent generation. get_freeze_count() -- Return the number of objects in the permanent generation. """ DEBUG_COLLECTABLE = 2 DEBUG_LEAK = 38 DEBUG_SAVEALL = 32 DEBUG_STATS = 1 DEBUG_UNCOLLECTABLE = 4 __doc__ = """This module provides access to the garbage collector for reference cycles. enable() -- Enable automatic garbage collection. disable() -- Disable automatic garbage collection. isenabled() -- Returns true if automatic collection is enabled. collect() -- Do a full collection right now. get_count() -- Return the current collection counts. get_stats() -- Return list of dictionaries containing per-generation stats. set_debug() -- Set debugging flags. get_debug() -- Get debugging flags. set_threshold() -- Set the collection thresholds. get_threshold() -- Return the current the collection thresholds. get_objects() -- Return a list of all objects tracked by the collector. is_tracked() -- Returns true if a given object is tracked. is_finalized() -- Returns true if a given object has been already finalized. get_referrers() -- Return the list of objects that refer to an object. get_referents() -- Return the list of objects that an object refers to. freeze() -- Freeze all tracked objects and ignore them for future collections. unfreeze() -- Unfreeze all objects in the permanent generation. get_freeze_count() -- Return the number of objects in the permanent generation. """ class __loader__(object): """ Meta path import for built-in modules. All methods are either class or static methods to avoid the need to instantiate the class. """ _ORIGIN = 'built-in' def create_module(self, spec): """ Create a built-in module """ pass def exec_module(self, module): """ Exec a built-in module """ pass def find_spec(self, fullname, path=None, target=None): pass def get_code(self, fullname): """ Return None as built-in modules do not have code objects. """ pass def get_source(self, fullname): """ Return None as built-in modules do not have source code. """ pass def is_package(self, fullname): """ Return False as built-in modules are never packages. """ pass def load_module(self, fullname): """ Load the specified module into sys.modules and return it. This method is deprecated. Use loader.exec_module() instead. """ pass __name__ = 'gc' __package__ = '' __spec__ = None callbacks = [] def collect(generation=2): """ Run the garbage collector. With no arguments, run a full collection. The optional argument may be an integer specifying which generation to collect. A ValueError is raised if the generation number is invalid. The number of unreachable objects is returned. """ pass def disable(): """ Disable automatic garbage collection. """ pass def enable(): """ Enable automatic garbage collection. """ pass def freeze(): """ Freeze all current tracked objects and ignore them for future collections. This can be used before a POSIX fork() call to make the gc copy-on-write friendly. Note: collection before a POSIX fork() call may free pages for future allocation which can cause copy-on-write. """ pass garbage = [] def get_count(): """ Return a three-tuple of the current collection counts. """ pass def get_debug(): """ Get the garbage collection debugging flags. """ pass def get_freeze_count(): """ Return the number of objects in the permanent generation. """ pass def get_objects(generation=None): """ Return a list of objects tracked by the collector (excluding the list returned). generation Generation to extract the objects from. If generation is not None, return only the objects tracked by the collector that are in that generation. """ pass def get_referents(*objs): """ Return the list of objects that are directly referred to by 'objs'. """ pass def get_referrers(*objs): """ Return the list of objects that directly refer to any of 'objs'. """ pass def get_stats(): """ Return a list of dictionaries containing per-generation statistics. """ pass def get_threshold(): """ Return the current collection thresholds. """ pass def is_finalized(obj): """ Returns true if the object has been already finalized by the GC. """ pass def is_tracked(obj): """ Returns true if the object is tracked by the garbage collector. Simple atomic objects will return false. """ pass def isenabled(): """ Returns true if automatic garbage collection is enabled. """ pass def set_debug(flags): """ Set the garbage collection debugging flags. flags An integer that can have the following bits turned on: DEBUG_STATS - Print statistics during collection. DEBUG_COLLECTABLE - Print collectable objects found. DEBUG_UNCOLLECTABLE - Print unreachable but uncollectable objects found. DEBUG_SAVEALL - Save objects to gc.garbage rather than freeing them. DEBUG_LEAK - Debug leaking programs (everything but STATS). Debugging information is written to sys.stderr. """ pass def set_threshold(threshold0, threshold1=None, threshold2=None): """ set_threshold(threshold0, [threshold1, [threshold2]]) Set the collection thresholds (the collection frequency). Setting 'threshold0' to zero disables collection. """ pass def unfreeze(): """ Unfreeze all objects in the permanent generation. Put all objects in the permanent generation back into oldest generation. """ pass