wagtail 6.0.5__py3-none-any.whl → 6.0.6__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.
wagtail/__init__.py CHANGED
@@ -6,7 +6,7 @@ from wagtail.utils.version import get_semver_version, get_version
6
6
 
7
7
  # major.minor.patch.release.number
8
8
  # release must be one of alpha, beta, rc, or final
9
- VERSION = (6, 0, 5, "final", 1)
9
+ VERSION = (6, 0, 6, "final", 1)
10
10
 
11
11
  __version__ = get_version(VERSION)
12
12
 
@@ -171,6 +171,30 @@ class TestParseQueryString(SimpleTestCase):
171
171
  self.assertDictEqual(filters.dict(), {"author": "foo bar", "bar": "beer"})
172
172
  self.assertEqual(repr(query), repr(Phrase("hello world")))
173
173
 
174
+ def test_long_queries(self):
175
+ filters, query = parse_query_string("0" * 60_000)
176
+ self.assertEqual(filters.dict(), {})
177
+ self.assertEqual(repr(query), repr(PlainText("0" * 60_000)))
178
+
179
+ filters, _ = parse_query_string(f'{"a" * 60_000}:"foo bar"')
180
+ self.assertEqual(filters.dict(), {"a" * 60_000: "foo bar"})
181
+
182
+ def test_long_filter_value(self):
183
+ filters, _ = parse_query_string(f'foo:ba{"r" * 60_000}')
184
+ self.assertEqual(filters.dict(), {"foo": f'ba{"r" * 60_000}'})
185
+
186
+ def test_joined_filters(self):
187
+ filters, query = parse_query_string("foo:bar:baz")
188
+ self.assertEqual(filters.dict(), {"foo": "bar"})
189
+ self.assertEqual(repr(query), repr(PlainText(":baz")))
190
+
191
+ filters, query = parse_query_string("foo:'bar':baz")
192
+ self.assertEqual(filters.dict(), {"foo": "bar"})
193
+ self.assertEqual(repr(query), repr(PlainText(":baz")))
194
+
195
+ filters, query = parse_query_string("foo:'bar:baz'")
196
+ self.assertEqual(filters.dict(), {"foo": "bar:baz"})
197
+
174
198
  def test_multiple_phrases(self):
175
199
  filters, query = parse_query_string('"hello world" "hi earth"')
176
200
 
wagtail/search/utils.py CHANGED
@@ -69,6 +69,8 @@ MUL = partial(balanced_reduce, operator.mul)
69
69
 
70
70
  MAX_QUERY_STRING_LENGTH = 255
71
71
 
72
+ filters_regexp = re.compile(r'\b(\w+):(\w+|"[^"]+"|\'[^\']+\')')
73
+
72
74
 
73
75
  def normalise_query_string(query_string):
74
76
  # Truncate query string
@@ -83,20 +85,12 @@ def normalise_query_string(query_string):
83
85
 
84
86
 
85
87
  def separate_filters_from_query(query_string):
86
- filters_regexp = r'(\w+):(\w+|"[^"]+"|\'[^\']+\')'
87
-
88
88
  filters = QueryDict(mutable=True)
89
- for match_object in re.finditer(filters_regexp, query_string):
89
+ for match_object in filters_regexp.finditer(query_string):
90
90
  key, value = match_object.groups()
91
- filters.update(
92
- {
93
- key: value.strip('"')
94
- if value.strip('"') is not value
95
- else value.strip("'")
96
- }
97
- )
98
-
99
- query_string = re.sub(filters_regexp, "", query_string).strip()
91
+ filters.update({key: value.strip("\"'")})
92
+
93
+ query_string = filters_regexp.sub("", query_string).strip()
100
94
 
101
95
  return filters, query_string
