pulp-python 3.11.2__tar.gz → 3.11.3__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.11.2 → pulp-python-3.11.3}/CHANGES.md +11 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/PKG-INFO +1 -1
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/__init__.py +1 -1
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/models.py +5 -1
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/pypi/views.py +2 -1
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_crud_content_unit.py +15 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_download_content.py +30 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python.egg-info/PKG-INFO +1 -1
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python.egg-info/requires.txt +2 -2
- pulp-python-3.11.3/requirements.txt +4 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/setup.py +1 -1
- pulp-python-3.11.2/requirements.txt +0 -4
- {pulp-python-3.11.2 → pulp-python-3.11.3}/COMMITMENT +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/COPYRIGHT +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/LICENSE +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/MANIFEST.in +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/README.md +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/functest_requirements.txt +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0001_initial.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0002_pythonpackagecontent_python_version.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0003_new_sync_filters.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0004_DATA_swap_distribution_model.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0005_pythonpackagecontent_sha256.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0006_pythonrepository_autopublish.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0007_pythonpackagecontent_mv-2-1.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0008_pythonpackagecontent_unique_sha256.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0009_pythondistribution_allow_uploads.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0010_update_json_field.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0011_alter_pythondistribution_distribution_ptr_and_more.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/modelresource.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/pypi/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/pypi/serializers.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/serializers.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/settings.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/tasks/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/tasks/publish.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/tasks/sync.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/tasks/upload.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/urls.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/utils.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/viewsets.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/webserver_snippets/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/webserver_snippets/apache.conf +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/app/webserver_snippets/nginx.conf +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_auto_publish.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_consume_content.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_crud_publications.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_crud_remotes.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_export_import.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_full_mirror.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_pypi_apis.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_sync.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/conftest.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/constants.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/utils.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/unit/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/unit/test_models.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/upgrade/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/upgrade/post/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/upgrade/post/test_publish.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/upgrade/pre/__init__.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/upgrade/pre/test_publish.py +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python.egg-info/SOURCES.txt +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python.egg-info/dependency_links.txt +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python.egg-info/entry_points.txt +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python.egg-info/top_level.txt +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/pyproject.toml +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/setup.cfg +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/test_requirements.txt +0 -0
- {pulp-python-3.11.2 → pulp-python-3.11.3}/unittest_requirements.txt +0 -0
|
@@ -8,6 +8,17 @@
|
|
|
8
8
|
|
|
9
9
|
[//]: # (towncrier release notes start)
|
|
10
10
|
|
|
11
|
+
# ## 3.11.3 (2024-08-21) {: #3.11.3 }
|
|
12
|
+
|
|
13
|
+
#### Bugfixes {: #3.11.3-bugfix }
|
|
14
|
+
|
|
15
|
+
- Fixed uploads not supporting packages using metadata spec 2.3
|
|
16
|
+
[#682](https://github.com/pulp/pulp_python/issues/682)
|
|
17
|
+
- Fixed package name normalization issue preventing syncing packages with "." or "_" in their names.
|
|
18
|
+
[#716](https://github.com/pulp/pulp_python/issues/716)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
11
22
|
## 3.11.2 (2024-06-27) {: #3.11.2 }
|
|
12
23
|
|
|
13
24
|
|
|
@@ -16,6 +16,7 @@ from pulpcore.plugin.responses import ArtifactResponse
|
|
|
16
16
|
|
|
17
17
|
from pathlib import PurePath
|
|
18
18
|
from .utils import (
|
|
19
|
+
canonicalize_name,
|
|
19
20
|
get_project_metadata_from_artifact,
|
|
20
21
|
parse_project_metadata,
|
|
21
22
|
python_content_to_json,
|
|
@@ -84,6 +85,8 @@ class PythonDistribution(Distribution):
|
|
|
84
85
|
).latest("pulp_created")
|
|
85
86
|
except ObjectDoesNotExist:
|
|
86
87
|
return None
|
|
88
|
+
if len(path.parts) == 2:
|
|
89
|
+
path = PurePath(f"simple/{canonicalize_name(path.parts[1])}")
|
|
87
90
|
rel_path = f"{path}/index.html"
|
|
88
91
|
try:
|
|
89
92
|
ca = (
|
|
@@ -100,8 +103,9 @@ class PythonDistribution(Distribution):
|
|
|
100
103
|
return ArtifactResponse(ca.artifact, headers=headers)
|
|
101
104
|
|
|
102
105
|
if name:
|
|
106
|
+
normalized = canonicalize_name(name)
|
|
103
107
|
package_content = PythonPackageContent.objects.filter(
|
|
104
|
-
pk__in=self.publication.repository_version.content,
|
|
108
|
+
pk__in=self.publication.repository_version.content, name__normalize=normalized
|
|
105
109
|
)
|
|
106
110
|
# TODO Change this value to the Repo's serial value when implemented
|
|
107
111
|
headers = {PYPI_LAST_SERIAL: str(PYPI_SERIAL_CONSTANT)}
|
|
@@ -278,7 +278,8 @@ class MetadataView(ViewSet, PyPIMixin):
|
|
|
278
278
|
elif meta_path.match("*/json"):
|
|
279
279
|
name = meta_path.parts[0]
|
|
280
280
|
if name:
|
|
281
|
-
|
|
281
|
+
normalized = canonicalize_name(name)
|
|
282
|
+
package_content = content.filter(name__normalize=normalized)
|
|
282
283
|
# TODO Change this value to the Repo's serial value when implemented
|
|
283
284
|
headers = {PYPI_LAST_SERIAL: str(PYPI_SERIAL_CONSTANT)}
|
|
284
285
|
json_body = python_content_to_json(path, package_content, version=version)
|
{pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_crud_content_unit.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
2
|
"""Tests that perform actions over content unit."""
|
|
3
|
+
import pytest
|
|
3
4
|
from pulp_smash.pulp3.bindings import delete_orphans, monitor_task, PulpTaskError
|
|
4
5
|
|
|
5
6
|
from pulp_python.tests.functional.utils import (
|
|
@@ -12,6 +13,7 @@ from pulp_python.tests.functional.utils import (
|
|
|
12
13
|
from pulp_python.tests.functional.utils import set_up_module as setUpModule # noqa:F401
|
|
13
14
|
from tempfile import NamedTemporaryFile
|
|
14
15
|
from urllib.parse import urljoin
|
|
16
|
+
from pypi_simple import PyPISimple
|
|
15
17
|
|
|
16
18
|
from pulp_smash.utils import http_get
|
|
17
19
|
from pulp_python.tests.functional.constants import (
|
|
@@ -227,3 +229,16 @@ class ContentUnitTestCase(TestCaseUsingBindings, TestHelpersMixin):
|
|
|
227
229
|
for k, v in expected.items():
|
|
228
230
|
with self.subTest(key=k):
|
|
229
231
|
self.assertEqual(content_unit[k], v)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
@pytest.mark.parallel
|
|
235
|
+
def test_upload_metadata_23_spec(python_content_factory):
|
|
236
|
+
"""Test that packages using metadata spec 2.3 can be uploaded to pulp."""
|
|
237
|
+
filename = "urllib3-2.2.2-py3-none-any.whl"
|
|
238
|
+
with PyPISimple() as client:
|
|
239
|
+
page = client.get_project_page("urllib3")
|
|
240
|
+
for package in page.packages:
|
|
241
|
+
if package.filename == filename:
|
|
242
|
+
content = python_content_factory(filename, url=package.url)
|
|
243
|
+
assert content.metadata_version == "2.3"
|
|
244
|
+
break
|
{pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_download_content.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
2
|
"""Tests that verify download of content served by Pulp."""
|
|
3
|
+
import pytest
|
|
3
4
|
import hashlib
|
|
4
5
|
from random import choice
|
|
5
6
|
from urllib.parse import urljoin
|
|
@@ -149,3 +150,32 @@ class PublishPyPIJSON(TestCaseUsingBindings, TestHelpersMixin):
|
|
|
149
150
|
|
|
150
151
|
repo3 = self._create_repo_and_sync_with_remote(remote)
|
|
151
152
|
self.assertEqual(get_content_summary(repo3.to_dict()), PYTHON_MD_FIXTURE_SUMMARY)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
@pytest.mark.parallel
|
|
156
|
+
def test_pulp2pulp_sync_with_oddities(
|
|
157
|
+
python_repo_with_sync,
|
|
158
|
+
python_remote_factory,
|
|
159
|
+
python_publication_factory,
|
|
160
|
+
python_distribution_factory,
|
|
161
|
+
python_content_summary,
|
|
162
|
+
):
|
|
163
|
+
"""Test that Pulp can handle syncing packages with wierd names."""
|
|
164
|
+
remote = python_remote_factory(includes=["oslo.utils"], url="https://pypi.org")
|
|
165
|
+
repo = python_repo_with_sync(remote)
|
|
166
|
+
distro = python_distribution_factory(repository=repo.pulp_href)
|
|
167
|
+
summary = python_content_summary(repository_version=repo.latest_version_href)
|
|
168
|
+
# Test pulp 2 pulp full sync w/ live pypi apis
|
|
169
|
+
remote2 = python_remote_factory(includes=[], url=distro.base_url)
|
|
170
|
+
repo2 = python_repo_with_sync(remote2)
|
|
171
|
+
summary2 = python_content_summary(repository_version=repo2.latest_version_href)
|
|
172
|
+
assert summary2.present["python.python"]["count"] > 0
|
|
173
|
+
assert summary.present["python.python"]["count"] == summary2.present["python.python"]["count"]
|
|
174
|
+
# Test w/ publication
|
|
175
|
+
pub = python_publication_factory(repository=repo)
|
|
176
|
+
distro2 = python_distribution_factory(publication=pub.pulp_href)
|
|
177
|
+
remote3 = python_remote_factory(includes=[], url=distro2.base_url)
|
|
178
|
+
repo3 = python_repo_with_sync(remote3)
|
|
179
|
+
summary3 = python_content_summary(repository_version=repo3.latest_version_href)
|
|
180
|
+
assert summary3.present["python.python"]["count"] > 0
|
|
181
|
+
assert summary.present["python.python"]["count"] == summary3.present["python.python"]["count"]
|
|
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.11.2 → pulp-python-3.11.3}/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.11.2 → pulp-python-3.11.3}/pulp_python/app/migrations/0010_update_json_field.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
|
{pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_auto_publish.py
RENAMED
|
File without changes
|
{pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_consume_content.py
RENAMED
|
File without changes
|
{pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_crud_publications.py
RENAMED
|
File without changes
|
{pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_crud_remotes.py
RENAMED
|
File without changes
|
{pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_export_import.py
RENAMED
|
File without changes
|
{pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_full_mirror.py
RENAMED
|
File without changes
|
{pulp-python-3.11.2 → pulp-python-3.11.3}/pulp_python/tests/functional/api/test_pypi_apis.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
|