pulp-python 3.12.3__tar.gz → 3.12.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.
Files changed (75) hide show
  1. {pulp-python-3.12.3 → pulp-python-3.12.4}/CHANGES.md +9 -0
  2. {pulp-python-3.12.3 → pulp-python-3.12.4}/PKG-INFO +1 -1
  3. {pulp-python-3.12.3 → pulp-python-3.12.4}/functest_requirements.txt +1 -0
  4. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/__init__.py +1 -1
  5. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/replica.py +8 -0
  6. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/tasks/sync.py +2 -1
  7. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/utils.py +7 -5
  8. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_domains.py +29 -5
  9. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python.egg-info/PKG-INFO +1 -1
  10. {pulp-python-3.12.3 → pulp-python-3.12.4}/setup.py +1 -1
  11. {pulp-python-3.12.3 → pulp-python-3.12.4}/COMMITMENT +0 -0
  12. {pulp-python-3.12.3 → pulp-python-3.12.4}/COPYRIGHT +0 -0
  13. {pulp-python-3.12.3 → pulp-python-3.12.4}/LICENSE +0 -0
  14. {pulp-python-3.12.3 → pulp-python-3.12.4}/MANIFEST.in +0 -0
  15. {pulp-python-3.12.3 → pulp-python-3.12.4}/README.md +0 -0
  16. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/__init__.py +0 -0
  17. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/global_access_conditions.py +0 -0
  18. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0001_initial.py +0 -0
  19. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0002_pythonpackagecontent_python_version.py +0 -0
  20. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0003_new_sync_filters.py +0 -0
  21. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0004_DATA_swap_distribution_model.py +0 -0
  22. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0005_pythonpackagecontent_sha256.py +0 -0
  23. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0006_pythonrepository_autopublish.py +0 -0
  24. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0007_pythonpackagecontent_mv-2-1.py +0 -0
  25. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0008_pythonpackagecontent_unique_sha256.py +0 -0
  26. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0009_pythondistribution_allow_uploads.py +0 -0
  27. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0010_update_json_field.py +0 -0
  28. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0011_alter_pythondistribution_distribution_ptr_and_more.py +0 -0
  29. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0012_add_domain.py +0 -0
  30. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/0013_add_rbac_permissions.py +0 -0
  31. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/migrations/__init__.py +0 -0
  32. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/modelresource.py +0 -0
  33. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/models.py +0 -0
  34. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/pypi/__init__.py +0 -0
  35. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/pypi/serializers.py +0 -0
  36. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/pypi/views.py +0 -0
  37. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/serializers.py +0 -0
  38. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/settings.py +0 -0
  39. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/tasks/__init__.py +0 -0
  40. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/tasks/publish.py +0 -0
  41. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/tasks/upload.py +0 -0
  42. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/urls.py +0 -0
  43. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/viewsets.py +0 -0
  44. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/webserver_snippets/__init__.py +0 -0
  45. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/webserver_snippets/apache.conf +0 -0
  46. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/app/webserver_snippets/nginx.conf +0 -0
  47. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/pytest_plugin.py +0 -0
  48. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/__init__.py +0 -0
  49. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/__init__.py +0 -0
  50. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/__init__.py +0 -0
  51. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_auto_publish.py +0 -0
  52. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_consume_content.py +0 -0
  53. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_crud_content_unit.py +0 -0
  54. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_crud_publications.py +0 -0
  55. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_crud_remotes.py +0 -0
  56. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_download_content.py +0 -0
  57. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_export_import.py +0 -0
  58. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_full_mirror.py +0 -0
  59. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_pypi_apis.py +0 -0
  60. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_rbac.py +0 -0
  61. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/api/test_sync.py +0 -0
  62. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/constants.py +0 -0
  63. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/functional/utils.py +0 -0
  64. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/unit/__init__.py +0 -0
  65. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python/tests/unit/test_models.py +0 -0
  66. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python.egg-info/SOURCES.txt +0 -0
  67. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python.egg-info/dependency_links.txt +0 -0
  68. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python.egg-info/entry_points.txt +0 -0
  69. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python.egg-info/requires.txt +0 -0
  70. {pulp-python-3.12.3 → pulp-python-3.12.4}/pulp_python.egg-info/top_level.txt +0 -0
  71. {pulp-python-3.12.3 → pulp-python-3.12.4}/pyproject.toml +0 -0
  72. {pulp-python-3.12.3 → pulp-python-3.12.4}/requirements.txt +0 -0
  73. {pulp-python-3.12.3 → pulp-python-3.12.4}/setup.cfg +0 -0
  74. {pulp-python-3.12.3 → pulp-python-3.12.4}/test_requirements.txt +0 -0
  75. {pulp-python-3.12.3 → pulp-python-3.12.4}/unittest_requirements.txt +0 -0
