Releases: jwodder/pypi-simple
Releases · jwodder/pypi-simple
v1.0.0 — Overhaul
- Removed deprecated functionality:
DistributionPackage.get_digests()PyPISimple.get_projects()PyPISimple.get_project_files()parse_simple_index()parse_project_page()parse_links()
- Drop support for Python 3.6
- Support Python 3.11
IndexPage,ProjectPage,DistributionPackage, andLinkhave been changed from NamedTuples to dataclasses- Replaced
DistributionPackage.yankedwith separateis_yankedandyanked_reasonattributes parse_filename()now raises anUnparsableFilenameErroron unparsable filenames instead of returning a triple ofNonesPyPISimple.get_project_page()now raises aNoSuchProjectErroron 404 responses instead of returningNone- The functions for parsing data into
IndexPageandProjectPageinstances have been replaced with classmethods:parse_repo_index_page()→IndexPage.from_html()parse_repo_index_json()→IndexPage.from_json_data()parse_repo_index_response()→IndexPage.from_response()parse_repo_links()→RepositoryPage.from_html()parse_repo_project_page()→ProjectPage.from_html()parse_repo_project_json()→ProjectPage.from_json_data()parse_repo_project_response()→ProjectPage.from_response()
- Add a
RepositoryPageclass for representing the return value ofparse_repo_links()(now calledRepositoryPage.from_html()) - Renamed
DistributionPackage.from_pep691_details()tofrom_json_data() PyPISimple.stream_project_names()now accepts JSON responses- Use pydantic internally to parse JSON responses
- Added constants for passing to
PyPISimpleand its methods in order to specify theAcceptheader to send
v0.10.0 — PEP 691 and downloading packages
- 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 format parse_repo_project_response()andparse_repo_index_response()now support both the JSON and HTML formats- Add
parse_repo_index_json()andparse_repo_project_json()functions - Gave
DistributionPackageafrom_pep691_details()classmethod DistributionPackage.has_metadatawill now beNoneif not specified by a JSON responseDistributionPackage.metadata_urlis now always non-None
- Send "Accept" headers in requests (except for
- Gave
DistributionPackageadigestsattribute- The
get_digests()method ofDistributionPackageis now deprecated; usedigestsinstead - Digest fragments are now removed from
DistributionPackage.urlwhen parsing HTML responses
- The
- Warn on encountering a repository version with a greater minor version than expected
- Gave
PyPISimpleadownload_package()method
v0.9.0 — Support PEP 658
- Support PEP 658 by adding
has_metadata,metadata_url, andmetadata_digestsattributes toDistributionPackage
v0.8.0 — Support client as context manager
- Support Python 3.9
PyPISimpleis now usable as a context manager that will close the session on exit
v0.7.0 — New methods, typing, and PEP 629
- Drop support for Python 2.7, Python 3.4, and Python 3.5
DistributionPackage.has_sigis nowNoneif the package repository does not report this information- Added type annotations
- Moved documentation from README file to a Read the Docs site
- Added new methods to
PyPISimple:get_index_page()— Returns anIndexPageinstance with aprojects: List[str]attribute plus other attributes for repository metadataget_project_page()— Returns aProjectPageinstance 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 ofLinkobjectsparse_repo_project_page()— Parses a project page and returns aProjectPageinstanceparse_repo_project_response()— Parses arequests.Responseobject containing a project page and returns aProjectPageinstanceparse_links_stream()— Parses an HTML page as stream ofbytesorstrand returns a generator ofLinkobjectsparse_links_stream_response()— Parses a streamingrequests.Responseobject containing an HTML page and returns a generator ofLinkobjectsparse_repo_index_page()— Parses a simple repository index/root page and returns anIndexPageinstanceparse_repo_index_response()— Parses arequests.Responseobject containing an index page and returns anIndexPageinstance
- The following functions & methods are now deprecated and will be removed in a
future version:PyPISimple.get_projects()PyPISimple.get_project_files()parse_simple_index()parse_project_page()parse_links()
- Support Warehouse's
X-PyPI-Last-Serialheader by attaching the value to the objects returned byget_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 anUnsupportedRepoVersionErrorwhen a repository with an unsupported version is encountered
v0.6.0 — `sig_url` is now always set
- Support Python 3.8
DistributionPackage.sig_urlis now always non-None, as Warehouse does not report proper values forhas_sig
v0.5.0 — Yanking and user-supplied sessions
- The
PyPISimpleconstructor now takes an optionalsessionargument which can be used to specify arequests.Sessionobject with more complicated configuration than just authentication - Support for PEP 592;
DistributionPackagenow has ayankedattribute
v0.4.0 — Authentication support
- Publicly (i.e., in the README) document the utility functions
- Gave
PyPISimpleanauthparameter for specifying login/authentication details
v0.3.0 — Improved parsing of ambiguous filenames
- 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 — Recognize RPM packages
- The filename parser now rejects invalid project names, blatantly invalid versions, and non-ASCII digits.
- RPM packages are now recognized.