Commit 1fa05b6
committed
v0.7.0 — New methods, typing, and PEP 629
- Drop support for Python 2.7, Python 3.4, and Python 3.5
- `DistributionPackage.has_sig` is now `None` if 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 an `IndexPage` instance with a `projects: List[str]` attribute plus other attributes for repository metadata
- `get_project_page()` — Returns a `ProjectPage` instance with a `packages: List[DistributionPackage]` attribute plus other attributes for repository metadata
- `stream_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 of `Link` objects
- `parse_repo_project_page()` — Parses a project page and returns a `ProjectPage` instance
- `parse_repo_project_response()` — Parses a `requests.Response` object containing a project page and returns a `ProjectPage` instance
- `parse_links_stream()` — Parses an HTML page as stream of `bytes` or `str` and returns a generator of `Link` objects
- `parse_links_stream_response()` — Parses a streaming `requests.Response` object containing an HTML page and returns a generator of `Link` objects
- `parse_repo_index_page()` — Parses a simple repository index/root page and returns an `IndexPage` instance
- `parse_repo_index_response()` — Parses a `requests.Response` object containing an index page and returns an `IndexPage` instance
- 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-Serial`` header by attaching the value to the objects returned by `get_index_page()` and `get_project_page()`
- Support PEP 629 by attaching the repository version to the objects returned by `get_index_page()` and `get_project_page()` and by raising an `UnsupportedRepoVersionError` when a repository with an unsupported version is encountered1 parent e76f23f commit 1fa05b6
3 files changed
+10
-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 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments