From 4246792b818ce804fb1bb98877c8ec7e8f71b2ca Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Tue, 28 Dec 2021 17:32:48 -0700 Subject: [PATCH] Fix erroneous use of 'schema' instead of 'scheme' --- requests/exceptions.py | 4 ++-- requests/models.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requests/exceptions.py b/requests/exceptions.py index 957e31f384..79697635a5 100644 --- a/requests/exceptions.py +++ b/requests/exceptions.py @@ -80,11 +80,11 @@ class TooManyRedirects(RequestException): class MissingSchema(RequestException, ValueError): - """The URL schema (e.g. http or https) is missing.""" + """The URL scheme (e.g. http or https) is missing.""" class InvalidSchema(RequestException, ValueError): - """See defaults.py for valid schemas.""" + """The URL scheme provided is either invalid or unsupported.""" class InvalidURL(RequestException, ValueError): diff --git a/requests/models.py b/requests/models.py index e7d292d580..3816e8efb9 100644 --- a/requests/models.py +++ b/requests/models.py @@ -386,7 +386,7 @@ def prepare_url(self, url, params): raise InvalidURL(*e.args) if not scheme: - error = ("Invalid URL {0!r}: No schema supplied. Perhaps you meant http://{0}?") + error = ("Invalid URL {0!r}: No scheme supplied. Perhaps you meant http://{0}?") error = error.format(to_native_string(url, 'utf8')) raise MissingSchema(error)