Make it clear that CacheControl is a function that mounts an adapter
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- networking
调研方向
从 CacheControl 函数开始,检查它如何针对 http:// 和 https:// 前缀将 HTTPAdapter 挂载到会话上。确定预期的是所请求的 API 命名更改还是覆盖警告,然后验证所选行为是否明确表明适配器已被替换。
由索引模型根据 Issue 内容生成。
描述
The camel-case notation suggests that CacheControl is a class. Given the docs terminology, according to which CacheControl is a "wrapper", I expect that CacheControl returns an object that wraps a session.
But CacheControl is neither a class nor it returns a wrapper object. It's a function which mounts an HTTPAdapter to the session and returns the session itself. It's a function with side-effects that could even return None.
My problem with it is that it's not even innocently misleading, because if the user has already mounted an HTTPAdapter for "http://" and "https://", CacheControl will overwrite that adapter without the user even realizing what happened because he/she was convinced by the naming convention and the docs that CacheControl is a wrapper.
Consider:
- switching to a name that reflects what's actually happening, e.g.
mount_cache_adapter; - warning the user that any eventual adapter for those prefixes will be overwritten.
- 主要语言
- Python
- 星标
- 505
- 派生
- 153
- 平均合并
- 5 天 6 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
psf/cachecontrol 的其他 Issue
-
Cache Deserialization (part two) -- warning message incorrect?可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
psf/cachecontrol#209 · 5 条评论 ·
-
Race condition in send()可能已有人在做 @JulienPalard 于 147 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
psf/cachecontrol#424 · 1 条评论 ·
-
HTTP 302 Found responses with Cache Headers not being cached可能已有人在做 @cburroughs 于 280 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 42/100
psf/cachecontrol#384 · 18 条评论 ·
-
Head request is not cached even with cacheable_methods=("GET", HEAD") without a previous GET可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
psf/cachecontrol#337 · 6 条评论 ·
-
Investigate failure to load caches above `2^32 - 1` bytes可能重新可做 @woodruffw 于 853 天前认领,目前没有进行中的 PR。 未关闭
psf/cachecontrol#336 · 4 条评论 · 1 个 reaction · 已指派 1 人 ·
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
task
难度 2/5 1-3 小时 新手友好度 78/100
danparshall/claude_researcher#87 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
datajoint/datajoint-python#1586 ·
维护者通常 1 天内回复
-
1D intercept of length 1 is accepted as `fix_params` in population GLM with more than 1 unit可能已有人在做 @dhvani7014 今天认领。 未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 72/100
flatironinstitute/nemos#642 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
uniswap-python/uniswap-python#487 ·