pulp-python 3.27.3__tar.gz → 3.27.5__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.
Files changed (93) hide show
  1. {pulp_python-3.27.3 → pulp_python-3.27.5}/CHANGES.md +19 -0
  2. {pulp_python-3.27.3 → pulp_python-3.27.5}/PKG-INFO +1 -1
  3. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/__init__.py +1 -1
  4. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/pypi/views.py +12 -12
  5. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/utils.py +14 -9
  6. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_domains.py +8 -2
  7. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python.egg-info/PKG-INFO +1 -1
  8. {pulp_python-3.27.3 → pulp_python-3.27.5}/pyproject.toml +2 -2
  9. {pulp_python-3.27.3 → pulp_python-3.27.5}/COMMITMENT +0 -0
  10. {pulp_python-3.27.3 → pulp_python-3.27.5}/COPYRIGHT +0 -0
  11. {pulp_python-3.27.3 → pulp_python-3.27.5}/LICENSE +0 -0
  12. {pulp_python-3.27.3 → pulp_python-3.27.5}/MANIFEST.in +0 -0
  13. {pulp_python-3.27.3 → pulp_python-3.27.5}/README.md +0 -0
  14. {pulp_python-3.27.3 → pulp_python-3.27.5}/functest_requirements.txt +0 -0
  15. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/__init__.py +0 -0
  16. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/global_access_conditions.py +0 -0
  17. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/management/__init__.py +0 -0
  18. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/management/commands/__init__.py +0 -0
  19. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/management/commands/repair-python-metadata.py +0 -0
  20. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0001_initial.py +0 -0
  21. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0001_squashed_0010_update_json_field.py +0 -0
  22. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0002_pythonpackagecontent_python_version.py +0 -0
  23. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0003_new_sync_filters.py +0 -0
  24. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0004_DATA_swap_distribution_model.py +0 -0
  25. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0005_pythonpackagecontent_sha256.py +0 -0
  26. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0006_pythonrepository_autopublish.py +0 -0
  27. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0007_pythonpackagecontent_mv-2-1.py +0 -0
  28. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0008_pythonpackagecontent_unique_sha256.py +0 -0
  29. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0009_pythondistribution_allow_uploads.py +0 -0
  30. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0010_update_json_field.py +0 -0
  31. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0011_alter_pythondistribution_distribution_ptr_and_more.py +0 -0
  32. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0012_add_domain.py +0 -0
  33. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0013_add_rbac_permissions.py +0 -0
  34. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0014_pythonpackagecontent_dynamic_and_more.py +0 -0
  35. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0015_alter_pythonpackagecontent_options.py +0 -0
  36. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0016_pythonpackagecontent_metadata_sha256.py +0 -0
  37. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0017_pythonpackagecontent_size.py +0 -0
  38. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0018_packageprovenance.py +0 -0
  39. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/0019_create_missing_metadata_artifacts.py +0 -0
  40. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/migrations/__init__.py +0 -0
  41. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/modelresource.py +0 -0
  42. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/models.py +0 -0
  43. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/provenance.py +0 -0
  44. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/pypi/__init__.py +0 -0
  45. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/pypi/serializers.py +0 -0
  46. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/replica.py +0 -0
  47. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/serializers.py +0 -0
  48. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/settings.py +0 -0
  49. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/tasks/__init__.py +0 -0
  50. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/tasks/publish.py +0 -0
  51. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/tasks/repair.py +0 -0
  52. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/tasks/sync.py +0 -0
  53. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/tasks/upload.py +0 -0
  54. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/tasks/vulnerability_report.py +0 -0
  55. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/urls.py +0 -0
  56. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/viewsets.py +0 -0
  57. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/webserver_snippets/__init__.py +0 -0
  58. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/webserver_snippets/apache.conf +0 -0
  59. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/app/webserver_snippets/nginx.conf +0 -0
  60. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/pytest_plugin.py +0 -0
  61. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/__init__.py +0 -0
  62. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/__init__.py +0 -0
  63. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/__init__.py +0 -0
  64. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_attestations.py +0 -0
  65. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_auto_publish.py +0 -0
  66. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_consume_content.py +0 -0
  67. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_crud_content_unit.py +0 -0
  68. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_crud_publications.py +0 -0
  69. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_crud_remotes.py +0 -0
  70. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_download_content.py +0 -0
  71. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_export_import.py +0 -0
  72. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_full_mirror.py +0 -0
  73. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_pypi_apis.py +0 -0
  74. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_pypi_simple_api.py +0 -0
  75. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_rbac.py +0 -0
  76. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_repair.py +0 -0
  77. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_sync.py +0 -0
  78. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_upload.py +0 -0
  79. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/api/test_vulnerability_report.py +0 -0
  80. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/assets/shelf-reader-0.1.tar.gz.publish.attestation +0 -0
  81. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/assets/shelf_reader-0.1-py2-none-any.whl.publish.attestation +0 -0
  82. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/constants.py +0 -0
  83. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/functional/utils.py +0 -0
  84. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/unit/__init__.py +0 -0
  85. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python/tests/unit/test_models.py +0 -0
  86. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python.egg-info/SOURCES.txt +0 -0
  87. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python.egg-info/dependency_links.txt +0 -0
  88. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python.egg-info/entry_points.txt +0 -0
  89. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python.egg-info/requires.txt +0 -0
  90. {pulp_python-3.27.3 → pulp_python-3.27.5}/pulp_python.egg-info/top_level.txt +0 -0
  91. {pulp_python-3.27.3 → pulp_python-3.27.5}/setup.cfg +0 -0
  92. {pulp_python-3.27.3 → pulp_python-3.27.5}/test_requirements.txt +0 -0
  93. {pulp_python-3.27.3 → pulp_python-3.27.5}/unittest_requirements.txt +0 -0
