csu 2.3.2__tar.gz → 2.3.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.3.2 → csu-2.3.4}/.bumpversion.cfg +1 -1
- {csu-2.3.2 → csu-2.3.4}/.cookiecutterrc +1 -1
- {csu-2.3.2 → csu-2.3.4}/.pre-commit-config.yaml +2 -2
- {csu-2.3.2 → csu-2.3.4}/PKG-INFO +3 -3
- {csu-2.3.2 → csu-2.3.4}/README.rst +2 -2
- {csu-2.3.2 → csu-2.3.4}/pyproject.toml +1 -1
- {csu-2.3.2 → csu-2.3.4}/src/csu/__init__.py +1 -1
- {csu-2.3.2 → csu-2.3.4}/src/csu/worker/admin.py +1 -1
- {csu-2.3.2 → csu-2.3.4}/src/csu/worker/engine.py +11 -4
- {csu-2.3.2 → csu-2.3.4}/src/csu.egg-info/PKG-INFO +3 -3
- {csu-2.3.2 → csu-2.3.4}/.coveragerc +0 -0
- {csu-2.3.2 → csu-2.3.4}/.editorconfig +0 -0
- {csu-2.3.2 → csu-2.3.4}/.github/workflows/github-actions.yml +0 -0
- {csu-2.3.2 → csu-2.3.4}/.tombi.toml +0 -0
- {csu-2.3.2 → csu-2.3.4}/AUTHORS.rst +0 -0
- {csu-2.3.2 → csu-2.3.4}/CHANGELOG.rst +0 -0
- {csu-2.3.2 → csu-2.3.4}/CONTRIBUTING.rst +0 -0
- {csu-2.3.2 → csu-2.3.4}/LICENSE +0 -0
- {csu-2.3.2 → csu-2.3.4}/MANIFEST.in +0 -0
- {csu-2.3.2 → csu-2.3.4}/ci/bootstrap.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/ci/requirements.txt +0 -0
- {csu-2.3.2 → csu-2.3.4}/ci/templates/.github/workflows/github-actions.yml +0 -0
- {csu-2.3.2 → csu-2.3.4}/pytest.ini +0 -0
- {csu-2.3.2 → csu-2.3.4}/setup.cfg +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/admin.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/conf.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/consts.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/__init__.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/auth.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/fields.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/forms.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/perms.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/phonenumber.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/serializers.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/test_auth.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/test_fields.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/test_forms.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/test_phonenumber.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/test_serializers.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/drf/views.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/enums.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/env.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/exceptions.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/export.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/fixups.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/forms/__init__.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/forms/crispy.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/forms/fields.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/gettext.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/gettext_lazy.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/locale/ro/LC_MESSAGES/django.mo +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/locale/ro/LC_MESSAGES/django.po +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/logging.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/management.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/models.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/query.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/routers.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/service.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/templates/api_exception.html +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/templates/forms/widgets/opaquewidget.html +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/test_consts.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/test_env.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/test_exceptions.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/test_logging.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/test_management.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/test_service.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/test_timezones.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/test_utils.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/test_xml.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/timezones.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/utils.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/views.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/worker/__init__.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/worker/asgi.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/worker/enums.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/worker/job.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/worker/models.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/worker/registry.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/wsgi.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu/xml.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu.egg-info/SOURCES.txt +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu.egg-info/dependency_links.txt +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu.egg-info/requires.txt +0 -0
- {csu-2.3.2 → csu-2.3.4}/src/csu.egg-info/top_level.txt +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/cassettes/test_service/test_custom_context.yaml +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/cassettes/test_service/test_custom_context_0_retries.yaml +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/cassettes/test_service/test_decoding.yaml +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/cassettes/test_service/test_error.yaml +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/cassettes/test_service/test_logging.yaml +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/cassettes/test_service/test_redirects.yaml +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/cassettes/test_service_auth/test_async.yaml +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/cassettes/test_service_auth/test_sync.yaml +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/conftest.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/exampleworker.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/test_exampleworker.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/test_models.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/test_service.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/test_service_auth.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/test_views.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/test_worker.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/testproject/__init__.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/testproject/fixtures/testuser.json +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/testproject/models.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/testproject/settings.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tests/testproject/urls.py +0 -0
- {csu-2.3.2 → csu-2.3.4}/tox.ini +0 -0
|
@@ -18,7 +18,7 @@ repos:
|
|
|
18
18
|
args: [--fix, --exit-non-zero-on-fix, --show-fixes, --unsafe-fixes]
|
|
19
19
|
- id: ruff-format
|
|
20
20
|
- repo: https://github.com/tombi-toml/tombi-pre-commit
|
|
21
|
-
rev: v0.9.
|
|
21
|
+
rev: v0.9.17
|
|
22
22
|
hooks:
|
|
23
23
|
- id: tombi-format
|
|
24
24
|
# args: [ "--offline" ]
|
|
@@ -26,7 +26,7 @@ repos:
|
|
|
26
26
|
# args: [ "--offline" ]
|
|
27
27
|
# Should you use this offline, uncomment those args
|
|
28
28
|
- repo: https://github.com/rtts/djhtml
|
|
29
|
-
rev: 3.0.
|
|
29
|
+
rev: 3.0.11
|
|
30
30
|
hooks:
|
|
31
31
|
- id: djhtml
|
|
32
32
|
entry: djhtml --tabwidth 2
|
{csu-2.3.2 → csu-2.3.4}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: csu
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.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
|
|
@@ -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.3.
|
|
72
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.3.4.svg
|
|
73
73
|
:alt: Commits since latest release
|
|
74
|
-
:target: https://github.com/ionelmc/python-csu/compare/v2.3.
|
|
74
|
+
:target: https://github.com/ionelmc/python-csu/compare/v2.3.4...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.3.
|
|
37
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.3.4.svg
|
|
38
38
|
:alt: Commits since latest release
|
|
39
|
-
:target: https://github.com/ionelmc/python-csu/compare/v2.3.
|
|
39
|
+
:target: https://github.com/ionelmc/python-csu/compare/v2.3.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/
|
|
@@ -12,10 +12,10 @@ from ..export import ChoiceWidget
|
|
|
12
12
|
from ..export import FullFilenameExportAdminMixin
|
|
13
13
|
from ..export import SmartModelResource
|
|
14
14
|
from ..gettext import _
|
|
15
|
+
from ..timezones import now
|
|
15
16
|
from .models import AbstractTask
|
|
16
17
|
from .models import QueueState
|
|
17
18
|
from .models import ResultType
|
|
18
|
-
from .timezones import now
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class AbstractTaskResource(SmartModelResource):
|
|
@@ -20,6 +20,7 @@ from enum import auto
|
|
|
20
20
|
from functools import partial
|
|
21
21
|
from logging import getLogger
|
|
22
22
|
from random import randint
|
|
23
|
+
from signal import Signals
|
|
23
24
|
from typing import ClassVar
|
|
24
25
|
from typing import Protocol
|
|
25
26
|
|
|
@@ -271,7 +272,7 @@ class AbstractEngine(ABC):
|
|
|
271
272
|
workers: list[AbstractWorker]
|
|
272
273
|
queue: Queue = None
|
|
273
274
|
queue_sem: Semaphore
|
|
274
|
-
shutdown_on: Iterable[
|
|
275
|
+
shutdown_on: Iterable[Signals]
|
|
275
276
|
if sys.platform == "win32":
|
|
276
277
|
shutdown_on = signal.SIGINT, signal.SIGBREAK
|
|
277
278
|
else:
|
|
@@ -323,10 +324,16 @@ class AbstractEngine(ABC):
|
|
|
323
324
|
|
|
324
325
|
loop = asyncio.get_event_loop()
|
|
325
326
|
for sig in self.shutdown_on:
|
|
326
|
-
|
|
327
|
+
if sys.platform == "win32":
|
|
328
|
+
signal.signal(sig, self.shutdown_handler)
|
|
329
|
+
else:
|
|
330
|
+
loop.add_signal_handler(sig, self.shutdown_handler, sig)
|
|
327
331
|
|
|
328
|
-
def shutdown_handler(self, sig:
|
|
329
|
-
|
|
332
|
+
def shutdown_handler(self, sig: int | Signals, *_) -> None:
|
|
333
|
+
if isinstance(sig, Signals):
|
|
334
|
+
sig_name = sig.name
|
|
335
|
+
else:
|
|
336
|
+
sig_name = Signals(sig).name
|
|
330
337
|
graceful = not self.shutdown_requested
|
|
331
338
|
logger.info("%s.shutdown_handler(%s) %s", self, sig_name, "GRACEFUL" if graceful else "FORCED")
|
|
332
339
|
if not graceful:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: csu
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.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
|
|
@@ -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.3.
|
|
72
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-csu/v2.3.4.svg
|
|
73
73
|
:alt: Commits since latest release
|
|
74
|
-
:target: https://github.com/ionelmc/python-csu/compare/v2.3.
|
|
74
|
+
:target: https://github.com/ionelmc/python-csu/compare/v2.3.4...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/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csu-2.3.2 → csu-2.3.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csu-2.3.2 → csu-2.3.4}/tox.ini
RENAMED
|
File without changes
|