c2cwsgiutils 6.1.6__tar.gz → 6.1.6.dev2__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 (67) hide show
  1. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/LICENSE +1 -1
  2. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/PKG-INFO +1 -1
  3. c2cwsgiutils-6.1.6.dev2/c2cwsgiutils/loader.py +21 -0
  4. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/pyproject.toml +6 -6
  5. c2cwsgiutils-6.1.6/c2cwsgiutils/loader.py +0 -40
  6. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/README.md +0 -0
  7. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/__init__.py +0 -0
  8. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/acceptance/__init__.py +0 -0
  9. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/acceptance/connection.py +0 -0
  10. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/acceptance/image.py +0 -0
  11. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/acceptance/package-lock.json +0 -0
  12. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/acceptance/package.json +0 -0
  13. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/acceptance/print.py +0 -0
  14. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/acceptance/screenshot.js +0 -0
  15. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/acceptance/utils.py +0 -0
  16. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/auth.py +0 -0
  17. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/broadcast/__init__.py +0 -0
  18. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/broadcast/interface.py +0 -0
  19. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/broadcast/local.py +0 -0
  20. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/broadcast/redis.py +0 -0
  21. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/broadcast/utils.py +0 -0
  22. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/client_info.py +0 -0
  23. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/config_utils.py +0 -0
  24. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/coverage_setup.py +0 -0
  25. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/db.py +0 -0
  26. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/db_maintenance_view.py +0 -0
  27. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/debug/__init__.py +0 -0
  28. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/debug/_listeners.py +0 -0
  29. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/debug/_views.py +0 -0
  30. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/debug/utils.py +0 -0
  31. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/errors.py +0 -0
  32. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/health_check.py +0 -0
  33. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/index.py +0 -0
  34. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/logging_view.py +0 -0
  35. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/models_graph.py +0 -0
  36. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/pretty_json.py +0 -0
  37. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/profiler.py +0 -0
  38. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/prometheus.py +0 -0
  39. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/py.typed +0 -0
  40. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/pyramid.py +0 -0
  41. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/pyramid_logging.py +0 -0
  42. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/redis_stats.py +0 -0
  43. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/redis_utils.py +0 -0
  44. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/request_tracking/__init__.py +0 -0
  45. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/request_tracking/_sql.py +0 -0
  46. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/scripts/__init__.py +0 -0
  47. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/scripts/genversion.py +0 -0
  48. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/scripts/stats_db.py +0 -0
  49. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/scripts/test_print.py +0 -0
  50. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/sentry.py +0 -0
  51. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/services.py +0 -0
  52. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/setup_process.py +0 -0
  53. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/sql_profiler/__init__.py +0 -0
  54. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/sql_profiler/_impl.py +0 -0
  55. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/sqlalchemylogger/README.md +0 -0
  56. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/sqlalchemylogger/__init__.py +0 -0
  57. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/sqlalchemylogger/_filters.py +0 -0
  58. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/sqlalchemylogger/_models.py +0 -0
  59. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/sqlalchemylogger/examples/example.py +0 -0
  60. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/sqlalchemylogger/handlers.py +0 -0
  61. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/static/favicon-16x16.png +0 -0
  62. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/static/favicon-32x32.png +0 -0
  63. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/stats_pyramid/__init__.py +0 -0
  64. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/stats_pyramid/_db_spy.py +0 -0
  65. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/stats_pyramid/_pyramid_spy.py +0 -0
  66. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/templates/index.html.mako +0 -0
  67. {c2cwsgiutils-6.1.6 → c2cwsgiutils-6.1.6.dev2}/c2cwsgiutils/version.py +0 -0
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015-2025, Camptocamp SA
1
+ Copyright (c) 2015-2024, Camptocamp SA
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: c2cwsgiutils
3
- Version: 6.1.6
3
+ Version: 6.1.6.dev2
4
4
  Summary: Common utilities for Camptocamp WSGI applications
5
5
  Home-page: https://github.com/camptocamp/c2cwsgiutils
6
6
  License: BSD-2-Clause
