-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
195 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# {fa}`info-circle` Project Info | ||
|
||
```{toctree} | ||
:maxdepth: 2 | ||
project_info/contributing | ||
project_info/contributors | ||
project_info/code_of_conduct | ||
project_info/related_projects | ||
project_info/history | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# {fa}`handshake` Code of Conduct | ||
```{include} ../../.github/CODE_OF_CONDUCT.md | ||
:start-line: 1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
(contributing)= | ||
# {fa}`lightbulb` Contributing | ||
```{include} ../../CONTRIBUTING.md | ||
:start-line: 1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# {fa}`users` Contributors | ||
```{include} ../../CONTRIBUTORS.md | ||
:start-line: 1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
(changelog)= | ||
# {fa}`history` History | ||
```{include} ../../HISTORY.md | ||
:start-line: 1 | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(user-guide)= | ||
# {fa}`book` User Guide | ||
This section covers the main features of requests-cache. | ||
|
||
```{toctree} | ||
:caption: The Basics | ||
:maxdepth: 2 | ||
user_guide/installation | ||
user_guide/general | ||
user_guide/files | ||
user_guide/troubleshooting | ||
``` | ||
|
||
```{toctree} | ||
:caption: Features & Options | ||
:maxdepth: 2 | ||
user_guide/backends | ||
user_guide/filtering | ||
user_guide/headers | ||
user_guide/inspection | ||
user_guide/expiration | ||
user_guide/matching | ||
user_guide/security | ||
user_guide/serializers | ||
user_guide/advanced_requests | ||
user_guide/compatibility | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Installation | ||
# {fa}`download` Installation | ||
Installation instructions: | ||
|
||
:::{tab} Pip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(security)= | ||
# Security | ||
# {fa}`lock` Security | ||
|
||
## Pickle Vulnerabilities | ||
:::{warning} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,60 @@ | ||
<!-- TODO: Logging, tracebacks, submitting issues, etc. --> | ||
# Troubleshooting | ||
(debug)= | ||
# {fa}`exclamation-circle` Troubleshooting | ||
Here are a few tips for avoiding and debugging some common problems. | ||
|
||
## Potential Issues | ||
- See {ref}`monkeypatch-issues` for issues specific to {py:func}`.install_cache` | ||
- New releases of `requests`, `urllib3` or `requests-cache` itself may change response data and be | ||
be incompatible with previously cached data (see issues | ||
* **Patching:** See {ref}`monkeypatch-issues` for notes specific to {py:func}`.install_cache` | ||
* **Imports:** It's recommended to import everything from the top-level `requests_cache` package. | ||
Other internal modules and utilities may change with future releases. | ||
* **Library updates:** New releases of `requests`, `urllib3` or `requests-cache` itself can | ||
potentially change response data, and be incompatible with previously cached responses. See issues | ||
[#56](https://github.com/reclosedev/requests-cache/issues/56) and | ||
[#102](https://github.com/reclosedev/requests-cache/issues/102)). | ||
In these cases, the cached data will simply be invalidated and a new response will be fetched. | ||
[#102](https://github.com/reclosedev/requests-cache/issues/102). | ||
* **Cache settings:** Some issues may be caused by changing settings for an existing cache. For | ||
example, if you are using {ref}`custom-serializers`, {ref}`custom-matching`, or other advanced | ||
features, you may get unexpected behavior if you change those settings and reuse previously cached | ||
data. In these cases, the easiest way to resolve the issue is to clear the cache with | ||
({py:meth}`CachedSession.cache.clear() <.BaseCache.clear>`). | ||
|
||
```{note} | ||
A cached response that can't be reused will simply be deleted and fetched again. If you get a | ||
traceback just by reading from the cache, this is **not** intended behavior, so please create a bug | ||
report! | ||
``` | ||
|
||
## Logging | ||
Debug logging can be enabled with the standard python `logging` module, for example with | ||
{py:func}`logging.basicConfig`: | ||
```python | ||
import logging | ||
logging.basicConfig(level='DEBUG') | ||
``` | ||
|
||
For prettier, more readable logs, try the [rich](https://github.com/willmcgugan/rich) library's | ||
[logging handler](https://rich.readthedocs.io/en/stable/logging.html): | ||
```python | ||
import logging | ||
from rich.logging import RichHandler | ||
|
||
logging.basicConfig( | ||
level='DEBUG', format="%(message)s", datefmt="[%X]", handlers=[RichHandler()] | ||
) | ||
``` | ||
|
||
If you have other libraries installed with verbose debug logging, you can configure only the loggers | ||
you want with `logger.setLevel()`: | ||
```python | ||
import logging | ||
logging.basicConfig(level='WARNING') | ||
logging.getLogger('requests_cache').setLevel('DEBUG') | ||
``` | ||
|
||
## Bug Reports | ||
If you believe you've found a bug, or if you're just having trouble getting requests-cache to work | ||
the way you want, please | ||
[create an issue](https://github.com/reclosedev/requests-cache/issues/new/choose) for it on GitHub. | ||
|
||
Details that will help your issue get resolved: | ||
* A complete example to reproduce the issue | ||
* Tracebacks and logging output | ||
* Any other details about what you want to do and how you want it to work |
Oops, something went wrong.