Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release Notes

## 2.107.2

This release fixes Pex requirements parsing for direct reference URL requirements containing both
a fingerprint fragment and a trailing marker. Previously the trailing marker information was lost.

* Fix requirements parsing. (#3336)

## 2.107.1

This release fixes handling of source distributions that utilize `#subdirectory=...`. Previously,
Expand Down
4 changes: 4 additions & 0 deletions pex/artifact_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ def from_url_info(
fragment_parameters = attr.ib(eq=False) # type: Mapping[str, Sequence[str]]
fingerprints = attr.ib(eq=False) # type: Tuple[Fingerprint, ...]

@property
def is_local_path(self):
return self.scheme in ("", "file")

def subdirectory_fragment(self):
# type: () -> Optional[str]
if self.subdirectory:
Expand Down
5 changes: 4 additions & 1 deletion pex/dist_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,10 @@ def project_name_and_version(
source = "<parsed message>"
return ProjectNameAndVersion.from_parsed_pkg_info(source=source, pkg_info=pkg_info)
if fallback_to_filename and not isinstance(location, (Distribution, Message)):
return ProjectNameAndVersion.from_filename(location)
try:
return ProjectNameAndVersion.from_filename(location)
except UnrecognizedDistributionFormat:
pass
return None


Expand Down
Loading
Loading