class_docstr: Configuration file abstraction.
  
  The Config object makes the values of all config options available as
  attributes.
  
  It is exposed via the :py:class:`~sphinx.application.Sphinx`\ ``.config``
  and :py:class:`sphinx.environment.BuildEnvironment`\ ``.config`` attributes.
  For example, to get the value of :confval:`language`, use either
  ``app.config.language`` or ``env.config.language``.
class_docstr_tok: ["Configuration","file","abstraction",".","The","Config","object","makes","the","values","of","all","config","options","available","as","attributes",".","It","is","exposed","via","the",":","py",":","class",":","`","~sphinx.application.Sphinx","`","\\","``",".config","``","and",":","py",":","class",":","`","sphinx.environment.BuildEnvironment","`","\\","``",".config","``","attributes",".","For","example",",","to","get","the","value","of",":","confval",":","`","language","`",",","use","either","``","app.config.language","``","or","``","env.config.language","``","."]
docstr: Create a Config object from configuration file.
code: def read(
      cls: type[Config],
      confdir: str | os.PathLike[str],
      overrides: dict | None = None,
      tags: Tags | None = None,
  ) -> Config:
      """Create a Config object from configuration file."""
      filename = path.join(confdir, CONFIG_FILENAME)
      if not path.isfile(filename):
          raise ConfigError(
              __("config directory doesn't contain a conf.py file (%s)")
              % confdir
          )
      namespace = eval_config_file(filename, tags)
  
      # Note: Old sphinx projects have been configured as "language = None" because
      #       sphinx-quickstart previously generated this by default.
      #       To keep compatibility, they should be fallback to 'en' for a while
      #       (This conversion should not be removed before 2025-01-01).
      if namespace.get("language", ...) is None:
          logger.warning(
              __(
                  "Invalid configuration value found: 'language = None'. "
                  "Update your configuration to a valid language code. "
                  "Falling back to 'en' (English)."
              )
          )
          namespace["language"] = "en"
  
      return cls(namespace, overrides)
  
imports: from __future__ import annotations
  import sys
  import time
  import traceback
  import types
  import warnings
  from os import getenv, path
  from typing import TYPE_CHECKING, Any, Literal, NamedTuple, Union
  from sphinx.deprecation import RemovedInSphinx90Warning
  from sphinx.errors import ConfigError, ExtensionError
  from sphinx.locale import _, __
  from sphinx.util import logging
  from sphinx.util.osutil import fs_encoding
  from sphinx.util.typing import NoneType
label_desc: Use image node_id 4 for calling the Config obj's underlying member method code with example usage: obj.read(cls, confdir, overrides, tags) and returns: cls