csu 2.6.16__tar.gz → 2.6.17__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 (109) hide show
  1. {csu-2.6.16 → csu-2.6.17}/.bumpversion.cfg +1 -1
  2. {csu-2.6.16 → csu-2.6.17}/.cookiecutterrc +1 -1
  3. {csu-2.6.16 → csu-2.6.17}/PKG-INFO +3 -3
  4. {csu-2.6.16 → csu-2.6.17}/README.rst +2 -2
  5. {csu-2.6.16 → csu-2.6.17}/pyproject.toml +1 -1
  6. {csu-2.6.16 → csu-2.6.17}/src/csu/__init__.py +1 -1
  7. {csu-2.6.16 → csu-2.6.17}/src/csu/logging.py +4 -2
  8. {csu-2.6.16 → csu-2.6.17}/src/csu.egg-info/PKG-INFO +3 -3
  9. {csu-2.6.16 → csu-2.6.17}/tests/test_logging.py +39 -2
  10. {csu-2.6.16 → csu-2.6.17}/tests/test_service.py +3 -3
  11. {csu-2.6.16 → csu-2.6.17}/tox.ini +1 -0
  12. {csu-2.6.16 → csu-2.6.17}/.coveragerc +0 -0
  13. {csu-2.6.16 → csu-2.6.17}/.editorconfig +0 -0
  14. {csu-2.6.16 → csu-2.6.17}/.github/workflows/github-actions.yml +0 -0
  15. {csu-2.6.16 → csu-2.6.17}/.pre-commit-config.yaml +0 -0
  16. {csu-2.6.16 → csu-2.6.17}/.tombi.toml +0 -0
  17. {csu-2.6.16 → csu-2.6.17}/AUTHORS.rst +0 -0
  18. {csu-2.6.16 → csu-2.6.17}/CHANGELOG.rst +0 -0
  19. {csu-2.6.16 → csu-2.6.17}/CONTRIBUTING.rst +0 -0
  20. {csu-2.6.16 → csu-2.6.17}/LICENSE +0 -0
  21. {csu-2.6.16 → csu-2.6.17}/MANIFEST.in +0 -0
  22. {csu-2.6.16 → csu-2.6.17}/ci/bootstrap.py +0 -0
  23. {csu-2.6.16 → csu-2.6.17}/ci/requirements.txt +0 -0
  24. {csu-2.6.16 → csu-2.6.17}/ci/templates/.github/workflows/github-actions.yml +0 -0
  25. {csu-2.6.16 → csu-2.6.17}/pytest.ini +0 -0
  26. {csu-2.6.16 → csu-2.6.17}/setup.cfg +0 -0
  27. {csu-2.6.16 → csu-2.6.17}/src/csu/admin.py +0 -0
  28. {csu-2.6.16 → csu-2.6.17}/src/csu/conf.py +0 -0
  29. {csu-2.6.16 → csu-2.6.17}/src/csu/consts.py +0 -0
  30. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/__init__.py +0 -0
  31. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/auth.py +0 -0
  32. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/fields.py +0 -0
  33. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/forms.py +0 -0
  34. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/perms.py +0 -0
  35. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/phonenumber.py +0 -0
  36. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/serializers.py +0 -0
  37. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/test_auth.py +0 -0
  38. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/test_fields.py +0 -0
  39. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/test_forms.py +0 -0
  40. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/test_phonenumber.py +0 -0
  41. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/test_serializers.py +0 -0
  42. {csu-2.6.16 → csu-2.6.17}/src/csu/drf/views.py +0 -0
  43. {csu-2.6.16 → csu-2.6.17}/src/csu/enums.py +0 -0
  44. {csu-2.6.16 → csu-2.6.17}/src/csu/env.py +0 -0
  45. {csu-2.6.16 → csu-2.6.17}/src/csu/exceptions.py +0 -0
  46. {csu-2.6.16 → csu-2.6.17}/src/csu/export.py +0 -0
  47. {csu-2.6.16 → csu-2.6.17}/src/csu/fixups.py +0 -0
  48. {csu-2.6.16 → csu-2.6.17}/src/csu/forms/__init__.py +0 -0
  49. {csu-2.6.16 → csu-2.6.17}/src/csu/forms/crispy.py +0 -0
  50. {csu-2.6.16 → csu-2.6.17}/src/csu/forms/fields.py +0 -0
  51. {csu-2.6.16 → csu-2.6.17}/src/csu/gettext.py +0 -0
  52. {csu-2.6.16 → csu-2.6.17}/src/csu/gettext_lazy.py +0 -0
  53. {csu-2.6.16 → csu-2.6.17}/src/csu/locale/ro/LC_MESSAGES/django.mo +0 -0
  54. {csu-2.6.16 → csu-2.6.17}/src/csu/locale/ro/LC_MESSAGES/django.po +0 -0
  55. {csu-2.6.16 → csu-2.6.17}/src/csu/management.py +0 -0
  56. {csu-2.6.16 → csu-2.6.17}/src/csu/models.py +0 -0
  57. {csu-2.6.16 → csu-2.6.17}/src/csu/query.py +0 -0
  58. {csu-2.6.16 → csu-2.6.17}/src/csu/routers.py +0 -0
  59. {csu-2.6.16 → csu-2.6.17}/src/csu/service.py +0 -0
  60. {csu-2.6.16 → csu-2.6.17}/src/csu/templates/api_exception.html +0 -0
  61. {csu-2.6.16 → csu-2.6.17}/src/csu/templates/forms/widgets/opaquewidget.html +0 -0
  62. {csu-2.6.16 → csu-2.6.17}/src/csu/test_consts.py +0 -0
  63. {csu-2.6.16 → csu-2.6.17}/src/csu/test_env.py +0 -0
  64. {csu-2.6.16 → csu-2.6.17}/src/csu/test_management.py +0 -0
  65. {csu-2.6.16 → csu-2.6.17}/src/csu/test_service.py +0 -0
  66. {csu-2.6.16 → csu-2.6.17}/src/csu/test_timezones.py +0 -0
  67. {csu-2.6.16 → csu-2.6.17}/src/csu/test_utils.py +0 -0
  68. {csu-2.6.16 → csu-2.6.17}/src/csu/test_xml.py +0 -0
  69. {csu-2.6.16 → csu-2.6.17}/src/csu/timezones.py +0 -0
  70. {csu-2.6.16 → csu-2.6.17}/src/csu/utils.py +0 -0
  71. {csu-2.6.16 → csu-2.6.17}/src/csu/views.py +0 -0
  72. {csu-2.6.16 → csu-2.6.17}/src/csu/worker/__init__.py +0 -0
  73. {csu-2.6.16 → csu-2.6.17}/src/csu/worker/admin.py +0 -0
  74. {csu-2.6.16 → csu-2.6.17}/src/csu/worker/asgi.py +0 -0
  75. {csu-2.6.16 → csu-2.6.17}/src/csu/worker/engine.py +0 -0
  76. {csu-2.6.16 → csu-2.6.17}/src/csu/worker/enums.py +0 -0
  77. {csu-2.6.16 → csu-2.6.17}/src/csu/worker/job.py +0 -0
  78. {csu-2.6.16 → csu-2.6.17}/src/csu/worker/models.py +0 -0
  79. {csu-2.6.16 → csu-2.6.17}/src/csu/worker/registry.py +0 -0
  80. {csu-2.6.16 → csu-2.6.17}/src/csu/wsgi.py +0 -0
  81. {csu-2.6.16 → csu-2.6.17}/src/csu/xml.py +0 -0
  82. {csu-2.6.16 → csu-2.6.17}/src/csu.egg-info/SOURCES.txt +0 -0
  83. {csu-2.6.16 → csu-2.6.17}/src/csu.egg-info/dependency_links.txt +0 -0
  84. {csu-2.6.16 → csu-2.6.17}/src/csu.egg-info/requires.txt +0 -0
  85. {csu-2.6.16 → csu-2.6.17}/src/csu.egg-info/top_level.txt +0 -0
  86. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service/test_custom_context.yaml +0 -0
  87. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service/test_custom_context_0_retries.yaml +0 -0
  88. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service/test_decoding.yaml +0 -0
  89. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service/test_error.yaml +0 -0
  90. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service/test_logging.yaml +0 -0
  91. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service/test_redirects.yaml +0 -0
  92. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service/test_success.yaml +0 -0
  93. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service_auth/test_async.yaml +0 -0
  94. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service_auth/test_async_auth.yaml +0 -0
  95. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service_auth/test_sync.yaml +0 -0
  96. {csu-2.6.16 → csu-2.6.17}/tests/cassettes/test_service_auth/test_sync_auth.yaml +0 -0
  97. {csu-2.6.16 → csu-2.6.17}/tests/conftest.py +0 -0
  98. {csu-2.6.16 → csu-2.6.17}/tests/exampleworker.py +0 -0
  99. {csu-2.6.16 → csu-2.6.17}/tests/test_exampleworker.py +0 -0
  100. {csu-2.6.16 → csu-2.6.17}/tests/test_exceptions.py +0 -0
  101. {csu-2.6.16 → csu-2.6.17}/tests/test_models.py +0 -0
  102. {csu-2.6.16 → csu-2.6.17}/tests/test_service_auth.py +0 -0
  103. {csu-2.6.16 → csu-2.6.17}/tests/test_views.py +0 -0
  104. {csu-2.6.16 → csu-2.6.17}/tests/test_worker.py +0 -0
  105. {csu-2.6.16 → csu-2.6.17}/tests/testproject/__init__.py +0 -0
  106. {csu-2.6.16 → csu-2.6.17}/tests/testproject/fixtures/testuser.json +0 -0
  107. {csu-2.6.16 → csu-2.6.17}/tests/testproject/models.py +0 -0
  108. {csu-2.6.16 → csu-2.6.17}/tests/testproject/settings.py +0 -0
  109. {csu-2.6.16 → csu-2.6.17}/tests/testproject/urls.py +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 2.6.16
