subdir_data
Tools for managing a subdir's repodata.json.
Classes
Lazily convert dicts to PackageRecord. |
|
Functions
|
|
|
|
|
|
Attributes
- REPODATA_PICKLE_VERSION = 30
- MAX_REPODATA_VERSION = 1
- REPODATA_HEADER_RE = b'"(_etag|_mod|_cache_control)":[ ]?"(.*?[^\\\\])"[,}\\s]'
- get_cache_control_max_age(cache_control_value: str) int
- class SubdirDataType
Bases:
type
- __call__(channel, repodata_fn=REPODATA_FN)
Call self as a function.
- class PackageRecordList(initlist=None)
Bases:
collections.UserList
Lazily convert dicts to PackageRecord.
- __getitem__(i)
- class SubdirData(channel, repodata_fn=REPODATA_FN, RepoInterface=CondaRepoInterface)
- property _repo: conda.gateways.repodata.RepoInterface
Changes as we mutate self.repodata_fn.
- property repo_cache: conda.gateways.repodata.RepodataCache
- property repo_fetch: conda.gateways.repodata.RepodataFetch
Object to get repodata. Not cached since self.repodata_fn is mutable.
Replaces fetch_repodata_remote_request, self._repo, self.repo_cache.
- property cache_path_base
- property url_w_repodata_fn
- property cache_path_json
- property cache_path_state
Out-of-band etag and other state needed by the RepoInterface.
- property cache_path_pickle
- _cache_
- classmethod clear_cached_local_channel_data(exclude_file=True)
- static query_all(package_ref_or_match_spec, channels=None, subdirs=None, repodata_fn=REPODATA_FN)
- query(package_ref_or_match_spec)
- reload()
- load()
- iter_records()
- _iter_records_by_name(name)
- _load()
Try to load repodata. If e.g. we are downloading current_repodata.json, fall back to repodata.json when the former is unavailable.
- _pickle_me()
- _read_local_repodata(state: conda.gateways.repodata.RepodataState)
- _pickle_valid_checks(pickled_state, mod, etag)
Throw away the pickle if these don't all match.
- _read_pickled(state: conda.gateways.repodata.RepodataState)
- _process_raw_repodata_str(raw_repodata_str, state: RepodataState | None = None)
State contains information that was previously in-band in raw_repodata_str.
- _process_raw_repodata(repodata: dict, state: RepodataState | None = None)
- make_feature_record(feature_name)
- fetch_repodata_remote_request(url, etag, mod_stamp, repodata_fn=REPODATA_FN)
- Parameters
etag -- cached etag header
mod_stamp -- cached last-modified header