File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ END_UNRELEASED_TEMPLATE
7878 multiple times.
7979* (tools/wheelmaker.py) Extras are now preserved in Requires-Dist metadata when using requires_file
8080 to specify the requirements.
81+ * (pypi) Starlark implementation of the marker evaluation now supports the full PEP440
82+ spec for version comparison.
8183
8284{#v0-0-0-added}
8385### Added
Original file line number Diff line number Diff line change @@ -540,13 +540,6 @@ def _parse(version_str, strict = True):
540540 accept_local (parser )
541541
542542 parser_ctx = parser .context ()
543- if is_prefix and (parser_ctx ["local" ] or parser_ctx ["post" ] or parser_ctx ["dev" ] or parser_ctx ["pre" ]):
544- if strict :
545- fail ("local version part has been obtained, but only public segments can have prefix matches" )
546-
547- # https://peps.python.org/pep-0440/#public-version-identifiers
548- return None
549-
550543 if parser .input [parser_ctx ["start" ]:]:
551544 if strict :
552545 fail (
@@ -589,6 +582,13 @@ def parse(version_str, strict = False):
589582 if not parts :
590583 return None
591584
585+ if parts ["is_prefix" ] and (parts ["local" ] or parts ["post" ] or parts ["dev" ] or parts ["pre" ]):
586+ if strict :
587+ fail ("local version part has been obtained, but only public segments can have prefix matches" )
588+
589+ # https://peps.python.org/pep-0440/#public-version-identifiers
590+ return None
591+
592592 return struct (
593593 epoch = _parse_epoch (parts ["epoch" ]),
594594 release = _parse_release (parts ["release" ]),
You can’t perform that action at this time.
0 commit comments