Skip to content

Commit

Permalink
v1.0.0 — Overhaul
Browse files Browse the repository at this point in the history
- 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 `None`s
- `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
  • Loading branch information
jwodder committed Oct 31, 2022
1 parent 9c9338b commit d8b2f79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v1.0.0 (in development)
-----------------------
v1.0.0 (2022-10-31)
-------------------
- Removed deprecated functionality:
- `DistributionPackage.get_digests()`
- `PyPISimple.get_projects()`
Expand Down
5 changes: 3 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Changelog
=========

v1.0.0 (in development)
-----------------------
v1.0.0 (2022-10-31)
-------------------
- Removed deprecated functionality:

- ``DistributionPackage.get_digests()``
Expand Down Expand Up @@ -46,6 +46,7 @@ v1.0.0 (in development)
- Added constants for passing to `PyPISimple` and its methods in order to
specify the :mailheader:`Accept` header to send


v0.10.0 (2022-06-30)
--------------------
- Support Python 3.10
Expand Down
2 changes: 1 addition & 1 deletion src/pypi_simple/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
for more information.
"""

__version__ = "1.0.0.dev1"
__version__ = "1.0.0"
__author__ = "John Thorvald Wodder II"
__author_email__ = "[email protected]"
__license__ = "MIT"
Expand Down

0 comments on commit d8b2f79

Please sign in to comment.