diff --git a/src/flask/cli.py b/src/flask/cli.py index 3fa65cfd..c8181d03 100644 --- a/src/flask/cli.py +++ b/src/flask/cli.py @@ -687,14 +687,6 @@ class FlaskGroup(AppGroup): return super().parse_args(ctx, args) - -def _path_is_ancestor(path: str, other: str) -> bool: - """Take ``other`` and remove the length of ``path`` from it. Then join it - to ``path``. If it is the original value, ``path`` is an ancestor of - ``other``.""" - return os.path.join(path, other[len(path) :].lstrip(os.sep)) == other - - def load_dotenv( path: str | os.PathLike[str] | None = None, load_defaults: bool = True ) -> bool: diff --git a/src/flask/debughelpers.py b/src/flask/debughelpers.py index 61884e1a..ed34fd69 100644 --- a/src/flask/debughelpers.py +++ b/src/flask/debughelpers.py @@ -14,12 +14,6 @@ if t.TYPE_CHECKING: from .wrappers import Request -class UnexpectedUnicodeError(AssertionError, UnicodeError): - """Raised in places where we want some better error reporting for - unexpected unicode or binary data. - """ - - class DebugFilesKeyError(KeyError, AssertionError): """Raised from request.files during debugging. The idea is that it can provide a better error message than just a generic KeyError/BadRequest.