pulp-python 3.12.0__py3-none-any.whl → 3.12.2__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.
@@ -10,7 +10,7 @@ class PulpPythonPluginAppConfig(PulpPluginAppConfig):
10
10
 
11
11
  name = "pulp_python.app"
12
12
  label = "python"
13
- version = "3.12.0"
13
+ version = "3.12.2"
14
14
  python_package_name = "pulp-python"
15
15
  domain_compatible = True
16
16
 
pulp_python/app/models.py CHANGED
@@ -17,6 +17,7 @@ from pulpcore.plugin.responses import ArtifactResponse
17
17
 
18
18
  from pathlib import PurePath
19
19
  from .utils import (
20
+ canonicalize_name,
20
21
  get_project_metadata_from_artifact,
21
22
  parse_project_metadata,
22
23
  python_content_to_json,
@@ -87,6 +88,8 @@ class PythonDistribution(Distribution, AutoAddObjPermsMixin):
87
88
  ).latest("pulp_created")
88
89
  except ObjectDoesNotExist:
89
90
  return None
91
+ if len(path.parts) == 2:
92
+ path = PurePath(f"simple/{canonicalize_name(path.parts[1])}")
90
93
  rel_path = f"{path}/index.html"
91
94
  try:
92
95
  ca = (
@@ -103,8 +106,9 @@ class PythonDistribution(Distribution, AutoAddObjPermsMixin):
103
106
  return ArtifactResponse(ca.artifact, headers=headers)
104
107
 
105
108
  if name:
109
+ normalized = canonicalize_name(name)
106
110
  package_content = PythonPackageContent.objects.filter(
107
- pk__in=self.publication.repository_version.content, name__iexact=name
111
+ pk__in=self.publication.repository_version.content, name__normalize=normalized
108
112
  )
109
113
  # TODO Change this value to the Repo's serial value when implemented
110
114
  headers = {PYPI_LAST_SERIAL: str(PYPI_SERIAL_CONSTANT)}
@@ -327,7 +327,8 @@ class MetadataView(PyPIMixin, ViewSet):
327
327
  elif meta_path.match("*/json"):
328
328
  name = meta_path.parts[0]
329
329
  if name:
330
- package_content = content.filter(name__iexact=name)
330
+ normalized = canonicalize_name(name)
331
+ package_content = content.filter(name__normalize=normalized)
331
332
  # TODO Change this value to the Repo's serial value when implemented
332
333
  headers = {PYPI_LAST_SERIAL: str(PYPI_SERIAL_CONSTANT)}
333
334
  if settings.DOMAIN_ENABLED:
@@ -83,7 +83,7 @@ def create_bandersnatch_config(remote):
83
83
  config["plugins"]["enabled"] += "prerelease_release\n"
84
84
  if remote.package_types:
85
85
  rrfm = "regex_release_file_metadata"
86
- config["plugins"]["enabled"] += rrfm
86
+ config["plugins"]["enabled"] += f"{rrfm}\n"
87
87
  if not config.has_section(rrfm):
88
88
  config.add_section(rrfm)
89
89
  config[rrfm]["any:release_file.packagetype"] = "\n".join(remote.package_types)
@@ -87,3 +87,32 @@ def test_full_pulp_to_pulp_sync(
87
87
  repo3 = python_repo_with_sync(remote3)
88
88
  summary2 = python_content_summary(repository_version=repo3.latest_version_href)
89
89
  assert summary2.present["python.python"]["count"] == PYTHON_MD_PACKAGE_COUNT
90
+
91
+
92
+ @pytest.mark.parallel
93
+ def test_pulp2pulp_sync_with_oddities(
94
+ python_repo_with_sync,
95
+ python_remote_factory,
96
+ python_publication_factory,
97
+ python_distribution_factory,
98
+ python_content_summary,
99
+ ):
100
+ """Test that Pulp can handle syncing packages with wierd names."""
101
+ remote = python_remote_factory(includes=["oslo.utils"], url="https://pypi.org")
102
+ repo = python_repo_with_sync(remote)
103
+ distro = python_distribution_factory(repository=repo)
104
+ summary = python_content_summary(repository_version=repo.latest_version_href)
105
+ # Test pulp 2 pulp full sync w/ live pypi apis
106
+ remote2 = python_remote_factory(includes=[], url=distro.base_url)
107
+ repo2 = python_repo_with_sync(remote2)
108
+ summary2 = python_content_summary(repository_version=repo2.latest_version_href)
109
+ assert summary2.present["python.python"]["count"] > 0
110
+ assert summary.present["python.python"]["count"] == summary2.present["python.python"]["count"]
111
+ # Test w/ publication
112
+ pub = python_publication_factory(repository=repo)
113
+ distro2 = python_distribution_factory(publication=pub)
114
+ remote3 = python_remote_factory(includes=[], url=distro2.base_url)
115
+ repo3 = python_repo_with_sync(remote3)
116
+ summary3 = python_content_summary(repository_version=repo3.latest_version_href)
117
+ assert summary3.present["python.python"]["count"] > 0
118
+ assert summary.present["python.python"]["count"] == summary3.present["python.python"]["count"]
@@ -264,6 +264,23 @@ def test_sync_platform_exclude(
264
264
  assert summary.present["python.python"]["count"] == SCIPY_COUNTS["no_os"]
265
265
 
266
266
 
267
+ @pytest.mark.parallel
268
+ def test_sync_multiple_filters(
269
+ python_repo_with_sync, python_remote_factory, python_content_summary
270
+ ):
271
+ """Tests sync with multiple filters."""
272
+ remote = python_remote_factory(
273
+ includes=PYTHON_LG_PROJECT_SPECIFIER,
274
+ package_types=["bdist_wheel"],
275
+ keep_latest_packages=1,
276
+ prereleases=False
277
+ )
278
+ repo = python_repo_with_sync(remote)
279
+
280
+ summary = python_content_summary(repository_version=repo.latest_version_href)
281
+ assert summary.present["python.python"]["count"] == PYTHON_LG_FIXTURE_COUNTS["multi"]
282
+
283
+
267
284
  @pytest.mark.parallel
268
285
  def test_proxy_sync(
269
286
  python_bindings,
@@ -135,6 +135,7 @@ PYTHON_LG_FIXTURE_COUNTS = {
135
135
  "latest_3": 49,
136
136
  "sdist": 27,
137
137
  "bdist_wheel": 63,
138
+ "multi": 33, # keep_latest=1, package_types="bdist_wheel", prereleases=False
138
139
  }
139
140
 
140
141
  DJANGO_LATEST_3 = 4 # latest version has 2 dists, each other has 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pulp-python
3
- Version: 3.12.0
3
+ Version: 3.12.2
4
4
  Summary: pulp-python plugin for the Pulp Project
5
5
  Home-page: https://www.pulpproject.org
6
6
  Author: Pulp Project Developers
@@ -16,10 +16,10 @@ Classifier: Programming Language :: Python :: 3.9
16
16
  Requires-Python: >=3.9
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- Requires-Dist: pulpcore <3.70.0,>=3.49.0
20
- Requires-Dist: pkginfo <1.9.7,>=1.8.2
21
- Requires-Dist: bandersnatch <6.2,>=6.1
22
- Requires-Dist: pypi-simple <1.0.0,>=0.9.0
19
+ Requires-Dist: pulpcore<3.70.0,>=3.49.0
20
+ Requires-Dist: pkginfo<1.9.7,>=1.8.2
21
+ Requires-Dist: bandersnatch<6.2,>=6.1
22
+ Requires-Dist: pypi-simple<1.0.0,>=0.9.0
23
23
 
24
24
  # pulp_python
25
25
 
@@ -1,9 +1,9 @@
1
1
  pulp_python/__init__.py,sha256=BfGFMACxdZWJMiAhkn0BW-k_iKULe-nVCcQ6g0sX89k,65
2
2
  pulp_python/pytest_plugin.py,sha256=MdbAKZjcYvypT2-E1bJGaBsIDIaZuJkh6g45ZhWuKR4,7510
3
- pulp_python/app/__init__.py,sha256=gXsLGAnwNVcDoV6vmqU32-htBZuN9ulcgSN-BBXNOcw,2488
3
+ pulp_python/app/__init__.py,sha256=fjNk4QE2S2I3S07JHtk69FHoXH14pBRRcvr2T3zsSvQ,2488
4
4
  pulp_python/app/global_access_conditions.py,sha256=y8NwdgAoaB5iY7EzSBoCQOgVopSHpVMc55FKJmCGGlI,1081
5
5
  pulp_python/app/modelresource.py,sha256=dogoBWibBmQyFpcV-Hp1lu7D2WwSECa5PEShWSIg7mg,1248
6
- pulp_python/app/models.py,sha256=v-ziV8Ae9W3pSwotIfxGtuQ0DNxeZx_gL_9xO7BN7mE,10586
6
+ pulp_python/app/models.py,sha256=veoWVnGgpjn2yiuOdC5-IiXo9PJrlO5AAAuszpepOmg,10798
7
7
  pulp_python/app/replica.py,sha256=CJOSvYp7kwsF269g9Rje9jnbCWTkG_6s25UL9W1Vxuw,1583
8
8
  pulp_python/app/serializers.py,sha256=a_5Bul0NBtkxyHpgmqq8eJ6gR_3V8GtzkD2lr7muuHc,15280
9
9
  pulp_python/app/settings.py,sha256=F-TFLcol3nXK2IHpb9yIv-KIXj2OPibQ8FuyCCCFCT0,227
@@ -26,17 +26,17 @@ pulp_python/app/migrations/0013_add_rbac_permissions.py,sha256=ynnxHNW4SXo5YL7hR
26
26
  pulp_python/app/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  pulp_python/app/pypi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  pulp_python/app/pypi/serializers.py,sha256=6ivjOQx0cuokiyy4DZNPHR7YnMAZLQ-rnr_7i9sGtwM,3295
29
- pulp_python/app/pypi/views.py,sha256=tk1vBTTZL9Um1RF5oTHn16lA5n3nLcT9ttPc8ZTv5p4,15657
29
+ pulp_python/app/pypi/views.py,sha256=TDUNhZdvikzMKeUBsKlog5FOz6fIgJutntfKavsWRpI,15715
30
30
  pulp_python/app/tasks/__init__.py,sha256=wAbWAJEZDXPRChUjdxDXNHP1KVnWgH5Q_P_cHeG8LH4,172
31
31
  pulp_python/app/tasks/publish.py,sha256=H-7uqzHNqfCbkh7D5DmZqy060paTLGk3XpyGVCmVeHQ,4064
32
- pulp_python/app/tasks/sync.py,sha256=nSKuEhRrCv236wN_QXZN3Hv4INY2jMEvS2rMxm2AZec,11178
32
+ pulp_python/app/tasks/sync.py,sha256=q1RaIb58GojoighbmgSCYVbm6V0Zh0dI_9Ejyu6t91I,11185
33
33
  pulp_python/app/tasks/upload.py,sha256=7kn3q3DN7GufRZJpOdybXdJ6qDhFShz9lto-rtUF4t4,3836
34
34
  pulp_python/app/webserver_snippets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  pulp_python/app/webserver_snippets/apache.conf,sha256=3frHSl2YV_8pJPscaFxMVo7HmxGJdb8XVmfdLtCxzoA,97
36
36
  pulp_python/app/webserver_snippets/nginx.conf,sha256=gMqZGFefsTJVVx9YRxpHVS7NMEll9CzOseYdtLr3Avc,344
37
37
  pulp_python/tests/__init__.py,sha256=4Yz43a8s-KyhdHFb5eEhIIvH72807Y84uAHnG5bO5y0,31
38
38
  pulp_python/tests/functional/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
- pulp_python/tests/functional/constants.py,sha256=gxbHT6EMvt4kpJOie1RsqFWxnqjCGUK7j4_So9traeg,12239
39
+ pulp_python/tests/functional/constants.py,sha256=sARzSILWCTBeG0Gimj-c4_C1vAkPArVa0objTIqZTqM,12321
40
40
  pulp_python/tests/functional/utils.py,sha256=JPCEAqdbLFx89OC8J0WBtot1QD4go7hgUhG-8CWg8tQ,2705
41
41
  pulp_python/tests/functional/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  pulp_python/tests/functional/api/test_auto_publish.py,sha256=uCIt4LsO61oMk3bDs3LMQDJI8zkKqvY0b1uX16bTxzM,1747
@@ -45,17 +45,17 @@ pulp_python/tests/functional/api/test_crud_content_unit.py,sha256=PUpnfkCzlp39zd
45
45
  pulp_python/tests/functional/api/test_crud_publications.py,sha256=FyjkyM3qMzo-Um6GZP-qGssz4sZPBx34dD2Oux3qlm0,4448
46
46
  pulp_python/tests/functional/api/test_crud_remotes.py,sha256=1O5QiN5JK-xM-PSrZlXJDZOAr2KLMq3JFHIXV6zOVJw,5487
47
47
  pulp_python/tests/functional/api/test_domains.py,sha256=euQM0XIt2jTnJJCSXl2pw-tNzBBKkgQ_rksZ1rd7l6c,9468
48
- pulp_python/tests/functional/api/test_download_content.py,sha256=9bii7Y9PqfjlC-xvrDnsllHywGI5bx9LadbsZTBqRu8,3502
48
+ pulp_python/tests/functional/api/test_download_content.py,sha256=msnsKpU6TGT8eNu6e0uFa4fte6hj85OTexwOHdf66-c,4950
49
49
  pulp_python/tests/functional/api/test_export_import.py,sha256=-nxRdaG_adFgJTkilLLsVmAeH6f74ludb6qqZrm_bGA,4597
50
50
  pulp_python/tests/functional/api/test_full_mirror.py,sha256=_ECJAQDOYtGC3EKMHjW7ACLDLDC7OdcxY-8RriMwMIg,2929
51
51
  pulp_python/tests/functional/api/test_pypi_apis.py,sha256=vYEqpCq-oSpDlW2KSKox--s3rU5zh6HiGEehqimWjtQ,12676
52
52
  pulp_python/tests/functional/api/test_rbac.py,sha256=p9x_E14BkhWwRww1GcApOtRsiyF6U-cTcKZYrrLKNas,10285
53
- pulp_python/tests/functional/api/test_sync.py,sha256=0CbPGXcKeLBLIUEu7PsrHn3kDfwcCCW2yihfePEvEK8,12070
53
+ pulp_python/tests/functional/api/test_sync.py,sha256=EYMnscBllEQxzZAKRv2QcrT2n_r5ny0NJzsH5XrjsSY,12645
54
54
  pulp_python/tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
55
  pulp_python/tests/unit/test_models.py,sha256=TBI0yKsrdbnJSPeBFfxSqhXK7zaNvR6qg5JehGH3Pds,229
56
- pulp_python-3.12.0.dist-info/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
57
- pulp_python-3.12.0.dist-info/METADATA,sha256=9DD0NhGOJDUQ98ikN5Pt3RQRpoGmZ4JmjjcexDrdrjo,1175
58
- pulp_python-3.12.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
59
- pulp_python-3.12.0.dist-info/entry_points.txt,sha256=HvqLEXjw_dS5jqAwnE5JiRZFE6f-y5SRtitKLPml2To,115
60
- pulp_python-3.12.0.dist-info/top_level.txt,sha256=X0hXgXc_bpbiKqVrkt8jD5_QEiQviKbHDwveQcOcJjo,12
61
- pulp_python-3.12.0.dist-info/RECORD,,
56
+ pulp_python-3.12.2.dist-info/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
57
+ pulp_python-3.12.2.dist-info/METADATA,sha256=mCacBmG67vMD9Gv86jKUW42rK56hD3Lg5c_t8tmQ_wc,1171
58
+ pulp_python-3.12.2.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
59
+ pulp_python-3.12.2.dist-info/entry_points.txt,sha256=HvqLEXjw_dS5jqAwnE5JiRZFE6f-y5SRtitKLPml2To,115
60
+ pulp_python-3.12.2.dist-info/top_level.txt,sha256=X0hXgXc_bpbiKqVrkt8jD5_QEiQviKbHDwveQcOcJjo,12
61
+ pulp_python-3.12.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: bdist_wheel (0.44.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5