class_docstr: See default_options at the end of this module for a list of all possible
  options and CmdLine.usage and CmdLine.parse_command_line() for their
  meaning.
class_docstr_tok: ["See","default_options","at","the","end","of","this","module","for","a","list","of","all","possible","options","and","CmdLine.usage","and","CmdLine.parse_command_line","(",")","for","their","meaning","."]
docstr: Return a string that contains all the options that are relevant for cache invalidation.
docstr_tok: ["Return","a","string","that","contains","all","the","options","that","are","relevant","for","cache","invalidation","."]
code: def get_fingerprint(self):
      r"""
      Return a string that contains all the options that are relevant for cache invalidation.
      """
      # Collect only the data that can affect the generated file(s).
      data = {}
  
      for key, value in self.__dict__.items():
          if key in [
              "show_version",
              "errors_to_stderr",
              "verbose",
              "quiet",
          ]:
              # verbosity flags have no influence on the compilation result
              continue
          elif key in ["output_file", "output_dir"]:
              # ignore the exact name of the output file
              continue
          elif key in ["timestamps"]:
              # the cache cares about the content of files, not about the timestamps of sources
              continue
          elif key in ["cache"]:
              # hopefully caching has no influence on the compilation result
              continue
          elif key in ["compiler_directives"]:
              # directives passed on to the C compiler do not influence the generated C code
              continue
          elif key in ["include_path"]:
              # this path changes which headers are tracked as dependencies,
              # it has no influence on the generated C code
              continue
          elif key in ["working_path"]:
              # this path changes where modules and pxd files are found;
              # their content is part of the fingerprint anyway, their
              # absolute path does not matter
              continue
          elif key in ["create_extension"]:
              # create_extension() has already mangled the options, e.g.,
              # embedded_metadata, when the fingerprint is computed so we
              # ignore it here.
              continue
          elif key in ["build_dir"]:
              # the (temporary) directory where we collect dependencies
              # has no influence on the C output
              continue
          elif key in [
              "use_listing_file",
              "generate_pxi",
              "annotate",
              "annotate_coverage_xml",
          ]:
              # all output files are contained in the cache so the types of
              # files generated must be part of the fingerprint
              data[key] = value
          elif key in ["formal_grammar", "evaluate_tree_assertions"]:
              # these bits can change whether compilation to C passes/fails
              data[key] = value
          elif key in [
              "embedded_metadata",
              "emit_linenums",
              "c_line_in_traceback",
              "gdb_debug",
              "relative_path_in_code_position_comments",
          ]:
              # the generated code contains additional bits when these are set
              data[key] = value
          elif key in [
              "cplus",
              "language_level",
              "compile_time_env",
              "np_pythran",
          ]:
              # assorted bits that, e.g., influence the parser
              data[key] = value
          elif key == ["capi_reexport_cincludes"]:
              if self.capi_reexport_cincludes:
                  # our caching implementation does not yet include fingerprints of all the header files
                  raise NotImplementedError(
                      "capi_reexport_cincludes is not compatible with Cython caching"
                  )
          elif key == ["common_utility_include_dir"]:
              if self.common_utility_include_dir:
                  raise NotImplementedError(
                      "common_utility_include_dir is not compatible with Cython caching yet"
                  )
          else:
              # any unexpected option should go into the fingerprint; it's better
              # to recompile than to return incorrect results from the cache.
              data[key] = value
  
      def to_fingerprint(item):
          r"""
          Recursively turn item into a string, turning dicts into lists with
          deterministic ordering.
          """
          if isinstance(item, dict):
              item = sorted(
                  [
                      (repr(key), to_fingerprint(value))
                      for key, value in item.items()
                  ]
              )
          return repr(item)
  
      return to_fingerprint(data)
  
imports: from __future__ import absolute_import
  import os
  import re
  import sys
  import io
  from .None import Errors
  from .StringEncoding import EncodedString
  from .Scanning import PyrexScanner, FileSourceDescriptor
  from .Errors import PyrexError, CompileError, error, warning
  from .Symtab import ModuleScope
  from ..None import Utils
  from .None import Options
  from .None import Version
label_desc: Use image node_id 4 for calling the CompilationOptions obj's underlying member method code with example usage: obj.get_fingerprint() and returns: to_fingerprint, repr