102
96
 
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.1
2
+ Name: wagtail
3
+ Version: 6.0.6
4
+ Summary: A Django content management system.
5
+ Home-page: https://wagtail.org/
6
+ Author: Wagtail core team + contributors
7
+ Author-email: hello@wagtail.org
8
+ License: BSD
9
+ Project-URL: Changelog, https://github.com/wagtail/wagtail/blob/main/CHANGELOG.txt
10
+ Project-URL: Documentation, https://docs.wagtail.org
11
+ Project-URL: Source, https://github.com/wagtail/wagtail
12
+ Project-URL: Tracker, https://github.com/wagtail/wagtail/issues
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Environment :: Web Environment
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: BSD License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Framework :: Django
26
+ Classifier: Framework :: Django :: 4.2
27
+ Classifier: Framework :: Django :: 5.0
28
+ Classifier: Framework :: Wagtail
29
+ Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
30
+ Requires-Python: >=3.8
31
+ License-File: LICENSE
32
+ Requires-Dist: Django (<6.0,>=4.2)
33
+ Requires-Dist: django-modelcluster (<7.0,>=6.2.1)
34
+ Requires-Dist: django-permissionedforms (<1.0,>=0.1)
35
+ Requires-Dist: django-taggit (<5.1,>=4.0)
36
+ Requires-Dist: django-treebeard (<5.0,>=4.5.1)
37
+ Requires-Dist: djangorestframework (<4.0,>=3.11.1)
38
+ Requires-Dist: django-filter (<24,>=23.3)
39
+ Requires-Dist: draftjs-exporter (<6.0,>=2.1.5)
40
+ Requires-Dist: Pillow (<11.0.0,>=9.1.0)
41
+ Requires-Dist: beautifulsoup4 (<4.13,>=4.8)
42
+ Requires-Dist: html5lib (<2,>=0.999)
43
+ Requires-Dist: Willow[heif] (<2,>=1.6.2)
44
+ Requires-Dist: requests (<3.0,>=2.11.1)
45
+ Requires-Dist: l18n (>=2018.5)
46
+ Requires-Dist: openpyxl (<4.0,>=3.0.10)
47
+ Requires-Dist: anyascii (>=0.1.5)
48
+ Requires-Dist: telepath (<1,>=0.3.1)
49
+ Requires-Dist: laces (<0.2,>=0.1)
50
+ Provides-Extra: docs
51
+ Requires-Dist: pyenchant (<4,>=3.1.1) ; extra == 'docs'
52
+ Requires-Dist: sphinxcontrib-spelling (<8,>=7) ; extra == 'docs'
53
+ Requires-Dist: Sphinx (>=1.5.2) ; extra == 'docs'
54
+ Requires-Dist: sphinx-autobuild (>=0.6.0) ; extra == 'docs'
55
+ Requires-Dist: sphinx-wagtail-theme (==6.3.0) ; extra == 'docs'
56
+ Requires-Dist: myst-parser (==2.0.0) ; extra == 'docs'
57
+ Requires-Dist: sphinx-copybutton (<1.0,>=0.5) ; extra == 'docs'
58
+ Provides-Extra: testing
59
+ Requires-Dist: python-dateutil (>=2.7) ; extra == 'testing'
60
+ Requires-Dist: pytz (>=2014.7) ; extra == 'testing'
61
+ Requires-Dist: Jinja2 (<3.2,>=3.0) ; extra == 'testing'
62
+ Requires-Dist: boto3 (<2,>=1.28) ; extra == 'testing'
63
+ Requires-Dist: freezegun (>=0.3.8) ; extra == 'testing'
64
+ Requires-Dist: azure-mgmt-cdn (<13.0,>=12.0) ; extra == 'testing'
65
+ Requires-Dist: azure-mgmt-frontdoor (<1.1,>=1.0) ; extra == 'testing'
66
+ Requires-Dist: django-pattern-library (>=0.7) ; extra == 'testing'
67
+ Requires-Dist: coverage (>=3.7.0) ; extra == 'testing'
68
+ Requires-Dist: doc8 (==0.8.1) ; extra == 'testing'
69
+ Requires-Dist: ruff (==0.1.5) ; extra == 'testing'
70
+ Requires-Dist: semgrep (==1.40.0) ; extra == 'testing'
71
+ Requires-Dist: curlylint (==0.13.1) ; extra == 'testing'
72
+ Requires-Dist: djhtml (==3.0.6) ; extra == 'testing'
73
+ Requires-Dist: polib (<2.0,>=1.1) ; extra == 'testing'
74
+ Requires-Dist: factory-boy (>=3.2) ; extra == 'testing'
75
+ Requires-Dist: tblib (<3.0,>=2.0) ; extra == 'testing'
76
+
77
+ Wagtail is an open source content management system built on Django, with a strong community and commercial support. It’s focused on user experience, and offers precise control for designers and developers.
78
+
79
+ For more details, see https://wagtail.org, https://docs.wagtail.org and https://github.com/wagtail/wagtail/.
@@ -1,4 +1,4 @@
1
- wagtail/__init__.py,sha256=K1wcA7S0Dnw2cah_2MSZ9P5YYQC3hqIaZv6jZCx-OSY,724
1
+ wagtail/__init__.py,sha256=9_2bzqbwkoBbaBpIjwvDH0P_pmBU2jMlaPkAI62e3WI,724
2
2
  wagtail/apps.py,sha256=38kXTdHoQzFnpUqDNxFpsqn2dut4V0u9rLOkhqCoYkc,713
