:py:mod:`exclude_newer` ======================= .. py:module:: conda.core.exclude_newer .. autoapi-nested-parse:: Helpers for applying the ``exclude_newer`` package policy. Classes ------- .. autoapisummary:: conda.core.exclude_newer._CutoffParser conda.core.exclude_newer._ChannelSelector conda.core.exclude_newer._ChannelCutoff conda.core.exclude_newer.ExcludeNewerPolicy Functions --------- .. autoapisummary:: conda.core.exclude_newer._get_timestamp conda.core.exclude_newer._get_value .. py:class:: _CutoffParser Resolve user-provided cutoff values into absolute POSIX timestamps. .. py:attribute:: now :type: float .. py:method:: is_false_override(value: object) -> bool :staticmethod: .. py:method:: optional_cutoff(value: str | int | float | bool | None) -> float | None .. py:method:: cutoff(value: str | int | float | bool) -> float .. py:method:: duration_cutoff(duration_seconds: float, value: object) -> float .. py:method:: invalid(value: str) -> conda.exceptions.CondaValueError :staticmethod: .. py:class:: _ChannelSelector Resolved ``channel_settings`` channel selector. .. py:attribute:: URL_GLOB_CHARS .. py:attribute:: keys :type: frozenset[str] .. py:attribute:: url_pattern :type: tuple[str, str] | None .. py:method:: from_value(value: str) -> _ChannelSelector :classmethod: .. py:method:: matches(record: conda.models.records.PackageRecord | collections.abc.Mapping[str, Any]) -> bool .. py:method:: keys_for_record(record: conda.models.records.PackageRecord | collections.abc.Mapping[str, Any]) -> frozenset[str] :classmethod: .. py:method:: keys_for(value: object) -> frozenset[str] :classmethod: .. py:method:: channel_from(value: object) :staticmethod: .. py:method:: url_match_parts(value: object) -> tuple[str, str] | None :classmethod: .. py:method:: normalize(value: object) -> str | None :staticmethod: .. py:class:: _ChannelCutoff Resolved channel-specific ``exclude_newer`` cutoff. .. py:attribute:: SETTING_KEYS :value: ('exclude_newer', 'exclude-newer') .. py:attribute:: selector :type: _ChannelSelector .. py:attribute:: cutoff :type: float | None .. py:method:: from_settings(settings: collections.abc.Mapping[str, Any], parser: _CutoffParser) -> _ChannelCutoff | None :classmethod: .. py:method:: matches(record: conda.models.records.PackageRecord | collections.abc.Mapping[str, Any]) -> bool .. py:class:: ExcludeNewerPolicy Resolved ``exclude_newer`` configuration. Cutoffs are stored as absolute POSIX timestamps. A package record is included when its ``indexed_timestamp`` or ``timestamp`` is missing or older than the effective cutoff for that package name. .. py:attribute:: global_cutoff :type: float | None :value: None .. py:attribute:: channel_cutoffs :type: tuple[_ChannelCutoff, ...] :value: () .. py:attribute:: package_cutoffs :type: dict[str, float | None] | None :value: None .. py:attribute:: now :type: float :value: 0.0 .. py:method:: from_values(exclude_newer: str | int | float | None, exclude_newer_package: collections.abc.Mapping[str, str | bool | int | float | None] | None, channel_settings: collections.abc.Iterable[collections.abc.Mapping[str, Any]] | None = None, now: float | None = None) -> ExcludeNewerPolicy :classmethod: .. py:property:: active :type: bool .. py:property:: has_global_cutoff :type: bool .. py:property:: has_package_overrides :type: bool .. py:property:: has_channel_overrides :type: bool .. py:method:: _cutoff_for_record(record: conda.models.records.PackageRecord | collections.abc.Mapping[str, Any]) -> float | None .. py:method:: should_include(record: conda.models.records.PackageRecord | collections.abc.Mapping[str, Any]) -> bool .. py:method:: filter_records(records: collections.abc.Iterable[conda.models.records.PackageRecord]) -> tuple[conda.models.records.PackageRecord, ...] .. py:method:: excluded_records(records: collections.abc.Iterable[conda.models.records.PackageRecord]) -> tuple[conda.models.records.PackageRecord, ...] .. py:function:: _get_timestamp(record: conda.models.records.PackageRecord | collections.abc.Mapping[str, Any]) -> float | None .. py:function:: _get_value(record: conda.models.records.PackageRecord | collections.abc.Mapping[str, Any], key: str) -> Any