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

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

DEFAULT_CHANNEL_ALIAS

CONDA_HOMEPAGE_URL

ERROR_UPLOAD_URL

DEFAULTS_CHANNEL_NAME

RECOGNIZED_URL_SCHEMES

DEFAULT_CHANNELS_UNIX

DEFAULT_CHANNELS_WIN

DEFAULT_CUSTOM_CHANNELS

DEFAULT_CHANNELS

ROOT_ENV_NAME

ROOT_NO_RM

DEFAULT_AGGRESSIVE_UPDATE_PACKAGES

COMPATIBLE_SHELLS

MAX_CHANNEL_PRIORITY

CONDA_PACKAGE_EXTENSION_V1

CONDA_PACKAGE_EXTENSION_V2

CONDA_PACKAGE_EXTENSIONS

CONDA_TARBALL_EXTENSION

CONDA_TEMP_EXTENSION

CONDA_TEMP_EXTENSIONS

CONDA_LOGS_DIR

UNKNOWN_CHANNEL

REPODATA_FN

NOTICES_FN

NOTICES_CACHE_FN

NOTICES_CACHE_SUBDIR

NOTICES_DECORATOR_DISPLAY_INTERVAL

DRY_RUN_PREFIX

PREFIX_NAME_DISALLOWED_CHARS

PACKAGE_CACHE_MAGIC_FILE

PREFIX_MAGIC_FILE

PREFIX_STATE_FILE

PACKAGE_ENV_VARS_DIR

CONDA_ENV_VARS_UNSET_VAR

NAMESPACES_MAP

NAMESPACE_PACKAGE_NAMES

NAMESPACES

NO_PLUGINS

PREFIX_PLACEHOLDER = '/opt/anaconda1anaconda2anaconda3'
machine_bits
APP_NAME = 'conda'
SEARCH_PATH = ('C:/ProgramData/conda/.condarc', 'C:/ProgramData/conda/condarc', 'C:/ProgramData/conda/condarc.d')
DEFAULT_CHANNEL_ALIAS = 'https://conda.anaconda.org'
CONDA_HOMEPAGE_URL = 'https://conda.io'
ERROR_UPLOAD_URL = 'https://conda.io/conda-post/unexpected-error'
DEFAULTS_CHANNEL_NAME = 'defaults'
RECOGNIZED_URL_SCHEMES = ('http', 'https', 'ftp', 's3', 'file')
DEFAULT_CHANNELS_UNIX = ('https://repo.anaconda.com/pkgs/main', 'https://repo.anaconda.com/pkgs/r')
DEFAULT_CHANNELS_WIN = ('https://repo.anaconda.com/pkgs/main', 'https://repo.anaconda.com/pkgs/r',...
DEFAULT_CUSTOM_CHANNELS
DEFAULT_CHANNELS
ROOT_ENV_NAME = 'base'
ROOT_NO_RM = ('python', 'pycosat', 'ruamel.yaml', 'conda', 'openssl', 'requests')
DEFAULT_AGGRESSIVE_UPDATE_PACKAGES = ('ca-certificates', 'certifi', 'openssl')
COMPATIBLE_SHELLS = ('bash', 'cmd.exe', 'fish', 'tcsh', 'xonsh', 'zsh', 'powershell')
MAX_CHANNEL_PRIORITY = 10000
CONDA_PACKAGE_EXTENSION_V1 = '.tar.bz2'
CONDA_PACKAGE_EXTENSION_V2 = '.conda'
CONDA_PACKAGE_EXTENSIONS = ()
CONDA_TARBALL_EXTENSION
CONDA_TEMP_EXTENSION = '.c~'
CONDA_TEMP_EXTENSIONS = ()
CONDA_LOGS_DIR = '.logs'
UNKNOWN_CHANNEL = '<unknown>'
REPODATA_FN = 'repodata.json'
NOTICES_FN = 'notices.json'
NOTICES_CACHE_FN = 'notices.cache'
NOTICES_CACHE_SUBDIR = 'notices'
NOTICES_DECORATOR_DISPLAY_INTERVAL = 86400
DRY_RUN_PREFIX = 'Dry run action:'
PREFIX_NAME_DISALLOWED_CHARS
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__()

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__()

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__()

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__()

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')).

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__()

Return str(self).

class ChannelPriority

Bases: six_with_metaclass(ChannelPriorityMeta, ValueEnum)

__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'
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 = 'urls.txt'
PREFIX_MAGIC_FILE
PREFIX_STATE_FILE
PACKAGE_ENV_VARS_DIR
CONDA_ENV_VARS_UNSET_VAR = '***unset***'
NAMESPACES_MAP
NAMESPACE_PACKAGE_NAMES
NAMESPACES
NO_PLUGINS = False