pulp-python 3.10.0__tar.gz → 3.11.1__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.10.0 → pulp-python-3.11.1}/CHANGES.rst +28 -0
  2. {pulp-python-3.10.0 → pulp-python-3.11.1}/PKG-INFO +11 -11
  3. {pulp-python-3.10.0 → pulp-python-3.11.1}/functest_requirements.txt +1 -1
  4. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/__init__.py +1 -1
  5. pulp-python-3.11.1/pulp_python/app/modelresource.py +40 -0
  6. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/tasks/sync.py +28 -5
  7. pulp-python-3.11.1/pulp_python/tests/functional/api/test_export_import.py +108 -0
  8. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/test_full_mirror.py +9 -8
  9. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/conftest.py +21 -3
  10. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/constants.py +6 -4
  11. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python.egg-info/PKG-INFO +11 -11
  12. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python.egg-info/SOURCES.txt +2 -0
  13. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python.egg-info/entry_points.txt +0 -1
  14. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python.egg-info/requires.txt +1 -1
  15. {pulp-python-3.10.0 → pulp-python-3.11.1}/requirements.txt +1 -1
  16. {pulp-python-3.10.0 → pulp-python-3.11.1}/setup.py +1 -1
  17. pulp-python-3.11.1/unittest_requirements.txt +2 -0
  18. pulp-python-3.10.0/unittest_requirements.txt +0 -2
  19. {pulp-python-3.10.0 → pulp-python-3.11.1}/COMMITMENT +0 -0
  20. {pulp-python-3.10.0 → pulp-python-3.11.1}/COPYRIGHT +0 -0
  21. {pulp-python-3.10.0 → pulp-python-3.11.1}/LICENSE +0 -0
  22. {pulp-python-3.10.0 → pulp-python-3.11.1}/MANIFEST.in +0 -0
  23. {pulp-python-3.10.0 → pulp-python-3.11.1}/README.md +0 -0
  24. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/__init__.py +0 -0
  25. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0001_initial.py +0 -0
  26. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0002_pythonpackagecontent_python_version.py +0 -0
  27. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0003_new_sync_filters.py +0 -0
  28. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0004_DATA_swap_distribution_model.py +0 -0
  29. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0005_pythonpackagecontent_sha256.py +0 -0
  30. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0006_pythonrepository_autopublish.py +0 -0
  31. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0007_pythonpackagecontent_mv-2-1.py +0 -0
  32. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0008_pythonpackagecontent_unique_sha256.py +0 -0
  33. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0009_pythondistribution_allow_uploads.py +0 -0
  34. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0010_update_json_field.py +0 -0
  35. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/0011_alter_pythondistribution_distribution_ptr_and_more.py +0 -0
  36. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/migrations/__init__.py +0 -0
  37. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/models.py +0 -0
  38. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/pypi/__init__.py +0 -0
  39. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/pypi/serializers.py +0 -0
  40. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/pypi/views.py +0 -0
  41. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/serializers.py +0 -0
  42. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/settings.py +0 -0
  43. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/tasks/__init__.py +0 -0
  44. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/tasks/publish.py +0 -0
  45. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/tasks/upload.py +0 -0
  46. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/urls.py +0 -0
  47. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/utils.py +0 -0
  48. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/viewsets.py +0 -0
  49. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/webserver_snippets/__init__.py +0 -0
  50. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/webserver_snippets/apache.conf +0 -0
  51. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/app/webserver_snippets/nginx.conf +0 -0
  52. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/__init__.py +0 -0
  53. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/__init__.py +0 -0
  54. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/__init__.py +0 -0
  55. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/test_auto_publish.py +0 -0
  56. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/test_consume_content.py +0 -0
  57. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/test_crud_content_unit.py +0 -0
  58. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/test_crud_publications.py +0 -0
  59. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/test_crud_remotes.py +0 -0
  60. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/test_download_content.py +0 -0
  61. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/test_pypi_apis.py +0 -0
  62. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/api/test_sync.py +0 -0
  63. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/functional/utils.py +0 -0
  64. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/unit/__init__.py +0 -0
  65. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/unit/test_models.py +0 -0
  66. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/upgrade/__init__.py +0 -0
  67. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/upgrade/post/__init__.py +0 -0
  68. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/upgrade/post/test_publish.py +0 -0
  69. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/upgrade/pre/__init__.py +0 -0
  70. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python/tests/upgrade/pre/test_publish.py +0 -0
  71. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python.egg-info/dependency_links.txt +0 -0
  72. {pulp-python-3.10.0 → pulp-python-3.11.1}/pulp_python.egg-info/top_level.txt +0 -0
  73. {pulp-python-3.10.0 → pulp-python-3.11.1}/pyproject.toml +0 -0
  74. {pulp-python-3.10.0 → pulp-python-3.11.1}/setup.cfg +0 -0
  75. {pulp-python-3.10.0 → pulp-python-3.11.1}/test_requirements.txt +0 -0
@@ -13,6 +13,34 @@ Changelog
13
13
 
14
14
  .. towncrier release notes start
15
15
 
16
+ 3.11.1 (2024-04-11)
17
+ ===================
18
+
19
+ Bugfixes
20
+ --------
21
+
22
+ - Fixed tls_validation not being disabled when set to false on the remote.
23
+ `#653 <https://github.com/pulp/pulp_python/issues/653>`__
24
+
25
+
26
+ ----
27
+
28
+
29
+ 3.11.0 (2023-11-08)
30
+ ===================
31
+
32
+
33
+ Features
34
+ --------
35
+
36
+ - Added pulpcore 3.40 compatibility.
37
+ - Added import export support of python content.
38
+ `#579 <https://github.com/pulp/pulp_python/issues/579>`__
39
+
40
+
41
+ ----
42
+
43
+
16
44
  3.10.0 (2023-05-17)
17
45
  ===================
18
46
 
@@ -1,21 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulp-python
3
- Version: 3.10.0
3
+ Version: 3.11.1
4
4
  Summary: pulp-python plugin for the Pulp Project
5
5
  Home-page: https://www.pulpproject.org
6
6
  Author: Pulp Project Developers
7
7
  Author-email: pulp-list@redhat.com
8
8
  License: GPLv2+
