pulp-python 3.27.3__py3-none-any.whl → 3.27.4__py3-none-any.whl
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/app/__init__.py +1 -1
- pulp_python/app/pypi/views.py +12 -12
- pulp_python/app/utils.py +12 -8
- pulp_python/tests/functional/api/test_domains.py +8 -2
- {pulp_python-3.27.3.dist-info → pulp_python-3.27.4.dist-info}/METADATA +1 -1
- {pulp_python-3.27.3.dist-info → pulp_python-3.27.4.dist-info}/RECORD +10 -10
- {pulp_python-3.27.3.dist-info → pulp_python-3.27.4.dist-info}/WHEEL +0 -0
- {pulp_python-3.27.3.dist-info → pulp_python-3.27.4.dist-info}/entry_points.txt +0 -0
- {pulp_python-3.27.3.dist-info → pulp_python-3.27.4.dist-info}/licenses/LICENSE +0 -0
- {pulp_python-3.27.3.dist-info → pulp_python-3.27.4.dist-info}/top_level.txt +0 -0
pulp_python/app/__init__.py
CHANGED
pulp_python/app/pypi/views.py
CHANGED
|
@@ -7,7 +7,7 @@ from urllib.parse import urljoin, urlparse, urlunsplit
|
|
|
7
7
|
from django.contrib.sessions.models import Session
|
|
8
8
|
from django.core.exceptions import ObjectDoesNotExist
|
|
9
9
|
from django.db import transaction
|
|
10
|
-
from django.db.models import OuterRef,
|
|
10
|
+
from django.db.models import Exists, F, FilteredRelation, OuterRef, Q
|
|
11
11
|
from django.db.utils import DatabaseError
|
|
12
12
|
from django.http.response import (
|
|
13
13
|
Http404,
|
|
@@ -26,7 +26,6 @@ from rest_framework.renderers import BrowsableAPIRenderer, JSONRenderer, Templat
|
|
|
26
26
|
from rest_framework.response import Response
|
|
27
27
|
from rest_framework.viewsets import ViewSet
|
|
28
28
|
|
|
29
|
-
from pulpcore.plugin.models import RepositoryContent
|
|
30
29
|
from pulpcore.plugin.tasking import dispatch
|
|
31
30
|
from pulpcore.plugin.util import get_domain, get_url
|
|
32
31
|
from pulpcore.plugin.viewsets import OperationPostponedResponse
|
|
@@ -363,13 +362,16 @@ class SimpleView(PackageUploadMixin, ViewSet):
|
|
|
363
362
|
return redirect(urljoin(self.base_content_url, f"{path}/simple/{normalized}/"))
|
|
364
363
|
if content:
|
|
365
364
|
local_packages = content.filter(name__normalize=normalized)
|
|
366
|
-
repo_added_subquery = RepositoryContent.objects.filter(
|
|
367
|
-
content_id=OuterRef("pk"),
|
|
368
|
-
repository=repo_ver.repository,
|
|
369
|
-
version_removed=None,
|
|
370
|
-
).values("pulp_created")[:1]
|
|
371
365
|
packages = local_packages.annotate(
|
|
372
|
-
|
|
366
|
+
active_membership=FilteredRelation(
|
|
367
|
+
"version_memberships",
|
|
368
|
+
condition=Q(
|
|
369
|
+
version_memberships__repository=repo_ver.repository,
|
|
370
|
+
version_memberships__version_removed=None,
|
|
371
|
+
),
|
|
372
|
+
),
|
|
373
|
+
repo_added_time=F("active_membership__pulp_created"),
|
|
374
|
+
has_provenance=Exists(PackageProvenance.objects.filter(package_id=OuterRef("pk"))),
|
|
373
375
|
).values(
|
|
374
376
|
"filename",
|
|
375
377
|
"sha256",
|
|
@@ -378,9 +380,7 @@ class SimpleView(PackageUploadMixin, ViewSet):
|
|
|
378
380
|
"size",
|
|
379
381
|
"repo_added_time",
|
|
380
382
|
"version",
|
|
381
|
-
|
|
382
|
-
provenances = PackageProvenance.objects.filter(package__in=local_packages).values_list(
|
|
383
|
-
"package__filename", flat=True
|
|
383
|
+
"has_provenance",
|
|
384
384
|
)
|
|
385
385
|
local_releases = {
|
|
386
386
|
p["filename"]: {
|
|
@@ -389,7 +389,7 @@ class SimpleView(PackageUploadMixin, ViewSet):
|
|
|
389
389
|
"upload_time": p["repo_added_time"],
|
|
390
390
|
"provenance": (
|
|
391
391
|
self.get_provenance_url(normalized, p["version"], p["filename"])
|
|
392
|
-
if p["
|
|
392
|
+
if p["has_provenance"]
|
|
393
393
|
else None
|
|
394
394
|
),
|
|
395
395
|
}
|
pulp_python/app/utils.py
CHANGED
|
@@ -11,7 +11,7 @@ from datetime import timezone
|
|
|
11
11
|
import pkginfo
|
|
12
12
|
from aiohttp.client_exceptions import ClientError
|
|
13
13
|
from django.conf import settings
|
|
14
|
-
from django.db.models import
|
|
14
|
+
from django.db.models import F, FilteredRelation, Q
|
|
15
15
|
from django.db.utils import IntegrityError
|
|
16
16
|
from jinja2 import Template
|
|
17
17
|
from packaging.requirements import Requirement
|
|
@@ -20,7 +20,7 @@ from packaging.version import InvalidVersion, parse
|
|
|
20
20
|
from pypi_simple import ACCEPT_JSON_PREFERRED, ProjectPage
|
|
21
21
|
|
|
22
22
|
from pulpcore.plugin.exceptions import TimeoutException
|
|
23
|
-
from pulpcore.plugin.models import Artifact, Remote
|
|
23
|
+
from pulpcore.plugin.models import Artifact, Remote
|
|
24
24
|
from pulpcore.plugin.util import get_domain
|
|
25
25
|
|
|
26
26
|
log = logging.getLogger(__name__)
|
|
@@ -375,12 +375,16 @@ def python_content_to_json(
|
|
|
375
375
|
Returns None if version is specified but not found within content_query
|
|
376
376
|
"""
|
|
377
377
|
if repository_version:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
378
|
+
content_query = content_query.annotate(
|
|
379
|
+
active_membership=FilteredRelation(
|
|
380
|
+
"version_memberships",
|
|
381
|
+
condition=Q(
|
|
382
|
+
version_memberships__repository=repository_version.repository,
|
|
383
|
+
version_memberships__version_removed=None,
|
|
384
|
+
),
|
|
385
|
+
),
|
|
386
|
+
repo_added_time=F("active_membership__pulp_created"),
|
|
387
|
+
)
|
|
384
388
|
full_metadata = {"last_serial": 0} # For now the serial field isn't supported by Pulp
|
|
385
389
|
latest_content = latest_content_version(content_query, version)
|
|
386
390
|
if not latest_content:
|
|
@@ -174,7 +174,10 @@ def test_domain_content_replication(
|
|
|
174
174
|
pulpcore_bindings.UpstreamPulpsApi, upstream_pulp_body, pulp_domain=replica_domain.name
|
|
175
175
|
)
|
|
176
176
|
# Run the replicate task and assert that all tasks successfully complete.
|
|
177
|
-
response = pulpcore_bindings.UpstreamPulpsApi.replicate(
|
|
177
|
+
response = pulpcore_bindings.UpstreamPulpsApi.replicate(
|
|
178
|
+
upstream_pulp.pulp_href,
|
|
179
|
+
upstream_pulp_replicate=pulpcore_bindings.module.UpstreamPulpReplicate(),
|
|
180
|
+
)
|
|
178
181
|
monitor_task_group(response.task_group)
|
|
179
182
|
|
|
180
183
|
counts = {}
|
|
@@ -198,7 +201,10 @@ def test_domain_content_replication(
|
|
|
198
201
|
body = {"remote": remote.pulp_href}
|
|
199
202
|
monitor_task(python_bindings.RepositoriesPythonApi.sync(repo.pulp_href, body).task)
|
|
200
203
|
|
|
201
|
-
response = pulpcore_bindings.UpstreamPulpsApi.replicate(
|
|
204
|
+
response = pulpcore_bindings.UpstreamPulpsApi.replicate(
|
|
205
|
+
upstream_pulp.pulp_href,
|
|
206
|
+
upstream_pulp_replicate=pulpcore_bindings.module.UpstreamPulpReplicate(),
|
|
207
|
+
)
|
|
202
208
|
monitor_task_group(response.task_group)
|
|
203
209
|
|
|
204
210
|
response = python_bindings.ContentPackagesApi.list(pulp_domain=replica_domain.name)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
pulp_python/__init__.py,sha256=GIuTLoBTc-07dSLJUh8xrZPRz8x-jJ61pfR0J1IjnzI,65
|
|
2
2
|
pulp_python/pytest_plugin.py,sha256=LNnLjOkeEu2X4gJi614bHVmbsHyEwooHYIeecr96Qy4,8606
|
|
3
|
-
pulp_python/app/__init__.py,sha256=
|
|
3
|
+
pulp_python/app/__init__.py,sha256=xNk7l82avmUWcrdLtV6cOS0t-VdrgsdNhx1ecTqdVDs,2490
|
|
4
4
|
pulp_python/app/global_access_conditions.py,sha256=MZJtyoVsr-4hRaty6mKDqh3caOHd5UKJjEWLV2crOLs,1080
|
|
5
5
|
pulp_python/app/modelresource.py,sha256=4SFAdqk6lozi_cZz4uqDIqhqPAZF-7l5jJwPn-xGZFs,1249
|
|
6
6
|
pulp_python/app/models.py,sha256=VVyr8LjAtHeHvY6klFeokwHNnY90qUuMchalm-2Gtjk,14056
|
|
@@ -9,7 +9,7 @@ pulp_python/app/replica.py,sha256=qiWRP7tM_v4yP_XLIQfumfGolru-Jt6ZA0KVb-9g2cA,18
|
|
|
9
9
|
pulp_python/app/serializers.py,sha256=8RpEeRSCLLD5rMd-Pz8fTXCglYmwDUWZNySGh6P3JuA,28669
|
|
10
10
|
pulp_python/app/settings.py,sha256=HXJK3rr0LVTOv1xBS5cZvVtz6j4SvFZl0PH3sLTcu2w,227
|
|
11
11
|
pulp_python/app/urls.py,sha256=NuNnyGc0lqa2HPtMpCpqJlMA0Hi4htOtZO_i8YPCc3k,1328
|
|
12
|
-
pulp_python/app/utils.py,sha256=
|
|
12
|
+
pulp_python/app/utils.py,sha256=aFBd0llndGiBb6VlvoOvGkD3G3ciWyQierykpqxue_8,27386
|
|
13
13
|
pulp_python/app/viewsets.py,sha256=R0vJSI-G9WBvaVPXdtBgTTlvddN_MFwoRUtWFwqBsaQ,28440
|
|
14
14
|
pulp_python/app/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
pulp_python/app/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -37,7 +37,7 @@ pulp_python/app/migrations/0019_create_missing_metadata_artifacts.py,sha256=glHe
|
|
|
37
37
|
pulp_python/app/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
pulp_python/app/pypi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
pulp_python/app/pypi/serializers.py,sha256=rE0Cci2IMg4NbNWlVdo-8zPaJCAUq2Re57q_T3jMt0Y,5030
|
|
40
|
-
pulp_python/app/pypi/views.py,sha256=
|
|
40
|
+
pulp_python/app/pypi/views.py,sha256=CmYBgrXBBSNcF0FSFWvOILJrexOUvH2M2FPO-Jiea6c,21547
|
|
41
41
|
pulp_python/app/tasks/__init__.py,sha256=lTFpVvpDKbqv9RC0b2RYU8Bo6svDjrA-djt16pADFr8,284
|
|
42
42
|
pulp_python/app/tasks/publish.py,sha256=EMAfOZH8EFB9A-rzuxjrQG5FnvSXBVGT7dHQGCAUtrM,4334
|
|
43
43
|
pulp_python/app/tasks/repair.py,sha256=5InzdbjW8y3AC4Vj2PsNLm3wGGTr8D3LcfPw_WA2Fks,12257
|
|
@@ -58,7 +58,7 @@ pulp_python/tests/functional/api/test_consume_content.py,sha256=-7b6KOrIT3NLSUaf
|
|
|
58
58
|
pulp_python/tests/functional/api/test_crud_content_unit.py,sha256=Pwjv3ytSfqBuoemuhJNIOEWdwzurPVN1XO3kDRlLFqY,8757
|
|
59
59
|
pulp_python/tests/functional/api/test_crud_publications.py,sha256=3cuSDC9C9M1opt0lh5ObGj8t7gq5jUW-RWj6MrA4Teo,5647
|
|
60
60
|
pulp_python/tests/functional/api/test_crud_remotes.py,sha256=clFFhgG5udyKzWOLwxpmwjhiVz8r5JEPAQHkztcAf9w,5812
|
|
61
|
-
pulp_python/tests/functional/api/test_domains.py,sha256=
|
|
61
|
+
pulp_python/tests/functional/api/test_domains.py,sha256=uEA7dIBXaXah3WQ6g6xSIjdXOR_hrsQnSFrfbdtz8bg,10421
|
|
62
62
|
pulp_python/tests/functional/api/test_download_content.py,sha256=5IuaHXyLakPkjm5sLTxtTl7Dq0yl7N36HpObnIa0Sks,4950
|
|
63
63
|
pulp_python/tests/functional/api/test_export_import.py,sha256=rHns9wdaeP-vtfW_qoGHU9EVuJ4YuWE0-rjl_8otAgU,4530
|
|
64
64
|
pulp_python/tests/functional/api/test_full_mirror.py,sha256=eU5HzgBBFOnX1q4m8ELx-t-I3U4TWXL-LNrlc2BcWVc,12045
|
|
@@ -73,9 +73,9 @@ pulp_python/tests/functional/assets/shelf-reader-0.1.tar.gz.publish.attestation,
|
|
|
73
73
|
pulp_python/tests/functional/assets/shelf_reader-0.1-py2-none-any.whl.publish.attestation,sha256=muTQ8dqYSSdx76DlaPjB1REcNIS-aak-Na0TkASxu8M,10426
|
|
74
74
|
pulp_python/tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
75
|
pulp_python/tests/unit/test_models.py,sha256=TBI0yKsrdbnJSPeBFfxSqhXK7zaNvR6qg5JehGH3Pds,229
|
|
76
|
-
pulp_python-3.27.
|
|
77
|
-
pulp_python-3.27.
|
|
78
|
-
pulp_python-3.27.
|
|
79
|
-
pulp_python-3.27.
|
|
80
|
-
pulp_python-3.27.
|
|
81
|
-
pulp_python-3.27.
|
|
76
|
+
pulp_python-3.27.4.dist-info/licenses/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
|
|
77
|
+
pulp_python-3.27.4.dist-info/METADATA,sha256=gQHHH7ShgKisSIlMoitIzsCdH4OGpnCwpNd--NlA_JU,1743
|
|
78
|
+
pulp_python-3.27.4.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
79
|
+
pulp_python-3.27.4.dist-info/entry_points.txt,sha256=HvqLEXjw_dS5jqAwnE5JiRZFE6f-y5SRtitKLPml2To,115
|
|
80
|
+
pulp_python-3.27.4.dist-info/top_level.txt,sha256=X0hXgXc_bpbiKqVrkt8jD5_QEiQviKbHDwveQcOcJjo,12
|
|
81
|
+
pulp_python-3.27.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|