Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
pip._internal.exceptions.HashMismatch Class Reference
Inheritance diagram for pip._internal.exceptions.HashMismatch:
Inheritance graph
[legend]
Collaboration diagram for pip._internal.exceptions.HashMismatch:
Collaboration graph
[legend]

Public Member Functions

None __init__ (self, Dict[str, List[str]] allowed, Dict[str, "_Hash"] gots)
 
str body (self)
 
- Public Member Functions inherited from pip._internal.exceptions.HashError
str __str__ (self)
 

Public Attributes

 allowed
 
 gots
 
- Public Attributes inherited from pip._internal.exceptions.HashError
 req
 

Static Public Attributes

int order = 4
 
tuple head
 
- Static Public Attributes inherited from pip._internal.exceptions.HashError
Optional req = None
 
str head = ""
 
int order = -1
 

Protected Member Functions

str _hash_comparison (self)
 
- Protected Member Functions inherited from pip._internal.exceptions.HashError
str _requirement_name (self)
 

Detailed Description

Distribution file hash values don't match.

:ivar package_name: The name of the package that triggered the hash
    mismatch. Feel free to write to this after the exception is raise to
    improve its error message.

Constructor & Destructor Documentation

◆ __init__()

None pip._internal.exceptions.HashMismatch.__init__ (   self,
Dict[str, List[str]]  allowed,
Dict[str, "_Hash"]  gots 
)
:param allowed: A dict of algorithm names pointing to lists of allowed
    hex digests
:param gots: A dict of algorithm names pointing to hashes we
    actually got from the files under suspicion

Member Function Documentation

◆ _hash_comparison()

str pip._internal.exceptions.HashMismatch._hash_comparison (   self)
protected
Return a comparison of actual and expected hash values.

Example::

       Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde
                    or 123451234512345123451234512345123451234512345
            Got        bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef

◆ body()

str pip._internal.exceptions.HashMismatch.body (   self)
Return a summary of me for display under the heading.

This default implementation simply prints a description of the
triggering requirement.

:param req: The InstallRequirement that provoked this error, with
    its link already populated by the resolver's _populate_link().

Reimplemented from pip._internal.exceptions.HashError.

Member Data Documentation

◆ head

tuple pip._internal.exceptions.HashMismatch.head
static
Initial value:
= (
"THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS "
"FILE. If you have updated the package versions, please update "
"the hashes. Otherwise, examine the package contents carefully; "
"someone may have tampered with them."
)

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