3
3
  wagtail/compat.py,sha256=L41FhlX4xy5KgTdJ63smtM78mtKf1mxkPeOs8kyOwS0,538
4
4
  wagtail/coreutils.py,sha256=2eFnlfuyzu8wr5_u2j_zbrHhQDPxPfnaIlgRc4433J0,20660
@@ -3041,7 +3041,7 @@ wagtail/search/models.py,sha256=60eutCtHsmzAIfd7gEadRCN0aXkDV2_GTclm-wUCzg0,6059
3041
3041
  wagtail/search/query.py,sha256=QhZD3Sx2rtZWKz9BXq7Cy6oSHxJ1Ly0Nr9BpyyUsoiE,2340
3042
3042
  wagtail/search/queryset.py,sha256=xwsUc1FoodmIru4l8bZEIsYtfR-GnDEjizN6jLmkZBI,1094
3043
3043
  wagtail/search/signal_handlers.py,sha256=Md4dhmwLF7kX7YLG-MsqTLQ6NdfkFIavBJ9n5OsUIgA,956
3044
- wagtail/search/utils.py,sha256=PnF65FM5Udc7mZ8J2oBMJ15T6vYGL0N69awp_RgEDmc,6210
3044
+ wagtail/search/utils.py,sha256=onx_ym1p0kMBggaormbztwM-T0lXvnTG5vyOuyDnMQ0,6075
3045
3045
  wagtail/search/backends/__init__.py,sha256=nJEc435WnprL13v7OwcUCyHz0CTXMCMar9xTRqn1rH8,3455
3046
3046
  wagtail/search/backends/base.py,sha256=EhedKzF_2niqc7xIH8HmMdykoDXfz7EZ6thaIWUbMi0,16712
3047
3047
  wagtail/search/backends/elasticsearch7.py,sha256=HYZD5SD9YNMDGcAa28X7PrxjzuZcB8GF7J91BA4wXJA,41219
@@ -3182,7 +3182,7 @@ wagtail/search/tests/test_mysql_backend.py,sha256=BsAJk-0y0nKsSOo4qovY8yHIRLnL6S
3182
3182
  wagtail/search/tests/test_page_search.py,sha256=1oPBcgyJQpJmAQaNAhDAWXdVe2xrZ6kf7clefPZ0JLY,2363
3183
3183
  wagtail/search/tests/test_postgres_backend.py,sha256=QAR78RKMAUCH9beNu3r1Qxuhb865K8NU1C9sWC8lVco,7406
3184
3184
  wagtail/search/tests/test_postgres_stemming.py,sha256=zUqIANnIu4FD8SQtDd0xtCKH6x5voe9mdgA7nK0g3Wk,1346
3185
- wagtail/search/tests/test_queries.py,sha256=-_ZLLpLkF1HDaNzncrc3BVBNBaE4nBFhHABQC3oqG5M,11251
3185
+ wagtail/search/tests/test_queries.py,sha256=WiDiwm1fhc-dANf91gXGAfu3v1q23KyvL1-Vuu0gMhM,12290
3186
3186
  wagtail/search/tests/test_related_fields.py,sha256=B3vvhVVzzBQQYgbe2n6WE9s3VkD4YniCxfqy8nIQXU8,3420