2
+ current_version = 2.6.17
3
3
  commit = True
4
4
  tag = True
5
5
 
@@ -41,7 +41,7 @@ default_context:
41
41
  sphinx_theme: furo
42
42
  test_matrix_separate_coverage: false
43
43
  tests_inside_package: true
44
- version: 2.6.16
44
+ version: 2.6.17
45
45
  version_manager: bump2version
46
46
  website: https://blog.ionelmc.ro
47
47
  year_from: '2024'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csu
3
- Version: 2.6.16
3
+ Version: 2.6.17
4
4
  Summary: Clean Slate Utils - bunch of utility code, mostly Django/DRF specific.
5
5
  Author-email: Ionel Cristian Mărieș <contact@ionelmc.ro>
6
6
  License-Expression: BSD-2-Clause
@@ -69,9 +69,9 @@ Overview
69
69
  .. |supported-implementations| image:: https://img.shields.io/pypi/implementation/csu.svg
70
70
  :alt: Supported implementations
71
71
  :target: https://pypi.org/project/csu
72
- .. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.6.16.svg
72
+ .. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.6.17.svg
73
73
  :alt: Commits since latest release
74
- :target: https://github.com/ionelmc/python-csu/compare/v2.6.16...main
74
+ :target: https://github.com/ionelmc/python-csu/compare/v2.6.17...main
75
75
  .. |scrutinizer| image:: https://img.shields.io/scrutinizer/quality/g/ionelmc/python-csu/main.svg
