Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from pallets:main #297

Merged
merged 2 commits into from
Jul 16, 2024
Merged

[pull] main from pallets:main #297

merged 2 commits into from
Jul 16, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Jul 15, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

RazerM and others added 2 commits July 12, 2024 08:47
Cache-Control no-transform directive is a boolean

no-transform has no arguments as a request or response directive (RFC
9111). Prior to this fix, cc.no_transform would return None whether the
directive is present or not.

Cache-Control min-fresh directive requires argument

The type for this property is `int | None`, so getting `"*"` for a
malformed directive is surprising. I think dropping the empty value here
is better than fixing the type.

Fix CacheControl getter type stubs

- cache_control_property with type=bool never return None
- some non-bool types were marked as returning bool instead of str
- max_stale can return "*" in addition to int or None

Reflect immutability of RequestCacheControl in type stubs

Fix CacheControl setter type stubs

mypy doesn't use the type of setters as of 1.9.0 (see python/mypy#3004),
but I think it's still good to have these be accurate (maybe the other
type checkers work better here).

mypy's recommendation is to use `# type: ignore` comments if setter
types don't match getters, which you see when setting no_cache to True.

Support must-understand response directive
@pull pull bot merged commit 9e050f7 into MLH-Fellowship:main Jul 16, 2024
10 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants