Fix invalid escape sequence and dangling hyphens. (#3049)

This commit is contained in:
Julien Palard 2023-03-10 19:48:32 +01:00 committed by GitHub
parent d318dc8329
commit 26f6303d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 9 deletions

View File

@ -17,10 +17,10 @@ from distlib.version import suggest_normalized_version, legacy_key, normalized_k
logger = logging.getLogger(__name__)
PEP426_VERSION_RE = re.compile('^(\d+(\.\d+)*)((a|b|c|rc)(\d+))?'
'(\.(post)(\d+))?(\.(dev)(\d+))?$')
PEP426_VERSION_RE = re.compile(r'^(\d+(\.\d+)*)((a|b|c|rc)(\d+))?'
r'(\.(post)(\d+))?(\.(dev)(\d+))?$')
PEP426_PRERELEASE_RE = re.compile('(a|b|c|rc|dev)\d+')
PEP426_PRERELEASE_RE = re.compile(r'(a|b|c|rc|dev)\d+')
def pep426_key(s):
s = s.strip()

View File

@ -1271,8 +1271,8 @@ not at the same time).
The proposed module maintains this behavior. Interpreters are not
tied to threads. Only calls to ``Interpreter.run()`` are. However,
one of the key objectives of this PEP is to provide a more human-
centric concurrency model. With that in mind, from a conceptual
one of the key objectives of this PEP is to provide a more
human-centric concurrency model. With that in mind, from a conceptual
standpoint the module *might* be easier to understand if each
interpreter were associated with its own thread.

View File

@ -280,8 +280,8 @@ With the reference implementation I measured negligible performance effects
time performance of generics is significantly improved:
* ``importlib.reload(typing)`` is up to 7x faster
* Creation of user defined generic classes is up to 4x faster (on a micro-
benchmark with an empty body)
* Creation of user defined generic classes is up to 4x faster (on a
micro-benchmark with an empty body)
* Instantiation of generic classes is up to 5x faster (on a micro-benchmark
with an empty ``__init__``)
* Other operations with generic types and instances (like method lookup and

View File

@ -116,8 +116,9 @@ Requirement table
The keys of the requirement table are as follows (all are optional):
- ``version`` (string): a :pep:`440` version specifier, which is a comma-
delimited list of version specifier clauses. The string MUST be non-empty.
- ``version`` (string): a :pep:`440` version specifier, which is a
comma-delimited list of version specifier clauses. The string MUST be
non-empty.
- ``extras`` (array of strings): a list of :pep:`508` extras declarations for
the distribution. The list MUST be non-empty.