fetch#

JLAP 消费者。

#

HashWriter

原始二进制 I/O 的基类。

函数#

hash()

普通哈希。

process_jlap_response(response[, pos, iv])

fetch_jlap(url[, pos, etag, iv, ignore_etag, session])

request_jlap(url[, pos, etag, ignore_etag, session])

返回我们感兴趣的远程 .jlap 文件的一部分。

format_hash(hash)

缩写哈希以便格式化。

find_patches(patches, have, want)

apply_patches(data, apply)

withext(url, ext)

timeme(message)

build_headers(json_path, state)

缓存路径和状态的标头。

download_and_hash(hasher, url, json_path, session, state)

如果 URL 不存在则下载,并将字节传递给 hasher.update()。

_is_http_error_most_400_codes(→ bool)

确定 HTTPError 是否为 HTTP 400 错误代码(416 除外)。

request_url_jlap_state(→ dict | None)

属性#

DIGEST_SIZE = 32#
JLAP_KEY = 'jlap'#
HEADERS = 'headers'#
NOMINAL_HASH = 'blake2_256_nominal'#
ON_DISK_HASH = 'blake2_256'#
LATEST = 'latest'#
STORE_HEADERS#
hash()#

普通哈希。

exception Jlap304NotModified#

基类:Exception

所有非退出异常的通用基类。

初始化 self。有关准确的签名,请参阅 help(type(self))。

exception JlapSkipZst#

基类:Exception

所有非退出异常的通用基类。

初始化 self。有关准确的签名,请参阅 help(type(self))。

exception JlapPatchNotFound#

基类:LookupError

查找错误的基类。

初始化 self。有关准确的签名,请参阅 help(type(self))。

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: conda.gateways.connection.Session | None = None)#

返回我们感兴趣的远程 .jlap 文件的一部分。

format_hash(hash)#

缩写哈希以便格式化。

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)#

缓存路径和状态的标头。

class HashWriter(backing, hasher)#

基类:io.RawIOBase

原始二进制 I/O 的基类。

初始化 self。有关准确的签名,请参阅 help(type(self))。

write(b: bytes)#
close()#

刷新并关闭 IO 对象。

如果文件已关闭,则此方法无效。

download_and_hash(hasher, url, json_path: pathlib.Path, session: conda.gateways.connection.Session, state: conda.gateways.repodata.RepodataState | None, is_zst=False, dest_path: pathlib.Path | None = None)#

如果 URL 不存在则下载,并将字节传递给 hasher.update()。

json_path:旧缓存数据的路径(如果不存在,则忽略 etag)。 dest_path:用于写入新数据的路径。

_is_http_error_most_400_codes(e: requests.HTTPError) bool#

确定 HTTPError 是否为 HTTP 400 错误代码(416 除外)。

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#