Skip to content

Commit

Permalink
update version to remove deprecations to 3.0 (#2696)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed May 8, 2023
2 parents 5a149fa + 0820d2e commit 3b1b0e0
Show file tree
Hide file tree
Showing 13 changed files with 120 additions and 120 deletions.
26 changes: 13 additions & 13 deletions src/werkzeug/datastructures/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ class FooAuthenticate(WWWAuthenticate):
special_realm = auth_property('special_realm')
.. deprecated:: 2.3
Will be removed in Werkzeug 2.4.
Will be removed in Werkzeug 3.0.
"""
warnings.warn(
"'auth_property' is deprecated and will be removed in Werkzeug 2.4.",
"'auth_property' is deprecated and will be removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -202,7 +202,7 @@ def __init__(
if auth_type is None:
warnings.warn(
"An auth type must be given as the first parameter. Assuming 'basic' is"
" deprecated and will be removed in Werkzeug 2.4.",
" deprecated and will be removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -264,10 +264,10 @@ def set_basic(self, realm: str = "authentication required") -> None:
"""Clear any existing data and set a ``Basic`` challenge.
.. deprecated:: 2.3
Will be removed in Werkzeug 2.4. Create and assign an instance instead.
Will be removed in Werkzeug 3.0. Create and assign an instance instead.
"""
warnings.warn(
"The 'set_basic' method is deprecated and will be removed in Werkzeug 2.4."
"The 'set_basic' method is deprecated and will be removed in Werkzeug 3.0."
" Create and assign an instance instead."
)
self._type = "basic"
Expand All @@ -291,10 +291,10 @@ def set_digest(
"""Clear any existing data and set a ``Digest`` challenge.
.. deprecated:: 2.3
Will be removed in Werkzeug 2.4. Create and assign an instance instead.
Will be removed in Werkzeug 3.0. Create and assign an instance instead.
"""
warnings.warn(
"The 'set_digest' method is deprecated and will be removed in Werkzeug 2.4."
"The 'set_digest' method is deprecated and will be removed in Werkzeug 3.0."
" Create and assign an instance instead."
)
self._type = "digest"
Expand Down Expand Up @@ -415,11 +415,11 @@ def qop(self) -> set[str]:
"""The ``qop`` parameter as a set.
.. deprecated:: 2.3
Will be removed in Werkzeug 2.4. It will become the same as other
Will be removed in Werkzeug 3.0. It will become the same as other
parameters, returning a string.
"""
warnings.warn(
"The 'qop' property is deprecated and will be removed in Werkzeug 2.4."
"The 'qop' property is deprecated and will be removed in Werkzeug 3.0."
" It will become the same as other parameters, returning a string.",
DeprecationWarning,
stacklevel=2,
Expand All @@ -441,11 +441,11 @@ def stale(self) -> bool | None:
"""The ``stale`` parameter as a boolean.
.. deprecated:: 2.3
Will be removed in Werkzeug 2.4. It will become the same as other
Will be removed in Werkzeug 3.0. It will become the same as other
parameters, returning a string.
"""
warnings.warn(
"The 'stale' property is deprecated and will be removed in Werkzeug 2.4."
"The 'stale' property is deprecated and will be removed in Werkzeug 3.0."
" It will become the same as other parameters, returning a string.",
DeprecationWarning,
stacklevel=2,
Expand All @@ -467,7 +467,7 @@ def stale(self, value: bool | str | None) -> None:
if isinstance(value, bool):
warnings.warn(
"Setting the 'stale' property to a boolean is deprecated and will be"
" removed in Werkzeug 2.4.",
" removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -483,7 +483,7 @@ def _deprecated_dict_method(f): # type: ignore[no-untyped-def]
def wrapper(*args, **kwargs): # type: ignore[no-untyped-def]
warnings.warn(
"Treating 'Authorization' and 'WWWAuthenticate' as a dict is deprecated and"
" will be removed in Werkzeug 2.4. Use the 'parameters' attribute instead.",
" will be removed in Werkzeug 3.0. Use the 'parameters' attribute instead.",
DeprecationWarning,
stacklevel=2,
)
Expand Down
12 changes: 6 additions & 6 deletions src/werkzeug/datastructures/headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ def get(self, key, default=None, type=None, as_bytes=None):
.. versionchanged:: 2.3
The ``as_bytes`` parameter is deprecated and will be removed
in Werkzeug 2.4.
in Werkzeug 3.0.
.. versionchanged:: 0.9
The ``as_bytes`` parameter was added.
"""
if as_bytes is not None:
warnings.warn(
"The 'as_bytes' parameter is deprecated and will be"
" removed in Werkzeug 2.4.",
" removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -143,15 +143,15 @@ def getlist(self, key, type=None, as_bytes=None):
.. versionchanged:: 2.3
The ``as_bytes`` parameter is deprecated and will be removed
in Werkzeug 2.4.
in Werkzeug 3.0.
.. versionchanged:: 0.9
The ``as_bytes`` parameter was added.
"""
if as_bytes is not None:
warnings.warn(
"The 'as_bytes' parameter is deprecated and will be"
" removed in Werkzeug 2.4.",
" removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -480,7 +480,7 @@ def _str_header_key(key: t.Any) -> str:
if not isinstance(key, str):
warnings.warn(
"Header keys must be strings. Passing other types is deprecated and will"
" not be supported in Werkzeug 2.4.",
" not be supported in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -500,7 +500,7 @@ def _str_header_value(value: t.Any) -> str:
if isinstance(value, bytes):
warnings.warn(
"Passing bytes as a header value is deprecated and will not be supported in"
" Werkzeug 2.4.",
" Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand Down
26 changes: 13 additions & 13 deletions src/werkzeug/formparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def parse_form_data(
.. versionchanged:: 2.3
The ``charset`` and ``errors`` parameters are deprecated and will be removed in
Werkzeug 2.4.
Werkzeug 3.0.
.. versionadded:: 0.5.1
Added the ``silent`` parameter.
Expand Down Expand Up @@ -162,11 +162,11 @@ class FormDataParser:
.. versionchanged:: 2.3
The ``charset`` and ``errors`` parameters are deprecated and will be removed in
Werkzeug 2.4.
Werkzeug 3.0.
.. versionchanged:: 2.3
The ``parse_functions`` attribute and ``get_parse_func`` methods are deprecated
and will be removed in Werkzeug 2.4.
and will be removed in Werkzeug 3.0.
.. versionchanged:: 2.2.3
Added the ``max_form_parts`` parameter.
Expand Down Expand Up @@ -194,7 +194,7 @@ def __init__(
if charset is not None:
warnings.warn(
"The 'charset' parameter is deprecated and will be"
" removed in Werkzeug 2.4.",
" removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -206,7 +206,7 @@ def __init__(
if errors is not None:
warnings.warn(
"The 'errors' parameter is deprecated and will be"
" removed in Werkzeug 2.4.",
" removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -234,7 +234,7 @@ def get_parse_func(
):
warnings.warn(
"The 'get_parse_func' method is deprecated and will be"
" removed in Werkzeug 2.4.",
" removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -246,15 +246,15 @@ def get_parse_func(
elif mimetype == "application/x-url-encoded":
warnings.warn(
"The 'application/x-url-encoded' mimetype is invalid, and will not be"
" treated as 'application/x-www-form-urlencoded' in Werkzeug 2.4.",
" treated as 'application/x-www-form-urlencoded' in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
return type(self)._parse_urlencoded
elif mimetype in self.parse_functions:
warnings.warn(
"The 'parse_functions' attribute is deprecated and will be removed in"
" Werkzeug 2.4. Override 'parse' instead.",
" Werkzeug 3.0. Override 'parse' instead.",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -297,7 +297,7 @@ def parse(
.. versionchanged:: 2.3
The ``application/x-url-encoded`` content type is deprecated and will not be
treated as ``application/x-www-form-urlencoded`` in Werkzeug 2.4.
treated as ``application/x-www-form-urlencoded`` in Werkzeug 3.0.
"""
if mimetype == "multipart/form-data":
parse_func = self._parse_multipart
Expand All @@ -306,15 +306,15 @@ def parse(
elif mimetype == "application/x-url-encoded":
warnings.warn(
"The 'application/x-url-encoded' mimetype is invalid, and will not be"
" treated as 'application/x-www-form-urlencoded' in Werkzeug 2.4.",
" treated as 'application/x-www-form-urlencoded' in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
parse_func = self._parse_urlencoded
elif mimetype in self.parse_functions:
warnings.warn(
"The 'parse_functions' attribute is deprecated and will be removed in"
" Werkzeug 2.4. Override 'parse' instead.",
" Werkzeug 3.0. Override 'parse' instead.",
DeprecationWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -407,7 +407,7 @@ def __init__(
if charset is not None:
warnings.warn(
"The 'charset' parameter is deprecated and will be"
" removed in Werkzeug 2.4.",
" removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -419,7 +419,7 @@ def __init__(
if errors is not None:
warnings.warn(
"The 'errors' parameter is deprecated and will be"
" removed in Werkzeug 2.4.",
" removed in Werkzeug 3.0.",
DeprecationWarning,
stacklevel=2,
)
Expand Down

0 comments on commit 3b1b0e0

Please sign in to comment.