From b8e7a70fd53b3131cc8d1b043f1b115dfb54bbf7 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Thu, 3 Jun 2021 16:44:42 +0200 Subject: [PATCH] Fix typos (#10001) --- NEWS.rst | 4 ++-- docs/html/user_guide.rst | 2 +- news/0d757310-0e1d-4887-9076-a1eb3c55d9fa.trivial.rst | 1 + src/pip/_internal/models/wheel.py | 2 +- src/pip/_internal/network/lazy_wheel.py | 2 +- src/pip/_internal/utils/filesystem.py | 2 +- src/pip/_internal/utils/misc.py | 2 +- src/pip/py.typed | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 news/0d757310-0e1d-4887-9076-a1eb3c55d9fa.trivial.rst diff --git a/NEWS.rst b/NEWS.rst index 69655db57e6..5688da3ba82 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -350,7 +350,7 @@ Features - When installing a git URL that refers to a commit that is not available locally after git clone, attempt to fetch it from the remote. (`#8815 `_) - Include http subdirectory in ``pip cache info`` and ``pip cache purge`` commands. (`#8892 `_) -- Cache package listings on index packages so they are guarenteed to stay stable +- Cache package listings on index packages so they are guaranteed to stay stable during a pip command session. This also improves performance when a index page is accessed multiple times during the command session. (`#8905 `_) - New resolver: Tweak resolution logic to improve user experience when @@ -422,7 +422,7 @@ Features and considered good enough. (`#8023 `_) - Improve error message friendliness when an environment has packages with corrupted metadata. (`#8676 `_) -- Cache package listings on index packages so they are guarenteed to stay stable +- Cache package listings on index packages so they are guaranteed to stay stable during a pip command session. This also improves performance when a index page is accessed multiple times during the command session. (`#8905 `_) - New resolver: Tweak resolution logic to improve user experience when diff --git a/docs/html/user_guide.rst b/docs/html/user_guide.rst index a36bc92689b..cfcdfc182a1 100644 --- a/docs/html/user_guide.rst +++ b/docs/html/user_guide.rst @@ -778,7 +778,7 @@ those specified on the command-line or via a requirements file) while requirements). As an example, say ``SomePackage`` has a dependency, ``SomeDependency``, and -both of them are already installed but are not the latest avaialable versions: +both of them are already installed but are not the latest available versions: - ``pip install SomePackage``: will not upgrade the existing ``SomePackage`` or ``SomeDependency``. diff --git a/news/0d757310-0e1d-4887-9076-a1eb3c55d9fa.trivial.rst b/news/0d757310-0e1d-4887-9076-a1eb3c55d9fa.trivial.rst new file mode 100644 index 00000000000..c5abc976248 --- /dev/null +++ b/news/0d757310-0e1d-4887-9076-a1eb3c55d9fa.trivial.rst @@ -0,0 +1 @@ +Fix typos in several files. diff --git a/src/pip/_internal/models/wheel.py b/src/pip/_internal/models/wheel.py index 0a582b305c9..827ebca91c6 100644 --- a/src/pip/_internal/models/wheel.py +++ b/src/pip/_internal/models/wheel.py @@ -69,7 +69,7 @@ def support_index_min(self, tags): def find_most_preferred_tag(self, tags, tag_to_priority): # type: (List[Tag], Dict[Tag, int]) -> int """Return the priority of the most preferred tag that one of the wheel's file - tag combinations acheives in the given list of supported tags using the given + tag combinations achieves in the given list of supported tags using the given tag_to_priority mapping, where lower priorities are more-preferred. This is used in place of support_index_min in some cases in order to avoid diff --git a/src/pip/_internal/network/lazy_wheel.py b/src/pip/_internal/network/lazy_wheel.py index b877d3b7a67..781cb015466 100644 --- a/src/pip/_internal/network/lazy_wheel.py +++ b/src/pip/_internal/network/lazy_wheel.py @@ -123,7 +123,7 @@ def seek(self, offset, whence=0): def tell(self): # type: () -> int - """Return the current possition.""" + """Return the current position.""" return self._file.tell() def truncate(self, size=None): diff --git a/src/pip/_internal/utils/filesystem.py b/src/pip/_internal/utils/filesystem.py index 3db97dc413b..177a6b4fbb5 100644 --- a/src/pip/_internal/utils/filesystem.py +++ b/src/pip/_internal/utils/filesystem.py @@ -98,7 +98,7 @@ def adjacent_tmp_file(path, **kwargs): os.fsync(result.fileno()) -# Tenacity raises RetryError by default, explictly raise the original exception +# Tenacity raises RetryError by default, explicitly raise the original exception _replace_retry = retry(reraise=True, stop=stop_after_delay(1), wait=wait_fixed(0.25)) replace = _replace_retry(os.replace) diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py index a4ad35be61c..d88f3f46ae6 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py @@ -128,7 +128,7 @@ def get_prog(): # Retry every half second for up to 3 seconds -# Tenacity raises RetryError by default, explictly raise the original exception +# Tenacity raises RetryError by default, explicitly raise the original exception @retry(reraise=True, stop=stop_after_delay(3), wait=wait_fixed(0.5)) def rmtree(dir, ignore_errors=False): # type: (AnyStr, bool) -> None diff --git a/src/pip/py.typed b/src/pip/py.typed index 0b44fd9b5c7..493b53e4e7a 100644 --- a/src/pip/py.typed +++ b/src/pip/py.typed @@ -1,4 +1,4 @@ pip is a command line program. While it is implemented in Python, and so is available for import, you must not use pip's internal APIs in this way. Typing -information is provided as a convenience only and is not a gaurantee. Expect +information is provided as a convenience only and is not a guarantee. Expect unannounced changes to the API and types in releases.