76
76
  :alt: Scrutinizer Status
77
77
  :target: https://scrutinizer-ci.com/g/ionelmc/python-csu/
@@ -34,9 +34,9 @@ Overview
34
34
  .. |supported-implementations| image:: https://img.shields.io/pypi/implementation/csu.svg
35
35
  :alt: Supported implementations
36
36
  :target: https://pypi.org/project/csu
37
- .. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.6.16.svg
37
+ .. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.6.17.svg
38
38
  :alt: Commits since latest release
39
- :target: https://github.com/ionelmc/python-csu/compare/v2.6.16...main
39
+ :target: https://github.com/ionelmc/python-csu/compare/v2.6.17...main
40
40
  .. |scrutinizer| image:: https://img.shields.io/scrutinizer/quality/g/ionelmc/python-csu/main.svg
41
41
  :alt: Scrutinizer Status
42
42
  :target: https://scrutinizer-ci.com/g/ionelmc/python-csu/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "csu"
3
- version = "2.6.16"
3
+ version = "2.6.17"
4
4
  description = "Clean Slate Utils - bunch of utility code, mostly Django/DRF specific."
5
5
  requires-python = ">=3.14"
6
6
  license = "BSD-2-Clause"
@@ -2,4 +2,4 @@
2
2
  a.k.a Clean Slate Utils