@@ -0,0 +1,21 @@
1
+ import logging
2
+ from typing import Optional, cast
3
+
4
+ from plaster_pastedeploy import Loader as BaseLoader
5
+
6
+ from c2cwsgiutils import get_config_defaults
7
+
8
+ _LOG = logging.getLogger(__name__)
9
+
10
+
11
+ class Loader(BaseLoader): # type: ignore
12
+ """The application loader."""
13
+
14
+ def _get_defaults(self, defaults: Optional[dict[str, str]] = None) -> dict[str, str]:
15
+ d = get_config_defaults()
16
+ d.update(defaults or {})
17
+ return cast(dict[str, str], super()._get_defaults(d))
18
+
19
+ def __repr__(self) -> str:
20
+ """Get the object representation."""
21
+ return f'c2cwsgiutils.loader.Loader(uri="{self.uri}")'
@@ -16,7 +16,7 @@ strict = true
16
16
 
17
17
  [tool.poetry]
18
18
  name = "c2cwsgiutils"
19
- version = "6.1.6"
19
+ version = "6.1.6.dev2"
20
20
  description = "Common utilities for Camptocamp WSGI applications"
21
21
  readme = "README.md"
22
22
  authors = ["Camptocamp <info@camptocamp.com>"]
@@ -90,7 +90,7 @@ pyjwt = { version = "2.9.0", optional = true }
90
90
  requests-oauthlib = { version = "2.0.0", optional = true }
91
91
  waitress = "3.0.2"
92
92
  scikit-image = { version = "0.24.0", optional = true }
93
- prometheus-client = { version = "0.21.1", optional = true}
93
+ prometheus-client = { version = "0.21.0", optional = true}
94
94
  pyramid_mako = { version = "1.1.0", optional = true}
95
95
 
96
96
  [tool.poetry.extras]
@@ -173,16 +173,16 @@ test_images = ["scikit-image"]
173
173
  prospector = { extras = ["with_bandit", "with_mypy", "with_pyroma"], version = "1.12.1" }
174
174
  prospector-profile-duplicated = "1.6.0"
175
175
  prospector-profile-utils = "1.9.1"
176
- coverage = "7.6.9"
176
+ coverage = "7.6.8"
177
177
  junit2html = "31.0.2"
178
- pytest = "8.3.4"
178
+ pytest = "8.3.3"
179
179
  pytest-cov = "5.0.0"
180
180
  pytest-html = "4.1.1"
181
- types-pyyaml = "6.0.12.20241221"
181
+ types-pyyaml = "6.0.12.20240917"
182
182
  types-requests = "2.32.0.20241016"
183
183
  types-redis = "4.6.0.20241004"
184
184
  types-ujson = "5.10.0.20240515"
185
- types-python-dateutil = "2.9.0.20241206"
185
+ types-python-dateutil = "2.9.0.20241003"
186
186
  typing_extensions = "4.12.2"
187
187
 
188
188
  [build-system]
@@ -1,40 +0,0 @@
1
- import logging
2
- from typing import Optional, cast
3
-
4
- from plaster_pastedeploy import Loader as BaseLoader
5
-
6
- from c2cwsgiutils import get_config_defaults, get_logconfig_dict
7
-
8
- _LOG = logging.getLogger(__name__)
9
-
10
-
11
- class Loader(BaseLoader): # type: ignore
12
- """The application loader."""
13
-
14
- def _get_defaults(self, defaults: Optional[dict[str, str]] = None) -> dict[str, str]:
15
- d = get_config_defaults()
16
- d.update(defaults or {})
17
- return cast(dict[str, str], super()._get_defaults(d))
18
-
19
- def __repr__(self) -> str:
20
- """Get the object representation."""
21
- return f'c2cwsgiutils.loader.Loader(uri="{self.uri}")'
22
-
23
- def setup_logging(self, defaults: Optional[dict[str, str]] = None) -> None:
24
- """
25
- Set up logging via :func:`logging.config.dictConfig` with value returned from c2cwsgiutils.get_logconfig_dict.
26
-
27
- Defaults are specified for the special ``__file__`` and ``here``
28
- variables, similar to PasteDeploy config loading. Extra defaults can
29
- optionally be specified as a dict in ``defaults``.
30
-
31
- Arguments:
32
- ---------
33
- defaults: The defaults that will be used when passed to
34
- :func:`logging.config.fileConfig`.
35
-
36
- """
37
- if "loggers" in self.get_sections():
38
- logging.config.dictConfig(get_logconfig_dict(self.uri.path))
39
- else:
40
- logging.basicConfig()