pulp-python 3.36.1__py3-none-any.whl → 3.36.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.
@@ -12,7 +12,7 @@ class PulpPythonPluginAppConfig(PulpPluginAppConfig):
12
12
 
13
13
  name = "pulp_python.app"
14
14
  label = "python"
15
- version = "3.36.1"
15
+ version = "3.36.2"
16
16
  python_package_name = "pulp-python"
17
17
  domain_compatible = True
18
18
 
@@ -2,7 +2,7 @@ import re
2
2
  from email.utils import getaddresses
3
3
  from urllib.parse import urljoin
4
4
 
5
- from django.db.models import F, FilteredRelation, Min, Q
5
+ from django.db.models import F, FilteredRelation, Max, Min, Q
6
6
  from django.http.response import HttpResponse, HttpResponseNotFound
7
7
  from django.utils.decorators import method_decorator
8
8
  from django.utils.feedgenerator import Rss201rev2Feed
@@ -15,7 +15,7 @@ from rest_framework.viewsets import ViewSet
15
15
  from pulp_python.app.cache import PythonApiCache, find_base_path_cached
16
16
  from pulp_python.app.pypi.views import PyPIMixin, _etag_func
17
17
 
18
- UPDATES_LIMIT = 100
18
+ UPDATES_LIMIT = 500
19
19
  PACKAGES_LIMIT = 40
20
20
  PROJECT_RELEASES_LIMIT = 40
21
21
  RSS_CONTENT_TYPE = "application/rss+xml; charset=utf-8"
@@ -66,7 +66,7 @@ def iter_releases(content, repo_ver, name_normalized=None, limit=UPDATES_LIMIT):
66
66
  qs.order_by()
67
67
  .values("name_normalized", "version")
68
68
  .annotate(
69
- added_at=Min("file_added_at"),
69
+ added_at=Max("file_added_at"),
70
70
  name=Min("name"),
71
71
  summary=Min("summary"),
72
72
  author_email=Min("author_email"),
@@ -82,7 +82,7 @@ def iter_projects(content, repo_ver, limit=PACKAGES_LIMIT):
82
82
  qs.order_by()
83
83
  .values("name_normalized")
84
84
  .annotate(
85
- added_at=Min("file_added_at"),
85
+ added_at=Max("file_added_at"),
86
86
  name=Min("name"),
87
87
  summary=Min("summary"),
88
88
  author_email=Min("author_email"),
@@ -98,7 +98,7 @@ def _item_dict(title, link, description, author_email, pubdate):
98
98
  "description": sanitize_xml_text(description),
99
99
  "author_email": format_author(author_email),
100
100
  "pubdate": pubdate,
101
- "unique_id": link,
101
+ "unique_id": f"{link}#{pubdate.isoformat()}",
102
102
  }
103
103
 
104
104
 
@@ -118,7 +118,7 @@ def render_rss(title, link, description, items):
118
118
  author_email=item["author_email"],
119
119
  pubdate=item["pubdate"],
120
120
  unique_id=item["unique_id"],
121
- unique_id_is_permalink=True,
121
+ unique_id_is_permalink=False,
122
122
  )
123
123
  return feed.writeString("utf-8")
124
124
 
