Changelog
v0.10.0 (2022-06-30)
Support Python 3.10
Support PEP 691
Send Accept headers in requests (except for
stream_project_names()
) listing both the new JSON format and the old HTML formatparse_repo_project_response()
andparse_repo_index_response()
now support both the JSON and HTML formatsAdd
parse_repo_index_json()
andparse_repo_project_json()
functionsGave
DistributionPackage
afrom_pep691_details()
classmethodDistributionPackage.has_metadata
will now beNone
if not specified by a JSON responseDistributionPackage.metadata_url
is now always non-None
Gave
DistributionPackage
adigests
attributeThe
get_digests()
method ofDistributionPackage
is now deprecated; usedigests
insteadDigest fragments are now removed from
DistributionPackage.url
when parsing HTML responses
Warn on encountering a repository version with a greater minor version than expected
Gave
PyPISimple
adownload_package()
method
v0.9.0 (2021-08-26)
Support PEP 658 by adding
has_metadata
,metadata_url
, andmetadata_digests
attributes toDistributionPackage
v0.8.0 (2020-12-13)
Support Python 3.9
PyPISimple
is now usable as a context manager that will close the session on exit
v0.7.0 (2020-10-15)
Drop support for Python 2.7, Python 3.4, and Python 3.5
DistributionPackage.has_sig
is nowNone
if the package repository does not report this informationAdded type annotations
Moved documentation from README file to a Read the Docs site
Added new methods to
PyPISimple
:get_index_page()
— Returns anIndexPage
instance with aprojects: List[str]
attribute plus other attributes for repository metadataget_project_page()
— Returns aProjectPage
instance with apackages: List[DistributionPackage]
attribute plus other attributes for repository metadatastream_project_names()
— Retrieves project names from a repository using a streaming request
New utility functions:
parse_repo_links()
— Parses an HTML page and returns a pair of repository metadata and a list ofLink
objectsparse_repo_project_page()
— Parses a project page and returns aProjectPage
instanceparse_repo_project_response()
— Parses arequests.Response
object containing a project page and returns aProjectPage
instanceparse_links_stream()
— Parses an HTML page as stream ofbytes
orstr
and returns a generator ofLink
objectsparse_links_stream_response()
— Parses a streamingrequests.Response
object containing an HTML page and returns a generator ofLink
objectsparse_repo_index_page()
— Parses a simple repository index/root page and returns anIndexPage
instanceparse_repo_index_response()
— Parses arequests.Response
object containing an index page and returns anIndexPage
instance
The following functions & methods are now deprecated and will be removed in a future version:
Support Warehouse’s X-PyPI-Last-Serial header by attaching the value to the objects returned by
get_index_page()
andget_project_page()
Support PEP 629 by attaching the repository version to the objects returned by
get_index_page()
andget_project_page()
and by raising anUnsupportedRepoVersionError
when a repository with an unsupported version is encountered
v0.6.0 (2020-03-01)
Support Python 3.8
DistributionPackage.sig_url
is now always non-None
, as Warehouse does not report proper values forhas_sig
v0.5.0 (2019-05-12)
The
PyPISimple
constructor now takes an optionalsession
argument which can be used to specify arequests.Session
object with more complicated configuration than just authenticationSupport for PEP 592;
DistributionPackage
now has ayanked
attribute
v0.4.0 (2018-09-06)
Publicly (i.e., in the README) document the utility functions
Gave
PyPISimple
anauth
parameter for specifying login/authentication details
v0.3.0 (2018-09-03)
When fetching the list of files for a project, the project name is now used to resolve ambiguous filenames.
The filename parser now requires all filenames to be all-ASCII (except for wheels).
v0.2.0 (2018-09-01)
The filename parser now rejects invalid project names, blatantly invalid versions, and non-ASCII digits.
RPM packages are now recognized.
v0.1.0 (2018-08-31)
Initial release