3
3
  """
4
4
 
5
- __version__ = "2.6.16"
5
+ __version__ = "2.6.17"
@@ -86,8 +86,10 @@ def trim_auth_info(auth_info, limit: int | None = LOGGING_AUTH_INFO_LIMIT):
86
86
  def fa_append_repr(format: list[str], arguments: list, value, limit: int | None):
87
87
  value = repr(value)
88
88
  if limit and (size := len(value)) > limit:
89
- format.append("%s\n ... %s more characters")
90
- arguments.extend((value[:limit], size - limit))
89
+ prefix_limit = limit * 2 // 3
90
+ suffix_limit = limit - prefix_limit
91
+ format.append("%s\n ..(%s more)..\n %s")
92
+ arguments.extend((value[:prefix_limit], size - limit, value[-suffix_limit:]))
91
93
  else:
92
94
  format.append("%s")
93
95
  arguments.append(value)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csu
3
- Version: 2.6.16
3
+ Version: 2.6.17
4
4
  Summary: Clean Slate Utils - bunch of utility code, mostly Django/DRF specific.
5
5
  Author-email: Ionel Cristian Mărieș <contact@ionelmc.ro>
6
6
  License-Expression: BSD-2-Clause
@@ -69,9 +69,9 @@ Overview
69
69
  .. |supported-implementations| image:: https://img.shields.io/pypi/implementation/csu.svg
70
70
  :alt: Supported implementations
71
71
  :target: https://pypi.org/project/csu
72
- .. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.6.16.svg
72
+ .. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.6.17.svg
73
73
  :alt: Commits since latest release
74
- :target: https://github.com/ionelmc/python-csu/compare/v2.6.16...main
74
+ :target: https://github.com/ionelmc/python-csu/compare/v2.6.17...main
75
75
  .. |scrutinizer| image:: https://img.shields.io/scrutinizer/quality/g/ionelmc/python-csu/main.svg
76
76
  :alt: Scrutinizer Status
77
77
  :target: https://scrutinizer-ci.com/g/ionelmc/python-csu/
@@ -9,8 +9,45 @@ def test_fa_append_repr():
9
9
  a = []
10
10
  b = []
11
11
  assert fa_append_repr(a, b, "123456", 3) is None
12
- assert a == snapshot(["%s\n ... %s more characters"])
13
- assert b == snapshot(["'12", 5])
12
+ assert a == snapshot(
13
+ [
14
+ """\
15
+ %s
16
+ ..(%s more)..
17
+ %s\
18
+ """
19
+ ]
20
+ )
21
+ assert b == snapshot(["'1", 5, "'"])
22
+
23
+
24
+ def test_fa_append_repr_long():
25
+ a = []
26
+ b = []
27
+ assert (
28
+ fa_append_repr(
29
+ a,
30
+ b,
31
+ "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c"
32
+ "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c"
33
+ "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c"
34
+ "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c"
35
+ "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c"
36
+ "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c",
37
+ 80,
38
+ )
39
+ is None
40
+ )
41
+ assert a == snapshot(
42
+ [
43
+ """\
44
+ %s
45
+ ..(%s more)..
46
+ %s\
47
+ """
48
+ ]
49
+ )
50
+ assert b == snapshot(["'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP", 588, "[\\\\]^_`{|}~ \\t\\n\\r\\x0b\\x0c'"])
14
51
 
15
52
 
16
53
  def test_get_request_line():
@@ -313,13 +313,13 @@ Traceback (most recent call last):
313
313
  File "[&MODELS_PATH]", line 1594, in json
314
314
  return _json.loads(str(encoding_guess), **kwargs)
315
315
  ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
316
- File "[&JSON_PATH]", line 365, in loads
316
+ File "[&JSON_PATH]", line 386, in loads
317
317
  return cls(**kw).decode(s)
318
318
  ~~~~~~~~~~~~~~~~^^^
319
- File "/usr/lib64/python3.14/json/decoder.py", line 345, in decode
319
+ File "/usr/lib64/python3.15/json/decoder.py", line 358, in decode
320
320
  obj, end = self.raw_decode(s, idx=_w(s, 0).end())
321
321
  ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
322
- File "/usr/lib64/python3.14/json/decoder.py", line 363, in raw_decode
322
+ File "/usr/lib64/python3.15/json/decoder.py", line 376, in raw_decode
323
323
  raise JSONDecodeError("Expecting value", s, err.value) from None
324
324
  json.decoder.JSONDecodeError: Expecting value: line 2 column 5 (char 5)
325
325
 
@@ -14,6 +14,7 @@ envlist =
14
14
  clean,
15
15
  check,
16
16
  py314,
17
+ py315,
17
18
  report
18
19
  ignore_basepython_conflict = true
19
20
 
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
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
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
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