Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #4849

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ Bugfixes
--------

- In tests, rely on pytest-home for reusable fixture. (#4072)
- Explicitely marked as ``Protocol`` and fixed missing ``self`` argument in interfaces ``pkg_resources.IMetadataProvider`` and ``pkg_resources.IResourceProvider`` -- by :user:`Avasam` (#4144)
- Explicitly marked as ``Protocol`` and fixed missing ``self`` argument in interfaces ``pkg_resources.IMetadataProvider`` and ``pkg_resources.IResourceProvider`` -- by :user:`Avasam` (#4144)
- Restored expectation that egg-link files would be named with dash separators for compatibility with pip prior to version 24. (#4167)


Expand Down Expand Up @@ -7151,7 +7151,7 @@ setuptools

* Fixed invalid URL error catching. Old Setuptools #20.

* Fixed invalid bootstraping with easy_install installation (Distribute #40).
* Fixed invalid bootstrapping with easy_install installation (Distribute #40).
Thanks to Florian Schulze for the help.

* Removed buildout/bootstrap.py. A new repository will create a specific
Expand Down
2 changes: 1 addition & 1 deletion setuptools/_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Static:
def _prevent_modification(target: type, method: str, copying: str) -> None:
"""
Because setuptools is very flexible we cannot fully prevent
plugins and user customisations from modifying static values that were
plugins and user customizations from modifying static values that were
parsed from config files.
But we can attempt to block "in-place" mutations and identify when they
were done.
Expand Down
4 changes: 2 additions & 2 deletions setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ optional arguments:
STOP and STEP default to 1
```

Even though autocommand is being applied to the `wrapper` returned by `print_yielded`, it still retreives the signature of the underlying `seq` function to create the argument parsing.
Even though autocommand is being applied to the `wrapper` returned by `print_yielded`, it still retrieves the signature of the underlying `seq` function to create the argument parsing.

### Custom Parser

Expand All @@ -331,7 +331,7 @@ from argparse import ArgumentParser
from autocommand import autocommand

parser = ArgumentParser()
# autocommand can't do optional positonal parameters
# autocommand can't do optional positional parameters
parser.add_argument('arg', nargs='?')
# or mutually exclusive options
group = parser.add_mutually_exclusive_group()
Expand Down
8 changes: 4 additions & 4 deletions setuptools/_vendor/autocommand/autoasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ async def _run_forever_coro(coro, args, kwargs, loop):
def autoasync(coro=None, *, loop=None, forever=False, pass_loop=False):
'''
Convert an asyncio coroutine into a function which, when called, is
evaluted in an event loop, and the return value returned. This is intented
evaluated in an event loop, and the return value returned. This is intended
to make it easy to write entry points into asyncio coroutines, which
otherwise need to be explictly evaluted with an event loop's
otherwise need to be explicitly evaluated with an event loop's
run_until_complete.

If `loop` is given, it is used as the event loop to run the coro in. If it
is None (the default), the loop is retreived using asyncio.get_event_loop.
This call is defered until the decorated function is called, so that
is None (the default), the loop is retrieved using asyncio.get_event_loop.
This call is deferred until the decorated function is called, so that
callers can install custom event loops or event loop policies after
@autoasync is applied.

Expand Down
8 changes: 4 additions & 4 deletions setuptools/_vendor/autocommand/autoparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AnnotationError(AutocommandError):

class PositionalArgError(AutocommandError):
'''
Postional Arg Error: autocommand can't handle postional-only parameters
Positional Arg Error: autocommand can't handle positional-only parameters
'''


Expand Down Expand Up @@ -137,7 +137,7 @@ def _add_arguments(param, parser, used_char_args, add_nos):
arg_spec['type'] = str

# TODO: special case for list type.
# - How to specificy type of list members?
# - How to specify type of list members?
# - param: [int]
# - param: int =[]
# - action='append' vs nargs='*'
Expand Down Expand Up @@ -197,7 +197,7 @@ def make_parser(func_sig, description, epilog, add_nos):
used_char_args = {'h'}

# Arange the params so that single-character arguments are first. This
# esnures they don't have to get --long versions. sorted is stable, so the
# ensures they don't have to get --long versions. sorted is stable, so the
# parameters will otherwise still be in relative order.
params = sorted(
func_sig.parameters.values(),
Expand Down Expand Up @@ -249,7 +249,7 @@ def autoparse(
while parameters *with* defaults become --options. Use annotations to set
the type of the parameter.

The `desctiption` and `epilog` parameters corrospond to the same respective
The `description` and `epilog` parameters correspond to the same respective
argparse parameters. If no description is given, it defaults to the
decorated functions's docstring, if present.

Expand Down
2 changes: 1 addition & 1 deletion setuptools/_vendor/inflect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ def get_si_pron(thecase, word, gender) -> str:
re.VERBOSE,
)

# THIS PATTERN CODES THE BEGINNINGS OF ALL ENGLISH WORDS BEGINING WITH A
# THIS PATTERN CODES THE BEGINNINGS OF ALL ENGLISH WORDS BEGINNING WITH A
# 'y' FOLLOWED BY A CONSONANT. ANY OTHER Y-CONSONANT PREFIX THEREFORE
# IMPLIES AN ABBREVIATION.

Expand Down
12 changes: 6 additions & 6 deletions setuptools/_vendor/packaging/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ def _parse_project_urls(data: list[str]) -> dict[str, str]:
# be the missing value, then they'd have multiple '' values that
# overwrite each other in a accumulating dict.
#
# The other potentional issue is that it's possible to have the
# The other potential issue is that it's possible to have the
# same label multiple times in the metadata, with no solid "right"
# answer with what to do in that case. As such, we'll do the only
# thing we can, which is treat the field as unparseable and add it
# thing we can, which is treat the field as unparsable and add it
# to our list of unparsed fields.
parts = [p.strip() for p in pair.split(",", 1)]
parts.extend([""] * (max(0, 2 - len(parts)))) # Ensure 2 items
Expand All @@ -209,8 +209,8 @@ def _parse_project_urls(data: list[str]) -> dict[str, str]:
label, url = parts
if label in urls:
# The label already exists in our set of urls, so this field
# is unparseable, and we can just add the whole thing to our
# unparseable data and stop processing it.
# is unparsable, and we can just add the whole thing to our
# unparsable data and stop processing it.
raise KeyError("duplicate labels in project urls")
urls[label] = url

Expand Down Expand Up @@ -424,7 +424,7 @@ def parse_email(data: bytes | str) -> tuple[RawMetadata, dict[str, list[str]]]:
except KeyError:
unparsed[name] = value
# Nothing that we've done has managed to parse this, so it'll just
# throw it in our unparseable data and move on.
# throw it in our unparsable data and move on.
else:
unparsed[name] = value

Expand All @@ -441,7 +441,7 @@ def parse_email(data: bytes | str) -> tuple[RawMetadata, dict[str, list[str]]]:
else:
if payload:
# Check to see if we've already got a description, if so then both
# it, and this body move to unparseable.
# it, and this body move to unparsable.
if "description" in raw:
description_header = cast(str, raw.pop("description"))
unparsed.setdefault("description", []).extend(
Expand Down
6 changes: 3 additions & 3 deletions setuptools/command/editable_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def _run_build_subcommands(self) -> None:
This method implements a temporary workaround to support the ecosystem
while the implementations catch up.
"""
# TODO: Once plugins/customisations had the chance to catch up, replace
# TODO: Once plugins/customizations had the chance to catch up, replace
# `self._run_build_subcommands()` with `self.run_command("build")`.
# Also remove _safely_run, TestCustomBuildPy. Suggested date: Aug/2023.
build = self.get_finalized_command("build")
Expand Down Expand Up @@ -309,7 +309,7 @@ def _safely_run(self, cmd_name: str):
https://setuptools.pypa.io/en/latest/userguide/extension.html.

For the time being `setuptools` will silence this error and ignore
the faulty command, but this behaviour will change in future versions.
the faulty command, but this behavior will change in future versions.
""",
# TODO: define due_date
# There is a series of shortcomings with the available editable install
Expand Down Expand Up @@ -564,7 +564,7 @@ def _encode_pth(content: str) -> bytes:
.pth files are always read with 'locale' encoding, the recommendation
from the cpython core developers is to write them as ``open(path, "w")``
and ignore warnings (see python/cpython#77102, pypa/setuptools#3937).
This function tries to simulate this behaviour without having to create an
This function tries to simulate this behavior without having to create an
actual file, in a way that supports a range of active Python versions.
(There seems to be some variety in the way different version of Python handle
``encoding=None``, not all of them use ``locale.getpreferredencoding(False)``
Expand Down
2 changes: 1 addition & 1 deletion setuptools/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def initialize_options(self):
""",
see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
# TODO: Document how to bootstrap setuptools without install
# (e.g. by unziping the wheel file)
# (e.g. by unzipping the wheel file)
# and then add a due_date to this warning.
)

Expand Down
2 changes: 1 addition & 1 deletion setuptools/tests/test_build_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_excluded_subpackages(tmpdir_cwd):
with pytest.warns(SetuptoolsDeprecationWarning, match=msg):
# TODO: To fix #3260 we need some transition period to deprecate the
# existing behavior of `include_package_data`. After the transition, we
# should remove the warning and fix the behaviour.
# should remove the warning and fix the behavior.

if os.getenv("SETUPTOOLS_USE_DISTUTILS") == "stdlib":
# pytest.warns reset the warning filter temporarily
Expand Down
2 changes: 1 addition & 1 deletion setuptools/unicode_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class _Utf8EncodingNeeded(SetuptoolsDeprecationWarning):
"""

_DETAILS = """
Fallback behaviour for UTF-8 is considered **deprecated** and future versions of
Fallback behavior for UTF-8 is considered **deprecated** and future versions of
`setuptools` may not implement it.

Please encode {file!r} with "utf-8" to ensure future builds will succeed.
Expand Down
Loading