@@ -8,6 +8,25 @@
8
8
 
9
9
  [//]: # (towncrier release notes start)
10
10
 
11
+ ## 3.27.5 (2026-06-30) {: #3.27.5 }
12
+
13
+ #### Bugfixes {: #3.27.5-bugfix }
14
+
15
+ - Fixed a bug where the `python_version` field was not parsed correctly when Pulp workers had hyphens in their name.
16
+
17
+ ---
18
+
19
+ ## 3.27.4 (2026-06-05) {: #3.27.4 }
20
+
21
+ #### Bugfixes {: #3.27.4-bugfix }
22
+
23
+ - Optimized `upload_time` lookups in Simple and JSON APIs.
24
+ [#1242](https://github.com/pulp/pulp_python/issues/1242)
25
+ - Optimized `provenance` lookups in Simple API.
26
+ [#1243](https://github.com/pulp/pulp_python/issues/1243)
27
+
28
+ ---
29
+
11
30
  ## 3.27.3 (2026-05-19) {: #3.27.3 }
12
31
 
13
32
  #### Bugfixes {: #3.27.3-bugfix }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pulp-python
3
- Version: 3.27.3
3
+ Version: 3.27.5
4
4
  Summary: pulp-python plugin for the Pulp Project
5
5
  Author-email: Pulp Team <pulp-list@redhat.com>
6
6
  Project-URL: Homepage, https://pulpproject.org
@@ -12,7 +12,7 @@ class PulpPythonPluginAppConfig(PulpPluginAppConfig):
12
12
 
13
13
  name = "pulp_python.app"
14
14
  label = "python"
15
- version = "3.27.3"
15
+ version = "3.27.5"
16
16
  python_package_name = "pulp-python"
17
17
  domain_compatible = True
18
18
 
@@ -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, Subquery
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
- repo_added_time=Subquery(repo_added_subquery)
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["filename"] in provenances
392
+ if p["has_provenance"]
393
393
  else None
394
394
  ),
395
395
  }
@@ -1,6 +1,7 @@
1
1
  import hashlib
2
2
  import json
3
3
  import logging
4
+ import os
4
5
  import re
5
6
  import shutil
6
7
  import tempfile
@@ -11,7 +12,7 @@ from datetime import timezone
11
12
  import pkginfo
12
13
  from aiohttp.client_exceptions import ClientError
13
14
  from django.conf import settings
14
- from django.db.models import OuterRef, Subquery
15
+ from django.db.models import F, FilteredRelation, Q
15
16
  from django.db.utils import IntegrityError
16
17
  from jinja2 import Template
17
18
  from packaging.requirements import Requirement
@@ -20,7 +21,7 @@ from packaging.version import InvalidVersion, parse
20
21
  from pypi_simple import ACCEPT_JSON_PREFERRED, ProjectPage
21
22
 
22
23
  from pulpcore.plugin.exceptions import TimeoutException
23
- from pulpcore.plugin.models import Artifact, Remote, RepositoryContent
24
+ from pulpcore.plugin.models import Artifact, Remote
24
25
  from pulpcore.plugin.util import get_domain
25
26
 
26
27
  log = logging.getLogger(__name__)
@@ -206,7 +207,7 @@ def get_project_metadata_from_file(filename):
206
207
  else:
207
208
  pyver = ""
208
209
  regex = DIST_REGEXES[extensions[pkg_type_index]]
209
- if bdist_name := regex.match(filename):
210
+ if bdist_name := regex.match(os.path.basename(filename)):
210
211
  pyver = bdist_name.group("pyver") or ""
211
212
  metadata.python_version = pyver
212
213
  return metadata
@@ -375,12 +376,16 @@ def python_content_to_json(
375
376
  Returns None if version is specified but not found within content_query
376
377
  """
377
378
  if repository_version:
378
- repo_added_subquery = RepositoryContent.objects.filter(
379
- content_id=OuterRef("pk"),
380
- repository=repository_version.repository,
381
- version_removed=None,
382
- ).values("pulp_created")[:1]
383
- content_query = content_query.annotate(repo_added_time=Subquery(repo_added_subquery))
379
+ content_query = content_query.annotate(
380
+ active_membership=FilteredRelation(
381
+ "version_memberships",
382
+ condition=Q(
383
+ version_memberships__repository=repository_version.repository,
384
+ version_memberships__version_removed=None,
385
+ ),
386
+ ),
387
+ repo_added_time=F("active_membership__pulp_created"),
388
+ )
384
389
  full_metadata = {"last_serial": 0} # For now the serial field isn't supported by Pulp
385
390
  latest_content = latest_content_version(content_query, version)
386
391
  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(upstream_pulp.pulp_href)
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(upstream_pulp.pulp_href)
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
  Metadata-Version: 2.4
2
2
  Name: pulp-python
3
- Version: 3.27.3
3
+ Version: 3.27.5
4
4
  Summary: pulp-python plugin for the Pulp Project
5
5
  Author-email: Pulp Team <pulp-list@redhat.com>
6
6
  Project-URL: Homepage, https://pulpproject.org
@@ -7,7 +7,7 @@ build-backend = 'setuptools.build_meta'
7
7
 
8
8
  [project]
9
9
  name = "pulp-python"
10
- version = "3.27.3"
10
+ version = "3.27.5"
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.27.3"
82
+ current_version = "3.27.5"
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