Commit d8b2f79
committed
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`, 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 send1 parent 9c9338b commit d8b2f79
3 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments