From ae3bf2bedbb6c26dd24ed1789b079e84405cff87 Mon Sep 17 00:00:00 2001 From: Eirik Martiniussen Sylliaas Date: Fri, 28 Feb 2025 14:22:06 +0100 Subject: [PATCH] Fix ddtrace deprecation warnings. There is a new version 3 of ddtrace, this is one step closer to be able to use that. (#363) --- .github/workflows/ci.yml | 2 +- .pre-commit-config.yaml | 10 - Makefile | 35 +- README.md | 3 - poetry.lock | 450 ++++++++------------- pyproject.toml | 30 +- tests/structlog/test_configuration.py | 28 +- tests/tracing/test_decorators.py | 6 +- tests/tracing/test_writer.py | 45 ++- troncos/contrib/asgi/logging/middleware.py | 6 +- troncos/contrib/structlog/processors.py | 3 +- troncos/profiling/pyroscope.py | 6 +- troncos/tracing/__init__.py | 5 +- troncos/tracing/_writer.py | 7 +- troncos/tracing/decorators.py | 29 +- 15 files changed, 276 insertions(+), 389 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79ebe7a..dc33253 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - check: [isort, mypy, black, ruff-check, ruff-format] + check: [mypy, ruff-check, ruff-format] steps: - name: Checkout diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index edf495d..3d42028 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,16 +19,6 @@ repos: - repo: local hooks: - - id: isort - name: isort - entry: .venv/bin/isort - language: system - types: [python] - - id: black - name: black - entry: .venv/bin/black - language: system - types: [python] - id: ruff name: ruff entry: .venv/bin/ruff diff --git a/Makefile b/Makefile index ecd5d3f..feaae3c 100644 --- a/Makefile +++ b/Makefile @@ -16,51 +16,30 @@ $(POETRY): ; $(info $(M) checking POETRY...) @touch $@ .PHONY: lint -lint: .venv lint-isort lint-black lint-ruff-check lint-ruff-format lint-mypy ## Run all linters - -.PHONY: lint-isort -lint-isort: .venv ; $(info $(M) running isort...) @ ## Run isort linter - $Q $(POETRY) run isort -c --diff $(PACKAGE) - $Q $(POETRY) run isort -c --diff $(TESTS) - -.PHONY: lint-black -lint-black: .venv ; $(info $(M) running black...) @ ## Run black linter - $Q $(POETRY) run black --check $(PACKAGE) - $Q $(POETRY) run black --check $(TESTS) +lint: .venv lint-ruff-check lint-ruff-format lint-mypy ## Run all linters .PHONY: lint-mypy lint-mypy: .venv ; $(info $(M) running mypy...) @ ## Run mypy linter - $Q $(POETRY) run mypy $(PACKAGE) - $Q $(POETRY) run mypy $(TESTS) + $Q $(POETRY) run mypy $(PACKAGE) $(TESTS) .PHONY: lint-ruff-check lint-ruff-check: .venv | $(BASE) ; $(info $(M) running ruff check…) @ ## Run ruff check linter - $Q $(POETRY) run ruff check $(PACKAGE) + $Q $(POETRY) run ruff check $(PACKAGE) $(TESTS) .PHONY: lint-ruff-format lint-ruff-format: .venv | $(BASE) ; $(info $(M) running ruff format…) @ ## Run ruff format linter - $Q $(POETRY) run ruff format $(PACKAGE) --check + $Q $(POETRY) run ruff format $(PACKAGE) $(TESTS) --check .PHONY: fix -fix: .venv fix-isort fix-black fix-ruff-check fix-ruff-format ## Run all fixers - -.PHONY: fix-isort -fix-isort: .venv ; $(info $(M) running isort...) @ ## Run isort fixer - $Q $(POETRY) run isort $(PACKAGE) - $Q $(POETRY) run isort $(TESTS) - -.PHONY: fix-black -fix-black: .venv ; $(info $(M) running black...) @ ## Run black fixer - $Q $(POETRY) run black $(PACKAGE) - $Q $(POETRY) run black $(TESTS) +fix: .venv fix-ruff-check fix-ruff-format ## Run all fixers .PHONY: fix-ruff-check fix-ruff-check: .venv | $(BASE) ; $(info $(M) running ruff check…) @ ## Run ruff check fixer - $Q $(POETRY) run ruff check $(PACKAGE) --fix + $Q $(POETRY) run ruff check $(PACKAGE) $(TESTS) --fix .PHONY: fix-ruff-format fix-ruff-format: .venv | $(BASE) ; $(info $(M) running ruff format…) @ ## Run ruff format fixer - $Q $(POETRY) run ruff format $(PACKAGE) + $Q $(POETRY) run ruff format $(PACKAGE) $(TESTS) .PHONY: test test: .venv ; $(info $(M) running tests...) @ ## Run tests diff --git a/README.md b/README.md index 07360ac..1ef6944 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,6 @@ ddtrace.patch_all() # Configure the ddtrace tracer to send traces to Tempo. configure_tracer( - enabled=False, # Set to True when TRACE_HOST is configured. service_name='SERVICE_NAME', exporter=Exporter( host = "127.0.0.1", # Usually obtained from env variables. @@ -144,7 +143,6 @@ from troncos.tracing import configure_tracer, Exporter configure_tracer( - enabled=False, # Set to True when TRACE_HOST is configured. service_name='SERVICE_NAME', exporter=Exporter( host = "127.0.0.1", # Usually obtained from env variables. @@ -160,7 +158,6 @@ from troncos.tracing import configure_tracer, Exporter configure_tracer( - enabled=False, # Set to True when TRACE_HOST is configured. service_name='SERVICE_NAME', exporter=Exporter( host = "127.0.0.1", # Usually obtained from env variables. diff --git a/poetry.lock b/poetry.lock index b53da73..50f4e2c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -80,24 +80,6 @@ six = "*" [package.extras] test = ["astroid", "pytest"] -[[package]] -name = "attrs" -version = "23.1.0" -description = "Classes Without Boilerplate" -optional = false -python-versions = ">=3.7" -files = [ - {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, - {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, -] - -[package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[docs,tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] - [[package]] name = "babel" version = "2.13.1" @@ -126,88 +108,17 @@ files = [ {file = "billiard-4.2.0.tar.gz", hash = "sha256:9a3c3184cb275aa17a732f93f65b20c525d3d9f253722d26a82194803ade5a2c"}, ] -[[package]] -name = "black" -version = "24.4.2" -description = "The uncompromising code formatter." -optional = false -python-versions = ">=3.8" -files = [ - {file = "black-24.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce"}, - {file = "black-24.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e537d281831ad0e71007dcdcbe50a71470b978c453fa41ce77186bbe0ed6021"}, - {file = "black-24.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063"}, - {file = "black-24.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:7768a0dbf16a39aa5e9a3ded568bb545c8c2727396d063bbaf847df05b08cd96"}, - {file = "black-24.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474"}, - {file = "black-24.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c"}, - {file = "black-24.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb"}, - {file = "black-24.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1"}, - {file = "black-24.4.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:accf49e151c8ed2c0cdc528691838afd217c50412534e876a19270fea1e28e2d"}, - {file = "black-24.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:88c57dc656038f1ab9f92b3eb5335ee9b021412feaa46330d5eba4e51fe49b04"}, - {file = "black-24.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be8bef99eb46d5021bf053114442914baeb3649a89dc5f3a555c88737e5e98fc"}, - {file = "black-24.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:415e686e87dbbe6f4cd5ef0fbf764af7b89f9057b97c908742b6008cc554b9c0"}, - {file = "black-24.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bf10f7310db693bb62692609b397e8d67257c55f949abde4c67f9cc574492cc7"}, - {file = "black-24.4.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:98e123f1d5cfd42f886624d84464f7756f60ff6eab89ae845210631714f6db94"}, - {file = "black-24.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48a85f2cb5e6799a9ef05347b476cce6c182d6c71ee36925a6c194d074336ef8"}, - {file = "black-24.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:b1530ae42e9d6d5b670a34db49a94115a64596bc77710b1d05e9801e62ca0a7c"}, - {file = "black-24.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:37aae07b029fa0174d39daf02748b379399b909652a806e5708199bd93899da1"}, - {file = "black-24.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:da33a1a5e49c4122ccdfd56cd021ff1ebc4a1ec4e2d01594fef9b6f267a9e741"}, - {file = "black-24.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e"}, - {file = "black-24.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:b9176b9832e84308818a99a561e90aa479e73c523b3f77afd07913380ae2eab7"}, - {file = "black-24.4.2-py3-none-any.whl", hash = "sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c"}, - {file = "black-24.4.2.tar.gz", hash = "sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - [[package]] name = "bytecode" -version = "0.15.0" +version = "0.16.1" description = "Python module to generate and modify bytecode" optional = false python-versions = ">=3.8" files = [ - {file = "bytecode-0.15.0-py3-none-any.whl", hash = "sha256:a66718dc1d246b4fec52b5850c15592344a56c8bdb28fd243c895ccf00f8371f"}, - {file = "bytecode-0.15.0.tar.gz", hash = "sha256:0908a8348cabf366b5c1865daabcdc0d650cb0cbdeb1750cc90564852f81945c"}, + {file = "bytecode-0.16.1-py3-none-any.whl", hash = "sha256:1d4b61ed6bade4bff44127c8283bef8131a664ce4dbe09d64a88caf329939f35"}, + {file = "bytecode-0.16.1.tar.gz", hash = "sha256:8fbbb637c880f339e564858bc6c7984ede67ae97bc71343379a535a9a4baf398"}, ] -[[package]] -name = "cattrs" -version = "23.1.2" -description = "Composable complex class support for attrs and dataclasses." -optional = false -python-versions = ">=3.7" -files = [ - {file = "cattrs-23.1.2-py3-none-any.whl", hash = "sha256:b2bb14311ac17bed0d58785e5a60f022e5431aca3932e3fc5cc8ed8639de50a4"}, - {file = "cattrs-23.1.2.tar.gz", hash = "sha256:db1c821b8c537382b2c7c66678c3790091ca0275ac486c76f3c8f3920e83c657"}, -] - -[package.dependencies] -attrs = ">=20" -exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} -typing_extensions = {version = ">=4.1.0", markers = "python_version < \"3.11\""} - -[package.extras] -bson = ["pymongo (>=4.2.0,<5.0.0)"] -cbor2 = ["cbor2 (>=5.4.6,<6.0.0)"] -msgpack = ["msgpack (>=1.0.2,<2.0.0)"] -orjson = ["orjson (>=3.5.2,<4.0.0)"] -pyyaml = ["PyYAML (>=6.0,<7.0)"] -tomlkit = ["tomlkit (>=0.11.4,<0.12.0)"] -ujson = ["ujson (>=5.4.0,<6.0.0)"] - [[package]] name = "celery" version = "5.4.0" @@ -577,106 +488,95 @@ tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.1 toml = ["tomli"] [[package]] -name = "ddsketch" -version = "3.0.1" -description = "Distributed quantile sketches" +name = "ddtrace" +version = "2.21.3" +description = "Datadog APM client library" optional = false python-versions = ">=3.7" files = [ - {file = "ddsketch-3.0.1-py3-none-any.whl", hash = "sha256:6d047b455fe2837c43d366ff1ae6ba0c3166e15499de8688437a75cea914224e"}, - {file = "ddsketch-3.0.1.tar.gz", hash = "sha256:aa8f20b2965e61731ca4fee2ca9c209f397f5bbb23f9d192ec8bd7a2f5bd9824"}, + {file = "ddtrace-2.21.3-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:12945048797fed9f31d4ef7a2147e2fbb9aca26165fd7f0dbacc393fa09b9908"}, + {file = "ddtrace-2.21.3-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:4807456bde18115157b07c7391d28b51b75c6ee95e38a7164d19e34f51942f27"}, + {file = "ddtrace-2.21.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a66866af252d0356f16a63e3613f3b9d59f41cc54576babeba773d0ca162c7a1"}, + {file = "ddtrace-2.21.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bf429df9812237d860e9b6ba48b60941a21eae0df232b934271e0a4c99db5a82"}, + {file = "ddtrace-2.21.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39a0a11eeea26ee8a07fa518b416d5837708f827854ae6182eacb97adbc3ba1e"}, + {file = "ddtrace-2.21.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b32b3c8a114f51d2149253460a45491da907034a7c3aba2e15cd85644d7337fe"}, + {file = "ddtrace-2.21.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:f73373e91de08b89338c7d365c9b429dd7fe9afd19cda62c6d30e2275168719a"}, + {file = "ddtrace-2.21.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8f7201ef7ebabef3595f67dfc702a07e9328eeab4b17bb0e8a820e770c76ea9a"}, + {file = "ddtrace-2.21.3-cp310-cp310-win32.whl", hash = "sha256:9f4844a5490febbfd70d87e073c98100b48a268e63ba6f0aba734ed8720fe378"}, + {file = "ddtrace-2.21.3-cp310-cp310-win_amd64.whl", hash = "sha256:675dff64aada3dd371a590d3e4b3cdcef4bd17f27dd6391fdb67d597a8aedaf4"}, + {file = "ddtrace-2.21.3-cp311-cp311-macosx_12_0_universal2.whl", hash = "sha256:f2d1f37fe5a0a1a6f7f9247cc3f736b5f6143b5cec3dd9c2cdbd9f2d0e1a112d"}, + {file = "ddtrace-2.21.3-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:f9a8e22811d6ab2790c5114a2fa95dc0d5677c274db1367064567185b0317fde"}, + {file = "ddtrace-2.21.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79041d96d483770a581a68b7f09cac8e40d3c9ec19fe0d9fe7daaaa977ad80ef"}, + {file = "ddtrace-2.21.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:021dda5c07b5ceb9dab715fcfd4786949d3eeb4a55bdb39ff2a1bf6dbf24f1a9"}, + {file = "ddtrace-2.21.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ac4b1adcea3a431129f0e57c75f746fd8c9087e778e4e13359c370d2efdd934"}, + {file = "ddtrace-2.21.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:549219ff70ea5ec74f2881c46cf2995f6b80fee49838c2cb4af5d00f33d015e0"}, + {file = "ddtrace-2.21.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1ddc9684332934ca977f5ee1ae991222258ce94103eddbe20602c585910fd427"}, + {file = "ddtrace-2.21.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c349a8294959365f872b6f5a634e37c33bf9c06f9bbe0347ddc38bafedf241a2"}, + {file = "ddtrace-2.21.3-cp311-cp311-win32.whl", hash = "sha256:31c61632e7a4f244dd5d0c2bc92986f5a1c75ff02a28a4e598d2fa819cfb1fe9"}, + {file = "ddtrace-2.21.3-cp311-cp311-win_amd64.whl", hash = "sha256:4939fcb7aacb74e2d1c0cf469ed4b2a3ef7ac35ad439b06881b4ca7af9af3f89"}, + {file = "ddtrace-2.21.3-cp312-cp312-macosx_12_0_universal2.whl", hash = "sha256:68ca509870d1b6bfb22fd1cf5ad860ff58b48b4de4814884c149a79243cfe60f"}, + {file = "ddtrace-2.21.3-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:159aff1e58f0d4d3bb88db8912eceb1bb18bc704157d942b247d7d02b279a9b6"}, + {file = "ddtrace-2.21.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b39a03051b91718d526c0c238c22e7f471b573ffe0d5b1b558ad8b9ebf2d88ad"}, + {file = "ddtrace-2.21.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9b713dd43fbeff942bb1b600ff8b5ffc5d0d4b77f0cf63366cb9f49d27a1ea67"}, + {file = "ddtrace-2.21.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e1e5cea33dde5130f62bf971ede956f4e4d83d28ef594485c64fb53a3838bc8"}, + {file = "ddtrace-2.21.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:68e8bfe9c0d5d73a98daf6acf87558546fe4a57245e0d7a0a4e4449c56ad62e4"}, + {file = "ddtrace-2.21.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c534cd5137b5022097bbe1bd76d93e367d4e991e140a8eb6eee38198fec7e56d"}, + {file = "ddtrace-2.21.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dcf70356372584a02bcf6ce10e9778a44c078f3eeb68452d752e525cc4174377"}, + {file = "ddtrace-2.21.3-cp312-cp312-win32.whl", hash = "sha256:eab7efa4264b59bdd5d639896fdcf4f09d09444be0c4e0023007dd532b74e683"}, + {file = "ddtrace-2.21.3-cp312-cp312-win_amd64.whl", hash = "sha256:2282739eb8e753fc11b8827c04345731921a433c29ceb4b4b94080fe30d83deb"}, + {file = "ddtrace-2.21.3-cp313-cp313-macosx_12_0_universal2.whl", hash = "sha256:68210865a2919d4d9776b951b15aded42a970ee7aae50fa80620c622365ec4a3"}, + {file = "ddtrace-2.21.3-cp313-cp313-macosx_12_0_x86_64.whl", hash = "sha256:1db7385d363899c41876f32e5358e0aaef3d9f71fb81ab8efe870ad498954f3a"}, + {file = "ddtrace-2.21.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:937f9d9941e3e72c3c43a34553288b3543659bba9b6eba37a6ca543683809938"}, + {file = "ddtrace-2.21.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:669b2ef62303e3174db58c7e61b4bc58e95926b7e683b5d272101b95cf22e809"}, + {file = "ddtrace-2.21.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08d15580325837afd61af95095dcd34778041575b21eb497c81144673f2a3389"}, + {file = "ddtrace-2.21.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:fe1e6727d822ec62cb609f6e930b22f28c81321025c9fdd39e489987686e2976"}, + {file = "ddtrace-2.21.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:061a32498226eff02bd7a1cefd9c3418dc70f5adc4a911de780617d08caa7b1a"}, + {file = "ddtrace-2.21.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fc89569fceec8e9686b69124db5666c19aa5e4d5fd3cb1f29c325002951b9d14"}, + {file = "ddtrace-2.21.3-cp37-cp37m-macosx_12_0_x86_64.whl", hash = "sha256:9a6a4a6d42ea518d4068f4b88bbb57b6109c8b5a3f952aacc6be6451a743d4db"}, + {file = "ddtrace-2.21.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c2cbab8d2f51f6531b880de261ef9b88b2c8abfd05805e4aac59b24dfb049ab"}, + {file = "ddtrace-2.21.3-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b4da3074d24c7fa824a85f5676a072d690f7b1b3b64529b1f75932ae07737a37"}, + {file = "ddtrace-2.21.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b331fecd4dd09a1e9c7fde9a0387ddc08fbfd9432f37496168bb667cf6301e0d"}, + {file = "ddtrace-2.21.3-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:482ebc760a3beccb864f3894cafbbb2931ae3b72daa10435c70b9c2dd984ab0f"}, + {file = "ddtrace-2.21.3-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:70dd06984a3caa4dc710170e1c7d1ba9c6fd8f6002dae7a03aa2b1ea33b1d720"}, + {file = "ddtrace-2.21.3-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:bd9b7dea1999e2534598b2428c229f210055e5bd74b0201521ddf13a0eb76e89"}, + {file = "ddtrace-2.21.3-cp37-cp37m-win32.whl", hash = "sha256:7a2504cdd29bc7a5f423d99802907c5e48a0fa946c23d149b0e20ff652ec2cc6"}, + {file = "ddtrace-2.21.3-cp37-cp37m-win_amd64.whl", hash = "sha256:679926f0a997d08f23db383c7c00bc46de4f79cbdc72bf7df9b62fab926662a7"}, + {file = "ddtrace-2.21.3-cp38-cp38-macosx_12_0_universal2.whl", hash = "sha256:74a7b3bec6cd9ab670a801d46b9137af27e9138af8019e3ec952f418e0264ccd"}, + {file = "ddtrace-2.21.3-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:cec8b57ad35908333125ca46ef4dd819a4b560101c5af79edee5a6849f53faec"}, + {file = "ddtrace-2.21.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a5d90d98ce4c272e57789fed445fd01bb21c88addcb3f2e8f9de9c2ed89e215"}, + {file = "ddtrace-2.21.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:67dca1e73ab11140940edd00e5b12365aa1c6b789b99d69298c92cf1980c3290"}, + {file = "ddtrace-2.21.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51c44ad95ab7db80302e45a0b5a456979e4fa9c066bdfa199846a60cbf2e7bc1"}, + {file = "ddtrace-2.21.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:67bed11a6737a75b44ed06488ac62aee9f0c8cb69f69f950c0210df797b1316f"}, + {file = "ddtrace-2.21.3-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:f10ed99fb4cc89c206efddb6574c65c8a1fcfc6a20979d317ba677088348e7a5"}, + {file = "ddtrace-2.21.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:df1d1a0a1db3656d1bc98933da437b423d839a8dc57aaf4695c736bc94b5e254"}, + {file = "ddtrace-2.21.3-cp38-cp38-win32.whl", hash = "sha256:dcfbd8b4efb8a6515db56fe3a2b20d855c62bffd3fb3b643b69e5518c1e96197"}, + {file = "ddtrace-2.21.3-cp38-cp38-win_amd64.whl", hash = "sha256:349befd69a27be6440bd4920c0dfd005307ebc80997b7ea3381ed9171db212f1"}, + {file = "ddtrace-2.21.3-cp39-cp39-macosx_12_0_universal2.whl", hash = "sha256:2dfb1d1d22bf223412b6d87a743dc50bc108b398bdd4af818465ad007c3485a8"}, + {file = "ddtrace-2.21.3-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:29540bb4b60ed2414a453c3a318876d61e1209c65a24bff9e66f166447713526"}, + {file = "ddtrace-2.21.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7c3a58065f05fa491c535112b2eb11561972daf18a2e8161b56e1fda2d5e2df0"}, + {file = "ddtrace-2.21.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:912861ebf2904cfdc36167c24ad63c25e3d823abfae2df5c1bb7c5d9935d69c0"}, + {file = "ddtrace-2.21.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9a83a1cddf8946a098fbaa8d79ca6229885c0f78fa98b3bf61f9874fbf3d1b"}, + {file = "ddtrace-2.21.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:637e5e876039ecd30060b00569d9aaf913e2ec3ded6224bd5cb9a549604dcf89"}, + {file = "ddtrace-2.21.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3e07fec6955dce28f34deec4c5cc8ba51e5860aecf6ca838dcf0bc63252bbeee"}, + {file = "ddtrace-2.21.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:d22507de96d4eec96b862cccfeef91493dd42a2a5f51af13673547f53356786d"}, + {file = "ddtrace-2.21.3-cp39-cp39-win32.whl", hash = "sha256:abaa358c935a6292f9cb9b04515817f03b6dc9c1fbeb829417337b5497ccb02d"}, + {file = "ddtrace-2.21.3-cp39-cp39-win_amd64.whl", hash = "sha256:473d6e3d2f99e2b1a8e7d85705be7329e54bccdcd541e634ad48b68b3dff546e"}, + {file = "ddtrace-2.21.3.tar.gz", hash = "sha256:07f247928943d1ac7523d68f3629bec240a29d5a51b144d29513513d303e199b"}, ] [package.dependencies] -six = "*" - -[package.extras] -serialization = ["protobuf (>=3.0.0)"] - -[[package]] -name = "ddtrace" -version = "2.9.2" -description = "Datadog APM client library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "ddtrace-2.9.2-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:aaa4c4c0d001e5695d8d8f03361e25fbba62716bd4dbc861daa45bc71802a165"}, - {file = "ddtrace-2.9.2-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:99fa4f3437dd908622d015fd0a92015eb2bb718554fd6e9cb3c8984737ca8173"}, - {file = "ddtrace-2.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c3be4f5ea1378138f26b6a84b23048a681e705e602f5f4a2db6c9f1ae6f52c9"}, - {file = "ddtrace-2.9.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b79f44ebd64496e8d2c85250290486f08cf338b02cb484a24d17204d11af39d6"}, - {file = "ddtrace-2.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0f9bcf9dc2fee145c1fa295e451898dd0b6fbdbdd7cc205b5c226c945369238"}, - {file = "ddtrace-2.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6418399be4eb0100d8c25e7154d94032dafb08f3387864db6ea64ae6b01044a4"}, - {file = "ddtrace-2.9.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:72a3d3cdca7508b787e6bd0d09a75f1cb7cba9580f91591be51af22c9d9bf9bf"}, - {file = "ddtrace-2.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:93efef2f0b88792fefe5840c47c9f262fc94471078c0cf10f54831b44ea422b6"}, - {file = "ddtrace-2.9.2-cp310-cp310-win32.whl", hash = "sha256:5ad725a61da4b4d76368b7e205ae327ae39cab5ec64d8c6e16760bc86d6a6507"}, - {file = "ddtrace-2.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:9a31c9a2d714b3d45fb5ae24b912521d4569d1dac3fd3fc3c77ec9fcba5dfd26"}, - {file = "ddtrace-2.9.2-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:358ccb1b7bf9ec39658e00aa1ba4972712603deefb5562219ce0ccc5e7521e52"}, - {file = "ddtrace-2.9.2-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:98b44e28151b07a9ce8ae27951978ac340f66640c833dee9b396831ddf06a9a6"}, - {file = "ddtrace-2.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9d409e6d061bbe3d026696403edd37b390a4a8bc661b7490c02199a8a9da7e9"}, - {file = "ddtrace-2.9.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a26ecdf3f7666e604bb15e20d32b63d948e85bcde6c63b2f1d45af0681079bf"}, - {file = "ddtrace-2.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:519e2a9e6daf592bf4a9993ae782621016770b5182ed7567fba0ef23812ca6d7"}, - {file = "ddtrace-2.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2243582de6aef14fc87621169d586679572cf3f39c79cef6f898963f37a6a296"}, - {file = "ddtrace-2.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c176c0ea15e2b94f139ca68ba3d5ee48430c717ae785cd9e51eeb59634629c94"}, - {file = "ddtrace-2.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e9befe7b40141a686f991fd98780b9dfe31e55b9ed3cf685a5fcfa256789b879"}, - {file = "ddtrace-2.9.2-cp311-cp311-win32.whl", hash = "sha256:84f1a7b517f1790374ad1079e783cd893634518521ae6e2ed41a4e343227830b"}, - {file = "ddtrace-2.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:4c34823c3ed3e1da5fe11de483c4091179f21fb4f255144a5082af2f52a1e02e"}, - {file = "ddtrace-2.9.2-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:b5b749b609036917cab6ae9187aaf4e83051e0396bd0d4d9f2af4bfbaf866bf2"}, - {file = "ddtrace-2.9.2-cp312-cp312-macosx_11_0_x86_64.whl", hash = "sha256:b1f21076ecb3a7736e92dc288ff6437337098f9acc6dcbbebfcfb7a1ce7aabff"}, - {file = "ddtrace-2.9.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8bb857a7a66ac56d041f2e40778f88cea51db55d0611beb36b6a45b52504c90d"}, - {file = "ddtrace-2.9.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f1f7e403b77f6c26d2f813712c38cda09d4b5c2e07e5e6e578eb71ce674382ce"}, - {file = "ddtrace-2.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dace336a9c14f6f8953732806d4fccee489d670aac6b2b75a3fa9eb94c32fda6"}, - {file = "ddtrace-2.9.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:e7c59ce06f887db4a6a0309bdc504beada8969979876dc8f54681e10d1993426"}, - {file = "ddtrace-2.9.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:0b7c81323a952da21e7a85b20334bb33ba47600c7b7604f4267022217c7025e3"}, - {file = "ddtrace-2.9.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:07aa83c4a6e6822fd365a92f972576980badc3d426d257d9814212d0a2a5f837"}, - {file = "ddtrace-2.9.2-cp312-cp312-win32.whl", hash = "sha256:5fe686fe657b9871f6faf2f7f7e97e659421c17dc5903b43ff174f8866726a21"}, - {file = "ddtrace-2.9.2-cp312-cp312-win_amd64.whl", hash = "sha256:858b61e57cb11c5c467907add391ce8ad2dec823bc326c8e1505368c4f0ac7d4"}, - {file = "ddtrace-2.9.2-cp37-cp37m-macosx_11_0_x86_64.whl", hash = "sha256:28ee6dee988609f1d720934d52f6a29b7c9b914a39fb70528a51a194d1ab3b8d"}, - {file = "ddtrace-2.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:07ade55550c3b1debb96f9ffdb716eae5bd48335d3ca54e9c5b9e492a7dc91f2"}, - {file = "ddtrace-2.9.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:41cf398da7a28a78c108cccfc87abe33d7e8936f99462f6fee3877fb180913c0"}, - {file = "ddtrace-2.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d79259e140070dc2533c3bc5776df7731baa9e2f078daf4ce708efd33ac00d3"}, - {file = "ddtrace-2.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:753f845308d97f8290d4ff7ce92e7875b83efa4eb5ff3fac8e2042caf6761bfb"}, - {file = "ddtrace-2.9.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:28c88f5efc946dddefc320c682c93bb65001ee38e78569e496b20823f21ef745"}, - {file = "ddtrace-2.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:765d7c031b54da32fc18cbeafadd3c22cd1a6f98317e6e0498bf2898fbeae350"}, - {file = "ddtrace-2.9.2-cp37-cp37m-win32.whl", hash = "sha256:7b5dddfbd23646a16ad9b991fd2866628dc56b7abe8dd7100962ce0681b738c9"}, - {file = "ddtrace-2.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:c8c17f5f57f65ea95d6bf61511869abfaa10fb555e81b0294e30226afa047115"}, - {file = "ddtrace-2.9.2-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:aa329ace4909bd402de3d9dbaaaff9e3545fd5a9fad1c72a39e075743c673099"}, - {file = "ddtrace-2.9.2-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:afebe7e5467a743795a878cad3e9658f704c5572ca398a70a840da034a571f67"}, - {file = "ddtrace-2.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd1271c597f088b1ff7e5881138a1317a799025c834bd496cecfdcb816748e51"}, - {file = "ddtrace-2.9.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:24da863c984d3261c7dae9362cf48c01fc0dc1557c92de336a1bbeb08452e046"}, - {file = "ddtrace-2.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e68014fa46b4be6e58cc64feb3516ec856df714ce3d4576f3d6df9079ddfba8f"}, - {file = "ddtrace-2.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:10824581a708c643515747e814c6b146bed6d91e687a825111858a198eee75e6"}, - {file = "ddtrace-2.9.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:03c6874475db7d7b1fb563cd6aa3ba0c22ee72bb8c6cceb36c84dba6ca21e2f4"}, - {file = "ddtrace-2.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b91b8cfc7239317fe6b185beb0b8153769b43bf11fb2cda9e6e2996962e4b820"}, - {file = "ddtrace-2.9.2-cp38-cp38-win32.whl", hash = "sha256:0d9456defb679d6225d32967902853cd4d8b01f55e4da18089a9ffa9d6495328"}, - {file = "ddtrace-2.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:d39c2da38c295aba1810083ce63d37041e3e40a06add960f6edf5a33517f743c"}, - {file = "ddtrace-2.9.2-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:c251e684c9e3a7828308a74d2be073d88cf28b4be457a5c201a2755ef9205d24"}, - {file = "ddtrace-2.9.2-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:707151d2aa4f04388af4e3e8b0783e99b110fa0f2f1db775f64667c62bd249c2"}, - {file = "ddtrace-2.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c536a53d628e8d96812edea10d84e9df2f9022a7e932beb10e187c98f4471ec"}, - {file = "ddtrace-2.9.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9c093fbabdeb6ecc6a749b1b5f80ebe557dcf768984bb42aadf66c57f04f3b85"}, - {file = "ddtrace-2.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d5b6c58d4ebc988f61a5f81e8953531ee59490240d69463592ff63dd2f6e00b"}, - {file = "ddtrace-2.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:85511fade95b21ca29e9ba314eeb5847733a81128d8cbdbc43012caba45c03c8"}, - {file = "ddtrace-2.9.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:8b3b2f64414c57742e7be924079e80576110abf8725f70e56bce0603877d08bf"}, - {file = "ddtrace-2.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ad04028487d7cdb44318323ab4438c873e01855c3391a3c47a4400ff499bcbfc"}, - {file = "ddtrace-2.9.2-cp39-cp39-win32.whl", hash = "sha256:206759c2847ee7174e14c4a2cffd3086ad55aca10d73f50b24cc2e00ec22e871"}, - {file = "ddtrace-2.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:d916dbfeeebb38cd48c64c771b74276b716902471f6bf9c02e8d5c278f0baad1"}, - {file = "ddtrace-2.9.2.tar.gz", hash = "sha256:40775def3f3fc01d1c4c5eec64f7f624621eb394fe62d107c27e181123443716"}, -] - -[package.dependencies] -attrs = ">=20" bytecode = [ - {version = ">=0.13.0", markers = "python_version < \"3.11.0\""}, - {version = ">=0.15.0", markers = "python_version >= \"3.12.0\""}, + {version = ">=0.16.0", markers = "python_version >= \"3.13.0\""}, + {version = ">=0.15.0", markers = "python_version ~= \"3.12.0\""}, {version = ">=0.14.0", markers = "python_version ~= \"3.11.0\""}, + {version = ">=0.13.0", markers = "python_version < \"3.11.0\""}, ] -cattrs = "*" -ddsketch = ">=3.0.0" envier = ">=0.5,<1.0" +legacy-cgi = {version = ">=2.0.0", markers = "python_version >= \"3.13.0\""} opentelemetry-api = ">=1" protobuf = ">=3" -setuptools = {version = "*", markers = "python_version >= \"3.12\""} -six = ">=1.12.0" -typing-extensions = "*" +typing_extensions = "*" +wrapt = ">=1" xmltodict = ">=0.12" [package.extras] @@ -1150,20 +1050,6 @@ qtconsole = ["qtconsole"] test = ["pickleshare", "pytest", "pytest-asyncio (<0.22)", "testpath"] test-extra = ["curio", "ipython[test]", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.23)", "pandas", "trio"] -[[package]] -name = "isort" -version = "5.13.2" -description = "A Python utility / library to sort Python imports." -optional = false -python-versions = ">=3.8.0" -files = [ - {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, - {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, -] - -[package.extras] -colors = ["colorama (>=0.4.6)"] - [[package]] name = "jedi" version = "0.19.0" @@ -1232,6 +1118,17 @@ sqs = ["boto3 (>=1.26.143)", "pycurl (>=7.43.0.5)", "urllib3 (>=1.26.16)"] yaml = ["PyYAML (>=3.10)"] zookeeper = ["kazoo (>=2.8.0)"] +[[package]] +name = "legacy-cgi" +version = "2.6.2" +description = "Fork of the standard library cgi and cgitb modules, being deprecated in PEP-594" +optional = false +python-versions = ">=3.10" +files = [ + {file = "legacy_cgi-2.6.2-py3-none-any.whl", hash = "sha256:a7b83afb1baf6ebeb56522537c5943ef9813cf933f6715e88a803f7edbce0bff"}, + {file = "legacy_cgi-2.6.2.tar.gz", hash = "sha256:9952471ceb304043b104c22d00b4f333cac27a6abe446d8a528fc437cf13c85f"}, +] + [[package]] name = "markdown" version = "3.3.7" @@ -1311,16 +1208,6 @@ files = [ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, @@ -1528,47 +1415,53 @@ pymdown-extensions = "10.3.1" [[package]] name = "mypy" -version = "1.10.1" +version = "1.15.0" description = "Optional static typing for Python" optional = false -python-versions = ">=3.8" -files = [ - {file = "mypy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e36f229acfe250dc660790840916eb49726c928e8ce10fbdf90715090fe4ae02"}, - {file = "mypy-1.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:51a46974340baaa4145363b9e051812a2446cf583dfaeba124af966fa44593f7"}, - {file = "mypy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:901c89c2d67bba57aaaca91ccdb659aa3a312de67f23b9dfb059727cce2e2e0a"}, - {file = "mypy-1.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0cd62192a4a32b77ceb31272d9e74d23cd88c8060c34d1d3622db3267679a5d9"}, - {file = "mypy-1.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:a2cbc68cb9e943ac0814c13e2452d2046c2f2b23ff0278e26599224cf164e78d"}, - {file = "mypy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd6f629b67bb43dc0d9211ee98b96d8dabc97b1ad38b9b25f5e4c4d7569a0c6a"}, - {file = "mypy-1.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1bbb3a6f5ff319d2b9d40b4080d46cd639abe3516d5a62c070cf0114a457d84"}, - {file = "mypy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8edd4e9bbbc9d7b79502eb9592cab808585516ae1bcc1446eb9122656c6066f"}, - {file = "mypy-1.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6166a88b15f1759f94a46fa474c7b1b05d134b1b61fca627dd7335454cc9aa6b"}, - {file = "mypy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bb9cd11c01c8606a9d0b83ffa91d0b236a0e91bc4126d9ba9ce62906ada868e"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d8681909f7b44d0b7b86e653ca152d6dff0eb5eb41694e163c6092124f8246d7"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:378c03f53f10bbdd55ca94e46ec3ba255279706a6aacaecac52ad248f98205d3"}, - {file = "mypy-1.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bacf8f3a3d7d849f40ca6caea5c055122efe70e81480c8328ad29c55c69e93e"}, - {file = "mypy-1.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:701b5f71413f1e9855566a34d6e9d12624e9e0a8818a5704d74d6b0402e66c04"}, - {file = "mypy-1.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:3c4c2992f6ea46ff7fce0072642cfb62af7a2484efe69017ed8b095f7b39ef31"}, - {file = "mypy-1.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:604282c886497645ffb87b8f35a57ec773a4a2721161e709a4422c1636ddde5c"}, - {file = "mypy-1.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37fd87cab83f09842653f08de066ee68f1182b9b5282e4634cdb4b407266bade"}, - {file = "mypy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8addf6313777dbb92e9564c5d32ec122bf2c6c39d683ea64de6a1fd98b90fe37"}, - {file = "mypy-1.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5cc3ca0a244eb9a5249c7c583ad9a7e881aa5d7b73c35652296ddcdb33b2b9c7"}, - {file = "mypy-1.10.1-cp38-cp38-win_amd64.whl", hash = "sha256:1b3a2ffce52cc4dbaeee4df762f20a2905aa171ef157b82192f2e2f368eec05d"}, - {file = "mypy-1.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe85ed6836165d52ae8b88f99527d3d1b2362e0cb90b005409b8bed90e9059b3"}, - {file = "mypy-1.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c2ae450d60d7d020d67ab440c6e3fae375809988119817214440033f26ddf7bf"}, - {file = "mypy-1.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6be84c06e6abd72f960ba9a71561c14137a583093ffcf9bbfaf5e613d63fa531"}, - {file = "mypy-1.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2189ff1e39db399f08205e22a797383613ce1cb0cb3b13d8bcf0170e45b96cc3"}, - {file = "mypy-1.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:97a131ee36ac37ce9581f4220311247ab6cba896b4395b9c87af0675a13a755f"}, - {file = "mypy-1.10.1-py3-none-any.whl", hash = "sha256:71d8ac0b906354ebda8ef1673e5fde785936ac1f29ff6987c7483cfbd5a4235a"}, - {file = "mypy-1.10.1.tar.gz", hash = "sha256:1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0"}, -] - -[package.dependencies] -mypy-extensions = ">=1.0.0" +python-versions = ">=3.9" +files = [ + {file = "mypy-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:979e4e1a006511dacf628e36fadfecbcc0160a8af6ca7dad2f5025529e082c13"}, + {file = "mypy-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c4bb0e1bd29f7d34efcccd71cf733580191e9a264a2202b0239da95984c5b559"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be68172e9fd9ad8fb876c6389f16d1c1b5f100ffa779f77b1fb2176fcc9ab95b"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7be1e46525adfa0d97681432ee9fcd61a3964c2446795714699a998d193f1a3"}, + {file = "mypy-1.15.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2e2c2e6d3593f6451b18588848e66260ff62ccca522dd231cd4dd59b0160668b"}, + {file = "mypy-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:6983aae8b2f653e098edb77f893f7b6aca69f6cffb19b2cc7443f23cce5f4828"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2922d42e16d6de288022e5ca321cd0618b238cfc5570e0263e5ba0a77dbef56f"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2ee2d57e01a7c35de00f4634ba1bbf015185b219e4dc5909e281016df43f5ee5"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:973500e0774b85d9689715feeffcc980193086551110fd678ebe1f4342fb7c5e"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a95fb17c13e29d2d5195869262f8125dfdb5c134dc8d9a9d0aecf7525b10c2c"}, + {file = "mypy-1.15.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1905f494bfd7d85a23a88c5d97840888a7bd516545fc5aaedff0267e0bb54e2f"}, + {file = "mypy-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:c9817fa23833ff189db061e6d2eff49b2f3b6ed9856b4a0a73046e41932d744f"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:aea39e0583d05124836ea645f412e88a5c7d0fd77a6d694b60d9b6b2d9f184fd"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2f2147ab812b75e5b5499b01ade1f4a81489a147c01585cda36019102538615f"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ce436f4c6d218a070048ed6a44c0bbb10cd2cc5e272b29e7845f6a2f57ee4464"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8023ff13985661b50a5928fc7a5ca15f3d1affb41e5f0a9952cb68ef090b31ee"}, + {file = "mypy-1.15.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1124a18bc11a6a62887e3e137f37f53fbae476dc36c185d549d4f837a2a6a14e"}, + {file = "mypy-1.15.0-cp312-cp312-win_amd64.whl", hash = "sha256:171a9ca9a40cd1843abeca0e405bc1940cd9b305eaeea2dda769ba096932bb22"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:93faf3fdb04768d44bf28693293f3904bbb555d076b781ad2530214ee53e3445"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:811aeccadfb730024c5d3e326b2fbe9249bb7413553f15499a4050f7c30e801d"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:98b7b9b9aedb65fe628c62a6dc57f6d5088ef2dfca37903a7d9ee374d03acca5"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c43a7682e24b4f576d93072216bf56eeff70d9140241f9edec0c104d0c515036"}, + {file = "mypy-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:baefc32840a9f00babd83251560e0ae1573e2f9d1b067719479bfb0e987c6357"}, + {file = "mypy-1.15.0-cp313-cp313-win_amd64.whl", hash = "sha256:b9378e2c00146c44793c98b8d5a61039a048e31f429fb0eb546d93f4b000bedf"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e601a7fa172c2131bff456bb3ee08a88360760d0d2f8cbd7a75a65497e2df078"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:712e962a6357634fef20412699a3655c610110e01cdaa6180acec7fc9f8513ba"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95579473af29ab73a10bada2f9722856792a36ec5af5399b653aa28360290a5"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8f8722560a14cde92fdb1e31597760dc35f9f5524cce17836c0d22841830fd5b"}, + {file = "mypy-1.15.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fbb8da62dc352133d7d7ca90ed2fb0e9d42bb1a32724c287d3c76c58cbaa9c2"}, + {file = "mypy-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:d10d994b41fb3497719bbf866f227b3489048ea4bbbb5015357db306249f7980"}, + {file = "mypy-1.15.0-py3-none-any.whl", hash = "sha256:5469affef548bd1895d86d3bf10ce2b44e33d86923c29e4d675b3e323437ea3e"}, + {file = "mypy-1.15.0.tar.gz", hash = "sha256:404534629d51d3efea5c800ee7c42b72a6554d6c400e6a79eafe15d11341fd43"}, +] + +[package.dependencies] +mypy_extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=4.1.0" +typing_extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] +faster-cache = ["orjson"] install-types = ["pip"] mypyc = ["setuptools (>=50)"] reports = ["lxml"] @@ -1936,7 +1829,7 @@ name = "pycparser" version = "2.21" description = "C parser in Python" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = "*" files = [ {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, @@ -2130,13 +2023,13 @@ cffi = ">=1.6.0" [[package]] name = "pytest" -version = "8.2.2" +version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, - {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, + {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, + {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, ] [package.dependencies] @@ -2144,7 +2037,7 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.5,<2.0" +pluggy = ">=1.5,<2" tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] @@ -2220,6 +2113,24 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] +[[package]] +name = "pytest-env" +version = "1.1.5" +description = "pytest plugin that allows you to add environment variables." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest_env-1.1.5-py3-none-any.whl", hash = "sha256:ce90cf8772878515c24b31cd97c7fa1f4481cd68d588419fd45f10ecaee6bc30"}, + {file = "pytest_env-1.1.5.tar.gz", hash = "sha256:91209840aa0e43385073ac464a554ad2947cc2fd663a9debf88d03b01e0cc1cf"}, +] + +[package.dependencies] +pytest = ">=8.3.3" +tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "pytest-mock (>=3.14)"] + [[package]] name = "pytest-httpserver" version = "1.0.10" @@ -2319,7 +2230,6 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -2327,16 +2237,8 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, - {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, - {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, - {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -2353,7 +2255,6 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -2361,7 +2262,6 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -2519,29 +2419,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.8.0" +version = "0.9.8" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.0-py3-none-linux_armv6l.whl", hash = "sha256:fcb1bf2cc6706adae9d79c8d86478677e3bbd4ced796ccad106fd4776d395fea"}, - {file = "ruff-0.8.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:295bb4c02d58ff2ef4378a1870c20af30723013f441c9d1637a008baaf928c8b"}, - {file = "ruff-0.8.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7b1f1c76b47c18fa92ee78b60d2d20d7e866c55ee603e7d19c1e991fad933a9a"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb0d4f250a7711b67ad513fde67e8870109e5ce590a801c3722580fe98c33a99"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e55cce9aa93c5d0d4e3937e47b169035c7e91c8655b0974e61bb79cf398d49c"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f4cd64916d8e732ce6b87f3f5296a8942d285bbbc161acee7fe561134af64f9"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c5c1466be2a2ebdf7c5450dd5d980cc87c8ba6976fb82582fea18823da6fa362"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2dabfd05b96b7b8f2da00d53c514eea842bff83e41e1cceb08ae1966254a51df"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:facebdfe5a5af6b1588a1d26d170635ead6892d0e314477e80256ef4a8470cf3"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87a8e86bae0dbd749c815211ca11e3a7bd559b9710746c559ed63106d382bd9c"}, - {file = "ruff-0.8.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:85e654f0ded7befe2d61eeaf3d3b1e4ef3894469cd664ffa85006c7720f1e4a2"}, - {file = "ruff-0.8.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:83a55679c4cb449fa527b8497cadf54f076603cc36779b2170b24f704171ce70"}, - {file = "ruff-0.8.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:812e2052121634cf13cd6fddf0c1871d0ead1aad40a1a258753c04c18bb71bbd"}, - {file = "ruff-0.8.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:780d5d8523c04202184405e60c98d7595bdb498c3c6abba3b6d4cdf2ca2af426"}, - {file = "ruff-0.8.0-py3-none-win32.whl", hash = "sha256:5fdb6efecc3eb60bba5819679466471fd7d13c53487df7248d6e27146e985468"}, - {file = "ruff-0.8.0-py3-none-win_amd64.whl", hash = "sha256:582891c57b96228d146725975fbb942e1f30a0c4ba19722e692ca3eb25cc9b4f"}, - {file = "ruff-0.8.0-py3-none-win_arm64.whl", hash = "sha256:ba93e6294e9a737cd726b74b09a6972e36bb511f9a102f1d9a7e1ce94dd206a6"}, - {file = "ruff-0.8.0.tar.gz", hash = "sha256:a7ccfe6331bf8c8dad715753e157457faf7351c2b69f62f32c165c2dbcbacd44"}, + {file = "ruff-0.9.8-py3-none-linux_armv6l.whl", hash = "sha256:d236f0ce0190bbc6fa9b4c4b85e916fb4c50fd087e6558af1bf5a45eb20e374d"}, + {file = "ruff-0.9.8-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:59fac6922b336d0c38df199761ade561563e1b7636e3a2b767b9ee5a68aa9cbf"}, + {file = "ruff-0.9.8-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a82082ec72bde2166ec138055307396c4d4e543fd97266dc2bfa24284cb30af6"}, + {file = "ruff-0.9.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e06635d12321605d1d11226c7d3c6b1245a0df498099868d14b4e353b3f0ac22"}, + {file = "ruff-0.9.8-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:65961815bb35d427e957940d13b2a1d0a67d8b245d3a7e0b5a4a2058536d3532"}, + {file = "ruff-0.9.8-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c18356beaef174797ad83f11debc5569e96afa73a549b2d073912565cfc4cfd1"}, + {file = "ruff-0.9.8-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:a1dfc443bee0288ea926a4d9ecfd858bf94ddf0a03a256c63e81b2b6dccdfc7d"}, + {file = "ruff-0.9.8-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc86d5a85cd5ab1d5aff1650f038aa34681d0692cc2467aa9ddef37bd56ea3f9"}, + {file = "ruff-0.9.8-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:66662aa19535d58fe6d04e5b59a39e495b102f2f5a2a1b9698e240eb78f429ef"}, + {file = "ruff-0.9.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:733647b2fe9367e1aa049c0eba296363746f3bc0dbfd454b0bc4b7b46cdf0146"}, + {file = "ruff-0.9.8-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:100031be9777f67af7f61b4d4eea2a0531ed6788940aca4360f6b9aae317c53b"}, + {file = "ruff-0.9.8-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:2f090758d58b4667d9022eee1085a854db93d800279e5a177ebda5adc1faf639"}, + {file = "ruff-0.9.8-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f774998b9c9a062510533aba9b53085de6be6d41e13a7a0bd086af8a40e838c3"}, + {file = "ruff-0.9.8-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:6ef7cc80626264ab8ab4d68b359ba867b8a52b0830a9643cd31289146dd40892"}, + {file = "ruff-0.9.8-py3-none-win32.whl", hash = "sha256:54b57b623a683e696a1ede99db95500763c1badafe105b6ad8d8e9d96e385ae2"}, + {file = "ruff-0.9.8-py3-none-win_amd64.whl", hash = "sha256:b0878103b2fb8af55ad701308a69ce713108ad346c3a3a143ebcd1e13829c9a7"}, + {file = "ruff-0.9.8-py3-none-win_arm64.whl", hash = "sha256:e459a4fc4150fcc60da26c59a6a4b70878c60a99df865a71cf6f958dc68c419a"}, + {file = "ruff-0.9.8.tar.gz", hash = "sha256:12d455f2be6fe98accbea2487bbb8eaec716c760bf60b45e7e13f76f913f56e9"}, ] [[package]] @@ -3379,4 +3279,4 @@ sentry = ["structlog-sentry"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<4.0" -content-hash = "e2f7ffb1a96817ac0f43fcee2089594def9df3be56e53c759d7cf3e6c2c9606e" +content-hash = "54fe40554eca62915cf0d674c3919786cec6b9605ea8f3f84d2aa133eba651aa" diff --git a/pyproject.toml b/pyproject.toml index b4b0ece..67c5bdb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,15 +29,13 @@ grpc = ["opentelemetry-exporter-otlp-proto-grpc"] sentry = ["structlog-sentry"] [tool.poetry.group.dev.dependencies] -black = "^24.0.0" celery = "^5.3.4" django = "^5.0.0" django-environ = "^0.11.0" fastapi = ">=0.111,<0.112" ipython = "^8.14.0" -isort = "^5.12.0" mkdocs-techdocs-core = "^1.2.3" -mypy = "^1.5.0" +mypy = "^1.15.0" pytest = "^8.0.0" pytest_codeblocks = "^0.17.0" pytest-asyncio = ">=0.23.1,<0.24.0" @@ -48,19 +46,10 @@ requests = "^2.31.0" snakeviz = "^2.2.0" structlog = "^24.0.0" types-requests = "^2.28.11.14" -ruff = "^0.8.0" +ruff = "^0.9.8" +pytest-env = "^1.1.5" -[tool.black] -target-version = ['py311'] -line-length = 88 -include = '\.pyi?$' - -[tool.isort] -profile = "black" -skip_gitignore = true -combine_as_imports = true - [tool.mypy] python_version = "3.11" files = ["./troncos", "./tests"] @@ -87,11 +76,22 @@ console_output_style = "classic" empty_parameter_set_mark = "xfail" log_cli_level = "INFO" log_level = "INFO" -filterwarnings = ["ignore::DeprecationWarning"] +ddtrace = 0 +filterwarnings = [ + "error", + "ignore:Type google._upb._message.MessageMapContainer:DeprecationWarning:", + "ignore:Type google._upb._message.ScalarMapContainer:DeprecationWarning:", + "ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning:", + "ignore:pkg_resources is deprecated as an API:DeprecationWarning:", + "ignore:Deprecated call to `pkg_resources:DeprecationWarning:", +] addopts = [ "--ignore=perf" ] +[tool.pytest_env] +DD_TRACE_ENABLED = "True" + [tool.ruff] line-length = 88 exclude = [ diff --git a/tests/structlog/test_configuration.py b/tests/structlog/test_configuration.py index 8c1fe3b..bf338b3 100644 --- a/tests/structlog/test_configuration.py +++ b/tests/structlog/test_configuration.py @@ -29,23 +29,23 @@ def test_processors_with_sentry() -> None: logger_name_index = shared_processors.index(structlog.stdlib.add_logger_name) log_level_index = shared_processors.index(structlog.stdlib.add_log_level) - sentry_processor = [ + sentry_processor = next( proc for proc in shared_processors if "structlog_sentry" in repr(proc) - ][0] + ) sentry_processor_index = shared_processors.index(sentry_processor) format_exc_info_index = shared_processors.index( structlog.processors.format_exc_info ) - assert ( - logger_name_index < sentry_processor_index - ), "Logger name must come before Sentry processor" - assert ( - log_level_index < sentry_processor_index - ), "Log level must come before Sentry processor" - assert ( - sentry_processor_index < format_exc_info_index - ), "Format exc info must come after Sentry processor" + assert logger_name_index < sentry_processor_index, ( + "Logger name must come before Sentry processor" + ) + assert log_level_index < sentry_processor_index, ( + "Log level must come before Sentry processor" + ) + assert sentry_processor_index < format_exc_info_index, ( + "Format exc info must come after Sentry processor" + ) @patch("builtins.__import__", side_effect=import_without_structlog_sentry) @@ -65,9 +65,9 @@ def test_processors_without_sentry(mocked: Any) -> None: for proc in shared_processors if "structlog_sentry" in repr(proc) ] - assert ( - len(sentry_processors) == 0 - ), "No Sentry processors should exist in shared processors when not installed" + assert len(sentry_processors) == 0, ( + "No Sentry processors should exist in shared processors when not installed" + ) # And make sure nothing in the actual initiation blows up when we don't have # structlog_sentry installed diff --git a/tests/tracing/test_decorators.py b/tests/tracing/test_decorators.py index ed5a72e..7166be5 100644 --- a/tests/tracing/test_decorators.py +++ b/tests/tracing/test_decorators.py @@ -69,6 +69,6 @@ def test_trace_class_is_traced(class_attr: Any) -> None: ], ) def test_trace_class_is_not_traced(class_attr: Any) -> None: - assert ( - hasattr(class_attr, "__wrapped__") is False - ), f"Expected {class_attr} not to be traced" + assert hasattr(class_attr, "__wrapped__") is False, ( + f"Expected {class_attr} not to be traced" + ) diff --git a/tests/tracing/test_writer.py b/tests/tracing/test_writer.py index 5a10da2..60dd35d 100644 --- a/tests/tracing/test_writer.py +++ b/tests/tracing/test_writer.py @@ -2,6 +2,7 @@ from typing import Any, Generator from ddtrace import Tracer +from ddtrace.trace import tracer from pytest_httpserver import HTTPServer from troncos.tracing._exporter import Exporter, ExporterType @@ -14,9 +15,10 @@ def tracer_test( service_name: str, resource_attributes: dict[str, Any] | None = None, ) -> Generator[Tracer, Any, Any]: - httpserver.expect_oneshot_request("/v1/trace").respond_with_data("OK") + httpserver.expect_request("/v1/trace").respond_with_data("OK") + + assert tracer.current_span() is None - tracer = Tracer() tracer.configure( writer=OTELWriter( service_name=service_name, @@ -36,15 +38,20 @@ def tracer_test( def tracer_assert(httpserver: HTTPServer) -> bytes: - assert len(httpserver.log), "We should have gotten 1 request" - req, res = httpserver.log[0] - assert res.status_code == 200, "Response should have been 200" - return req.data + assert len(httpserver.log), "We should have gotten at least 1 request" + + data: bytes = b"" + + for req, res in httpserver.log: + assert res.status_code == 200, "Response should have been 200" + data += req.data + + return data def test_simple_span(httpserver: HTTPServer) -> None: with tracer_test(httpserver, "test_service") as tracer: - with tracer.trace("test"): + with tracer.trace("test", service="test_service"): pass data = tracer_assert(httpserver) @@ -57,7 +64,7 @@ def test_attributes(httpserver: HTTPServer) -> None: "test_attributes", resource_attributes={"resource_attribute": "working"}, ) as tracer: - with tracer.trace("test") as span: + with tracer.trace("test", service="test_attributes") as span: span.set_tag("span_attribute", "also_working") data = tracer_assert(httpserver) @@ -69,8 +76,8 @@ def test_attributes(httpserver: HTTPServer) -> None: def test_exceptions(httpserver: HTTPServer) -> None: with tracer_test(httpserver, "test_exception") as tracer: try: - with tracer.trace("test"): - assert False, "TestFailure" + with tracer.trace("test", service="test_exception"): + raise AssertionError("TestFailure") except AssertionError: pass @@ -80,16 +87,16 @@ def test_exceptions(httpserver: HTTPServer) -> None: def test_headers(httpserver: HTTPServer) -> None: - httpserver.expect_oneshot_request("/v1/trace").respond_with_data("OK") + httpserver.expect_request("/v1/trace").respond_with_data("OK") + httpserver.expect_request("/v1/trace/custom-header").respond_with_data("OK") - tracer = Tracer() tracer.configure( writer=OTELWriter( service_name="test_headers", exporter=Exporter( host=httpserver.host, port=f"{httpserver.port}", - path="/v1/trace", + path="/v1/trace/custom-header", exporter_type=ExporterType.HTTP, headers={"test-header": "works"}, ), @@ -97,11 +104,19 @@ def test_headers(httpserver: HTTPServer) -> None: ) ) + assert tracer.current_span() is None + with tracer.trace("test"): pass tracer.flush() # type: ignore[no-untyped-call] - assert len(httpserver.log), "We should have gotten 1 request" - req, _ = httpserver.log[0] + relevant_requests = [ + entry for entry in httpserver.log if entry[0].path == "/v1/trace/custom-header" + ] + + assert len(relevant_requests) == 1, "We should have gotten 1 request" + + req, _ = relevant_requests[0] + assert req.headers.get("test-header") == "works" diff --git a/troncos/contrib/asgi/logging/middleware.py b/troncos/contrib/asgi/logging/middleware.py index 2862742..f221157 100644 --- a/troncos/contrib/asgi/logging/middleware.py +++ b/troncos/contrib/asgi/logging/middleware.py @@ -1,7 +1,9 @@ import time from typing import Any, Awaitable, Callable, Iterator, Mapping, MutableMapping, cast -import ddtrace + +from ddtrace.trace import tracer + from python_ipware.python_ipware import IpWare try: @@ -147,7 +149,7 @@ async def wrapped_send(message: MutableMapping[str, Any]) -> None: # To ensure that the trace information is always logged, we simply inject that # information in here, and by doing so we do not have to care about the # internals of the ASGI TraceMiddleware in ddtrace. - if dd_context := ddtrace.tracer.current_trace_context(): + if dd_context := tracer.current_trace_context(): extra["trace_id"] = f"{dd_context.trace_id:x}" extra["span_id"] = f"{dd_context.span_id:x}" diff --git a/troncos/contrib/structlog/processors.py b/troncos/contrib/structlog/processors.py index f8786e4..d07543f 100644 --- a/troncos/contrib/structlog/processors.py +++ b/troncos/contrib/structlog/processors.py @@ -1,4 +1,5 @@ -from ddtrace import tracer +from ddtrace.trace import tracer + from structlog.processors import LogfmtRenderer as LogFmt from structlog.types import EventDict, WrappedLogger diff --git a/troncos/profiling/pyroscope.py b/troncos/profiling/pyroscope.py index 94330e3..683c14e 100644 --- a/troncos/profiling/pyroscope.py +++ b/troncos/profiling/pyroscope.py @@ -1,5 +1,7 @@ import pyroscope -from ddtrace import config, tracer +from ddtrace import config +from ddtrace.trace import tracer + from ddtrace.internal.hostname import get_hostname @@ -30,7 +32,7 @@ def start_py_spy_profiler( profiler_tags.update(tags) pyroscope.configure( - app_name=app_name, + application_name=app_name, tags=profiler_tags, server_address=server_address, sample_rate=100, diff --git a/troncos/tracing/__init__.py b/troncos/tracing/__init__.py index 844c040..dc5b901 100644 --- a/troncos/tracing/__init__.py +++ b/troncos/tracing/__init__.py @@ -1,6 +1,6 @@ from typing import Any -import ddtrace +from ddtrace.trace import tracer from ._exporter import Exporter, ExporterType from ._writer import OTELWriter @@ -10,7 +10,6 @@ def configure_tracer( *, - enabled: bool, service_name: str, exporter: Exporter | None = None, resource_attributes: dict[str, Any] | None = None, @@ -27,4 +26,4 @@ def configure_tracer( resource_attributes=resource_attributes, ) - ddtrace.tracer.configure(writer=writer, enabled=enabled) + tracer.configure(writer=writer) diff --git a/troncos/tracing/_writer.py b/troncos/tracing/_writer.py index e86e5ed..3294922 100644 --- a/troncos/tracing/_writer.py +++ b/troncos/tracing/_writer.py @@ -43,10 +43,9 @@ def write(self, spans: list[Span] | None = None) -> None: span for span in spans # ddtrace use span.sampled == False to drop spans. - if span.sampled - # ddtrace uses sampling_priority > 0 to indicate that we - # want to ingest the span. - and ( + if ( + # ddtrace uses sampling_priority > 0 to indicate that we + # want to ingest the span. span.context.sampling_priority is None or span.context.sampling_priority > 0 ) diff --git a/troncos/tracing/decorators.py b/troncos/tracing/decorators.py index d6a440f..56e0865 100644 --- a/troncos/tracing/decorators.py +++ b/troncos/tracing/decorators.py @@ -5,9 +5,10 @@ from contextlib import contextmanager from functools import wraps from types import FunctionType -from typing import Awaitable, Callable, ParamSpec, Type, TypeVar, cast, overload - +from typing import Awaitable, Any, Callable, ParamSpec, Type, TypeVar, cast, overload import ddtrace +from ddtrace.trace import tracer + _TRACE_IGNORE_ATTR = "_trace_ignore" @@ -24,7 +25,7 @@ def trace_block( resource: str | None = None, service: str | None = None, span_type: str | None = None, - attributes: dict[str, str] | None = None, + attributes: dict[str | bytes, Any] | None = None, ) -> Generator[ddtrace.Span, None, None]: """ Trace a code block using a with statement. Example: @@ -33,13 +34,15 @@ def trace_block( time.sleep(1) """ - with ddtrace.tracer.trace( + tags: dict[str | bytes, Any] = attributes or {} + + with tracer.trace( name=name, resource=resource, service=service, span_type=span_type, ) as span: - span.set_tags(attributes) + span.set_tags(tags) yield span @@ -49,7 +52,7 @@ def _trace_function( resource: str | None = None, service: str | None = None, span_type: str | None = None, - attributes: dict[str, str] | None = None, + attributes: dict[str | bytes, Any] | None = None, ) -> Callable[P, R]: if hasattr(f, _TRACE_IGNORE_ATTR): return f @@ -95,7 +98,7 @@ def trace_function( resource: str | None = None, service: str | None = None, span_type: str | None = None, - attributes: dict[str, str] | None = None, + attributes: dict[str | bytes, Any] | None = None, ) -> Callable[P, R]: ... @@ -107,7 +110,7 @@ def trace_function( resource: str | None = None, service: str | None = None, span_type: str | None = None, - attributes: dict[str, str] | None = None, + attributes: dict[str | bytes, Any] | None = None, ) -> Callable[[Callable[P, R]], Callable[P, R]]: ... @@ -118,7 +121,7 @@ def trace_function( resource: str | None = None, service: str | None = None, span_type: str | None = None, - attributes: dict[str, str] | None = None, + attributes: dict[str | bytes, Any] | None = None, ) -> Callable[P, R] | Callable[[Callable[P, R]], Callable[P, R]]: """ This decorator adds tracing to a function. Example: @@ -149,7 +152,7 @@ def trace_class( resource: str | None = None, service: str | None = None, span_type: str | None = None, - attributes: dict[str, str] | None = None, + attributes: dict[str | bytes, Any] | None = None, ) -> Callable[[Type[TClass]], Type[TClass]]: ... @@ -160,7 +163,7 @@ def trace_class( resource: str | None = None, service: str | None = None, span_type: str | None = None, - attributes: dict[str, str] | None = None, + attributes: dict[str | bytes, Any] | None = None, ) -> Type[TClass]: ... @@ -170,7 +173,7 @@ def trace_class( resource: str | None = None, service: str | None = None, span_type: str | None = None, - attributes: dict[str, str] | None = None, + attributes: dict[str | bytes, Any] | None = None, ) -> Type[TClass] | Callable[[Type[TClass]], Type[TClass]]: """ This decorator adds a tracing decorator to every method of the decorated class. If @@ -230,7 +233,7 @@ def trace_module( resource: str | None = None, service: str | None = None, span_type: str | None = None, - attributes: dict[str, str] | None = None, + attributes: dict[str | bytes, Any] | None = None, ) -> None: """ This function adds a tracing decorator to every function of the calling module. If