csu 2.6.12__tar.gz → 2.6.14__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.6.12 → csu-2.6.14}/.bumpversion.cfg +1 -1
- {csu-2.6.12 → csu-2.6.14}/.cookiecutterrc +1 -1
- {csu-2.6.12 → csu-2.6.14}/PKG-INFO +3 -3
- {csu-2.6.12 → csu-2.6.14}/README.rst +2 -2
- {csu-2.6.12 → csu-2.6.14}/pyproject.toml +1 -1
- {csu-2.6.12 → csu-2.6.14}/src/csu/__init__.py +1 -1
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/test_auth.py +8 -8
- {csu-2.6.12 → csu-2.6.14}/src/csu/service.py +8 -3
- {csu-2.6.12 → csu-2.6.14}/src/csu/views.py +5 -1
- {csu-2.6.12 → csu-2.6.14}/src/csu.egg-info/PKG-INFO +3 -3
- {csu-2.6.12 → csu-2.6.14}/tests/conftest.py +3 -0
- {csu-2.6.12 → csu-2.6.14}/tests/test_service.py +25 -25
- {csu-2.6.12 → csu-2.6.14}/tests/test_service_auth.py +6 -6
- {csu-2.6.12 → csu-2.6.14}/tox.ini +8 -9
- {csu-2.6.12 → csu-2.6.14}/.coveragerc +0 -0
- {csu-2.6.12 → csu-2.6.14}/.editorconfig +0 -0
- {csu-2.6.12 → csu-2.6.14}/.github/workflows/github-actions.yml +0 -0
- {csu-2.6.12 → csu-2.6.14}/.pre-commit-config.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/.tombi.toml +0 -0
- {csu-2.6.12 → csu-2.6.14}/AUTHORS.rst +0 -0
- {csu-2.6.12 → csu-2.6.14}/CHANGELOG.rst +0 -0
- {csu-2.6.12 → csu-2.6.14}/CONTRIBUTING.rst +0 -0
- {csu-2.6.12 → csu-2.6.14}/LICENSE +0 -0
- {csu-2.6.12 → csu-2.6.14}/MANIFEST.in +0 -0
- {csu-2.6.12 → csu-2.6.14}/ci/bootstrap.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/ci/requirements.txt +0 -0
- {csu-2.6.12 → csu-2.6.14}/ci/templates/.github/workflows/github-actions.yml +0 -0
- {csu-2.6.12 → csu-2.6.14}/pytest.ini +0 -0
- {csu-2.6.12 → csu-2.6.14}/setup.cfg +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/admin.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/conf.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/consts.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/__init__.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/auth.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/fields.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/forms.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/perms.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/phonenumber.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/serializers.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/test_fields.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/test_forms.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/test_phonenumber.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/test_serializers.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/drf/views.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/enums.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/env.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/exceptions.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/export.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/fixups.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/forms/__init__.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/forms/crispy.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/forms/fields.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/gettext.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/gettext_lazy.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/locale/ro/LC_MESSAGES/django.mo +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/locale/ro/LC_MESSAGES/django.po +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/logging.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/management.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/models.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/query.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/routers.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/templates/api_exception.html +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/templates/forms/widgets/opaquewidget.html +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/test_consts.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/test_env.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/test_management.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/test_service.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/test_timezones.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/test_utils.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/test_xml.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/timezones.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/utils.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/worker/__init__.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/worker/admin.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/worker/asgi.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/worker/engine.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/worker/enums.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/worker/job.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/worker/models.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/worker/registry.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/wsgi.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu/xml.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu.egg-info/SOURCES.txt +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu.egg-info/dependency_links.txt +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu.egg-info/requires.txt +0 -0
- {csu-2.6.12 → csu-2.6.14}/src/csu.egg-info/top_level.txt +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service/test_custom_context.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service/test_custom_context_0_retries.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service/test_decoding.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service/test_error.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service/test_logging.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service/test_redirects.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service_auth/test_async.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service_auth/test_async_auth.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service_auth/test_sync.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/cassettes/test_service_auth/test_sync_auth.yaml +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/exampleworker.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/test_exampleworker.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/test_exceptions.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/test_logging.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/test_models.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/test_views.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/test_worker.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/testproject/__init__.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/testproject/fixtures/testuser.json +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/testproject/models.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/testproject/settings.py +0 -0
- {csu-2.6.12 → csu-2.6.14}/tests/testproject/urls.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: csu
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.14
|
|
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.
|
|
72
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.6.14.svg
|
|
73
73
|
:alt: Commits since latest release
|
|
74
|
-
:target: https://github.com/ionelmc/python-csu/compare/v2.6.
|
|
74
|
+
:target: https://github.com/ionelmc/python-csu/compare/v2.6.14...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.
|
|
37
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.6.14.svg
|
|
38
38
|
:alt: Commits since latest release
|
|
39
|
-
:target: https://github.com/ionelmc/python-csu/compare/v2.6.
|
|
39
|
+
:target: https://github.com/ionelmc/python-csu/compare/v2.6.14...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/
|
|
@@ -10,21 +10,21 @@ class StrTokenAuthentication(auth.BearerTokenAuthentication):
|
|
|
10
10
|
|
|
11
11
|
def test_one_token_auth(mocker):
|
|
12
12
|
spy = mocker.spy(auth, "compare_digest")
|
|
13
|
-
assert StrTokenAuthentication().authenticate(SimpleNamespace(
|
|
13
|
+
assert StrTokenAuthentication().authenticate(SimpleNamespace(headers={"authorization": b"Bearer 123"})) == (None, "123")
|
|
14
14
|
assert spy.call_args_list == [call("123", "123")]
|
|
15
15
|
assert spy.spy_return_list == [True]
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def test_one_token_auth_longer(mocker):
|
|
19
19
|
spy = mocker.spy(auth, "compare_digest")
|
|
20
|
-
assert StrTokenAuthentication().authenticate(SimpleNamespace(
|
|
20
|
+
assert StrTokenAuthentication().authenticate(SimpleNamespace(headers={"authorization": b"Bearer 1234"})) is None
|
|
21
21
|
assert spy.call_args_list == [call("1234", "123")]
|
|
22
22
|
assert spy.spy_return_list == [False]
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
def test_one_token_auth_shorter(mocker):
|
|
26
26
|
spy = mocker.spy(auth, "compare_digest")
|
|
27
|
-
assert StrTokenAuthentication().authenticate(SimpleNamespace(
|
|
27
|
+
assert StrTokenAuthentication().authenticate(SimpleNamespace(headers={"authorization": b"Bearer 12"})) is None
|
|
28
28
|
assert spy.call_args_list == [call("12", "123")]
|
|
29
29
|
assert spy.spy_return_list == [False]
|
|
30
30
|
|
|
@@ -35,7 +35,7 @@ class ListTokenAuthentication(auth.BearerTokenAuthentication):
|
|
|
35
35
|
|
|
36
36
|
def test_multiple_token_auth_1(mocker):
|
|
37
37
|
spy = mocker.spy(auth, "compare_digest")
|
|
38
|
-
assert ListTokenAuthentication().authenticate(SimpleNamespace(
|
|
38
|
+
assert ListTokenAuthentication().authenticate(SimpleNamespace(headers={"authorization": b"Bearer 123"})) == (None, "123")
|
|
39
39
|
assert spy.call_args_list == [
|
|
40
40
|
call("123", "123"),
|
|
41
41
|
call("123", "1234"),
|
|
@@ -46,7 +46,7 @@ def test_multiple_token_auth_1(mocker):
|
|
|
46
46
|
|
|
47
47
|
def test_multiple_token_auth_2(mocker):
|
|
48
48
|
spy = mocker.spy(auth, "compare_digest")
|
|
49
|
-
assert ListTokenAuthentication().authenticate(SimpleNamespace(
|
|
49
|
+
assert ListTokenAuthentication().authenticate(SimpleNamespace(headers={"authorization": b"Bearer 1234"})) == (None, "1234")
|
|
50
50
|
assert spy.call_args_list == [
|
|
51
51
|
call("1234", "123"),
|
|
52
52
|
call("1234", "1234"),
|
|
@@ -57,7 +57,7 @@ def test_multiple_token_auth_2(mocker):
|
|
|
57
57
|
|
|
58
58
|
def test_multiple_token_auth_3(mocker):
|
|
59
59
|
spy = mocker.spy(auth, "compare_digest")
|
|
60
|
-
assert ListTokenAuthentication().authenticate(SimpleNamespace(
|
|
60
|
+
assert ListTokenAuthentication().authenticate(SimpleNamespace(headers={"authorization": b"Bearer ABC"})) == (None, "ABC")
|
|
61
61
|
assert spy.call_args_list == [
|
|
62
62
|
call("ABC", "123"),
|
|
63
63
|
call("ABC", "1234"),
|
|
@@ -68,7 +68,7 @@ def test_multiple_token_auth_3(mocker):
|
|
|
68
68
|
|
|
69
69
|
def test_multiple_token_auth_shorter(mocker):
|
|
70
70
|
spy = mocker.spy(auth, "compare_digest")
|
|
71
|
-
assert ListTokenAuthentication().authenticate(SimpleNamespace(
|
|
71
|
+
assert ListTokenAuthentication().authenticate(SimpleNamespace(headers={"authorization": b"Bearer 12"})) is None
|
|
72
72
|
assert spy.call_args_list == [
|
|
73
73
|
call("12", "123"),
|
|
74
74
|
call("12", "1234"),
|
|
@@ -79,7 +79,7 @@ def test_multiple_token_auth_shorter(mocker):
|
|
|
79
79
|
|
|
80
80
|
def test_multiple_token_auth_case(mocker):
|
|
81
81
|
spy = mocker.spy(auth, "compare_digest")
|
|
82
|
-
assert ListTokenAuthentication().authenticate(SimpleNamespace(
|
|
82
|
+
assert ListTokenAuthentication().authenticate(SimpleNamespace(headers={"authorization": b"Bearer abc"})) is None
|
|
83
83
|
assert spy.call_args_list == [
|
|
84
84
|
call("abc", "123"),
|
|
85
85
|
call("abc", "1234"),
|
|
@@ -6,6 +6,7 @@ from logging import getLogger
|
|
|
6
6
|
from traceback import format_exc
|
|
7
7
|
from typing import Any
|
|
8
8
|
from typing import Self
|
|
9
|
+
from urllib.parse import urlunparse
|
|
9
10
|
|
|
10
11
|
from niquests import AsyncResponse
|
|
11
12
|
from niquests import AsyncSession
|
|
@@ -18,6 +19,7 @@ from niquests.auth import AuthBase
|
|
|
18
19
|
from niquests.exceptions import ConnectionError
|
|
19
20
|
from niquests.typing import TLSClientCertType
|
|
20
21
|
from niquests.typing import TLSVerifyType
|
|
22
|
+
from urllib3.util import parse_url
|
|
21
23
|
|
|
22
24
|
from .conf import SERVICE_LOGGING_REQUEST_BODY_LIMIT
|
|
23
25
|
from .conf import SERVICE_LOGGING_REQUEST_SHOW_HEADERS
|
|
@@ -256,13 +258,16 @@ class HTTPServiceContext[RTYPE = HTTPServiceResponse]:
|
|
|
256
258
|
return self.client.prepare_request(request)
|
|
257
259
|
|
|
258
260
|
def handle_retriable_failure(self, method, url, exc, retries_left, retry_budget):
|
|
261
|
+
parsed_url = parse_url(url)
|
|
262
|
+
netloc = f"{parsed_url.host}:{parsed_url.port}" if parsed_url.port else parsed_url.host
|
|
263
|
+
clean_url = urlunparse((parsed_url.scheme, netloc, parsed_url.path, None, None, None))
|
|
259
264
|
if retries_left:
|
|
260
|
-
self.logger.error("[%s] %s
|
|
265
|
+
self.logger.error(f"[%s] %s {clean_url} !> %r (will retry %s more times)\n%s", self.short_id, method, exc, retries_left, format_exc(limit=5))
|
|
261
266
|
else:
|
|
262
267
|
if retry_budget:
|
|
263
|
-
self.logger.error("[%s] %s
|
|
268
|
+
self.logger.error(f"[%s] %s {clean_url} !> %r (exhausted retries)", self.short_id, method, exc)
|
|
264
269
|
else:
|
|
265
|
-
self.logger.error("[%s] %s
|
|
270
|
+
self.logger.error(f"[%s] %s {clean_url} !> %r (no retry)", self.short_id, method, exc)
|
|
266
271
|
raise InternalServiceError(exc, event_id=self.event_id) from exc
|
|
267
272
|
|
|
268
273
|
def request(
|
|
@@ -117,7 +117,11 @@ def exception_handler(
|
|
|
117
117
|
request = context.get("request")
|
|
118
118
|
|
|
119
119
|
if request:
|
|
120
|
-
request_line, request_line_arguments = get_request_line(
|
|
120
|
+
request_line, request_line_arguments = get_request_line(
|
|
121
|
+
request.META,
|
|
122
|
+
status_code,
|
|
123
|
+
*(getattr(request, field, None) for field in LOGGING_AUTH_INFO_FIELDS),
|
|
124
|
+
)
|
|
121
125
|
content_lines, content_lines_arguments = get_content_lines(request, thick_line=False)
|
|
122
126
|
else:
|
|
123
127
|
request_line, request_line_arguments = "", ()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: csu
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.14
|
|
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.
|
|
72
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.6.14.svg
|
|
73
73
|
:alt: Commits since latest release
|
|
74
|
-
:target: https://github.com/ionelmc/python-csu/compare/v2.6.
|
|
74
|
+
:target: https://github.com/ionelmc/python-csu/compare/v2.6.14...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/
|
|
@@ -20,6 +20,7 @@ from urllib3 import HTTPHeaderDict
|
|
|
20
20
|
from vcr.errors import CannotOverwriteExistingCassetteException
|
|
21
21
|
from vcr.patch import CassettePatcherBuilder
|
|
22
22
|
from vcr.request import Request
|
|
23
|
+
from vcr.stubs import VCRFakeSocket
|
|
23
24
|
|
|
24
25
|
from csu import exceptions
|
|
25
26
|
|
|
@@ -30,6 +31,8 @@ _original_build = CassettePatcherBuilder.build
|
|
|
30
31
|
|
|
31
32
|
_DEFAULT_PORTS = {"https": 443, "http": 80}
|
|
32
33
|
|
|
34
|
+
VCRFakeSocket.gettimeout = lambda: None
|
|
35
|
+
|
|
33
36
|
|
|
34
37
|
@pytest.fixture(scope="session")
|
|
35
38
|
def vcr_config():
|
|
@@ -185,7 +185,7 @@ INFO | [00001] GET [&HTTPBIN]/status/599
|
|
|
185
185
|
Accept: '*/*'
|
|
186
186
|
Accept-Encoding: 'gzip, deflate, br'
|
|
187
187
|
Connection: 'keep-alive'
|
|
188
|
-
User-Agent: 'niquests/3.
|
|
188
|
+
User-Agent: 'niquests/3.21.2'\
|
|
189
189
|
""",
|
|
190
190
|
"""\
|
|
191
191
|
INFO | [00001] GET [&HTTPBIN]/status/599 => 599 in 0.0000s (HNone)
|
|
@@ -232,7 +232,7 @@ INFO | [00001] GET [&HTTPBIN]/status/418
|
|
|
232
232
|
Accept: '*/*'
|
|
233
233
|
Accept-Encoding: 'gzip, deflate, br'
|
|
234
234
|
Connection: 'keep-alive'
|
|
235
|
-
User-Agent: 'niquests/3.
|
|
235
|
+
User-Agent: 'niquests/3.21.2'\
|
|
236
236
|
""",
|
|
237
237
|
'''\
|
|
238
238
|
INFO | [00001] GET [&HTTPBIN]/status/418 => 418 in 0.0000s (HNone)
|
|
@@ -256,7 +256,7 @@ ERROR | (renderer: NoneType)
|
|
|
256
256
|
{}
|
|
257
257
|
---------------------------------------------------------------- traceback -----------------------------------------------------------------
|
|
258
258
|
Traceback (most recent call last):
|
|
259
|
-
File "[&MODELS_PATH]", line
|
|
259
|
+
File "[&MODELS_PATH]", line 1594, in json
|
|
260
260
|
return _json.loads(str(encoding_guess), **kwargs)
|
|
261
261
|
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
262
262
|
File "[&JSON_PATH]", line 365, in loads
|
|
@@ -272,9 +272,9 @@ json.decoder.JSONDecodeError: Expecting value: line 2 column 5 (char 5)
|
|
|
272
272
|
During handling of the above exception, another exception occurred:
|
|
273
273
|
|
|
274
274
|
Traceback (most recent call last):
|
|
275
|
-
File "[&SERVICE_PATH]", line
|
|
275
|
+
File "[&SERVICE_PATH]", line 236, in handle_process_response
|
|
276
276
|
json = response.json(parse_float=Decimal)
|
|
277
|
-
File "[&MODELS_PATH]", line
|
|
277
|
+
File "[&MODELS_PATH]", line 1596, in json
|
|
278
278
|
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
|
|
279
279
|
niquests.exceptions.JSONDecodeError: Expecting value: line 2 column 5 (char 5)
|
|
280
280
|
|
|
@@ -287,10 +287,10 @@ Traceback (most recent call last):
|
|
|
287
287
|
File "[&TEST_PATH]", line 78, in json
|
|
288
288
|
return ctx.request("GET", "status/418", accept_statuses=[418]).json
|
|
289
289
|
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
290
|
-
File "[&SERVICE_PATH]", line
|
|
290
|
+
File "[&SERVICE_PATH]", line 317, in request
|
|
291
291
|
return self.handle_process_response(response, expect_json=expect_json)
|
|
292
292
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
293
|
-
File "[&SERVICE_PATH]", line
|
|
293
|
+
File "[&SERVICE_PATH]", line 238, in handle_process_response
|
|
294
294
|
raise DecodeError(response, exc, event_id=self.event_id) from exc
|
|
295
295
|
csu.exceptions.DecodeError: DecodeError(JSONDecodeError('Expecting value: line 2 column 5 (char 5)'), response=<Response Dummy [418]>)
|
|
296
296
|
(418, b'\\n -=[ teapot ]=-\\n\\n _...._\\n .\\' _ _ `.\\n | ."` ^ `". _,\\n \\\\_;`"---"`|//\\n | ;/\\n \\\\_ _/\\n `"""`\\n')
|
|
@@ -325,7 +325,7 @@ INFO | [00001] GET [&HTTPBIN]/status/599
|
|
|
325
325
|
Accept: '*/*'
|
|
326
326
|
Accept-Encoding: 'gzip, deflate, br'
|
|
327
327
|
Connection: 'keep-alive'
|
|
328
|
-
User-Agent: 'niquests/3.
|
|
328
|
+
User-Agent: 'niquests/3.21.2'\
|
|
329
329
|
""",
|
|
330
330
|
"""\
|
|
331
331
|
INFO | [00001] GET [&HTTPBIN]/status/599 => 599 in 0.0000s (HNone)
|
|
@@ -352,7 +352,7 @@ Traceback (most recent call last):
|
|
|
352
352
|
File "[&TEST_PATH]", line 47, in error
|
|
353
353
|
return ctx.request("GET", "status/599", expect_json=False)
|
|
354
354
|
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
355
|
-
File "[&SERVICE_PATH]", line
|
|
355
|
+
File "[&SERVICE_PATH]", line 316, in request
|
|
356
356
|
raise UnexpectedStatusError(response, accept_statuses, event_id=self.event_id)
|
|
357
357
|
csu.exceptions.UnexpectedStatusError: UnexpectedStatusError(<Response Dummy [599]>, accept_statuses=[200])
|
|
358
358
|
(599, b'')
|
|
@@ -530,7 +530,7 @@ INFO | [00001] POST [&HTTPBIN]/anything?foo=bar&accept_statuses=%7B999%7D&exp
|
|
|
530
530
|
Accept-Encoding: 'gzip, deflate, br'
|
|
531
531
|
Connection: 'keep-alive'
|
|
532
532
|
Content-Length: '27'
|
|
533
|
-
User-Agent: 'niquests/3.
|
|
533
|
+
User-Agent: 'niquests/3.21.2'
|
|
534
534
|
------------------------------------------------ request body (no content-type - 27 bytes) -------------------------------------------------
|
|
535
535
|
"config={'custom': 'config'}"
|
|
536
536
|
============================================================================================================================================\
|
|
@@ -550,9 +550,9 @@ INFO | [00001] POST [&HTTPBIN]/anything?foo=bar&accept_statuses=%7B999%7D&exp
|
|
|
550
550
|
============================================================================================================================================\
|
|
551
551
|
""",
|
|
552
552
|
"""\
|
|
553
|
-
ERROR | [00001] POST [&HTTPBIN]/anything
|
|
553
|
+
ERROR | [00001] POST [&HTTPBIN]/anything !> RetryableStatusError('200 not in [999] but in [200]', 200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"3","retry_count":"0","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=3&retry_count=0&retry_statuses={200}"}\\n', event_id=PCC00001000) (will retry 3 more times)
|
|
554
554
|
Traceback (most recent call last):
|
|
555
|
-
File "[&SERVICE_PATH]", line
|
|
555
|
+
File "[&SERVICE_PATH]", line 314, in request
|
|
556
556
|
raise RetryableStatusError(response, accept_statuses, retry_statuses, event_id=self.event_id)
|
|
557
557
|
csu.exceptions.RetryableStatusError: RetryableStatusError(<Response Dummy [200]>, accept_statuses=[999], retry_statuses=[200])
|
|
558
558
|
(200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"3","retry_count":"0","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=3&retry_count=0&retry_statuses={200}"}\\n')
|
|
@@ -564,7 +564,7 @@ INFO | [00001] POST [&HTTPBIN]/anything?foo=bar&accept_statuses=%7B999%7D&exp
|
|
|
564
564
|
Accept-Encoding: 'gzip, deflate, br'
|
|
565
565
|
Connection: 'keep-alive'
|
|
566
566
|
Content-Length: '27'
|
|
567
|
-
User-Agent: 'niquests/3.
|
|
567
|
+
User-Agent: 'niquests/3.21.2'
|
|
568
568
|
------------------------------------------------ request body (no content-type - 27 bytes) -------------------------------------------------
|
|
569
569
|
"config={'custom': 'config'}"
|
|
570
570
|
============================================================================================================================================\
|
|
@@ -584,9 +584,9 @@ INFO | [00001] POST [&HTTPBIN]/anything?foo=bar&accept_statuses=%7B999%7D&exp
|
|
|
584
584
|
============================================================================================================================================\
|
|
585
585
|
""",
|
|
586
586
|
"""\
|
|
587
|
-
ERROR | [00001] POST [&HTTPBIN]/anything
|
|
587
|
+
ERROR | [00001] POST [&HTTPBIN]/anything !> RetryableStatusError('200 not in [999] but in [200]', 200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"2","retry_count":"1","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=2&retry_count=1&retry_statuses={200}"}\\n', event_id=PCC00001000) (will retry 2 more times)
|
|
588
588
|
Traceback (most recent call last):
|
|
589
|
-
File "[&SERVICE_PATH]", line
|
|
589
|
+
File "[&SERVICE_PATH]", line 314, in request
|
|
590
590
|
raise RetryableStatusError(response, accept_statuses, retry_statuses, event_id=self.event_id)
|
|
591
591
|
csu.exceptions.RetryableStatusError: RetryableStatusError(<Response Dummy [200]>, accept_statuses=[999], retry_statuses=[200])
|
|
592
592
|
(200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"2","retry_count":"1","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=2&retry_count=1&retry_statuses={200}"}\\n')
|
|
@@ -598,7 +598,7 @@ INFO | [00001] POST [&HTTPBIN]/anything?foo=bar&accept_statuses=%7B999%7D&exp
|
|
|
598
598
|
Accept-Encoding: 'gzip, deflate, br'
|
|
599
599
|
Connection: 'keep-alive'
|
|
600
600
|
Content-Length: '27'
|
|
601
|
-
User-Agent: 'niquests/3.
|
|
601
|
+
User-Agent: 'niquests/3.21.2'
|
|
602
602
|
------------------------------------------------ request body (no content-type - 27 bytes) -------------------------------------------------
|
|
603
603
|
"config={'custom': 'config'}"
|
|
604
604
|
============================================================================================================================================\
|
|
@@ -618,9 +618,9 @@ INFO | [00001] POST [&HTTPBIN]/anything?foo=bar&accept_statuses=%7B999%7D&exp
|
|
|
618
618
|
============================================================================================================================================\
|
|
619
619
|
""",
|
|
620
620
|
"""\
|
|
621
|
-
ERROR | [00001] POST [&HTTPBIN]/anything
|
|
621
|
+
ERROR | [00001] POST [&HTTPBIN]/anything !> RetryableStatusError('200 not in [999] but in [200]', 200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"1","retry_count":"2","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=1&retry_count=2&retry_statuses={200}"}\\n', event_id=PCC00001000) (will retry 1 more times)
|
|
622
622
|
Traceback (most recent call last):
|
|
623
|
-
File "[&SERVICE_PATH]", line
|
|
623
|
+
File "[&SERVICE_PATH]", line 314, in request
|
|
624
624
|
raise RetryableStatusError(response, accept_statuses, retry_statuses, event_id=self.event_id)
|
|
625
625
|
csu.exceptions.RetryableStatusError: RetryableStatusError(<Response Dummy [200]>, accept_statuses=[999], retry_statuses=[200])
|
|
626
626
|
(200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"1","retry_count":"2","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=1&retry_count=2&retry_statuses={200}"}\\n')
|
|
@@ -632,7 +632,7 @@ INFO | [00001] POST [&HTTPBIN]/anything?foo=bar&accept_statuses=%7B999%7D&exp
|
|
|
632
632
|
Accept-Encoding: 'gzip, deflate, br'
|
|
633
633
|
Connection: 'keep-alive'
|
|
634
634
|
Content-Length: '27'
|
|
635
|
-
User-Agent: 'niquests/3.
|
|
635
|
+
User-Agent: 'niquests/3.21.2'
|
|
636
636
|
------------------------------------------------ request body (no content-type - 27 bytes) -------------------------------------------------
|
|
637
637
|
"config={'custom': 'config'}"
|
|
638
638
|
============================================================================================================================================\
|
|
@@ -651,7 +651,7 @@ INFO | [00001] POST [&HTTPBIN]/anything?foo=bar&accept_statuses=%7B999%7D&exp
|
|
|
651
651
|
b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"0","retry_count":"3","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=0&retry_count=3&retry_statuses={200}"}\\n'
|
|
652
652
|
============================================================================================================================================\
|
|
653
653
|
""",
|
|
654
|
-
'ERROR | [00001] POST [&HTTPBIN]/anything
|
|
654
|
+
'ERROR | [00001] POST [&HTTPBIN]/anything !> RetryableStatusError(\'200 not in [999] but in [200]\', 200, b\'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"0","retry_count":"3","retry_statuses":"{200}"},"data":"config={\\\'custom\\\': \\\'config\\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=0&retry_count=3&retry_statuses={200}"}\\n\', event_id=PCC00001000) (exhausted retries)',
|
|
655
655
|
'WARNING | [00001] __exit__ !> ExhaustedRetriesError(3, [RetryableStatusError(\'200 not in [999] but in [200]\', 200, b\'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"3","retry_count":"0","retry_statuses":"{200}"},"data":"config={\\\'custom\\\': \\\'config\\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=3&retry_count=0&retry_statuses={200}"}\\n\', event_id=PCC00001000), RetryableStatusError(\'200 not in [999] but in [200]\', 200, b\'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"2","retry_count":"1","retry_statuses":"{200}"},"data":"config={\\\'custom\\\': \\\'config\\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=2&retry_count=1&retry_statuses={200}"}\\n\', event_id=PCC00001000), RetryableStatusError(\'200 not in [999] but in [200]\', 200, b\'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"1","retry_count":"2","retry_statuses":"{200}"},"data":"config={\\\'custom\\\': \\\'config\\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=1&retry_count=2&retry_statuses={200}"}\\n\', event_id=PCC00001000), RetryableStatusError(\'200 not in [999] but in [200]\', 200, b\'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"0","retry_count":"3","retry_statuses":"{200}"},"data":"config={\\\'custom\\\': \\\'config\\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=0&retry_count=3&retry_statuses={200}"}\\n\', event_id=PCC00001000)], event_id=PCC00001000)',
|
|
656
656
|
"""\
|
|
657
657
|
ERROR | (renderer: NoneType)
|
|
@@ -668,31 +668,31 @@ ERROR | (renderer: NoneType)
|
|
|
668
668
|
| ...<6 lines>...
|
|
669
669
|
| accept_statuses=[999],
|
|
670
670
|
| )
|
|
671
|
-
| File "[&SERVICE_PATH]", line
|
|
671
|
+
| File "[&SERVICE_PATH]", line 328, in request
|
|
672
672
|
| raise ExhaustedRetriesError(retry_budget, retry_failures, event_id=self.event_id)
|
|
673
673
|
| csu.exceptions.ExhaustedRetriesError: ExhaustedRetriesError(3)
|
|
674
674
|
| ([RetryableStatusError('200 not in [999] but in [200]', 200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"3","retry_count":"0","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=3&retry_count=0&retry_statuses={200}"}\\n', event_id=PCC00001000), RetryableStatusError('200 not in [999] but in [200]', 200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"2","retry_count":"1","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=2&retry_count=1&retry_statuses={200}"}\\n', event_id=PCC00001000), RetryableStatusError('200 not in [999] but in [200]', 200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"1","retry_count":"2","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=1&retry_count=2&retry_statuses={200}"}\\n', event_id=PCC00001000), RetryableStatusError('200 not in [999] but in [200]', 200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"0","retry_count":"3","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=0&retry_count=3&retry_statuses={200}"}\\n', event_id=PCC00001000)],)
|
|
675
675
|
+-+---------------- 1 ----------------
|
|
676
676
|
| Traceback (most recent call last):
|
|
677
|
-
| File "[&SERVICE_PATH]", line
|
|
677
|
+
| File "[&SERVICE_PATH]", line 314, in request
|
|
678
678
|
| raise RetryableStatusError(response, accept_statuses, retry_statuses, event_id=self.event_id)
|
|
679
679
|
| csu.exceptions.RetryableStatusError: RetryableStatusError(<Response Dummy [200]>, accept_statuses=[999], retry_statuses=[200])
|
|
680
680
|
| (200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"3","retry_count":"0","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=3&retry_count=0&retry_statuses={200}"}\\n')
|
|
681
681
|
+---------------- 2 ----------------
|
|
682
682
|
| Traceback (most recent call last):
|
|
683
|
-
| File "[&SERVICE_PATH]", line
|
|
683
|
+
| File "[&SERVICE_PATH]", line 314, in request
|
|
684
684
|
| raise RetryableStatusError(response, accept_statuses, retry_statuses, event_id=self.event_id)
|
|
685
685
|
| csu.exceptions.RetryableStatusError: RetryableStatusError(<Response Dummy [200]>, accept_statuses=[999], retry_statuses=[200])
|
|
686
686
|
| (200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"2","retry_count":"1","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=2&retry_count=1&retry_statuses={200}"}\\n')
|
|
687
687
|
+---------------- 3 ----------------
|
|
688
688
|
| Traceback (most recent call last):
|
|
689
|
-
| File "[&SERVICE_PATH]", line
|
|
689
|
+
| File "[&SERVICE_PATH]", line 314, in request
|
|
690
690
|
| raise RetryableStatusError(response, accept_statuses, retry_statuses, event_id=self.event_id)
|
|
691
691
|
| csu.exceptions.RetryableStatusError: RetryableStatusError(<Response Dummy [200]>, accept_statuses=[999], retry_statuses=[200])
|
|
692
692
|
| (200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"1","retry_count":"2","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=1&retry_count=2&retry_statuses={200}"}\\n')
|
|
693
693
|
+---------------- 4 ----------------
|
|
694
694
|
| Traceback (most recent call last):
|
|
695
|
-
| File "[&SERVICE_PATH]", line
|
|
695
|
+
| File "[&SERVICE_PATH]", line 314, in request
|
|
696
696
|
| raise RetryableStatusError(response, accept_statuses, retry_statuses, event_id=self.event_id)
|
|
697
697
|
| csu.exceptions.RetryableStatusError: RetryableStatusError(<Response Dummy [200]>, accept_statuses=[999], retry_statuses=[200])
|
|
698
698
|
| (200, b'{"args":{"accept_statuses":"{999}","expect_json":"true","follow_redirects":"false","foo":"bar","retries_left":"0","retry_count":"3","retry_statuses":"{200}"},"data":"config={\\'custom\\': \\'config\\'}","files":{},"form":{},"headers":{"Accept":"*/*","Accept-Encoding":"gzip, deflate, br","Connection":"keep-alive","Content-Length":"27","Host":"127.0.0.1:12345","User-Agent":"python-httpx/0.X.X"},"json":null,"method":"POST","origin":"127.0.0.1","url":"http://127.0.0.1:12345/anything?foo=bar&accept_statuses={999}&expect_json=true&follow_redirects=false&retries_left=0&retry_count=3&retry_statuses={200}"}\\n')
|
|
@@ -80,7 +80,7 @@ INFO | [00001] GET http://[&HTTPBIN]/basic-auth/usr/pwd
|
|
|
80
80
|
Accept-Encoding: 'gzip, deflate, br'
|
|
81
81
|
Authorization: 'Basic dXNyOnB3ZA=='
|
|
82
82
|
Connection: 'keep-alive'
|
|
83
|
-
User-Agent: 'niquests/3.
|
|
83
|
+
User-Agent: 'niquests/3.21.2'\
|
|
84
84
|
""",
|
|
85
85
|
"""\
|
|
86
86
|
INFO | [00001] GET http://[&HTTPBIN]/basic-auth/usr/pwd => 200 in 0.0000s (HNone)
|
|
@@ -120,7 +120,7 @@ INFO | [00001] GET http://[&HTTPBIN]/basic-auth/usr/pwd
|
|
|
120
120
|
Accept-Encoding: 'gzip, deflate, br'
|
|
121
121
|
Authorization: 'Basic dXNyOnB3ZA=='
|
|
122
122
|
Connection: 'keep-alive'
|
|
123
|
-
User-Agent: 'niquests/3.
|
|
123
|
+
User-Agent: 'niquests/3.21.2'\
|
|
124
124
|
""",
|
|
125
125
|
"INFO | Playing response for <Request (GET) http://[&HTTPBIN]/basic-auth/usr/pwd> from cassette",
|
|
126
126
|
"""\
|
|
@@ -161,7 +161,7 @@ INFO | [00001] POST http://[&HTTPBIN]/post
|
|
|
161
161
|
Connection: 'keep-alive'
|
|
162
162
|
Content-Length: '15'
|
|
163
163
|
Content-Type: 'application/json;charset=utf-8'
|
|
164
|
-
User-Agent: 'niquests/3.
|
|
164
|
+
User-Agent: 'niquests/3.21.2'
|
|
165
165
|
---------------------------------------- request body ('application/json;charset=utf-8' - 15 bytes) ----------------------------------------
|
|
166
166
|
b'{"foobar": 123}'
|
|
167
167
|
============================================================================================================================================\
|
|
@@ -186,7 +186,7 @@ INFO | [00001] GET http://[&HTTPBIN]/json
|
|
|
186
186
|
Accept: '*/*'
|
|
187
187
|
Accept-Encoding: 'gzip, deflate, br'
|
|
188
188
|
Connection: 'keep-alive'
|
|
189
|
-
User-Agent: 'niquests/3.
|
|
189
|
+
User-Agent: 'niquests/3.21.2'
|
|
190
190
|
X-Auth: '123'\
|
|
191
191
|
""",
|
|
192
192
|
"""\
|
|
@@ -226,7 +226,7 @@ INFO | [00001] POST [&HTTPBIN]/post
|
|
|
226
226
|
Connection: 'keep-alive'
|
|
227
227
|
Content-Length: '15'
|
|
228
228
|
Content-Type: 'application/json;charset=utf-8'
|
|
229
|
-
User-Agent: 'niquests/3.
|
|
229
|
+
User-Agent: 'niquests/3.21.2'
|
|
230
230
|
---------------------------------------- request body ('application/json;charset=utf-8' - 15 bytes) ----------------------------------------
|
|
231
231
|
b'{"foobar": 123}'
|
|
232
232
|
============================================================================================================================================\
|
|
@@ -252,7 +252,7 @@ INFO | [00001] GET [&HTTPBIN]/json
|
|
|
252
252
|
Accept: '*/*'
|
|
253
253
|
Accept-Encoding: 'gzip, deflate, br'
|
|
254
254
|
Connection: 'keep-alive'
|
|
255
|
-
User-Agent: 'niquests/3.
|
|
255
|
+
User-Agent: 'niquests/3.21.2'
|
|
256
256
|
X-Auth: '123'\
|
|
257
257
|
""",
|
|
258
258
|
"INFO | Playing response for <Request (GET) [&HTTPBIN]/json> from cassette",
|
|
@@ -35,21 +35,20 @@ deps =
|
|
|
35
35
|
pytest-django
|
|
36
36
|
pytest-httpbin
|
|
37
37
|
pytest-recording
|
|
38
|
-
https://github.com/kevin1024/vcrpy/archive/30a721d400b55ced25f5d8a612b8a1ae01240160.zip
|
|
38
|
+
; https://github.com/kevin1024/vcrpy/archive/30a721d400b55ced25f5d8a612b8a1ae01240160.zip
|
|
39
39
|
process-tests
|
|
40
40
|
inline-snapshot
|
|
41
41
|
time-machine
|
|
42
|
-
|
|
43
|
-
django-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
niquests[brotli,http3]==3.18.6
|
|
42
|
+
django-crispy-forms==2.7
|
|
43
|
+
django-import-export==4.4.1
|
|
44
|
+
djangorestframework==3.18.1
|
|
45
|
+
phonenumberslite==9.0.40
|
|
46
|
+
django-phonenumber-field==8.5.0
|
|
47
|
+
niquests[brotli,http3]==3.21.2
|
|
49
48
|
datetimerange==2.3.2
|
|
50
49
|
defusedxml==0.7.1
|
|
51
50
|
django-rosetta
|
|
52
|
-
django==6.0.
|
|
51
|
+
django==6.0.8
|
|
53
52
|
commands =
|
|
54
53
|
{posargs:pytest --cov --cov-report=term-missing --cov-report=xml -vv}
|
|
55
54
|
|
|
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
|
|
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
|