pulp-python 3.36.2__tar.gz → 3.36.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pulp_python-3.36.2 → pulp_python-3.36.4}/CHANGES.md +18 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/PKG-INFO +1 -1
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/__init__.py +1 -1
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/pypi/feeds.py +24 -2
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/pypi/views.py +1 -1
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/tasks/publish.py +5 -2
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/utils.py +1 -1
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_pypi_feeds.py +74 -6
- pulp_python-3.36.4/pulp_python/tests/unit/test_feeds.py +52 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python.egg-info/PKG-INFO +1 -1
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python.egg-info/SOURCES.txt +1 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pyproject.toml +2 -2
- {pulp_python-3.36.2 → pulp_python-3.36.4}/unittest_requirements.txt +1 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/COMMITMENT +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/COPYRIGHT +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/LICENSE +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/MANIFEST.in +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/README.md +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/functest_requirements.txt +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/cache.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/exceptions.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/global_access_conditions.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/management/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/management/commands/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/management/commands/repair-python-metadata.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0001_initial.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0001_squashed_0010_update_json_field.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0002_pythonpackagecontent_python_version.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0003_new_sync_filters.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0004_DATA_swap_distribution_model.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0005_pythonpackagecontent_sha256.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0006_pythonrepository_autopublish.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0007_pythonpackagecontent_mv-2-1.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0008_pythonpackagecontent_unique_sha256.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0009_pythondistribution_allow_uploads.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0010_update_json_field.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0011_alter_pythondistribution_distribution_ptr_and_more.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0012_add_domain.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0013_add_rbac_permissions.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0014_pythonpackagecontent_dynamic_and_more.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0015_alter_pythonpackagecontent_options.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0016_pythonpackagecontent_metadata_sha256.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0017_pythonpackagecontent_size.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0018_packageprovenance.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0019_create_missing_metadata_artifacts.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0020_pythonpackagecontent_name_normalized.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0021_pythonrepository_upload_duplicate_filenames.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0022_pythonblocklistentry.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0023_packageyank.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0024_pythonrepository_error_on_reject.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/modelresource.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/models.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/provenance.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/pypi/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/pypi/serializers.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/replica.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/serializers.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/settings.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/tasks/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/tasks/repair.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/tasks/sync.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/tasks/upload.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/tasks/vulnerability_report.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/tasks/yank.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/urls.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/viewsets.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/webserver_snippets/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/webserver_snippets/apache.conf +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/webserver_snippets/nginx.conf +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/pytest_plugin.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_attestations.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_auto_publish.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_blocklist.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_consume_content.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_crud_content_unit.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_crud_publications.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_crud_remotes.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_domains.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_download_content.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_export_import.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_full_mirror.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_pypi_apis.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_pypi_simple_api.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_rbac.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_repair.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_simple_cache.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_sync.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_upload.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_version_specifier_filter.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_vulnerability_report.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_yank.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/constants.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/utils.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/unit/__init__.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/unit/test_models.py +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python.egg-info/dependency_links.txt +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python.egg-info/entry_points.txt +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python.egg-info/requires.txt +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python.egg-info/top_level.txt +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/setup.cfg +0 -0
- {pulp_python-3.36.2 → pulp_python-3.36.4}/test_requirements.txt +0 -0
|
@@ -8,6 +8,24 @@
|
|
|
8
8
|
|
|
9
9
|
[//]: # (towncrier release notes start)
|
|
10
10
|
|
|
11
|
+
## 3.36.4 (2026-10-08) {: #3.36.4 }
|
|
12
|
+
|
|
13
|
+
#### Bugfixes {: #3.36.4-bugfix }
|
|
14
|
+
|
|
15
|
+
- Fixed quoting mistake in simple html index pages that can lead to a possible XSS attack given a carefully crafted package name. CVE-2026-103871
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 3.36.3 (2026-10-07) {: #3.36.3 }
|
|
20
|
+
|
|
21
|
+
#### Bugfixes {: #3.36.3-bugfix }
|
|
22
|
+
|
|
23
|
+
- RSS feed GUIDs are now stable when additional platform wheels arrive for the same release. GUIDs only change when a new PEP 427 build tag is introduced, preventing feed readers from showing duplicate entries for multi-architecture builds.
|
|
24
|
+
[#1381](https://github.com/pulp/pulp_python/issues/1381)
|
|
25
|
+
- Fixed the Integrity API evaluating the entire repository's content query before filtering.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
11
29
|
## 3.36.2 (2026-09-10) {: #3.36.2 }
|
|
12
30
|
|
|
13
31
|
#### Bugfixes {: #3.36.2-bugfix }
|
|
@@ -2,6 +2,7 @@ import re
|
|
|
2
2
|
from email.utils import getaddresses
|
|
3
3
|
from urllib.parse import urljoin
|
|
4
4
|
|
|
5
|
+
from django.contrib.postgres.aggregates import ArrayAgg
|
|
5
6
|
from django.db.models import F, FilteredRelation, Max, Min, Q
|
|
6
7
|
from django.http.response import HttpResponse, HttpResponseNotFound
|
|
7
8
|
from django.utils.decorators import method_decorator
|
|
@@ -15,6 +16,8 @@ from rest_framework.viewsets import ViewSet
|
|
|
15
16
|
from pulp_python.app.cache import PythonApiCache, find_base_path_cached
|
|
16
17
|
from pulp_python.app.pypi.views import PyPIMixin, _etag_func
|
|
17
18
|
|
|
19
|
+
_WHEEL_BUILD_TAG_RE = re.compile(r"^.+?-.+?-(?P<build>\d[^-]*?)-[^-]+-[^-]+-[^-]+\.whl$")
|
|
20
|
+
|
|
18
21
|
UPDATES_LIMIT = 500
|
|
19
22
|
PACKAGES_LIMIT = 40
|
|
20
23
|
PROJECT_RELEASES_LIMIT = 40
|
|
@@ -70,6 +73,7 @@ def iter_releases(content, repo_ver, name_normalized=None, limit=UPDATES_LIMIT):
|
|
|
70
73
|
name=Min("name"),
|
|
71
74
|
summary=Min("summary"),
|
|
72
75
|
author_email=Min("author_email"),
|
|
76
|
+
filenames=ArrayAgg("filename", distinct=True, ordering="filename"),
|
|
73
77
|
)
|
|
74
78
|
.order_by("-added_at", "name_normalized", "version")[:limit]
|
|
75
79
|
)
|
|
@@ -91,14 +95,30 @@ def iter_projects(content, repo_ver, limit=PACKAGES_LIMIT):
|
|
|
91
95
|
)
|
|
92
96
|
|
|
93
97
|
|
|
94
|
-
def
|
|
98
|
+
def _build_tag_fragment(filenames):
|
|
99
|
+
"""Extract sorted distinct build tags from wheel filenames for GUID stability.
|
|
100
|
+
|
|
101
|
+
Returns a fragment like `#builds=1,2` when build tags are present,
|
|
102
|
+
or an empty string for sdists and wheels without build tags.
|
|
103
|
+
"""
|
|
104
|
+
tags = set()
|
|
105
|
+
for fn in filenames or ():
|
|
106
|
+
m = _WHEEL_BUILD_TAG_RE.match(fn)
|
|
107
|
+
if m:
|
|
108
|
+
tags.add(m.group("build"))
|
|
109
|
+
if not tags:
|
|
110
|
+
return ""
|
|
111
|
+
return "#builds=" + ",".join(sorted(tags))
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def _item_dict(title, link, description, author_email, pubdate, filenames=()):
|
|
95
115
|
return {
|
|
96
116
|
"title": sanitize_xml_text(title),
|
|
97
117
|
"link": link,
|
|
98
118
|
"description": sanitize_xml_text(description),
|
|
99
119
|
"author_email": format_author(author_email),
|
|
100
120
|
"pubdate": pubdate,
|
|
101
|
-
"unique_id": f"{link}
|
|
121
|
+
"unique_id": f"{link}{_build_tag_fragment(filenames)}",
|
|
102
122
|
}
|
|
103
123
|
|
|
104
124
|
|
|
@@ -139,6 +159,7 @@ def render_updates_feed(index_url, releases):
|
|
|
139
159
|
description=release["summary"],
|
|
140
160
|
author_email=release["author_email"],
|
|
141
161
|
pubdate=release["added_at"],
|
|
162
|
+
filenames=release.get("filenames", ()),
|
|
142
163
|
)
|
|
143
164
|
for release in releases
|
|
144
165
|
]
|
|
@@ -178,6 +199,7 @@ def render_project_releases_feed(index_url, project_name, releases):
|
|
|
178
199
|
description=release["summary"],
|
|
179
200
|
author_email=release["author_email"],
|
|
180
201
|
pubdate=release["added_at"],
|
|
202
|
+
filenames=release.get("filenames", ()),
|
|
181
203
|
)
|
|
182
204
|
for release in releases
|
|
183
205
|
]
|
|
@@ -621,7 +621,7 @@ class ProvenanceView(PyPIMixin, ViewSet):
|
|
|
621
621
|
def retrieve(self, request, path, package, version, filename):
|
|
622
622
|
"""Gets the provenance for a package."""
|
|
623
623
|
repo_ver, content = self.get_rvc()
|
|
624
|
-
if content:
|
|
624
|
+
if content is not None:
|
|
625
625
|
package_content = content.filter(
|
|
626
626
|
name_normalized=package, version=version, filename=filename
|
|
627
627
|
).first()
|
|
@@ -56,11 +56,14 @@ def write_simple_api(publication):
|
|
|
56
56
|
domain = get_domain()
|
|
57
57
|
simple_dir = "simple/"
|
|
58
58
|
os.mkdir(simple_dir)
|
|
59
|
+
# Secondary ORDER BY makes DISTINCT ON pick a stable display name when
|
|
60
|
+
# metadata names differ but canonicalize to the same name_normalized
|
|
61
|
+
# (e.g. msg-parser vs msg_parser).
|
|
59
62
|
project_names = (
|
|
60
63
|
python_models.PythonPackageContent.objects.filter(
|
|
61
64
|
pk__in=publication.repository_version.content, _pulp_domain=domain
|
|
62
65
|
)
|
|
63
|
-
.order_by("name_normalized")
|
|
66
|
+
.order_by("name_normalized", "name")
|
|
64
67
|
.values_list("name", flat=True)
|
|
65
68
|
.distinct("name_normalized")
|
|
66
69
|
)
|
|
@@ -81,7 +84,7 @@ def write_simple_api(publication):
|
|
|
81
84
|
packages = python_models.PythonPackageContent.objects.filter(
|
|
82
85
|
pk__in=publication.repository_version.content, _pulp_domain=domain
|
|
83
86
|
)
|
|
84
|
-
releases = packages.order_by("name_normalized").values("name", "filename", "sha256")
|
|
87
|
+
releases = packages.order_by("name_normalized", "filename").values("name", "filename", "sha256")
|
|
85
88
|
|
|
86
89
|
ind = 0
|
|
87
90
|
current_name = canonicalize_name(project_names[ind])
|
|
@@ -556,7 +556,7 @@ def python_content_to_download_info(content, base_path, domain=None):
|
|
|
556
556
|
|
|
557
557
|
def write_simple_index(project_names):
|
|
558
558
|
"""Writes the simple index."""
|
|
559
|
-
simple = Template(simple_index_template)
|
|
559
|
+
simple = Template(simple_index_template, autoescape=True)
|
|
560
560
|
context = {
|
|
561
561
|
"SIMPLE_API_VERSION": SIMPLE_API_VERSION,
|
|
562
562
|
"projects": ((x, canonicalize_name(x)) for x in project_names),
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_pypi_feeds.py
RENAMED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import io
|
|
2
|
+
import zipfile
|
|
1
3
|
from urllib.parse import urljoin, urlsplit
|
|
2
4
|
from xml.etree import ElementTree as ET
|
|
3
5
|
|
|
@@ -20,6 +22,23 @@ TWINE_500_WHEEL_FILENAME = "twine-5.0.0-py3-none-any.whl"
|
|
|
20
22
|
TWINE_500_WHEEL_URL = urljoin(urljoin(PYTHON_FIXTURES_URL, "packages/"), TWINE_500_WHEEL_FILENAME)
|
|
21
23
|
|
|
22
24
|
|
|
25
|
+
def _make_build_tagged_wheel(tmp_path, base_wheel_bytes, build_tag, platform="linux_x86_64"):
|
|
26
|
+
"""Repackage a wheel with a PEP 427 build tag and platform in the filename."""
|
|
27
|
+
filename = f"shelf_reader-0.1-{build_tag}-py2-none-{platform}.whl"
|
|
28
|
+
path = tmp_path / filename
|
|
29
|
+
with zipfile.ZipFile(io.BytesIO(base_wheel_bytes)) as src, zipfile.ZipFile(path, "w") as dst:
|
|
30
|
+
for item in src.infolist():
|
|
31
|
+
dst.writestr(item, src.read(item.filename))
|
|
32
|
+
# Pulp deduplicates content by sha256, so identical zip bytes with
|
|
33
|
+
# different filenames map to the same content unit. Inject a unique
|
|
34
|
+
# marker so each (build_tag, platform) combination gets its own sha256.
|
|
35
|
+
dst.writestr(
|
|
36
|
+
"shelf_reader/.build_marker",
|
|
37
|
+
f"build={build_tag} platform={platform}\n",
|
|
38
|
+
)
|
|
39
|
+
return str(path), filename
|
|
40
|
+
|
|
41
|
+
|
|
23
42
|
def _index_url(distro, bindings_cfg):
|
|
24
43
|
"""Build the index URL using the same origin the API client uses."""
|
|
25
44
|
path = urlsplit(distro.base_url).path
|
|
@@ -125,7 +144,7 @@ def test_pinned_version_feeds(
|
|
|
125
144
|
|
|
126
145
|
item = _parse_items(_get_feed(distro, "rss/updates.xml", bindings_cfg))[0]
|
|
127
146
|
assert item.findtext("link").endswith("pypi/shelf-reader/0.1/json")
|
|
128
|
-
assert "pypi/shelf-reader/0.1/json
|
|
147
|
+
assert item.findtext("guid").endswith("pypi/shelf-reader/0.1/json")
|
|
129
148
|
|
|
130
149
|
python_content_factory(TWINE_WHEEL_FILENAME, url=TWINE_WHEEL_URL, repository=repo)
|
|
131
150
|
update_titles = _titles(_parse_items(_get_feed(distro, "rss/updates.xml", bindings_cfg)))
|
|
@@ -133,10 +152,10 @@ def test_pinned_version_feeds(
|
|
|
133
152
|
|
|
134
153
|
|
|
135
154
|
@pytest.mark.parallel
|
|
136
|
-
def
|
|
155
|
+
def test_guid_stable_when_adding_file_without_new_build_tag(
|
|
137
156
|
bindings_cfg, python_content_factory, python_empty_repo_distro
|
|
138
157
|
):
|
|
139
|
-
"""Adding a
|
|
158
|
+
"""Adding a file without a new build tag keeps the GUID stable but updates pubDate."""
|
|
140
159
|
repo, distro = python_empty_repo_distro()
|
|
141
160
|
|
|
142
161
|
python_content_factory(PYTHON_EGG_FILENAME, url=PYTHON_EGG_URL, repository=repo)
|
|
@@ -145,7 +164,7 @@ def test_new_file_for_existing_version_updates_guid(
|
|
|
145
164
|
assert len(items) == 1
|
|
146
165
|
first_guid = items[0].findtext("guid")
|
|
147
166
|
first_date = items[0].findtext("pubDate")
|
|
148
|
-
assert "pypi/shelf-reader/0.1/json"
|
|
167
|
+
assert first_guid.endswith("pypi/shelf-reader/0.1/json")
|
|
149
168
|
|
|
150
169
|
python_content_factory(PYTHON_WHEEL_FILENAME, url=PYTHON_WHEEL_URL, repository=repo)
|
|
151
170
|
|
|
@@ -154,11 +173,60 @@ def test_new_file_for_existing_version_updates_guid(
|
|
|
154
173
|
second_guid = items[0].findtext("guid")
|
|
155
174
|
second_date = items[0].findtext("pubDate")
|
|
156
175
|
|
|
157
|
-
assert second_guid
|
|
176
|
+
assert second_guid == first_guid
|
|
158
177
|
assert second_date >= first_date
|
|
159
178
|
|
|
160
179
|
release_items = _parse_items(
|
|
161
180
|
_get_feed(distro, "rss/project/shelf-reader/releases.xml", bindings_cfg)
|
|
162
181
|
)
|
|
163
182
|
assert len(release_items) == 1
|
|
164
|
-
assert release_items[0].findtext("guid") ==
|
|
183
|
+
assert release_items[0].findtext("guid") == first_guid
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
@pytest.mark.parallel
|
|
187
|
+
def test_new_build_tag_changes_guid(
|
|
188
|
+
tmp_path, bindings_cfg, python_bindings, monitor_task, python_empty_repo_distro
|
|
189
|
+
):
|
|
190
|
+
"""A new build tag produces a new GUID; a new arch for the same tag does not."""
|
|
191
|
+
repo, distro = python_empty_repo_distro()
|
|
192
|
+
|
|
193
|
+
base_wheel = requests.get(PYTHON_WHEEL_URL, timeout=30).content
|
|
194
|
+
|
|
195
|
+
# Upload build tag 1 (x86_64)
|
|
196
|
+
path_1, name_1 = _make_build_tagged_wheel(tmp_path, base_wheel, "1")
|
|
197
|
+
task = python_bindings.ContentPackagesApi.create(
|
|
198
|
+
relative_path=name_1, file=path_1, repository=repo.pulp_href
|
|
199
|
+
).task
|
|
200
|
+
monitor_task(task)
|
|
201
|
+
|
|
202
|
+
items = _parse_items(_get_feed(distro, "rss/updates.xml", bindings_cfg))
|
|
203
|
+
assert len(items) == 1
|
|
204
|
+
guid_after_build1 = items[0].findtext("guid")
|
|
205
|
+
assert "#builds=1" in guid_after_build1
|
|
206
|
+
|
|
207
|
+
# Upload build tag 2 (x86_64) -- different build, GUID must change
|
|
208
|
+
path_2, name_2 = _make_build_tagged_wheel(tmp_path, base_wheel, "2")
|
|
209
|
+
task = python_bindings.ContentPackagesApi.create(
|
|
210
|
+
relative_path=name_2, file=path_2, repository=repo.pulp_href
|
|
211
|
+
).task
|
|
212
|
+
monitor_task(task)
|
|
213
|
+
|
|
214
|
+
items = _parse_items(_get_feed(distro, "rss/updates.xml", bindings_cfg))
|
|
215
|
+
assert len(items) == 1
|
|
216
|
+
guid_after_build2 = items[0].findtext("guid")
|
|
217
|
+
assert guid_after_build2 != guid_after_build1
|
|
218
|
+
assert "#builds=1,2" in guid_after_build2
|
|
219
|
+
|
|
220
|
+
# Upload build tag 2 again with a different arch -- same build tag, GUID must stay
|
|
221
|
+
path_2_arm, name_2_arm = _make_build_tagged_wheel(
|
|
222
|
+
tmp_path, base_wheel, "2", platform="linux_aarch64"
|
|
223
|
+
)
|
|
224
|
+
task = python_bindings.ContentPackagesApi.create(
|
|
225
|
+
relative_path=name_2_arm, file=path_2_arm, repository=repo.pulp_href
|
|
226
|
+
).task
|
|
227
|
+
monitor_task(task)
|
|
228
|
+
|
|
229
|
+
items = _parse_items(_get_feed(distro, "rss/updates.xml", bindings_cfg))
|
|
230
|
+
assert len(items) == 1
|
|
231
|
+
guid_after_build2_arm = items[0].findtext("guid")
|
|
232
|
+
assert guid_after_build2_arm == guid_after_build2
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from pulp_python.app.pypi.feeds import _build_tag_fragment
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@pytest.mark.parametrize(
|
|
7
|
+
"filenames, expected",
|
|
8
|
+
[
|
|
9
|
+
([], ""),
|
|
10
|
+
(["shelf-reader-0.1.tar.gz"], ""),
|
|
11
|
+
(["shelf_reader-0.1-py2-none-any.whl"], ""),
|
|
12
|
+
(
|
|
13
|
+
["docling_parse-7.19.1-1-cp312-cp312-linux_x86_64.whl"],
|
|
14
|
+
"#builds=1",
|
|
15
|
+
),
|
|
16
|
+
(
|
|
17
|
+
[
|
|
18
|
+
"docling_parse-7.19.1-1-cp312-cp312-linux_x86_64.whl",
|
|
19
|
+
"docling_parse-7.19.1-1-cp312-cp312-linux_aarch64.whl",
|
|
20
|
+
"docling_parse-7.19.1-1-cp312-cp312-linux_ppc64le.whl",
|
|
21
|
+
],
|
|
22
|
+
"#builds=1",
|
|
23
|
+
),
|
|
24
|
+
(
|
|
25
|
+
[
|
|
26
|
+
"ctranslate2-4.5.0-1-cp312-cp312-linux_x86_64.whl",
|
|
27
|
+
"ctranslate2-4.5.0-2-cp312-cp312-linux_x86_64.whl",
|
|
28
|
+
],
|
|
29
|
+
"#builds=1,2",
|
|
30
|
+
),
|
|
31
|
+
(
|
|
32
|
+
[
|
|
33
|
+
"foo-1.0-1-cp312-cp312-linux_x86_64.whl",
|
|
34
|
+
"foo-1.0.tar.gz",
|
|
35
|
+
],
|
|
36
|
+
"#builds=1",
|
|
37
|
+
),
|
|
38
|
+
(None, ""),
|
|
39
|
+
],
|
|
40
|
+
ids=[
|
|
41
|
+
"empty",
|
|
42
|
+
"sdist-only",
|
|
43
|
+
"wheel-no-build-tag",
|
|
44
|
+
"single-build-tag",
|
|
45
|
+
"same-build-tag-multi-arch",
|
|
46
|
+
"two-build-tags",
|
|
47
|
+
"mixed-sdist-and-tagged-wheel",
|
|
48
|
+
"none",
|
|
49
|
+
],
|
|
50
|
+
)
|
|
51
|
+
def test_build_tag_fragment(filenames, expected):
|
|
52
|
+
assert _build_tag_fragment(filenames) == expected
|
|
@@ -100,4 +100,5 @@ pulp_python/tests/functional/api/test_version_specifier_filter.py
|
|
|
100
100
|
pulp_python/tests/functional/api/test_vulnerability_report.py
|
|
101
101
|
pulp_python/tests/functional/api/test_yank.py
|
|
102
102
|
pulp_python/tests/unit/__init__.py
|
|
103
|
+
pulp_python/tests/unit/test_feeds.py
|
|
103
104
|
pulp_python/tests/unit/test_models.py
|
|
@@ -7,7 +7,7 @@ build-backend = 'setuptools.build_meta'
|
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "pulp-python"
|
|
10
|
-
version = "3.36.
|
|
10
|
+
version = "3.36.4"
|
|
11
11
|
description = "pulp-python plugin for the Pulp Project"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
authors = [
|
|
@@ -79,7 +79,7 @@ ignore = [
|
|
|
79
79
|
[tool.bumpversion]
|
|
80
80
|
# This section is managed by the plugin template. Do not edit manually.
|
|
81
81
|
|
|
82
|
-
current_version = "3.36.
|
|
82
|
+
current_version = "3.36.4"
|
|
83
83
|
commit = false
|
|
84
84
|
tag = false
|
|
85
85
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<alpha>0a)?(?P<patch>\\d+)(\\.(?P<release>[a-z]+))?"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0003_new_sync_filters.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0010_update_json_field.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0013_add_rbac_permissions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0018_packageprovenance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/app/migrations/0022_pythonblocklistentry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_attestations.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_auto_publish.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_blocklist.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_consume_content.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_crud_content_unit.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_crud_publications.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_crud_remotes.py
RENAMED
|
File without changes
|
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_download_content.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_export_import.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_full_mirror.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_pypi_apis.py
RENAMED
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_pypi_simple_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pulp_python-3.36.2 → pulp_python-3.36.4}/pulp_python/tests/functional/api/test_simple_cache.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|