Skip to content

Releases: jwodder/pypi-simple

v1.6.0 — Support PEP 740

18 Jul 16:10
v1.6.0
Compare
Choose a tag to compare
  • Drop support for Python 3.7
  • Support PEP 740
    • provenance_sha256 and provenance_url fields added to DistributionPackage
    • get_provenance() method added to PyPISimple
    • NoProvenanceError exception type added
  • Add url fields to the DigestMismatchError, NoDigestsError, and NoMetadataError classes

v1.5.0 — Custom headers and decoding metadata

24 Feb 21:08
v1.5.0
Compare
Choose a tag to compare
  • Bugfix: Fix parsing of "true" data-core-metadata attributes and handling of the attribute's absence (contributed by @thatch)
    • DistributionPackage.has_metadata will now be None if this attribute was absent in the HTML returned by PyPI. Previously, it would be False under this circumstance.
  • Added PyPISimple.get_package_metadata_bytes() (contributed by @thatch)
  • PyPISimple.get_package_metadata() now always decodes responses as UTF-8 (contributed by @thatch)
  • Request methods now take optional headers arguments (contributed by @thatch)

v1.4.1 — Fix `get_project_page()`

30 Jan 22:32
v1.4.1
Compare
Choose a tag to compare
  • Migrated from setuptools to hatch
  • Bugfix: When no accept argument is passed to PyPISimple.get_project_page(), actually fall back to the value supplied on client instantiation, as documented (contributed by @thatch)

v1.4.0 — Support PEP 708

01 Nov 14:32
v1.4.0
Compare
Choose a tag to compare
  • Support PEP 708
    • tracks and alternate_locations attributes added to ProjectPage
    • pypi_meta, tracks, and alternate_locations attributes added to RepositoryPage
    • SUPPORTED_REPOSITORY_VERSION increased to "1.2"

v1.3.0 — Fetching metadata

01 Nov 13:15
v1.3.0
Compare
Choose a tag to compare
  • Support Python 3.12
  • Update for PEP 714
  • Gave PyPISimple a get_package_metadata() method
  • Added an examples page to the documentation

v1.2.0 — Update pydantic to v2.0

23 Sep 18:57
v1.2.0
Compare
Choose a tag to compare

v1.1.0 — Support PEP 700

19 Feb 19:38
v1.1.0
Compare
Choose a tag to compare
  • Support PEP 700
    • versions field added to ProjectPage
    • size and upload_time fields added to DistributionPackage
    • SUPPORTED_REPOSITORY_VERSION increased to "1.1"

v1.0.0 — Overhaul

31 Oct 22:33
v1.0.0
Compare
Choose a tag to compare
  • 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, and Link have been changed from NamedTuples to dataclasses
  • Replaced DistributionPackage.yanked with separate is_yanked and yanked_reason attributes
  • parse_filename() now raises an UnparsableFilenameError on unparsable filenames instead of returning a triple of Nones
  • PyPISimple.get_project_page() now raises a NoSuchProjectError on 404 responses instead of returning None
  • The functions for parsing data into IndexPage and ProjectPage instances 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 RepositoryPage class for representing the return value of parse_repo_links() (now called RepositoryPage.from_html())
  • Renamed DistributionPackage.from_pep691_details() to from_json_data()
  • PyPISimple.stream_project_names() now accepts JSON responses
  • Use pydantic internally to parse JSON responses
  • Added constants for passing to PyPISimple and its methods in order to specify the Accept header to send

v0.10.0 — PEP 691 and downloading packages

30 Jun 14:49
v0.10.0
Compare
Choose a tag to compare
  • 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() and parse_repo_index_response() now support both the JSON and HTML formats
    • Add parse_repo_index_json() and parse_repo_project_json() functions
    • Gave DistributionPackage a from_pep691_details() classmethod
    • DistributionPackage.has_metadata will now be None if not specified by a JSON response
    • DistributionPackage.metadata_url is now always non-None
  • Gave DistributionPackage a digests attribute
    • The get_digests() method of DistributionPackage is now deprecated; use digests instead
    • Digest 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 a download_package() method

v0.9.0 — Support PEP 658

26 Aug 20:58
v0.9.0
Compare
Choose a tag to compare
  • Support PEP 658 by adding has_metadata, metadata_url, and metadata_digests attributes to DistributionPackage