Skip to content

Commit

Permalink
docs: clean up more newsfragments
Browse files Browse the repository at this point in the history
  • Loading branch information
vytas7 committed Oct 6, 2024
1 parent 6436374 commit dd4ca8f
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 11 deletions.
4 changes: 3 additions & 1 deletion docs/_newsfragments/2124.newandimproved.rst
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Added kwarg samesite to :meth:`~falcon.Response.unset_cookie` to allow override of default ``Lax`` setting of `SameSite` on the unset cookie
A new keyword argument, `samesite`, was added to
:meth:`~falcon.Response.unset_cookie` that allows to override the default
``Lax`` setting of `SameSite` on the unset cookie.
10 changes: 5 additions & 5 deletions docs/_newsfragments/2213.newandimproved.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Added kwarg ``partitioned`` to :meth:`~falcon.Response.set_cookie`
to opt a cookie into partitioned storage, with a separate cookie jar per
top-level site.
See also
A new keyword argument, `partitioned`, was added to
:meth:`~falcon.Response.set_cookie` to opt a cookie into partitioned storage,
with a separate cookie jar per each top-level site.
(See also
`CHIPS <https://developer.mozilla.org/en-US/docs/Web/Privacy/Privacy_sandbox/Partitioned_cookies>`__
for a more detailed description of this experimental web technology.
for a more detailed description of this experimental web technology.)
2 changes: 1 addition & 1 deletion docs/_newsfragments/2301.misc.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
The ``falcon.TimezoneGMT`` class was deprecated. Use the UTC timezone
The :class:`falcon.TimezoneGMT` class was deprecated. Use the UTC timezone
(:attr:`datetime.timezone.utc`) from the standard library instead.
4 changes: 2 additions & 2 deletions docs/_newsfragments/2325.newandimproved.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The :class:`~CORSMiddleware` now properly handles the missing ``Allow``
header case, by denying the preflight CORS request.
The static resource has been updated to properly support CORS request,
by allowing GET requests.
The static file route has been updated to properly support CORS preflight,
by allowing ``GET`` requests.
2 changes: 2 additions & 0 deletions falcon/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,8 @@ class HTTPContentTooLarge(HTTPError):
code (int): An internal code that customers can reference in their
support request or to help them when searching for knowledge
base articles related to this error (default ``None``).
.. versionadded:: 4.0
"""

def __init__(
Expand Down
7 changes: 6 additions & 1 deletion falcon/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,10 @@ def headers(self) -> Mapping[str, str]:

@property
def headers_lower(self) -> Mapping[str, str]:
"""Same as :attr:`headers` except header names are normalized to lowercase."""
"""Same as :attr:`headers` except header names are normalized to lowercase.
.. versionadded:: 4.0
"""
if self._cached_headers_lower is None:
self._cached_headers_lower = {
key.lower(): value for key, value in self.headers.items()
Expand Down Expand Up @@ -1283,6 +1286,8 @@ def get_header_as_int(self, header: str, required: bool = False) -> Optional[int
HTTPBadRequest: The header was not found in the request, but
it was required.
HttpInvalidHeader: The header contained a malformed/invalid value.
.. versionadded:: 4.0
"""

http_int = self.get_header(header, required=required)
Expand Down
5 changes: 5 additions & 0 deletions falcon/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ def set_cookie( # noqa: C901
standardized, it is already used by Chrome.
(See also: `CHIPS`_)
.. versionadded:: 4.0
Raises:
KeyError: `name` is not a valid cookie name.
ValueError: `value` is not a valid cookie value.
Expand Down Expand Up @@ -574,6 +577,8 @@ def unset_cookie(
samesite (str): Allows to override the default 'Lax' same_site
setting for the unset cookie.
.. versionadded:: 4.0
domain (str): Restricts the cookie to a specific domain and
any subdomains of that domain. By default, the user
agent will return the cookie only to the origin server.
Expand Down
7 changes: 6 additions & 1 deletion falcon/routing/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
'DateTimeConverter',
'FloatConverter',
'IntConverter',
'PathConverter',
'UUIDConverter',
)

Expand Down Expand Up @@ -140,7 +141,9 @@ class FloatConverter(BaseConverter):
max (float): Reject the value if it is greater than this number.
finite (bool) : Determines whether or not to only match ordinary
finite numbers (default: ``True``). Set to ``False`` to match
nan, inf, and -inf in addition to finite numbers.
``nan``, ``inf``, and ``-inf`` in addition to finite numbers.
.. versionadded:: 4.0
"""

__slots__ = '_finite', '_min', '_max'
Expand Down Expand Up @@ -228,6 +231,8 @@ class PathConverter(BaseConverter):
(the default), while it will *not* match when that option is ``True``.
(See also: :ref:`trailing_slash_in_path`)
.. versionadded:: 4.0
"""

CONSUME_MULTIPLE_SEGMENTS = True
Expand Down

0 comments on commit dd4ca8f

Please sign in to comment.