diff --git a/docs/_newsfragments/2124.newandimproved.rst b/docs/_newsfragments/2124.newandimproved.rst index edcaa0bdd..d83c19c02 100644 --- a/docs/_newsfragments/2124.newandimproved.rst +++ b/docs/_newsfragments/2124.newandimproved.rst @@ -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 \ No newline at end of file +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. diff --git a/docs/_newsfragments/2213.newandimproved.rst b/docs/_newsfragments/2213.newandimproved.rst index 981fc0ac6..a9ef86c44 100644 --- a/docs/_newsfragments/2213.newandimproved.rst +++ b/docs/_newsfragments/2213.newandimproved.rst @@ -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 `__ -for a more detailed description of this experimental web technology. +for a more detailed description of this experimental web technology.) diff --git a/docs/_newsfragments/2301.misc.rst b/docs/_newsfragments/2301.misc.rst index e6d2c8f89..8186a207e 100644 --- a/docs/_newsfragments/2301.misc.rst +++ b/docs/_newsfragments/2301.misc.rst @@ -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. diff --git a/docs/_newsfragments/2325.newandimproved.rst b/docs/_newsfragments/2325.newandimproved.rst index 62a61b81e..f6bb2905a 100644 --- a/docs/_newsfragments/2325.newandimproved.rst +++ b/docs/_newsfragments/2325.newandimproved.rst @@ -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. diff --git a/falcon/errors.py b/falcon/errors.py index 092fff2e5..f47e82b07 100644 --- a/falcon/errors.py +++ b/falcon/errors.py @@ -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__( diff --git a/falcon/request.py b/falcon/request.py index d23fd388e..a3f690e1b 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -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() @@ -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) diff --git a/falcon/response.py b/falcon/response.py index bd989868f..b60529deb 100644 --- a/falcon/response.py +++ b/falcon/response.py @@ -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. @@ -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. diff --git a/falcon/routing/converters.py b/falcon/routing/converters.py index d50d6b85e..d012a412d 100644 --- a/falcon/routing/converters.py +++ b/falcon/routing/converters.py @@ -24,6 +24,7 @@ 'DateTimeConverter', 'FloatConverter', 'IntConverter', + 'PathConverter', 'UUIDConverter', ) @@ -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' @@ -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