@@ -125,8 +125,40 @@ def test_pinned_version_feeds(
125
125
 
126
126
  item = _parse_items(_get_feed(distro, "rss/updates.xml", bindings_cfg))[0]
127
127
  assert item.findtext("link").endswith("pypi/shelf-reader/0.1/json")
128
- assert item.findtext("guid").endswith("pypi/shelf-reader/0.1/json")
128
+ assert "pypi/shelf-reader/0.1/json#" in item.findtext("guid")
129
129
 
130
130
  python_content_factory(TWINE_WHEEL_FILENAME, url=TWINE_WHEEL_URL, repository=repo)
131
131
  update_titles = _titles(_parse_items(_get_feed(distro, "rss/updates.xml", bindings_cfg)))
132
132
  assert update_titles == ["shelf-reader 0.1"]
133
+
134
+
135
+ @pytest.mark.parallel
136
+ def test_new_file_for_existing_version_updates_guid(
137
+ bindings_cfg, python_content_factory, python_empty_repo_distro
138
+ ):
139
+ """Adding a new file for an existing (name, version) produces a new guid and updated date."""
140
+ repo, distro = python_empty_repo_distro()
141
+
142
+ python_content_factory(PYTHON_EGG_FILENAME, url=PYTHON_EGG_URL, repository=repo)
143
+
144
+ items = _parse_items(_get_feed(distro, "rss/updates.xml", bindings_cfg))
145
+ assert len(items) == 1
146
+ first_guid = items[0].findtext("guid")
147
+ first_date = items[0].findtext("pubDate")
148
+ assert "pypi/shelf-reader/0.1/json" in first_guid
149
+
150
+ python_content_factory(PYTHON_WHEEL_FILENAME, url=PYTHON_WHEEL_URL, repository=repo)
151
+
152
+ items = _parse_items(_get_feed(distro, "rss/updates.xml", bindings_cfg))
153
+ assert len(items) == 1
154
+ second_guid = items[0].findtext("guid")
155
+ second_date = items[0].findtext("pubDate")
156
+
157
+ assert second_guid != first_guid
158
+ assert second_date >= first_date
159
+
160
+ release_items = _parse_items(
161
+ _get_feed(distro, "rss/project/shelf-reader/releases.xml", bindings_cfg)
162
+ )
163
+ assert len(release_items) == 1
164
+ assert release_items[0].findtext("guid") == second_guid
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pulp-python
3
- Version: 3.36.1
3
+ Version: 3.36.2
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
@@ -1,6 +1,6 @@
1
1
  pulp_python/__init__.py,sha256=GIuTLoBTc-07dSLJUh8xrZPRz8x-jJ61pfR0J1IjnzI,65
2
2
  pulp_python/pytest_plugin.py,sha256=8Ko-O87JGPC79h8-Ecw2gJLxa6q1Ng8wD6WxbinOnVs,8573
3
- pulp_python/app/__init__.py,sha256=mjDFOStnCqTyF63aolsuEvZuAHTL8_L95lFnTx-oHf0,2552
3
+ pulp_python/app/__init__.py,sha256=e6i6xQCW99OL1SQrMxWjiBz06J30kQAhKKM5XQaBEhg,2552
4
4
  pulp_python/app/cache.py,sha256=Zl2nb4uKyPYp5a3FBrdRZ_-cXfofNMQmIRaQ6dUZZ1g,1037
5
5
  pulp_python/app/exceptions.py,sha256=mPNcWyuzF0XeOPybm-G6oDKtRqvfj4jyp41iaYqcqkA,1314
6
6
  pulp_python/app/global_access_conditions.py,sha256=MZJtyoVsr-4hRaty6mKDqh3caOHd5UKJjEWLV2crOLs,1080
@@ -43,7 +43,7 @@ pulp_python/app/migrations/0023_packageyank.py,sha256=357fqSNK-D1OvI9RynnyMMrXJt
43
43
  pulp_python/app/migrations/0024_pythonrepository_error_on_reject.py,sha256=p10wp0OEVA7m-ZpuzlqsJg9dEbf4cF6kow9AfK37JU8,348
44
44
  pulp_python/app/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
45
  pulp_python/app/pypi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- pulp_python/app/pypi/feeds.py,sha256=KReO4_HPzw1Pf_A2lv19Yfia-k2mfDzFMuo3-kvdH7g,8985
46
+ pulp_python/app/pypi/feeds.py,sha256=G3o5ZOajLALxLIjbDCWmS5C0R5yg5peci0CbtNzEPY0,9018
47
47
  pulp_python/app/pypi/serializers.py,sha256=VDV4REMltZr98bxulgOGoGLnBxUtDod0t1fg_lDFpcs,5601
48
48
  pulp_python/app/pypi/views.py,sha256=Po1OoWeZAnhm6JETirynQhm2T2Y0f_OilCQCG__KsnM,27423
49
49
  pulp_python/app/tasks/__init__.py,sha256=JplOj2JtE_i4sQYqV7JnDY7zkraU_KlsCaNnYYaZ1x4,346
@@ -73,7 +73,7 @@ pulp_python/tests/functional/api/test_download_content.py,sha256=5IuaHXyLakPkjm5
73
73
  pulp_python/tests/functional/api/test_export_import.py,sha256=rHns9wdaeP-vtfW_qoGHU9EVuJ4YuWE0-rjl_8otAgU,4530
74
74
  pulp_python/tests/functional/api/test_full_mirror.py,sha256=v0nSlGKGSycFqZM4opCTHVtbmCfo_Y5y3k_6Rm7eBF8,12058
75
75
  pulp_python/tests/functional/api/test_pypi_apis.py,sha256=iZnoSN2wCczXh14KJDH8pSDTygjs0kgZsYIcIYS5TP8,13647
76
- pulp_python/tests/functional/api/test_pypi_feeds.py,sha256=RmeWEwH3-XOTkeYziClLZhF3CM8p2BXdY8MmQs7MIg4,5424
76
+ pulp_python/tests/functional/api/test_pypi_feeds.py,sha256=EuVcWxbYHFPgPZhobdxd89cf1nZUa4nzhNxM90DoLgI,6621
77
77
  pulp_python/tests/functional/api/test_pypi_simple_api.py,sha256=N01RnpoLbPE1hr3blz60Tmn8gWvixzs9u1Hh3eGfeyg,7336
78
78
  pulp_python/tests/functional/api/test_rbac.py,sha256=-xNWqvKKU-v1uC6tCRGBK0aWaff25K9C-AfzQkdHhhI,10513
79
79
  pulp_python/tests/functional/api/test_repair.py,sha256=4FR7jx_LA2K-pnRJXKkhq-1uUoWXST1leZ9XdyhGM2U,12909
@@ -85,9 +85,9 @@ pulp_python/tests/functional/api/test_vulnerability_report.py,sha256=Rv492Wrvu1F
85
85
  pulp_python/tests/functional/api/test_yank.py,sha256=qyZbAJ6bJO-4LPkVfVxKuWFjypJ8BmBrCnLo0luAhVk,11913
86
86
  pulp_python/tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
87
  pulp_python/tests/unit/test_models.py,sha256=TBI0yKsrdbnJSPeBFfxSqhXK7zaNvR6qg5JehGH3Pds,229
88
- pulp_python-3.36.1.dist-info/licenses/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
89
- pulp_python-3.36.1.dist-info/METADATA,sha256=J8k1fgH8pN-kLNN9yJM9GrMMwGzqN3MV1MeZxAr8-ag,1744
90
- pulp_python-3.36.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
91
- pulp_python-3.36.1.dist-info/entry_points.txt,sha256=HvqLEXjw_dS5jqAwnE5JiRZFE6f-y5SRtitKLPml2To,115
92
- pulp_python-3.36.1.dist-info/top_level.txt,sha256=X0hXgXc_bpbiKqVrkt8jD5_QEiQviKbHDwveQcOcJjo,12
93
- pulp_python-3.36.1.dist-info/RECORD,,
88
+ pulp_python-3.36.2.dist-info/licenses/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
89
+ pulp_python-3.36.2.dist-info/METADATA,sha256=WKxfQ8q3YiH8EM6ml3pRiHQbGTv8IwLXcSdbcc1llw0,1744
90
+ pulp_python-3.36.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
91
+ pulp_python-3.36.2.dist-info/entry_points.txt,sha256=HvqLEXjw_dS5jqAwnE5JiRZFE6f-y5SRtitKLPml2To,115
92
+ pulp_python-3.36.2.dist-info/top_level.txt,sha256=X0hXgXc_bpbiKqVrkt8jD5_QEiQviKbHDwveQcOcJjo,12
93
+ pulp_python-3.36.2.dist-info/RECORD,,