Make it clear that CacheControl is a function that mounts an adapter
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- networking
Direzione di ricerca
Inizia dalla funzione CacheControl e verifica come monta un HTTPAdapter sulla sessione per i prefissi http:// e https://. Determina se è previsto il cambiamento di denominazione dell’API richiesto o un avviso di sovrascrittura, quindi verifica che il comportamento scelto renda esplicita la sostituzione dell’adapter.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 505
- Fork
- 153
- Merge medio
- 5g 6h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di psf/cachecontrol
-
Cache Deserialization (part two) -- warning message incorrect?Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
psf/cachecontrol#209 · 5 commenti ·
-
Race condition in send()Forse già presa @JulienPalard l’ha presa 147 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
psf/cachecontrol#424 · 1 commento ·
-
HTTP 302 Found responses with Cache Headers not being cachedForse già presa @cburroughs l’ha presa 280 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
psf/cachecontrol#384 · 18 commenti ·
-
Head request is not cached even with cacheable_methods=("GET", HEAD") without a previous GETForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
psf/cachecontrol#337 · 6 commenti ·
-
Investigate failure to load caches above `2^32 - 1` bytesForse di nuovo libera @woodruffw l’ha presa 852 giorni fa e non c’è nessuna pull request aperta. Aperta
psf/cachecontrol#336 · 4 commenti · 1 reazione · 1 assegnatario ·
Tutte le issue di psf/cachecontrol
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
topoteretes/cognee#5773 ·
I maintainer di solito rispondono entro 1 giorno
-
MiKTeX: a failed build reports no errors because texify --quiet switches the log to file:line: styleAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
SublimeText/LaTeXTools#1718 ·