9
- Description: # pulp_python
10
-
11
- ![Pulp Nightly CI/CD](https://github.com/pulp/pulp_python/actions/workflows/nightly.yml/badge.svg)
12
-
13
- A Pulp plugin to support hosting your own pip compatible Python packages.
14
-
15
- For more information, please see the [documentation](https://docs.pulpproject.org/pulp_python/) or the
16
- [Pulp project page](https://pulpproject.org).
17
-
18
- Platform: UNKNOWN
19
9
  Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
20
10
  Classifier: Operating System :: POSIX :: Linux
21
11
  Classifier: Development Status :: 5 - Production/Stable
@@ -26,3 +16,13 @@ Classifier: Programming Language :: Python :: 3.8
26
16
  Classifier: Programming Language :: Python :: 3.9
27
17
  Requires-Python: >=3.8
28
18
  Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+
21
+ # pulp_python
22
+
23
+ ![Pulp Nightly CI/CD](https://github.com/pulp/pulp_python/actions/workflows/nightly.yml/badge.svg)
24
+
25
+ A Pulp plugin to support hosting your own pip compatible Python packages.
26
+
27
+ For more information, please see the [documentation](https://docs.pulpproject.org/pulp_python/) or the
28
+ [Pulp project page](https://pulpproject.org).
@@ -1,5 +1,5 @@
1
1
  git+https://github.com/pulp/pulp-smash.git#egg=pulp-smash
2
- pytest
2
+ pytest<8
3
3
  lxml
4
4
  twine
5
5
  pypi-simple
@@ -8,5 +8,5 @@ class PulpPythonPluginAppConfig(PulpPluginAppConfig):
8
8
 
9
9
  name = "pulp_python.app"
10
10
  label = "python"
11
- version = "3.10.0"
11
+ version = "3.11.1"
12
12
  python_package_name = "pulp-python"
@@ -0,0 +1,40 @@
1
+ from pulpcore.plugin.importexport import BaseContentResource
2
+ from pulpcore.plugin.modelresources import RepositoryResource
3
+ from pulp_python.app.models import (
4
+ PythonPackageContent,
5
+ PythonRepository,
6
+ )
7
+
8
+
9
+ class PythonPackageContentResource(BaseContentResource):
10
+ """
11
+ Resource for import/export of python_pythonpackagecontent entities.
12
+ """
13
+
14
+ def set_up_queryset(self):
15
+ """
16
+ :return: PythonPackageContent specific to a specified repo-version.
17
+ """
18
+ return PythonPackageContent.objects.filter(pk__in=self.repo_version.content)
19
+
20
+ class Meta:
21
+ model = PythonPackageContent
22
+ import_id_fields = model.natural_key_fields()
23
+
24
+
25
+ class PythonRepositoryResource(RepositoryResource):
26
+ """
27
+ A resource for importing/exporting python repository entities
28
+ """
29
+
30
+ def set_up_queryset(self):
31
+ """
32
+ :return: A queryset containing one repository that will be exported.
33
+ """
34
+ return PythonRepository.objects.filter(pk=self.repo_version.repository)
35
+
36
+ class Meta:
37
+ model = PythonRepository
38
+
39
+
40
+ IMPORT_ORDER = [PythonPackageContentResource, PythonRepositoryResource]
@@ -1,9 +1,12 @@
1
1
  import logging
2
+ import tempfile
3
+ from typing import Optional, Any, AsyncGenerator
2
4
 
5
+ import aiohttp
3
6
  from aiohttp import ClientResponseError, ClientError
4
7
  from lxml.etree import LxmlError
5
8
  from gettext import gettext as _
6
- from os import environ, path
9
+ from os import environ
7
10
 
8
11
  from rest_framework import serializers
9
12
 
@@ -111,9 +114,10 @@ class PythonBanderStage(Stage):
111
114
  """
112
115
  If includes is specified, then only sync those,else try to sync all other packages
113
116
  """
114
- # Prevent bandersnatch from reading actual .netrc file, set to nonexistent file
117
+ # Prevent bandersnatch from reading actual .netrc file, set to empty file
115
118
  # See discussion on https://github.com/pulp/pulp_python/issues/581
116
- environ["NETRC"] = f"{path.curdir}/.fake-netrc"
119
+ fake_netrc = tempfile.NamedTemporaryFile(dir=".", delete=False)
120
+ environ["NETRC"] = fake_netrc.name
117
121
  # TODO Change Bandersnatch internal API to take proxy settings in from config parameters
118
122
  if proxy_url := self.remote.proxy_url:
119
123
  if self.remote.proxy_username or self.remote.proxy_password:
@@ -126,7 +130,7 @@ class PythonBanderStage(Stage):
126
130
  # Bandersnatch includes leading slash when forming API urls
127
131
  url = self.remote.url.rstrip("/")
128
132
  # local & global timeouts defaults to 10secs and 5 hours
129
- async with Master(url) as master:
133
+ async with PulpMaster(url, tls=self.remote.tls_validation) as master:
130
134
  deferred_download = self.remote.policy != Remote.IMMEDIATE
131
135
  workers = self.remote.download_concurrency or self.remote.DEFAULT_DOWNLOAD_CONCURRENCY
132
136
  async with ProgressReport(
@@ -148,6 +152,25 @@ class PythonBanderStage(Stage):
148
152
  await pmirror.synchronize(packages_to_sync)
149
153
 
150
154
 
155
+ class PulpMaster(Master):
156
+ """
157
+ Pulp Master Class for Pulp specific overrides
158
+ """
159
+
160
+ def __init__(self, *args, tls=True, **kwargs):
161
+ self.tls = tls
162
+ super().__init__(*args, **kwargs)
163
+
164
+ async def get(
165
+ self, path: str, required_serial: Optional[int], **kw: Any
166
+ ) -> AsyncGenerator[aiohttp.ClientResponse, None]:
167
+ """Support tls=false"""
168
+ if not self.tls:
169
+ kw["ssl"] = False
170
+ async for r in super().get(path, required_serial, **kw):
171
+ yield r
172
+
173
+
151
174
  class PulpMirror(Mirror):
152
175
  """
153
176
  Pulp Mirror Class to perform syncing using Bandersnatch
@@ -257,4 +280,4 @@ class PulpMirror(Mirror):
257
280
  TODO
258
281
  This should have some error checking
259
282
  """
260
- pass
283
+ logger.error("Sync encountered an error: ", exc_info=exception)
@@ -0,0 +1,108 @@
1
+ """
2
+ Tests PulpExporter and PulpExport functionality.
3
+
4
+ NOTE: assumes ALLOWED_EXPORT_PATHS setting contains "/tmp" - all tests will fail if this is not
5
+ the case.
6
+ """
7
+ import pytest
8
+ import uuid
9
+
10
+ from pulp_python.tests.functional.constants import (
11
+ PYTHON_XS_PROJECT_SPECIFIER, PYTHON_SM_PROJECT_SPECIFIER
12
+ )
13
+
14
+
15
+ @pytest.mark.parallel
16
+ def test_export_then_import(
17
+ python_repo_factory,
18
+ python_remote_factory,
19
+ python_repo_api_client,
20
+ python_repo_version_api_client,
21
+ exporters_pulp_api_client,
22
+ exporters_pulp_exports_api_client,
23
+ importers_pulp_api_client,
24
+ importers_pulp_imports_api_client,
25
+ monitor_task,
26
+ monitor_task_group,
27
+ gen_object_with_cleanup,
28
+ ):
29
+ """Issue and evaluate a PulpExport (tests both Create and Read)."""
30
+ # Prepare content
31
+ remote_a = python_remote_factory(includes=PYTHON_XS_PROJECT_SPECIFIER, policy="immediate")
32
+ remote_b = python_remote_factory(includes=PYTHON_SM_PROJECT_SPECIFIER, policy="immediate")
33
+ repo_a = python_repo_factory()
34
+ repo_b = python_repo_factory()
35
+ sync_response_a = python_repo_api_client.sync(
36
+ repo_a.pulp_href, {"remote": remote_a.pulp_href}
37
+ )
38
+ sync_response_b = python_repo_api_client.sync(
39
+ repo_b.pulp_href, {"remote": remote_b.pulp_href}
40
+ )
41
+ monitor_task(sync_response_a.task)
42
+ monitor_task(sync_response_b.task)
43
+
44
+ repo_ver_a = python_repo_version_api_client.read(f"{repo_a.pulp_href}versions/1/")
45
+ repo_ver_b = python_repo_version_api_client.read(f"{repo_b.pulp_href}versions/1/")
46
+
47
+ # Prepare export
48
+ exporter = gen_object_with_cleanup(
49
+ exporters_pulp_api_client,
50
+ {
51
+ "name": str(uuid.uuid4()),
52
+ "path": f"/tmp/{uuid.uuid4()}/",
53
+ "repositories": [repo.pulp_href for repo in [repo_a, repo_b]],
54
+ },
55
+ )
56
+
57
+ # Export
58
+ task = exporters_pulp_exports_api_client.create(exporter.pulp_href, {}).task
59
+ task = monitor_task(task)
60
+ assert len(task.created_resources) == 1
61
+ export = exporters_pulp_exports_api_client.read(task.created_resources[0])
62
+ assert export is not None
63
+ assert len(exporter.repositories) == len(export.exported_resources)
64
+ assert export.output_file_info is not None
65
+ for an_export_filename in export.output_file_info.keys():
66
+ assert "//" not in an_export_filename
67
+ export_filename = next(
68
+ f for f in export.output_file_info.keys() if f.endswith("tar.gz") or f.endswith("tar")
69
+ )
70
+
71
+ # Prepare import
72
+ repo_c = python_repo_factory()
73
+ repo_d = python_repo_factory()
74
+ repo_mapping = {repo_a.name: repo_c.name, repo_b.name: repo_d.name}
75
+ importer = gen_object_with_cleanup(
76
+ importers_pulp_api_client, {"name": str(uuid.uuid4()), "repo_mapping": repo_mapping}
77
+ )
78
+
79
+ # Import
80
+ import_response = importers_pulp_imports_api_client.create(
81
+ importer.pulp_href, {"path": export_filename}
82
+ )
83
+ monitor_task_group(import_response.task_group)
84
+ repo_c = python_repo_api_client.read(repo_c.pulp_href)
85
+ repo_d = python_repo_api_client.read(repo_d.pulp_href)
86
+ assert repo_c.latest_version_href == f"{repo_c.pulp_href}versions/1/"
87
+ assert repo_d.latest_version_href == f"{repo_d.pulp_href}versions/1/"
88
+ repo_ver_c = python_repo_version_api_client.read(f"{repo_c.pulp_href}versions/1/")
89
+ repo_ver_d = python_repo_version_api_client.read(f"{repo_d.pulp_href}versions/1/")
90
+ assert (
91
+ repo_ver_c.content_summary.added["python.python"]["count"]
92
+ == repo_ver_a.content_summary.present["python.python"]["count"]
93
+ )
94
+ assert (
95
+ repo_ver_d.content_summary.added["python.python"]["count"]
96
+ == repo_ver_b.content_summary.present["python.python"]["count"]
97
+ )
98
+
99
+ # Import a second time
100
+ import_response = importers_pulp_imports_api_client.create(
101
+ importer.pulp_href, {"path": export_filename}
102
+ )
103
+ monitor_task_group(import_response.task_group)
104
+ assert len(importers_pulp_imports_api_client.list(importer.pulp_href).results) == 2
105
+ for repo in [repo_c, repo_d]:
106
+ repo = python_repo_api_client.read(repo.pulp_href)
107
+ # still only one version as pulp won't create a new version if nothing changed
108
+ assert repo.latest_version_href == f"{repo.pulp_href}versions/1/"
@@ -108,21 +108,22 @@ class PullThroughMirror(TestCaseUsingBindings, TestHelpersMixin):
108
108
  remote = self._create_remote(url=PYPI_URL)
109
109
  distro = self._create_distribution(remote=remote.pulp_href)
110
110
 
111
- if self.cli_client.run(("pip", "list")).stdout.find("numpy") == -1:
112
- content = self.content_api.list(name="numpy")
113
- self.assertEqual(content.count, 0, msg="numpy content already present in test")
111
+ PACKAGE = "pulpcore-releases"
112
+ if self.cli_client.run(("pip", "list")).stdout.find(PACKAGE) == -1:
113
+ content = self.content_api.list(name=PACKAGE)
114
+ self.assertEqual(content.count, 0, msg=f"{PACKAGE} content already present in test")
114
115
  host = urlsplit(PULP_CONTENT_BASE_URL).hostname
115
116
  url = urljoin(self.PYPI_HOST, f"{distro.base_path}/simple/")
116
117
  out = self.cli_client.run(
117
- ("pip", "install", "--trusted-host", host, "-i", url, "numpy")
118
+ ("pip", "install", "--trusted-host", host, "-i", url, PACKAGE)
118
119
  )
119
120
  self.addCleanup(delete_orphans)
120
- self.assertTrue(self.cli_client.run(("pip", "list")).stdout.find("numpy") != -1, out)
121
- self.addCleanup(self.cli_client.run, ("pip", "uninstall", "numpy", "-y"))
122
- content = self.content_api.list(name="numpy")
121
+ self.assertTrue(self.cli_client.run(("pip", "list")).stdout.find(PACKAGE) != -1, out)
122
+ self.addCleanup(self.cli_client.run, ("pip", "uninstall", PACKAGE, "-y"))
123
+ content = self.content_api.list(name=PACKAGE)
123
124
  self.assertEqual(content.count, 1)
124
125
  else:
125
- self.skipTest("Uninstall numpy before running this test")
126
+ self.skipTest(f"Uninstall {PACKAGE} before running this test")
126
127
 
127
128
  def test_pull_through_simple(self):
128
129
  """Tests that the simple page is properly modified when requesting a pull-through."""
@@ -1,6 +1,7 @@
1
1
  import pytest
2
+ import uuid
2
3
 
3
- from pulp_smash.pulp3.utils import gen_distribution, gen_repo
4
+ from pulp_smash.pulp3.utils import gen_distribution
4
5
  from pulp_python.tests.functional.utils import gen_python_remote
5
6
 
6
7
  from pulpcore.client.pulp_python import (
@@ -9,6 +10,7 @@ from pulpcore.client.pulp_python import (
9
10
  DistributionsPypiApi,
10
11
  PublicationsPypiApi,
11
12
  RepositoriesPythonApi,
13
+ RepositoriesPythonVersionsApi,
12
14
  RemotesPythonApi,
13
15
  )
14
16
 
@@ -29,6 +31,12 @@ def python_repo_api_client(python_bindings_client):
29
31
  return RepositoriesPythonApi(python_bindings_client)
30
32
 
31
33
 
34
+ @pytest.fixture
35
+ def python_repo_version_api_client(python_bindings_client):
36
+ """Provides the Python Repository Version API client object."""
37
+ return RepositoriesPythonVersionsApi(python_bindings_client)
38
+
39
+
32
40
  @pytest.fixture
33
41
  def python_distro_api_client(python_bindings_client):
34
42
  """Provides the Python Distribution API client object."""
@@ -56,9 +64,19 @@ def python_publication_api_client(python_bindings_client):
56
64
  # Object Generation Fixtures
57
65
 
58
66
  @pytest.fixture
59
- def python_repo(python_repo_api_client, gen_object_with_cleanup):
67
+ def python_repo_factory(python_repo_api_client, gen_object_with_cleanup):
68
+ """A factory to generate a Python Repository with auto-cleanup."""
69
+ def _gen_python_repo(**kwargs):
70
+ kwargs.setdefault("name", str(uuid.uuid4()))
71
+ return gen_object_with_cleanup(python_repo_api_client, kwargs)
72
+
73
+ return _gen_python_repo
74
+
75
+
76
+ @pytest.fixture
77
+ def python_repo(python_repo_factory):
60
78
  """Creates a Python Repository and deletes it at test cleanup time."""
61
- return gen_object_with_cleanup(python_repo_api_client, gen_repo())
79
+ return python_repo_factory()
62
80
 
63
81
 
64
82
  @pytest.fixture
@@ -142,17 +142,19 @@ PYTHON_MD_PYPI_SUMMARY = {"projects": 4, "releases": 17, "files": 26}
142
142
 
143
143
  PYTHON_LG_PROJECT_SPECIFIER = [
144
144
  "aiohttp", # matches 7
145
+ "bcrypt", # matches 8
145
146
  "celery", # matches 13
146
147
  "Django", # matches 31
148
+ "pytz", # matches 6
147
149
  "scipy", # matches 23
148
150
  "shelf-reader", # matches 2
149
151
  ]
150
- PYTHON_LG_PACKAGE_COUNT = 76
152
+ PYTHON_LG_PACKAGE_COUNT = 90
151
153
  PYTHON_LG_FIXTURE_SUMMARY = {PYTHON_CONTENT_NAME: PYTHON_LG_PACKAGE_COUNT}
152
154
  PYTHON_LG_FIXTURE_COUNTS = {
153
- "latest_3": 35,
154
- "sdist": 23,
155
- "bdist_wheel": 53,
155
+ "latest_3": 49,
156
+ "sdist": 27,
157
+ "bdist_wheel": 63,
156
158
  }
157
159
 
158
160
  DJANGO_LATEST_3 = 4 # latest version has 2 dists, each other has 1
@@ -1,21 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulp-python
3
- Version: 3.10.0
3
+ Version: 3.11.1
4
4
  Summary: pulp-python plugin for the Pulp Project
5
5
  Home-page: https://www.pulpproject.org
6
6
  Author: Pulp Project Developers
7
7
  Author-email: pulp-list@redhat.com
8
8
  License: GPLv2+
9
- Description: # pulp_python
10
-
11
- ![Pulp Nightly CI/CD](https://github.com/pulp/pulp_python/actions/workflows/nightly.yml/badge.svg)
12
-
13
- A Pulp plugin to support hosting your own pip compatible Python packages.
14
-
15
- For more information, please see the [documentation](https://docs.pulpproject.org/pulp_python/) or the
16
- [Pulp project page](https://pulpproject.org).
17
-
18
- Platform: UNKNOWN
19
9
  Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
20
10
  Classifier: Operating System :: POSIX :: Linux
21
11
  Classifier: Development Status :: 5 - Production/Stable
@@ -26,3 +16,13 @@ Classifier: Programming Language :: Python :: 3.8
26
16
  Classifier: Programming Language :: Python :: 3.9
27
17
  Requires-Python: >=3.8
28
18
  Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+
21
+ # pulp_python
22
+
23
+ ![Pulp Nightly CI/CD](https://github.com/pulp/pulp_python/actions/workflows/nightly.yml/badge.svg)
24
+
25
+ A Pulp plugin to support hosting your own pip compatible Python packages.
26
+
27
+ For more information, please see the [documentation](https://docs.pulpproject.org/pulp_python/) or the
28
+ [Pulp project page](https://pulpproject.org).
@@ -18,6 +18,7 @@ pulp_python.egg-info/entry_points.txt
18
18
  pulp_python.egg-info/requires.txt
19
19
  pulp_python.egg-info/top_level.txt
20
20
  pulp_python/app/__init__.py
21
+ pulp_python/app/modelresource.py
21
22
  pulp_python/app/models.py
22
23
  pulp_python/app/serializers.py
23
24
  pulp_python/app/settings.py
@@ -58,6 +59,7 @@ pulp_python/tests/functional/api/test_crud_content_unit.py
58
59
  pulp_python/tests/functional/api/test_crud_publications.py
59
60
  pulp_python/tests/functional/api/test_crud_remotes.py
60
61
  pulp_python/tests/functional/api/test_download_content.py
62
+ pulp_python/tests/functional/api/test_export_import.py
61
63
  pulp_python/tests/functional/api/test_full_mirror.py
62
64
  pulp_python/tests/functional/api/test_pypi_apis.py
63
65
  pulp_python/tests/functional/api/test_sync.py
@@ -1,3 +1,2 @@
1
1
  [pulpcore.plugin]
2
2
  pulp_python = pulp_python:default_app_config
3
-
@@ -1,4 +1,4 @@
1
- pulpcore<3.40,>=3.25.0
1
+ pulpcore<3.55,>=3.25.0
2
2
  pkginfo<1.9.7,>=1.8.2
3
3
  bandersnatch<6.2,>=6.1
4
4
  pypi-simple<1.0.0,>=0.9.0
@@ -1,4 +1,4 @@
1
- pulpcore>=3.25.0,<3.40
1
+ pulpcore>=3.25.0,<3.55
2
2
  pkginfo>=1.8.2,<1.9.7
3
3
  bandersnatch>=6.1,<6.2
4
4
  pypi-simple>=0.9.0,<1.0.0
@@ -10,7 +10,7 @@ with open("README.md") as f:
10
10
 
11
11
  setup(
12
12
  name="pulp-python",
13
- version="3.10.0",
13
+ version="3.11.1",
14
14
  description="pulp-python plugin for the Pulp Project",
15
15
  long_description=long_description,
16
16
  long_description_content_type="text/markdown",
@@ -0,0 +1,2 @@
1
+ mock
2
+ pytest<8
@@ -1,2 +0,0 @@
1
- mock
2
- pytest
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes