fetch#
JLAP 消费者。
类#
原始二进制 I/O 的基类。 |
函数#
|
普通哈希。 |
|
|
|
|
|
返回我们感兴趣的远程 .jlap 文件的一部分。 |
|
缩写哈希以便格式化。 |
|
|
|
|
|
|
|
|
|
缓存路径和状态的标头。 |
|
如果 URL 不存在则下载,并将字节传递给 hasher.update()。 |
|
确定 HTTPError 是否为 HTTP 400 错误代码(416 除外)。 |
|
属性#
- DIGEST_SIZE = 32#
- JLAP_KEY = 'jlap'#
- HEADERS = 'headers'#
- NOMINAL_HASH = 'blake2_256_nominal'#
- ON_DISK_HASH = 'blake2_256'#
- LATEST = 'latest'#
- STORE_HEADERS#
- hash()#
普通哈希。
- 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))。
- 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:用于写入新数据的路径。
- 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#