@@ -8,6 +8,15 @@
8
8
 
9
9
  [//]: # (towncrier release notes start)
10
10
 
11
+ ## 3.12.4 (2024-10-14) {: #3.12.4 }
12
+
13
+ #### Bugfixes {: #3.12.4-bugfix }
14
+
15
+ - Fixed replicate failing on upstream on-demand repositories
16
+ [#718](https://github.com/pulp/pulp_python/issues/718)
17
+
18
+ ---
19
+
11
20
  ## 3.12.3 (2024-08-26) {: #3.12.3 }
12
21
 
13
22
  #### Bugfixes {: #3.12.3-bugfix }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulp-python
3
- Version: 3.12.3
3
+ Version: 3.12.4
4
4
  Summary: pulp-python plugin for the Pulp Project
5
5
  Home-page: https://www.pulpproject.org
6
6
  Author: Pulp Project Developers
@@ -6,3 +6,4 @@ pytest-custom_exit_code
6
6
  pytest-xdist
7
7
  proxy.py~=2.4.4
8
8
  trustme~=1.1.0
9
+ pytest-timeout
@@ -10,7 +10,7 @@ class PulpPythonPluginAppConfig(PulpPluginAppConfig):
10
10
 
11
11
  name = "pulp_python.app"
12
12
  label = "python"
13
- version = "3.12.3"
13
+ version = "3.12.4"
14
14
  python_package_name = "pulp-python"
15
15
  domain_compatible = True
16
16
 
@@ -28,6 +28,14 @@ class PythonReplicator(Replicator):
28
28
  # strain the upstream Pulp.
29
29
  return {"policy": "immediate", "prereleases": True}
30
30
 
31
+ def url(self, upstream_distribution):
32
+ # Ignore distributions that are only pull-through
33
+ repo, pub = upstream_distribution["repository"], upstream_distribution["publication"]
34
+ if repo or pub:
35
+ return super().url(upstream_distribution)
36
+
37
+ return None
38
+
31
39
  def repository_extra_fields(self, remote):
32
40
  # Use autopublish since publications result in faster serving times
33
41
  return {"autopublish": True}
@@ -256,8 +256,9 @@ class PulpMirror(Mirror):
256
256
  for package in dists:
257
257
  entry = parse_metadata(pkg.info, version, package)
258
258
  url = entry.pop("url")
259
+ size = package["size"] or None
259
260
 
260
- artifact = Artifact(sha256=entry["sha256"])
261
+ artifact = Artifact(sha256=entry["sha256"], size=size)
261
262
  package = PythonPackageContent(**entry)
262
263
 
263
264
  da = DeclarativeArtifact(
@@ -284,19 +284,21 @@ def python_content_to_download_info(content, base_path, domain=None):
284
284
  if domain:
285
285
  components.insert(2, domain.name)
286
286
  url = "/".join(components)
287
+ md5 = artifact.md5 if artifact and artifact.md5 else ""
288
+ size = artifact.size if artifact and artifact.size else 0
287
289
  return {
288
290
  "comment_text": "",
289
- "digests": {"md5": artifact.md5, "sha256": artifact.sha256},
291
+ "digests": {"md5": md5, "sha256": content.sha256},
290
292
  "downloads": -1,
291
293
  "filename": content.filename,
292
294
  "has_sig": False,
293
- "md5_digest": artifact.md5,
295
+ "md5_digest": md5,
294
296
  "packagetype": content.packagetype,
295
297
  "python_version": content.python_version,
296
298
  "requires_python": content.requires_python or None,
297
- "size": artifact.size,
298
- "upload_time": str(artifact.pulp_created),
299
- "upload_time_iso_8601": str(artifact.pulp_created.isoformat()),
299
+ "size": size,
300
+ "upload_time": str(content.pulp_created),
301
+ "upload_time_iso_8601": str(content.pulp_created.isoformat()),
300
302
  "url": url,
301
303
  "yanked": False,
302
304
  "yanked_reason": None
@@ -5,7 +5,12 @@ import subprocess
5
5
 
6
6
  from pulpcore.app import settings
7
7
 
8
- from pulp_python.tests.functional.constants import PYTHON_URL, PYTHON_EGG_FILENAME
8
+ from pulp_python.tests.functional.constants import (
9
+ PYTHON_URL,
10
+ PYTHON_EGG_FILENAME,
11
+ PYTHON_SM_PROJECT_SPECIFIER,
12
+ PYTHON_SM_PACKAGE_COUNT,
13
+ )
9
14
  from urllib.parse import urlsplit
10
15
 
11
16
 
@@ -144,7 +149,7 @@ def test_domain_content_replication(
144
149
  python_bindings,
145
150
  python_file,
146
151
  python_repo_factory,
147
- python_publication_factory,
152
+ python_remote_factory,
148
153
  python_distribution_factory,
149
154
  monitor_task,
150
155
  monitor_task_group,
@@ -154,13 +159,12 @@ def test_domain_content_replication(
154
159
  """Test replication feature through the usage of domains."""
155
160
  # Set up source domain to replicate from
156
161
  source_domain = domain_factory()
157
- repo = python_repo_factory(pulp_domain=source_domain.name)
162
+ repo = python_repo_factory(pulp_domain=source_domain.name, autopublish=True)
158
163
  body = {"relative_path": PYTHON_EGG_FILENAME, "file": python_file, "repository": repo.pulp_href}
159
164
  monitor_task(
160
165
  python_bindings.ContentPackagesApi.create(pulp_domain=source_domain.name, **body).task
161
166
  )
162
- pub = python_publication_factory(repository=repo, pulp_domain=source_domain.name)
163
- python_distribution_factory(publication=pub.pulp_href, pulp_domain=source_domain.name)
167
+ python_distribution_factory(repository=repo, pulp_domain=source_domain.name)
164
168
 
165
169
  # Create the replica domain
166
170
  replica_domain = domain_factory()
@@ -171,6 +175,7 @@ def test_domain_content_replication(
171
175
  "domain": source_domain.name,
172
176
  "username": bindings_cfg.username,
173
177
  "password": bindings_cfg.password,
178
+ "tls_validation": False,
174
179
  }
175
180
  upstream_pulp = gen_object_with_cleanup(
176
181
  pulpcore_bindings.UpstreamPulpsApi, upstream_pulp_body, pulp_domain=replica_domain.name
@@ -194,6 +199,25 @@ def test_domain_content_replication(
194
199
 
195
200
  assert all(1 == x for x in counts.values()), f"Replica had more than 1 object {counts}"
196
201
 
202
+ # Test that we can replicate from an Upstream on-demand source (syncs are on-demand by default)
203
+ remote = python_remote_factory(
204
+ includes=PYTHON_SM_PROJECT_SPECIFIER, pulp_domain=source_domain.name
205
+ )
206
+ body = {"remote": remote.pulp_href}
207
+ monitor_task(python_bindings.RepositoriesPythonApi.sync(repo.pulp_href, body).task)
208
+
209
+ response = pulpcore_bindings.UpstreamPulpsApi.replicate(upstream_pulp.pulp_href)
210
+ monitor_task_group(response.task_group)
211
+
212
+ response = python_bindings.ContentPackagesApi.list(pulp_domain=replica_domain.name)
213
+ assert PYTHON_SM_PACKAGE_COUNT + 1 == response.count
214
+ response = python_bindings.PublicationsPypiApi.list(pulp_domain=replica_domain.name)
215
+ assert 2 == response.count
216
+ add_to_cleanup(python_bindings.PublicationsPypiApi, response.results[0])
217
+ assert 1 == python_bindings.RepositoriesPythonApi.list(pulp_domain=replica_domain.name).count
218
+ assert 1 == python_bindings.DistributionsPypiApi.list(pulp_domain=replica_domain.name).count
219
+ assert 1 == python_bindings.RemotesPythonApi.list(pulp_domain=replica_domain.name).count
220
+
197
221
 
198
222
  @pytest.fixture
199
223
  def shelf_reader_cleanup():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulp-python
3
- Version: 3.12.3
3
+ Version: 3.12.4
4
4
  Summary: pulp-python plugin for the Pulp Project
5
5
  Home-page: https://www.pulpproject.org
6
6
  Author: Pulp Project Developers
@@ -10,7 +10,7 @@ with open("README.md") as f:
10
10
 
11
11
  setup(
12
12
  name="pulp-python",
13
- version="3.12.3",
13
+ version="3.12.4",
14
14
  description="pulp-python plugin for the Pulp Project",
15
15
  long_description=long_description,
16
16
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes