constants#

This file should hold most string literals and magic numbers used throughout the code base. The exception is if a literal is specifically meant to be private to and isolated within a module. Think of this as a "more static" source of configuration information.

Another important source of "static" configuration is conda/models/enums.py.

Classes#

SafetyChecks

Create a collection of name/value pairs.

PathConflict

Create a collection of name/value pairs.

DepsModifier

Flags to enable alternate handling of dependencies.

UpdateModifier

Create a collection of name/value pairs.

ChannelPriorityMeta

Metaclass for Enum

ValueEnum

Subclass of enum that returns the value of the enum as its str representation

ChannelPriority

Subclass of enum that returns the value of the enum as its str representation

SatSolverChoice

Subclass of enum that returns the value of the enum as its str representation

NoticeLevel

Subclass of enum that returns the value of the enum as its str representation

Attributes#

PREFIX_PLACEHOLDER

machine_bits

APP_NAME

SEARCH_PATH

SEARCH_PATH

DEFAULT_CHANNEL_ALIAS

CONDA_HOMEPAGE_URL

DEFAULTS_CHANNEL_NAME

PLATFORMS

KNOWN_SUBDIRS

PLATFORM_DIRECTORIES

RECOGNIZED_URL_SCHEMES

DEFAULT_CHANNELS_UNIX

DEFAULT_CHANNELS_WIN

DEFAULT_CUSTOM_CHANNELS

DEFAULT_CHANNELS

ROOT_ENV_NAME

RESERVED_ENV_NAMES

UNUSED_ENV_NAME

ROOT_NO_RM

DEFAULT_AGGRESSIVE_UPDATE_PACKAGES

COMPATIBLE_SHELLS

COMPATIBLE_SHELLS

MAX_CHANNEL_PRIORITY

CONDA_PACKAGE_EXTENSION_V1

CONDA_PACKAGE_EXTENSION_V2

PARTIAL_EXTENSION

Suffix appended to package filenames during incomplete downloads.

CONDA_TARBALL_EXTENSION

CONDA_TEMP_EXTENSION

CONDA_TEMP_EXTENSIONS

CONDA_LOGS_DIR

UNKNOWN_CHANNEL

REPODATA_FN

NOTICES_FN

Default name of the notices file on the server we look for.

NOTICES_CACHE_FN

Name of cache file where read notice IDs are stored.

NOTICES_CACHE_SUBDIR

Determines the subdir for notices cache.

NOTICES_DECORATOR_DISPLAY_INTERVAL

Determines how often notices are displayed while running commands.

DRY_RUN_PREFIX

PREFIX_NAME_DISALLOWED_CHARS

DEFAULT_SOLVER

The name of the default solver, currently "libmamba".

CLASSIC_SOLVER

DEFAULT_JSON_REPORTER_BACKEND

The name of the default json reporter backend.

DEFAULT_CONSOLE_REPORTER_BACKEND

The name of the default console reporter backend.

DEFAULT_CONDA_LIST_FIELDS

The default conda list columns.

CONDA_LIST_FIELDS

PACKAGE_CACHE_MAGIC_FILE

PREFIX_MAGIC_FILE

PREFIX_FROZEN_FILE

PREFIX_CREATION_TIMESTAMP_FILE

PREFIX_STATE_FILE

PREFIX_PINNED_FILE

PACKAGE_ENV_VARS_DIR

CONDA_ENV_VARS_UNSET_VAR

RESERVED_ENV_VARS

NAMESPACES_MAP

NAMESPACE_PACKAGE_NAMES

NAMESPACES

NO_PLUGINS

EXPLICIT_MARKER

OK_MARK

X_MARK

CMD_LINE_SOURCE

ENV_VARS_SOURCE

CONFIGURATION_SOURCES

