|
12 | 12 | from pulpcore.plugin.models import Remote |
13 | 13 |
|
14 | 14 |
|
15 | | -# todo: why upper case? |
16 | 15 | PYPI_LAST_SERIAL = "X-PYPI-LAST-SERIAL" |
17 | 16 | """TODO This serial constant is temporary until Python repositories implements serials""" |
18 | 17 | PYPI_SERIAL_CONSTANT = 1000000000 |
|
42 | 41 | <body> |
43 | 42 | <h1>Links for {{ project_name }}</h1> |
44 | 43 | {% for pkg in project_packages %} |
45 | | - <a href="{{ pkg.url }}#sha256={{ pkg.sha256 }}" rel="internal">{{ pkg.filename }}</a><br/> |
| 44 | + <a href="{{ pkg.url }}#sha256={{ pkg.sha256 }}" rel="internal">{{ pkg.filename }}{% if pkg.yanked %}data-yanked="{{ pkg.yanked_reason }}"{% endif %}</a><br/> |
46 | 45 | {% endfor %} |
47 | 46 | </body> |
48 | 47 | </html> |
@@ -131,6 +130,10 @@ def parse_project_metadata(project): |
131 | 130 | # Release metadata |
132 | 131 | "packagetype": project.get("packagetype") or "", |
133 | 132 | "python_version": project.get("python_version") or "", |
| 133 | + |
| 134 | + "yanked": False |
| 135 | + "yanked_reason": "" |
| 136 | + "sha256_metadata": "" |
134 | 137 | } |
135 | 138 |
|
136 | 139 |
|
@@ -209,10 +212,6 @@ def artifact_to_python_content_data(filename, artifact, domain=None): |
209 | 212 | data["filename"] = filename |
210 | 213 | data["pulp_domain"] = domain or artifact.pulp_domain |
211 | 214 | data["_pulp_domain"] = data["pulp_domain"] |
212 | | - # todo: how to get these / should they be here? |
213 | | - # data["yanked"] = False |
214 | | - # data["yanked_reason"] = "" |
215 | | - # data["sha256_metadata"] = "" |
216 | 215 | return data |
217 | 216 |
|
218 | 217 |
|
@@ -335,7 +334,6 @@ def python_content_to_info(content): |
335 | 334 | "platform": content.platform or "", |
336 | 335 | "requires_dist": json_to_dict(content.requires_dist) or None, |
337 | 336 | "classifiers": json_to_dict(content.classifiers) or None, |
338 | | - # todo yanked |
339 | 337 | "yanked": False, # These are no longer used on PyPI, but are still present |
340 | 338 | "yanked_reason": None, |
341 | 339 | # New core metadata (Version 2.1, 2.2, 2.4) |
|
0 commit comments