forked from pallets/werkzeug
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
5 changed files
with
70 additions
and
26 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
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