Skip to content

Commit 399fd14

Browse files
committed
temp
1 parent 9aeaa21 commit 399fd14

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

pulp_python/app/tasks/publish.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ def write_project_page(name, simple_dir, package_releases, publication):
118118
metadata_relative_path = f"{project_dir}index.html"
119119

120120
with open(metadata_relative_path, "w") as simple_metadata:
121-
# todo?
122121
simple_metadata.write(write_simple_detail(name, package_releases))
123122

124123
project_metadata = models.PublishedMetadata.create_from_file(

pulp_python/app/utils.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from pulpcore.plugin.models import Remote
1313

1414

15-
# todo: why upper case?
1615
PYPI_LAST_SERIAL = "X-PYPI-LAST-SERIAL"
1716
"""TODO This serial constant is temporary until Python repositories implements serials"""
1817
PYPI_SERIAL_CONSTANT = 1000000000
@@ -42,7 +41,7 @@
4241
<body>
4342
<h1>Links for {{ project_name }}</h1>
4443
{% 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/>
4645
{% endfor %}
4746
</body>
4847
</html>
@@ -131,6 +130,10 @@ def parse_project_metadata(project):
131130
# Release metadata
132131
"packagetype": project.get("packagetype") or "",
133132
"python_version": project.get("python_version") or "",
133+
134+
"yanked": False
135+
"yanked_reason": ""
136+
"sha256_metadata": ""
134137
}
135138

136139

@@ -209,10 +212,6 @@ def artifact_to_python_content_data(filename, artifact, domain=None):
209212
data["filename"] = filename
210213
data["pulp_domain"] = domain or artifact.pulp_domain
211214
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"] = ""
216215
return data
217216

218217

@@ -335,7 +334,6 @@ def python_content_to_info(content):
335334
"platform": content.platform or "",
336335
"requires_dist": json_to_dict(content.requires_dist) or None,
337336
"classifiers": json_to_dict(content.classifiers) or None,
338-
# todo yanked
339337
"yanked": False, # These are no longer used on PyPI, but are still present
340338
"yanked_reason": None,
341339
# New core metadata (Version 2.1, 2.2, 2.4)

0 commit comments

Comments
 (0)