structlog-sentry 2.2.1__tar.gz → 2.2.2__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.
@@ -1,9 +1,9 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: structlog-sentry
3
- Version: 2.2.1
3
+ Version: 2.2.2
4
4
  Summary: Sentry integration for structlog
5
- Home-page: https://github.com/kiwicom/structlog-sentry
6
5
  License: MIT
6
+ License-File: LICENSE
7
7
  Author: Kiwi.com platform
8
8
  Author-email: platform@kiwi.com
9
9
  Requires-Python: >=3.7,<4.0
@@ -20,9 +20,12 @@ Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Programming Language :: Python :: 3.15
23
25
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
26
  Requires-Dist: sentry-sdk (>=2.15.0,<3.0.0)
25
27
  Requires-Dist: structlog
28
+ Project-URL: Homepage, https://github.com/kiwicom/structlog-sentry
26
29
  Project-URL: Repository, https://github.com/kiwicom/structlog-sentry
27
30
  Description-Content-Type: text/markdown
28
31
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "structlog-sentry"
3
- version = "2.2.1"
3
+ version = "2.2.2"
4
4
  description = "Sentry integration for structlog"
5
5
  authors = ["Kiwi.com platform <platform@kiwi.com>"]
6
6
  license = "MIT"
@@ -15,12 +15,12 @@ classifiers=[
15
15
  "License :: OSI Approved :: MIT License",
16
16
  "Programming Language :: Python",
17
17
  "Programming Language :: Python :: 3",
18
- "Programming Language :: Python :: 3.7",
19
- "Programming Language :: Python :: 3.8",
20
- "Programming Language :: Python :: 3.9",
21
18
  "Programming Language :: Python :: 3.10",
22
19
  "Programming Language :: Python :: 3.11",
23
20
  "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Programming Language :: Python :: 3.14",
23
+ "Programming Language :: Python :: 3.15",
24
24
  "Topic :: Software Development :: Libraries :: Python Modules",
25
25
  ]
26
26
  include = ["*.md", "*.toml", "*.txt", "*.yml", "*.yaml", ".coveragerc", "tox.ini", "structlog_sentry/py.typed"]
@@ -76,7 +76,6 @@ class SentryProcessor:
76
76
 
77
77
  self._scope = scope
78
78
  self._as_context = as_context
79
- self._original_event_dict: dict = {}
80
79
  self.ignore_breadcrumb_data = ignore_breadcrumb_data
81
80
 
82
81
  self._ignored_loggers: set[str] = set()
@@ -134,9 +133,9 @@ class SentryProcessor:
134
133
  event["logger"] = event_dict["logger"]
135
134
 
136
135
  if self._as_context:
137
- event["contexts"] = {"structlog": self._original_event_dict.copy()}
136
+ event["contexts"] = {"structlog": dict(event_dict)}
138
137
  if self.tag_keys == "__all__":
139
- event["tags"] = self._original_event_dict.copy()
138
+ event["tags"] = dict(event_dict)
140
139
  if isinstance(self.tag_keys, list):
141
140
  event["tags"] = {
142
141
  key: event_dict[key] for key in self.tag_keys if key in event_dict
@@ -202,7 +201,6 @@ class SentryProcessor:
202
201
  self, logger: WrappedLogger, name: str, event_dict: EventDict
203
202
  ) -> EventDict:
204
203
  """A middleware to process structlog `event_dict` and send it to Sentry."""
205
- self._original_event_dict = dict(event_dict)
206
204
  sentry_skip = event_dict.pop("sentry_skip", False)
207
205
 
208
206
  if self.active and not sentry_skip and self._can_record(logger, event_dict):
@@ -1,29 +1,30 @@
1
1
  [tox]
2
2
  envlist =
3
3
  lint
4
- py{37,38,39,310,311,312}
4
+ py{310,311,312,313,314,315}
5
5
  isolated_build = true
6
6
 
7
7
  [gh-actions]
8
8
  python =
9
- 3.7: py37
10
- 3.8: py38
11
- 3.9: py39
12
9
  3.10: py310
13
10
  3.11: py311
14
11
  3.12: py312
12
+ 3.13: py313
13
+ 3.14: py314
14
+ 3.15: py315
15
15
 
16
16
  [testenv]
17
- whitelist_externals = poetry
18
- deps = poetry
17
+ deps =
18
+ pytest
19
+ pytest-cov
20
+ pytest-mock
19
21
  commands =
20
- poetry install
21
- poetry run coverage run --parallel-mode -m pytest {posargs}
22
- poetry run coverage combine
23
- poetry run coverage report
22
+ coverage run --parallel-mode -m pytest {posargs}
23
+ coverage combine
24
+ coverage report
24
25
 
25
26
  [testenv:lint]
26
- basepython = python3.9
27
+ basepython = python3
27
28
  skip_install = true
28
29
  deps = pre-commit
29
30
  passenv = HOMEPATH # needed on Windows