Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
FrozenRequirement Class Reference

Public Member Functions

None __init__ (self, str name, str req, bool editable, Iterable[str] comments=())
 
"FrozenRequirement" from_dist (cls, BaseDistribution dist)
 
str __str__ (self)
 

Data Fields

 name
 
 canonical_name
 
 req
 
 editable
 
 comments
 

Detailed Description

Definition at line 220 of file freeze.py.

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self,
str  name,
str  req,
bool  editable,
Iterable[str]   comments = () 
)

Definition at line 221 of file freeze.py.

227 ) -> None:
228 self.name = name
229 self.canonical_name = canonicalize_name(name)
230 self.req = req
231 self.editable = editable
232 self.comments = comments
233

Referenced by Protocol.__init_subclass__().

Here is the caller graph for this function:

Member Function Documentation

◆ __str__()

str __str__ (   self)

Definition at line 251 of file freeze.py.

251 def __str__(self) -> str:
252 req = self.req
253 if self.editable:
254 req = f"-e {req}"
255 return "\n".join(list(self.comments) + [str(req)]) + "\n"

References _EditableInfo.comments, FrozenRequirement.comments, BaseDistribution.editable(), DirInfo.editable, FrozenRequirement.editable, InstallRequirement.editable, AbstractDistribution.req, SourceDistribution.req, HashError.req, HashMissing.req, FrozenRequirement.req, InstallRequirement.req, VersionConflict.req(), and DistributionNotFound.req().

Here is the call graph for this function:

◆ from_dist()

"FrozenRequirement" from_dist (   cls,
BaseDistribution  dist 
)

Definition at line 235 of file freeze.py.

235 def from_dist(cls, dist: BaseDistribution) -> "FrozenRequirement":
236 editable = dist.editable
237 if editable:
238 req, comments = _get_editable_info(dist)
239 else:
240 comments = []
241 direct_url = dist.direct_url
242 if direct_url:
243 # if PEP 610 metadata is present, use it
244 req = direct_url_as_pep440_direct_reference(direct_url, dist.raw_name)
245 else:
246 # name==version requirement
247 req = _format_as_name_version(dist)
248
249 return cls(dist.raw_name, req, editable, comments=comments)
250
for i

References pip._internal.operations.freeze._format_as_name_version(), pip._internal.operations.freeze._get_editable_info(), and i.

Here is the call graph for this function:

Field Documentation

◆ canonical_name

canonical_name

Definition at line 229 of file freeze.py.

Referenced by BaseDistribution.raw_name().

◆ comments

comments

Definition at line 232 of file freeze.py.

Referenced by FrozenRequirement.__str__().

◆ editable

◆ name

name

Definition at line 228 of file freeze.py.

Referenced by AlreadyInstalledCandidate.__eq__(), Distribution.__eq__(), ExportEntry.__eq__(), _LazyDescr.__get__(), Distribution.__hash__(), ElementState.__init__(), Requirement.__init__(), LinkHash.__post_init__(), InstallationCandidate.__repr__(), Distribution.__repr__(), Metadata.__repr__(), ExportEntry.__repr__(), Encoding.__repr__(), Color.__rich_repr__(), Layout.__rich_repr__(), InstallationCandidate.__str__(), InstalledDistribution.__str__(), EggInfoDistribution.__str__(), Requirement.__str__(), ParserElement.__str__(), Tag.__str__(), _SixMetaPathImporter._add_module(), Matcher._check_compatible(), InstallRequirement._get_archive_name(), Wheel._get_extensions(), _SixMetaPathImporter._get_module(), ConfigOptionParser._get_ordered_configuration_items(), Distribution._get_requirements(), _Cache.add(), InstallRequirement.archive(), LinkHash.as_dict(), LinkHash.as_hashes(), Wheel.build(), _Cache.clear(), Wheel.filename(), Layout.get(), InstallRequirement.get_dist(), InstalledDistribution.get_distinfo_file(), RequirementCommand.get_requirements(), Wheel.get_wheel_metadata(), InstallRequirement.install(), Wheel.install(), SpecifierRequirement.is_satisfied_by(), LinuxDistribution.linux_distribution(), Wheel.metadata(), Distribution.name_and_version(), InstallRequirement.prepare_metadata(), Distribution.provides(), Metadata.provides(), VcsSupport.register(), VersionControl.run_command(), InstallRequirement.uninstall(), Wheel.update(), and Wheel.verify().

◆ req


The documentation for this class was generated from the following file: