fetch
JLAP consumer.
Classes
Base class for raw binary I/O. |
Functions
|
Ordinary hash. |
|
|
|
|
|
Return the part of the remote .jlap file we are interested in. |
|
Abbreviate hash for formatting. |
|
|
|
|
|
|
|
|
|
Caching headers for a path and state. |
|
Download url if it doesn't exist, passing bytes through hasher.update(). |
|
Attributes
- DIGEST_SIZE = 32
- JLAP_KEY = 'jlap'
- HEADERS = 'headers'
- NOMINAL_HASH = 'blake2_256_nominal'
- ON_DISK_HASH = 'blake2_256'
- LATEST = 'latest'
- JLAP_UNAVAILABLE = 'jlap_unavailable'
- ZSTD_UNAVAILABLE = 'zstd_unavailable'
- STORE_HEADERS
- hash()
Ordinary hash.
- exception Jlap304NotModified
Bases:
Exception
Common base class for all non-exit exceptions.
- exception JlapSkipZst
Bases:
Exception
Common base class for all non-exit exceptions.
- exception JlapPatchNotFound
Bases:
LookupError
Base class for lookup errors.
- process_jlap_response(response: conda.gateways.connection.Response, pos=0, iv=b'')
- fetch_jlap(url, pos=0, etag=None, iv=b'', ignore_etag=True, session=None)
- request_jlap(url, pos=0, etag=None, ignore_etag=True, session: Session | None = None)
Return the part of the remote .jlap file we are interested in.
- format_hash(hash)
Abbreviate hash for formatting.
- find_patches(patches, have, want)
- apply_patches(data, apply)
- withext(url, ext)
- timeme(message)
- build_headers(json_path: pathlib.Path, state: conda.gateways.repodata.RepodataState)
Caching headers for a path and state.
- class HashWriter(backing, hasher)
Bases:
io.RawIOBase
Base class for raw binary I/O.
- write(b: bytes)
- close()
Flush and close the IO object.
This method has no effect if the file is already closed.
- download_and_hash(hasher, url, json_path, session: conda.gateways.connection.Session, state: RepodataState | None, is_zst=False, dest_path: pathlib.Path | None = None)
Download url if it doesn't exist, passing bytes through hasher.update().
json_path: Path of old cached data (ignore etag if not exists). dest_path: Path to write new data.
- request_url_jlap_state(url, state: conda.gateways.repodata.RepodataState, full_download=False, *, session: conda.gateways.connection.Session, cache: conda.gateways.repodata.RepodataCache, temp_path: pathlib.Path) dict | None