csu 2.0.2__tar.gz → 2.0.4__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.
- {csu-2.0.2 → csu-2.0.4}/.bumpversion.cfg +1 -1
- {csu-2.0.2 → csu-2.0.4}/.cookiecutterrc +1 -1
- {csu-2.0.2 → csu-2.0.4}/PKG-INFO +3 -3
- {csu-2.0.2 → csu-2.0.4}/README.rst +2 -2
- {csu-2.0.2 → csu-2.0.4}/pyproject.toml +1 -1
- {csu-2.0.2 → csu-2.0.4}/src/csu/__init__.py +1 -1
- {csu-2.0.2 → csu-2.0.4}/src/csu/conf.py +6 -1
- {csu-2.0.2 → csu-2.0.4}/src/csu/service.py +6 -3
- {csu-2.0.2 → csu-2.0.4}/src/csu.egg-info/PKG-INFO +3 -3
- {csu-2.0.2 → csu-2.0.4}/.coveragerc +0 -0
- {csu-2.0.2 → csu-2.0.4}/.editorconfig +0 -0
- {csu-2.0.2 → csu-2.0.4}/.github/workflows/github-actions.yml +0 -0
- {csu-2.0.2 → csu-2.0.4}/.pre-commit-config.yaml +0 -0
- {csu-2.0.2 → csu-2.0.4}/.taplo.toml +0 -0
- {csu-2.0.2 → csu-2.0.4}/AUTHORS.rst +0 -0
- {csu-2.0.2 → csu-2.0.4}/CHANGELOG.rst +0 -0
- {csu-2.0.2 → csu-2.0.4}/CONTRIBUTING.rst +0 -0
- {csu-2.0.2 → csu-2.0.4}/LICENSE +0 -0
- {csu-2.0.2 → csu-2.0.4}/MANIFEST.in +0 -0
- {csu-2.0.2 → csu-2.0.4}/ci/bootstrap.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/ci/requirements.txt +0 -0
- {csu-2.0.2 → csu-2.0.4}/ci/templates/.github/workflows/github-actions.yml +0 -0
- {csu-2.0.2 → csu-2.0.4}/pytest.ini +0 -0
- {csu-2.0.2 → csu-2.0.4}/setup.cfg +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/admin.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/consts.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/__init__.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/auth.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/fields.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/forms.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/perms.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/phonenumber.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/serializers.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/test_auth.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/test_fields.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/test_forms.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/test_phonenumber.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/test_serializers.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/drf/views.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/enums.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/env.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/exceptions.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/export.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/fixups.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/forms/__init__.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/forms/crispy.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/forms/fields.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/gettext.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/gettext_lazy.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/locale/ro/LC_MESSAGES/django.mo +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/locale/ro/LC_MESSAGES/django.po +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/logging.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/management.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/models.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/query.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/routers.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/templates/api_exception.html +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/templates/forms/widgets/opaquewidget.html +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/test_consts.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/test_env.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/test_exceptions.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/test_logging.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/test_management.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/test_service.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/test_timezones.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/test_utils.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/test_xml.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/timezones.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/utils.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/views.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/worker/__init__.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/worker/admin.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/worker/asgi.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/worker/engine.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/worker/enums.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/worker/job.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/worker/models.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/worker/registry.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/wsgi.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu/xml.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu.egg-info/SOURCES.txt +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu.egg-info/dependency_links.txt +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu.egg-info/requires.txt +0 -0
- {csu-2.0.2 → csu-2.0.4}/src/csu.egg-info/top_level.txt +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/cassettes/test_service/test_custom_context.yaml +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/cassettes/test_service/test_custom_context_0_retries.yaml +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/cassettes/test_service/test_decoding.yaml +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/cassettes/test_service/test_error.yaml +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/cassettes/test_service/test_logging.yaml +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/cassettes/test_service/test_redirects.yaml +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/conftest.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/exampleworker.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/test_models.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/test_service.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/test_views.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/test_worker.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/testproject/__init__.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/testproject/fixtures/testuser.json +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/testproject/models.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/testproject/settings.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tests/testproject/urls.py +0 -0
- {csu-2.0.2 → csu-2.0.4}/tox.ini +0 -0
{csu-2.0.2 → csu-2.0.4}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: csu
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
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
|
|
@@ -77,9 +77,9 @@ Overview
|
|
|
77
77
|
.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/csu.svg
|
|
78
78
|
:alt: Supported implementations
|
|
79
79
|
:target: https://pypi.org/project/csu
|
|
80
|
-
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.0.
|
|
80
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.0.4.svg
|
|
81
81
|
:alt: Commits since latest release
|
|
82
|
-
:target: https://github.com/ionelmc/python-csu/compare/v2.0.
|
|
82
|
+
:target: https://github.com/ionelmc/python-csu/compare/v2.0.4...main
|
|
83
83
|
.. |scrutinizer| image:: https://img.shields.io/scrutinizer/quality/g/ionelmc/python-csu/main.svg
|
|
84
84
|
:alt: Scrutinizer Status
|
|
85
85
|
: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.0.
|
|
37
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.0.4.svg
|
|
38
38
|
:alt: Commits since latest release
|
|
39
|
-
:target: https://github.com/ionelmc/python-csu/compare/v2.0.
|
|
39
|
+
:target: https://github.com/ionelmc/python-csu/compare/v2.0.4...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,8 +1,13 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from datetime import UTC
|
|
2
3
|
from importlib.util import find_spec
|
|
3
4
|
from zoneinfo import ZoneInfo
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
from .utils import import_string
|
|
7
|
+
|
|
8
|
+
if CSU_SETTINGS_MODULE := os.environ.get("CSU_SETTINGS_MODULE"):
|
|
9
|
+
settings = import_string(CSU_SETTINGS_MODULE)
|
|
10
|
+
elif find_spec("django"):
|
|
6
11
|
from django.conf import settings
|
|
7
12
|
else:
|
|
8
13
|
settings = None
|
|
@@ -330,8 +330,11 @@ class AsyncHTTPServiceContext[RT = HTTPServiceResponse](HTTPServiceContext[RT]):
|
|
|
330
330
|
async def log_request(self, request: PreparedRequest):
|
|
331
331
|
self.handle_log_request(request)
|
|
332
332
|
|
|
333
|
-
async def log_response(self, response: AsyncResponse):
|
|
334
|
-
|
|
333
|
+
async def log_response(self, response: AsyncResponse | Response):
|
|
334
|
+
if isinstance(response, AsyncResponse):
|
|
335
|
+
content = await response.content
|
|
336
|
+
else:
|
|
337
|
+
content = response.content
|
|
335
338
|
self.handle_log_response(response, content)
|
|
336
339
|
|
|
337
340
|
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
|
@@ -378,7 +381,7 @@ class AsyncHTTPServiceContext[RT = HTTPServiceResponse](HTTPServiceContext[RT]):
|
|
|
378
381
|
response = await self.client.send(prepared_request, timeout=self.client.timeout, allow_redirects=follow_redirects, **settings)
|
|
379
382
|
if expect_json:
|
|
380
383
|
try:
|
|
381
|
-
if
|
|
384
|
+
if isinstance(response, AsyncResponse):
|
|
382
385
|
json = await response.json(parse_float=Decimal)
|
|
383
386
|
else:
|
|
384
387
|
json = response.json(parse_float=Decimal)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: csu
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
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
|
|
@@ -77,9 +77,9 @@ Overview
|
|
|
77
77
|
.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/csu.svg
|
|
78
78
|
:alt: Supported implementations
|
|
79
79
|
:target: https://pypi.org/project/csu
|
|
80
|
-
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.0.
|
|
80
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.0.4.svg
|
|
81
81
|
:alt: Commits since latest release
|
|
82
|
-
:target: https://github.com/ionelmc/python-csu/compare/v2.0.
|
|
82
|
+
:target: https://github.com/ionelmc/python-csu/compare/v2.0.4...main
|
|
83
83
|
.. |scrutinizer| image:: https://img.shields.io/scrutinizer/quality/g/ionelmc/python-csu/main.svg
|
|
84
84
|
:alt: Scrutinizer Status
|
|
85
85
|
:target: https://scrutinizer-ci.com/g/ionelmc/python-csu/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csu-2.0.2 → csu-2.0.4}/LICENSE
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
|
|
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
|
{csu-2.0.2 → csu-2.0.4}/tox.ini
RENAMED
|
File without changes
|