PREFIX_PLACEHOLDER: Final = '/opt/anaconda1anaconda2anaconda3'#
machine_bits: Final#
APP_NAME: Final = 'conda'#
SEARCH_PATH: tuple[str, Ellipsis]#
SEARCH_PATH = ('C:/ProgramData/conda/.condarc', 'C:/ProgramData/conda/condarc', 'C:/ProgramData/conda/condarc.d')#
DEFAULT_CHANNEL_ALIAS: Final = 'https://conda.anaconda.org'#
CONDA_HOMEPAGE_URL: Final = 'https://conda.io'#
DEFAULTS_CHANNEL_NAME: Final = 'defaults'#
PLATFORMS: Final = ('emscripten-wasm32', 'wasi-wasm32', 'freebsd-64', 'linux-32', 'linux-64', 'linux-aarch64',...#
KNOWN_SUBDIRS: Final = ('noarch',)#
PLATFORM_DIRECTORIES#
RECOGNIZED_URL_SCHEMES: Final = ('http', 'https', 'ftp', 's3', 'file')#
DEFAULT_CHANNELS_UNIX: Final = ('https://repo.anaconda.com/pkgs/main', 'https://repo.anaconda.com/pkgs/r')#
DEFAULT_CHANNELS_WIN: Final = ('https://repo.anaconda.com/pkgs/main', 'https://repo.anaconda.com/pkgs/r',...#
DEFAULT_CUSTOM_CHANNELS: Final#
DEFAULT_CHANNELS: Final#
ROOT_ENV_NAME: Final = 'base'#
RESERVED_ENV_NAMES: Final = ()#
UNUSED_ENV_NAME: Final = 'unused-env-name'#
ROOT_NO_RM: Final = ('python', 'pycosat', 'ruamel.yaml', 'conda', 'openssl', 'requests')#
DEFAULT_AGGRESSIVE_UPDATE_PACKAGES: Final = ('ca-certificates', 'certifi', 'openssl')#
COMPATIBLE_SHELLS: tuple[str, Ellipsis]#
COMPATIBLE_SHELLS = ('bash', 'cmd.exe', 'fish', 'tcsh', 'xonsh', 'zsh', 'powershell')#
MAX_CHANNEL_PRIORITY: Final = 10000#
CONDA_PACKAGE_EXTENSION_V1: Final = '.tar.bz2'#
CONDA_PACKAGE_EXTENSION_V2: Final = '.conda'#
PARTIAL_EXTENSION: Final = '.partial'#

Suffix appended to package filenames during incomplete downloads.

CONDA_TARBALL_EXTENSION: Final#
CONDA_TEMP_EXTENSION: Final = '.c~'#
CONDA_TEMP_EXTENSIONS: Final = ()#
CONDA_LOGS_DIR: Final = '.logs'#
UNKNOWN_CHANNEL: Final = '<unknown>'#
REPODATA_FN: Final = 'repodata.json'#
NOTICES_FN: Final = 'notices.json'#

Default name of the notices file on the server we look for.

NOTICES_CACHE_FN: Final = 'notices.cache'#

Name of cache file where read notice IDs are stored.

NOTICES_CACHE_SUBDIR: Final = 'notices'#

Determines the subdir for notices cache.

NOTICES_DECORATOR_DISPLAY_INTERVAL: Final = 86400#

Determines how often notices are displayed while running commands.

DRY_RUN_PREFIX: Final = 'Dry run action:'#
PREFIX_NAME_DISALLOWED_CHARS: Final#
class SafetyChecks(*args, **kwds)#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

    >>> Color.RED
    <Color.RED: 1>
    
  • value lookup:

    >>> Color(1)
    <Color.RED: 1>
    
  • name lookup:

    >>> Color['RED']
    <Color.RED: 1>
    

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details.

disabled = 'disabled'#
warn = 'warn'#
enabled = 'enabled'#
__str__() str#

Return str(self).

class PathConflict(*args, **kwds)#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

    >>> Color.RED
    <Color.RED: 1>
    
  • value lookup:

    >>> Color(1)
    <Color.RED: 1>
    
  • name lookup:

    >>> Color['RED']
    <Color.RED: 1>
    

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details.

clobber = 'clobber'#
warn = 'warn'#
prevent = 'prevent'#
__str__() str#

Return str(self).

class DepsModifier(*args, **kwds)#

Bases: enum.Enum

Flags to enable alternate handling of dependencies.

NOT_SET = 'not_set'#
NO_DEPS = 'no_deps'#
ONLY_DEPS = 'only_deps'#
__str__() str#

Return str(self).

class UpdateModifier(*args, **kwds)#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

    >>> Color.RED
    <Color.RED: 1>
    
  • value lookup:

    >>> Color(1)
    <Color.RED: 1>
    
  • name lookup:

    >>> Color['RED']
    <Color.RED: 1>
    

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details.

SPECS_SATISFIED_SKIP_SOLVE = 'specs_satisfied_skip_solve'#
FREEZE_INSTALLED = 'freeze_installed'#
UPDATE_DEPS = 'update_deps'#
UPDATE_SPECS = 'update_specs'#
UPDATE_ALL = 'update_all'#
__str__() str#

Return str(self).

class ChannelPriorityMeta#

Bases: enum.EnumMeta

Metaclass for Enum

__call__(value, *args, **kwargs)#

Either returns an existing member, or creates a new enum class.

This method is used both when an enum class is given a value to match to an enumeration member (i.e. Color(3)) and for the functional API (i.e. Color = Enum('Color', names='RED GREEN BLUE')).

The value lookup branch is chosen if the enum is final.

When used for the functional API:

value will be the name of the new class.

names should be either a string of white-space/comma delimited names (values will start at start), or an iterator/mapping of name, value pairs.

module should be set to the module this class is being created in; if it is not set, an attempt to find that module will be made, but if it fails the class will not be picklable.

qualname should be set to the actual location this class can be found at in its module; by default it is set to the global scope. If this is not correct, unpickling will fail in some circumstances.

type, if set, will be mixed in as the first base class.

class ValueEnum(*args, **kwds)#

Bases: enum.Enum

Subclass of enum that returns the value of the enum as its str representation

__str__() str#

Return str(self).

class ChannelPriority(*args, **kwds)#

Bases: ValueEnum

Subclass of enum that returns the value of the enum as its str representation

__name__ = 'ChannelPriority'#
STRICT = 'strict'#
FLEXIBLE = 'flexible'#
DISABLED = 'disabled'#
class SatSolverChoice(*args, **kwds)#

Bases: ValueEnum

Subclass of enum that returns the value of the enum as its str representation

PYCOSAT = 'pycosat'#
PYCRYPTOSAT = 'pycryptosat'#
PYSAT = 'pysat'#
DEFAULT_SOLVER: Final = 'libmamba'#

The name of the default solver, currently "libmamba".

CLASSIC_SOLVER: Final = 'classic'#
DEFAULT_JSON_REPORTER_BACKEND: Final = 'json'#

The name of the default json reporter backend.

DEFAULT_CONSOLE_REPORTER_BACKEND: Final = 'classic'#

The name of the default console reporter backend.

DEFAULT_CONDA_LIST_FIELDS: Final = ('name', 'version', 'build', 'channel_name')#

The default conda list columns.

CONDA_LIST_FIELDS: Final#
class NoticeLevel(*args, **kwds)#

Bases: ValueEnum

Subclass of enum that returns the value of the enum as its str representation

CRITICAL = 'critical'#
WARNING = 'warning'#
INFO = 'info'#
PACKAGE_CACHE_MAGIC_FILE: Final[conda.common.path.PathType] = 'urls.txt'#
PREFIX_MAGIC_FILE: Final[conda.common.path.PathType]#
PREFIX_FROZEN_FILE: Final[conda.common.path.PathType]#
PREFIX_CREATION_TIMESTAMP_FILE: Final[conda.common.path.PathType]#
PREFIX_STATE_FILE: Final[conda.common.path.PathType]#
PREFIX_PINNED_FILE: Final[conda.common.path.PathType]#
PACKAGE_ENV_VARS_DIR: Final[conda.common.path.PathType]#
CONDA_ENV_VARS_UNSET_VAR: Final = '***unset***'#
RESERVED_ENV_VARS: Final = ('PATH',)#
NAMESPACES_MAP: Final#
NAMESPACE_PACKAGE_NAMES: Final#
NAMESPACES: Final#
NO_PLUGINS: Final = False#
EXPLICIT_MARKER: Final = '@EXPLICIT'#
OK_MARK: Final = '✅'#
X_MARK: Final = '❌'#
CMD_LINE_SOURCE: Final = 'cmd_line'#
ENV_VARS_SOURCE: Final = 'envvars'#
CONFIGURATION_SOURCES: Final = ()#