3187
3187
  wagtail/search/tests/test_sqlite_backend.py,sha256=csgHqTr7P2F4-KwMYq6UaehlLs73XG0uVQJn9hWWzVM,1821
3188
3188
  wagtail/sites/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -3923,9 +3923,9 @@ wagtail/utils/urlpatterns.py,sha256=RDhVScxdm-RV4HSMjWElyrbEoTPsXu841_SKMgoFKtY,
3923
3923
  wagtail/utils/utils.py,sha256=UALGn0KOyqi5ZoXOozWX99ZPUsVZP51ET8d7sZ1jlm0,430
3924
3924
  wagtail/utils/version.py,sha256=40WGMIy8nSPQJFF01p7c38L444SexH2Cb-bQmR8ztXg,1478
3925
3925
  wagtail/utils/widgets.py,sha256=ibAvxHCjNw06bMlTD7wvrwmGEMNS3NzrnSKREGfPF44,1775
3926
- wagtail-6.0.5.dist-info/LICENSE,sha256=0aiL7_RJ2YkOjscmRI7opwmuURrY6h8MR0B24nrdRQU,1512
3927
- wagtail-6.0.5.dist-info/METADATA,sha256=tLzVohroDl1RnnH3ALTZSlOE_jiQKZFma52jDGJq6ZY,3713
3928
- wagtail-6.0.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
3929
- wagtail-6.0.5.dist-info/entry_points.txt,sha256=R14Z0xKoufNcDaku0EWDKM-K8J4ap0EImO8C-df8HVM,53
3930
- wagtail-6.0.5.dist-info/top_level.txt,sha256=zcKgvuRTi0gSgVzJ1qMoERCwhQ_i0n9bkyxza3oh9as,8
3931
- wagtail-6.0.5.dist-info/RECORD,,
3926
+ wagtail-6.0.6.dist-info/LICENSE,sha256=0aiL7_RJ2YkOjscmRI7opwmuURrY6h8MR0B24nrdRQU,1512
3927
+ wagtail-6.0.6.dist-info/METADATA,sha256=y9gUI9HNNyBHgeK4VFWbbPb795wRzCw71TcFIfNNxDE,3797
3928
+ wagtail-6.0.6.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
3929
+ wagtail-6.0.6.dist-info/entry_points.txt,sha256=R14Z0xKoufNcDaku0EWDKM-K8J4ap0EImO8C-df8HVM,53
3930
+ wagtail-6.0.6.dist-info/top_level.txt,sha256=zcKgvuRTi0gSgVzJ1qMoERCwhQ_i0n9bkyxza3oh9as,8
3931
+ wagtail-6.0.6.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.38.4)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,79 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: wagtail
3
- Version: 6.0.5
4
- Summary: A Django content management system.
5
- Home-page: https://wagtail.org/
6
- Author: Wagtail core team + contributors
7
- Author-email: hello@wagtail.org
8
- License: BSD
9
- Project-URL: Changelog, https://github.com/wagtail/wagtail/blob/main/CHANGELOG.txt
10
- Project-URL: Documentation, https://docs.wagtail.org
11
- Project-URL: Source, https://github.com/wagtail/wagtail
12
- Project-URL: Tracker, https://github.com/wagtail/wagtail/issues
13
- Classifier: Development Status :: 5 - Production/Stable
14
- Classifier: Environment :: Web Environment
15
- Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: BSD License
17
- Classifier: Operating System :: OS Independent
18
- Classifier: Programming Language :: Python
19
- Classifier: Programming Language :: Python :: 3
20
- Classifier: Programming Language :: Python :: 3.8
21
- Classifier: Programming Language :: Python :: 3.9
22
- Classifier: Programming Language :: Python :: 3.10
23
- Classifier: Programming Language :: Python :: 3.11
24
- Classifier: Programming Language :: Python :: 3.12
25
- Classifier: Framework :: Django
26
- Classifier: Framework :: Django :: 4.2
27
- Classifier: Framework :: Django :: 5.0
28
- Classifier: Framework :: Wagtail
29
- Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
30
- Requires-Python: >=3.8
31
- License-File: LICENSE
32
- Requires-Dist: Django <6.0,>=4.2
33
- Requires-Dist: django-modelcluster <7.0,>=6.2.1
34
- Requires-Dist: django-permissionedforms <1.0,>=0.1
35
- Requires-Dist: django-taggit <5.1,>=4.0
36
- Requires-Dist: django-treebeard <5.0,>=4.5.1
37
- Requires-Dist: djangorestframework <4.0,>=3.11.1
38
- Requires-Dist: django-filter <24,>=23.3
39
- Requires-Dist: draftjs-exporter <6.0,>=2.1.5
40
- Requires-Dist: Pillow <11.0.0,>=9.1.0
41
- Requires-Dist: beautifulsoup4 <4.13,>=4.8
42
- Requires-Dist: html5lib <2,>=0.999
43
- Requires-Dist: Willow[heif] <2,>=1.6.2
44
- Requires-Dist: requests <3.0,>=2.11.1
45
- Requires-Dist: l18n >=2018.5
46
- Requires-Dist: openpyxl <4.0,>=3.0.10
47
- Requires-Dist: anyascii >=0.1.5
48
- Requires-Dist: telepath <1,>=0.3.1
49
- Requires-Dist: laces <0.2,>=0.1
50
- Provides-Extra: docs
51
- Requires-Dist: pyenchant <4,>=3.1.1 ; extra == 'docs'
52
- Requires-Dist: sphinxcontrib-spelling <8,>=7 ; extra == 'docs'
53
- Requires-Dist: Sphinx >=1.5.2 ; extra == 'docs'
54
- Requires-Dist: sphinx-autobuild >=0.6.0 ; extra == 'docs'
55
- Requires-Dist: sphinx-wagtail-theme ==6.3.0 ; extra == 'docs'
56
- Requires-Dist: myst-parser ==2.0.0 ; extra == 'docs'
57
- Requires-Dist: sphinx-copybutton <1.0,>=0.5 ; extra == 'docs'
58
- Provides-Extra: testing
59
- Requires-Dist: python-dateutil >=2.7 ; extra == 'testing'
60
- Requires-Dist: pytz >=2014.7 ; extra == 'testing'
61
- Requires-Dist: Jinja2 <3.2,>=3.0 ; extra == 'testing'
62
- Requires-Dist: boto3 <2,>=1.28 ; extra == 'testing'
63
- Requires-Dist: freezegun >=0.3.8 ; extra == 'testing'
64
- Requires-Dist: azure-mgmt-cdn <13.0,>=12.0 ; extra == 'testing'
65
- Requires-Dist: azure-mgmt-frontdoor <1.1,>=1.0 ; extra == 'testing'
66
- Requires-Dist: django-pattern-library >=0.7 ; extra == 'testing'
67
- Requires-Dist: coverage >=3.7.0 ; extra == 'testing'
68
- Requires-Dist: doc8 ==0.8.1 ; extra == 'testing'
69
- Requires-Dist: ruff ==0.1.5 ; extra == 'testing'
70
- Requires-Dist: semgrep ==1.40.0 ; extra == 'testing'
71
- Requires-Dist: curlylint ==0.13.1 ; extra == 'testing'
72
- Requires-Dist: djhtml ==3.0.6 ; extra == 'testing'
73
- Requires-Dist: polib <2.0,>=1.1 ; extra == 'testing'
74
- Requires-Dist: factory-boy >=3.2 ; extra == 'testing'
75
- Requires-Dist: tblib <3.0,>=2.0 ; extra == 'testing'
76
-
77
- Wagtail is an open source content management system built on Django, with a strong community and commercial support. It’s focused on user experience, and offers precise control for designers and developers.
78
-
79
- For more details, see https://wagtail.org, https://docs.wagtail.org and https://github.com/wagtail/wagtail/.