diff --git a/.github/workflows/build_python_3.yml b/.github/workflows/build_python_3.yml index fac67e45f82..a3d6066dc0c 100644 --- a/.github/workflows/build_python_3.yml +++ b/.github/workflows/build_python_3.yml @@ -132,6 +132,10 @@ jobs: CIBW_BEFORE_ALL_WINDOWS: rustup target add i686-pc-windows-msvc CIBW_BEFORE_ALL_MACOS: rustup target add aarch64-apple-darwin CIBW_ENVIRONMENT_LINUX: PATH=$HOME/.cargo/bin:$PATH CMAKE_BUILD_PARALLEL_LEVEL=24 + # SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a. + # `platform.mac_ver()` reports incorrect MacOS version at 11.0 + # See: https://stackoverflow.com/a/65402241 + CIBW_ENVIRONMENT_MACOS: CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 CIBW_REPAIR_WHEEL_COMMAND_LINUX: | mkdir ./tempwheelhouse && unzip -l {wheel} | grep '\.so' && diff --git a/.riot/requirements/105b4fa.txt b/.riot/requirements/105b4fa.txt new file mode 100644 index 00000000000..cd828ea969c --- /dev/null +++ b/.riot/requirements/105b4fa.txt @@ -0,0 +1,74 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/105b4fa.in +# +arrow==1.3.0 +asgiref==3.8.1 +attrs==24.3.0 +autobahn==24.4.2 +automat==24.8.1 +bcrypt==4.2.1 +blessed==1.20.0 +certifi==2024.12.14 +cffi==1.17.1 +channels==4.2.0 +charset-normalizer==3.4.0 +constantly==23.10.4 +coverage[toml]==7.6.9 +cryptography==44.0.0 +daphne==4.1.2 +django==4.2.17 +django-configurations==2.5.1 +django-picklefield==3.2 +django-pylibmc==0.6.1 +django-q==1.3.6 +django-redis==4.5.0 +hyperlink==21.0.0 +hypothesis==6.45.0 +idna==3.10 +incremental==24.7.2 +iniconfig==2.0.0 +isodate==0.7.2 +lxml==5.3.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +platformdirs==4.3.6 +pluggy==1.5.0 +psycopg==3.2.3 +psycopg2-binary==2.9.10 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 +pycparser==2.22 +pylibmc==1.6.3 +pyopenssl==24.3.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-django[testing]==3.10.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +python-dateutil==2.9.0.post0 +python-memcached==1.62 +pytz==2024.2 +redis==2.10.6 +requests==2.32.3 +requests-file==2.1.0 +requests-toolbelt==1.0.0 +service-identity==24.2.0 +six==1.17.0 +sortedcontainers==2.4.0 +spyne==2.14.0 +sqlparse==0.5.3 +twisted[tls]==24.11.0 +txaio==23.1.1 +types-python-dateutil==2.9.0.20241206 +typing-extensions==4.12.2 +urllib3==2.3.0 +wcwidth==0.2.13 +zeep==4.3.1 +zope-interface==7.2 + +# The following packages are considered to be unsafe in a requirements file: +setuptools==75.6.0 diff --git a/.riot/requirements/108f9cf.txt b/.riot/requirements/1069d71.txt similarity index 69% rename from .riot/requirements/108f9cf.txt rename to .riot/requirements/1069d71.txt index 68e407c1fea..d528654c86a 100644 --- a/.riot/requirements/108f9cf.txt +++ b/.riot/requirements/1069d71.txt @@ -2,37 +2,37 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/108f9cf.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1069d71.in # aiofiles==24.1.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 fastapi==0.90.1 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.23.1 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/1078c3b.txt b/.riot/requirements/1078c3b.txt new file mode 100644 index 00000000000..00d9778e6da --- /dev/null +++ b/.riot/requirements/1078c3b.txt @@ -0,0 +1,27 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1078c3b.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.0.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 +tomli==2.2.1 +zipp==3.20.2 diff --git a/.riot/requirements/41b3223.txt b/.riot/requirements/108d1af.txt similarity index 75% rename from .riot/requirements/41b3223.txt rename to .riot/requirements/108d1af.txt index d97afcad0ae..3afb1286ce6 100644 --- a/.riot/requirements/41b3223.txt +++ b/.riot/requirements/108d1af.txt @@ -2,19 +2,19 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/41b3223.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/108d1af.in # aiofiles==24.1.0 annotated-types==0.7.0 anyio==4.5.2 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 -fastapi==0.115.2 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -22,21 +22,21 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 -python-multipart==0.0.12 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 -tomli==2.0.2 +starlette==0.41.3 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 zipp==3.20.2 diff --git a/.riot/requirements/109311c.txt b/.riot/requirements/109311c.txt deleted file mode 100644 index be68727bd91..00000000000 --- a/.riot/requirements/109311c.txt +++ /dev/null @@ -1,22 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/109311c.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.0.1 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 diff --git a/.riot/requirements/10f3c55.txt b/.riot/requirements/10f3c55.txt index 34a8e65f917..95237c5566b 100644 --- a/.riot/requirements/10f3c55.txt +++ b/.riot/requirements/10f3c55.txt @@ -17,7 +17,7 @@ channels==4.2.0 charset-normalizer==3.4.0 constantly==23.10.4 coverage[toml]==7.6.9 -cryptography==43.0.3 +cryptography==44.0.0 daphne==4.1.2 django==4.2.17 django-configurations==2.5.1 @@ -39,7 +39,6 @@ opentracing==2.4.0 packaging==24.2 platformdirs==4.3.6 pluggy==1.5.0 -psycopg==3.2.3 psycopg2-binary==2.9.10 pyasn1==0.6.1 pyasn1-modules==0.4.1 diff --git a/.riot/requirements/13f7667.txt b/.riot/requirements/11b0a50.txt similarity index 71% rename from .riot/requirements/13f7667.txt rename to .riot/requirements/11b0a50.txt index cdb3642f7bf..e7ae1d3b05b 100644 --- a/.riot/requirements/13f7667.txt +++ b/.riot/requirements/11b0a50.txt @@ -2,32 +2,32 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/13f7667.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/11b0a50.in # aiofiles==24.1.0 anyio==3.7.1 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 fastapi==0.86.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1231d9a.txt b/.riot/requirements/1231d9a.txt deleted file mode 100644 index 15a480253de..00000000000 --- a/.riot/requirements/1231d9a.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1231d9a.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/134deb1.txt b/.riot/requirements/134deb1.txt new file mode 100644 index 00000000000..71a346694a6 --- /dev/null +++ b/.riot/requirements/134deb1.txt @@ -0,0 +1,27 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/134deb1.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/1b7df87.txt b/.riot/requirements/137d3ed.txt similarity index 88% rename from .riot/requirements/1b7df87.txt rename to .riot/requirements/137d3ed.txt index b23492441b9..72b5cba9c65 100644 --- a/.riot/requirements/1b7df87.txt +++ b/.riot/requirements/137d3ed.txt @@ -2,12 +2,12 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1b7df87.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/137d3ed.in # aiofiles==23.2.1 anyio==3.7.1 attrs==24.2.0 -certifi==2024.8.30 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 @@ -23,7 +23,7 @@ mock==5.1.0 opentracing==2.4.0 packaging==24.0 pluggy==1.2.0 -pydantic==1.10.18 +pydantic==1.10.19 pytest==7.4.4 pytest-asyncio==0.21.1 pytest-cov==4.1.0 diff --git a/.riot/requirements/1384411.txt b/.riot/requirements/1384411.txt new file mode 100644 index 00000000000..6cf47ca63ad --- /dev/null +++ b/.riot/requirements/1384411.txt @@ -0,0 +1,26 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1384411.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +tomli==2.2.1 +typing-extensions==4.12.2 diff --git a/.riot/requirements/13bb925.txt b/.riot/requirements/13bb925.txt new file mode 100644 index 00000000000..f87641d20cc --- /dev/null +++ b/.riot/requirements/13bb925.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/13bb925.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +falcon==3.0.1 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.20.2 diff --git a/.riot/requirements/22fdd8b.txt b/.riot/requirements/1486c11.txt similarity index 71% rename from .riot/requirements/22fdd8b.txt rename to .riot/requirements/1486c11.txt index c2ab379f101..a3cd0d8268d 100644 --- a/.riot/requirements/22fdd8b.txt +++ b/.riot/requirements/1486c11.txt @@ -2,32 +2,32 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/22fdd8b.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1486c11.in # aiofiles==24.1.0 anyio==3.7.1 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 fastapi==0.86.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 diff --git a/.riot/requirements/9571147.txt b/.riot/requirements/14b883c.txt similarity index 66% rename from .riot/requirements/9571147.txt rename to .riot/requirements/14b883c.txt index 37c6cbc9ad9..fc5fce6885f 100644 --- a/.riot/requirements/9571147.txt +++ b/.riot/requirements/14b883c.txt @@ -2,20 +2,20 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/9571147.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/14b883c.in # -attrs==23.1.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 falcon==3.1.3 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==23.2 +packaging==24.0 pluggy==1.2.0 -pytest==7.4.3 +pytest==7.4.4 pytest-cov==4.1.0 pytest-mock==3.11.1 pytest-randomly==3.12.0 diff --git a/.riot/requirements/14bdc60.txt b/.riot/requirements/14bdc60.txt deleted file mode 100644 index b911301abde..00000000000 --- a/.riot/requirements/14bdc60.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/14bdc60.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/14ebf3b.txt b/.riot/requirements/14ebf3b.txt index c762c1a65d3..a1e350a58fc 100644 --- a/.riot/requirements/14ebf3b.txt +++ b/.riot/requirements/14ebf3b.txt @@ -4,20 +4,20 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/14ebf3b.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 diff --git a/.riot/requirements/16054bb.txt b/.riot/requirements/16054bb.txt new file mode 100644 index 00000000000..df2a3b259cd --- /dev/null +++ b/.riot/requirements/16054bb.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/16054bb.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==3.0.1 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/161aef0.txt b/.riot/requirements/161aef0.txt new file mode 100644 index 00000000000..dad819d4d9c --- /dev/null +++ b/.riot/requirements/161aef0.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/161aef0.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/162f3c3.txt b/.riot/requirements/162f3c3.txt deleted file mode 100644 index 05535f25438..00000000000 --- a/.riot/requirements/162f3c3.txt +++ /dev/null @@ -1,25 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/162f3c3.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 -tomli==2.0.1 diff --git a/.riot/requirements/f823b38.txt b/.riot/requirements/164cf92.txt similarity index 81% rename from .riot/requirements/f823b38.txt rename to .riot/requirements/164cf92.txt index 99549b8b77f..3fd752de5e8 100644 --- a/.riot/requirements/f823b38.txt +++ b/.riot/requirements/164cf92.txt @@ -2,18 +2,18 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/f823b38.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/164cf92.in # aiofiles==24.1.0 anyio==4.5.2 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 fastapi==0.64.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -21,20 +21,20 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 -python-multipart==0.0.12 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.13.6 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 zipp==3.20.2 diff --git a/.riot/requirements/167bd61.txt b/.riot/requirements/167bd61.txt new file mode 100644 index 00000000000..da0880effad --- /dev/null +++ b/.riot/requirements/167bd61.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/167bd61.in +# +attrs==24.3.0 +confluent-kafka==2.6.2 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/173a4e7.txt b/.riot/requirements/173a4e7.txt new file mode 100644 index 00000000000..8402a7e1aad --- /dev/null +++ b/.riot/requirements/173a4e7.txt @@ -0,0 +1,38 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/173a4e7.in +# +aiofiles==24.1.0 +annotated-types==0.7.0 +anyio==3.7.1 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.0 +coverage[toml]==7.6.9 +fastapi==0.115.6 +h11==0.14.0 +httpcore==1.0.7 +httpx==0.27.2 +hypothesis==6.45.0 +idna==3.10 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pydantic==2.10.4 +pydantic-core==2.27.2 +pytest==8.3.4 +pytest-asyncio==0.21.1 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +python-multipart==0.0.20 +requests==2.32.3 +sniffio==1.3.1 +sortedcontainers==2.4.0 +starlette==0.41.3 +typing-extensions==4.12.2 +urllib3==2.2.3 diff --git a/.riot/requirements/173c90a.txt b/.riot/requirements/173c90a.txt deleted file mode 100644 index 4e9e47e9130..00000000000 --- a/.riot/requirements/173c90a.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/173c90a.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.0.1 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/175d0d6.txt b/.riot/requirements/175d0d6.txt index 2bdf82d04bc..443e7c0ee18 100644 --- a/.riot/requirements/175d0d6.txt +++ b/.riot/requirements/175d0d6.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/175d0d6.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/176cb93.txt b/.riot/requirements/176cb93.txt deleted file mode 100644 index 6259626b1f4..00000000000 --- a/.riot/requirements/176cb93.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/176cb93.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.0.1 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/1782179.txt b/.riot/requirements/1782179.txt new file mode 100644 index 00000000000..b6e578ca240 --- /dev/null +++ b/.riot/requirements/1782179.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1782179.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==3.0.1 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1785987.txt b/.riot/requirements/1785987.txt new file mode 100644 index 00000000000..eee10d642e6 --- /dev/null +++ b/.riot/requirements/1785987.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1785987.in +# +attrs==24.2.0 +coverage[toml]==7.6.9 +googleapis-common-protos==1.66.0 +grpcio==1.66.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +protobuf==5.29.1 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/178dbc8.txt b/.riot/requirements/178dbc8.txt new file mode 100644 index 00000000000..ef5d1cf72c2 --- /dev/null +++ b/.riot/requirements/178dbc8.txt @@ -0,0 +1,23 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/178dbc8.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 diff --git a/.riot/requirements/1f22277.txt b/.riot/requirements/17a7ba8.txt similarity index 66% rename from .riot/requirements/1f22277.txt rename to .riot/requirements/17a7ba8.txt index f8018be64b4..7984fff1ed6 100644 --- a/.riot/requirements/1f22277.txt +++ b/.riot/requirements/17a7ba8.txt @@ -2,20 +2,20 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1f22277.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/17a7ba8.in # -attrs==23.1.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 falcon==3.1.3 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==23.2 +packaging==24.0 pluggy==1.2.0 -pytest==7.4.3 +pytest==7.4.4 pytest-cov==4.1.0 pytest-mock==3.11.1 pytest-randomly==3.12.0 diff --git a/.riot/requirements/1809449.txt b/.riot/requirements/1809449.txt deleted file mode 100644 index a874c5c1994..00000000000 --- a/.riot/requirements/1809449.txt +++ /dev/null @@ -1,27 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1809449.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 -tomli==2.0.1 -zipp==3.18.1 diff --git a/.riot/requirements/1842452.txt b/.riot/requirements/1842452.txt new file mode 100644 index 00000000000..2c13c9135fd --- /dev/null +++ b/.riot/requirements/1842452.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1842452.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/18730a4.txt b/.riot/requirements/18730a4.txt new file mode 100644 index 00000000000..20d9f1d8a90 --- /dev/null +++ b/.riot/requirements/18730a4.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/18730a4.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysqlclient==2.2.6 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/18a1686.txt b/.riot/requirements/18a1686.txt deleted file mode 100644 index 9ba614bfc37..00000000000 --- a/.riot/requirements/18a1686.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/18a1686.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/19255aa.txt b/.riot/requirements/19255aa.txt index 76a9c7370b5..f8375d7e478 100644 --- a/.riot/requirements/19255aa.txt +++ b/.riot/requirements/19255aa.txt @@ -4,20 +4,20 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/19255aa.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 hypothesis==6.45.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 diff --git a/.riot/requirements/197c6fd.txt b/.riot/requirements/197c6fd.txt new file mode 100644 index 00000000000..745e2a9df4d --- /dev/null +++ b/.riot/requirements/197c6fd.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/197c6fd.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==3.1.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 diff --git a/.riot/requirements/19aab60.txt b/.riot/requirements/19aab60.txt new file mode 100644 index 00000000000..0bf2d25d3a2 --- /dev/null +++ b/.riot/requirements/19aab60.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/19aab60.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +falcon==4.0.2 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.20.2 diff --git a/.riot/requirements/19db357.txt b/.riot/requirements/19db357.txt new file mode 100644 index 00000000000..1e3ddd64be4 --- /dev/null +++ b/.riot/requirements/19db357.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/19db357.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/1353f0b.txt b/.riot/requirements/19e4a89.txt similarity index 75% rename from .riot/requirements/1353f0b.txt rename to .riot/requirements/19e4a89.txt index c26716cca4b..a43fb84b853 100644 --- a/.riot/requirements/1353f0b.txt +++ b/.riot/requirements/19e4a89.txt @@ -2,11 +2,11 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1353f0b.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/19e4a89.in # -attrs==23.2.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 greenlet==3.0.3 hypothesis==6.45.0 importlib-metadata==6.7.0 diff --git a/.riot/requirements/1d3d3db.txt b/.riot/requirements/1a26314.txt similarity index 69% rename from .riot/requirements/1d3d3db.txt rename to .riot/requirements/1a26314.txt index 8e4d720320e..7c381d39d24 100644 --- a/.riot/requirements/1d3d3db.txt +++ b/.riot/requirements/1a26314.txt @@ -2,18 +2,18 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/1d3d3db.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1a26314.in # aiofiles==24.1.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 fastapi==0.90.1 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -21,20 +21,20 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.23.1 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 -zipp==3.20.2 +zipp==3.21.0 diff --git a/.riot/requirements/1a67f8a.txt b/.riot/requirements/1a67f8a.txt new file mode 100644 index 00000000000..19b9a07ff78 --- /dev/null +++ b/.riot/requirements/1a67f8a.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1a67f8a.in +# +aiomysql==0.1.1 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pymysql==1.1.1 +pytest==8.3.4 +pytest-asyncio==0.25.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1b16023.txt b/.riot/requirements/1b16023.txt index 3ecfcd6426c..805c3b3f36e 100644 --- a/.riot/requirements/1b16023.txt +++ b/.riot/requirements/1b16023.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1b16023.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 hypothesis==6.45.0 importlib-metadata==8.5.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.20.2 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/1b19707.txt b/.riot/requirements/1b19707.txt index bb31e7d6d71..5a50cb0f571 100644 --- a/.riot/requirements/1b19707.txt +++ b/.riot/requirements/1b19707.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1b19707.in # -attrs==24.2.0 +attrs==24.3.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 hypothesis==6.45.0 importlib-metadata==8.5.0 iniconfig==2.0.0 -mako==1.3.5 +mako==1.3.8 markupsafe==2.1.5 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 zipp==3.20.2 diff --git a/.riot/requirements/134c543.txt b/.riot/requirements/1b39725.txt similarity index 66% rename from .riot/requirements/134c543.txt rename to .riot/requirements/1b39725.txt index 9b47784aff9..ac78a5259be 100644 --- a/.riot/requirements/134c543.txt +++ b/.riot/requirements/1b39725.txt @@ -2,37 +2,37 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/134c543.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1b39725.in # aiofiles==24.1.0 annotated-types==0.7.0 anyio==3.7.1 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 -fastapi==0.115.2 +coverage[toml]==7.6.9 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 +starlette==0.41.3 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/1b67e71.txt b/.riot/requirements/1b67e71.txt deleted file mode 100644 index 25a2a3e0ad0..00000000000 --- a/.riot/requirements/1b67e71.txt +++ /dev/null @@ -1,27 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1b67e71.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 -tomli==2.0.1 -zipp==3.18.1 diff --git a/.riot/requirements/1b8d922.txt b/.riot/requirements/1b8d922.txt index 76a225cb035..5b8e1001d48 100644 --- a/.riot/requirements/1b8d922.txt +++ b/.riot/requirements/1b8d922.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1b8d922.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1bb940b.txt b/.riot/requirements/1bb940b.txt deleted file mode 100644 index b4d6c0de42e..00000000000 --- a/.riot/requirements/1bb940b.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1bb940b.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.0.1 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/1bc2c36.txt b/.riot/requirements/1bc2c36.txt deleted file mode 100644 index c2c1d4bb8ab..00000000000 --- a/.riot/requirements/1bc2c36.txt +++ /dev/null @@ -1,23 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1bc2c36.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 diff --git a/.riot/requirements/1c21210.txt b/.riot/requirements/1c21210.txt new file mode 100644 index 00000000000..e8b03b2b581 --- /dev/null +++ b/.riot/requirements/1c21210.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1c21210.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==3.1.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/1c5581b.txt b/.riot/requirements/1c5581b.txt index 4886bf012bf..6b1f227cb15 100644 --- a/.riot/requirements/1c5581b.txt +++ b/.riot/requirements/1c5581b.txt @@ -17,7 +17,7 @@ channels==4.2.0 charset-normalizer==3.4.0 constantly==23.10.4 coverage[toml]==7.6.9 -cryptography==43.0.3 +cryptography==44.0.0 daphne==4.1.2 django==4.2.17 django-configurations==2.5.1 @@ -39,6 +39,7 @@ opentracing==2.4.0 packaging==24.2 platformdirs==4.3.6 pluggy==1.5.0 +psycopg==3.2.3 psycopg2-binary==2.9.10 pyasn1==0.6.1 pyasn1-modules==0.4.1 diff --git a/.riot/requirements/1c756dc.txt b/.riot/requirements/1c756dc.txt deleted file mode 100644 index 06878afcd04..00000000000 --- a/.riot/requirements/1c756dc.txt +++ /dev/null @@ -1,22 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1c756dc.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 diff --git a/.riot/requirements/1cc7f49.txt b/.riot/requirements/1cc7f49.txt index 4c33ca5b861..644fd59d910 100644 --- a/.riot/requirements/1cc7f49.txt +++ b/.riot/requirements/1cc7f49.txt @@ -4,26 +4,26 @@ # # pip-compile --no-annotate .riot/requirements/1cc7f49.in # -attrs==23.2.0 -coverage[toml]==7.4.1 +attrs==24.3.0 +coverage[toml]==7.6.9 glob2==0.7 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 more-itertools==8.10.0 -msgpack==1.0.7 +msgpack==1.1.0 opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 +packaging==24.2 +parse==1.20.2 +parse-type==0.6.4 +pluggy==1.5.0 py==1.11.0 -pytest==8.0.0 +pytest==8.3.4 pytest-bdd==6.0.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +six==1.17.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1d15df5.txt b/.riot/requirements/1d15df5.txt new file mode 100644 index 00000000000..7aa37dc4bff --- /dev/null +++ b/.riot/requirements/1d15df5.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1d15df5.in +# +attrs==24.2.0 +coverage[toml]==7.6.9 +googleapis-common-protos==1.66.0 +grpcio==1.68.1 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +protobuf==5.29.1 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1d44438.txt b/.riot/requirements/1d44438.txt index c067e47f7a9..5a2fbefacd8 100644 --- a/.riot/requirements/1d44438.txt +++ b/.riot/requirements/1d44438.txt @@ -4,26 +4,26 @@ # # pip-compile --no-annotate .riot/requirements/1d44438.in # -attrs==23.2.0 -coverage[toml]==7.4.1 +attrs==24.3.0 +coverage[toml]==7.6.9 glob2==0.7 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 more-itertools==8.10.0 -msgpack==1.0.7 +msgpack==1.1.0 opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 +packaging==24.2 +parse==1.20.2 +parse-type==0.6.4 +pluggy==1.5.0 py==1.11.0 -pytest==8.0.0 +pytest==8.3.4 pytest-bdd==6.0.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +six==1.17.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1d5ebaf.txt b/.riot/requirements/1d5ebaf.txt index be7d1a0c0ef..782c31d7836 100644 --- a/.riot/requirements/1d5ebaf.txt +++ b/.riot/requirements/1d5ebaf.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1d5ebaf.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/1d6049b.txt b/.riot/requirements/1d6049b.txt new file mode 100644 index 00000000000..bd72dc72359 --- /dev/null +++ b/.riot/requirements/1d6049b.txt @@ -0,0 +1,21 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1d6049b.in +# +asyncpg==0.30.0 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-asyncio==0.21.2 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1db8cf2.txt b/.riot/requirements/1db8cf2.txt new file mode 100644 index 00000000000..5cf71f8f771 --- /dev/null +++ b/.riot/requirements/1db8cf2.txt @@ -0,0 +1,28 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1db8cf2.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.0.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +tomli==2.2.1 +typing-extensions==4.12.2 +zipp==3.20.2 diff --git a/.riot/requirements/1dd8c71.txt b/.riot/requirements/1dd8c71.txt new file mode 100644 index 00000000000..569f278cbc6 --- /dev/null +++ b/.riot/requirements/1dd8c71.txt @@ -0,0 +1,36 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1dd8c71.in +# +aiofiles==24.1.0 +anyio==3.7.1 +attrs==24.3.0 +certifi==2024.12.14 +charset-normalizer==3.4.0 +coverage[toml]==7.6.9 +fastapi==0.86.0 +h11==0.14.0 +httpcore==1.0.7 +httpx==0.27.2 +hypothesis==6.45.0 +idna==3.10 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pydantic==1.10.19 +pytest==8.3.4 +pytest-asyncio==0.21.1 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +python-multipart==0.0.20 +requests==2.32.3 +sniffio==1.3.1 +sortedcontainers==2.4.0 +starlette==0.20.4 +typing-extensions==4.12.2 +urllib3==2.2.3 diff --git a/.riot/requirements/1e0ee8d.txt b/.riot/requirements/1e0ee8d.txt deleted file mode 100644 index f18af75a99a..00000000000 --- a/.riot/requirements/1e0ee8d.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1e0ee8d.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.0.1 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/1e2c1f1.txt b/.riot/requirements/1e2c1f1.txt new file mode 100644 index 00000000000..ccd4918ea54 --- /dev/null +++ b/.riot/requirements/1e2c1f1.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1e2c1f1.in +# +attrs==24.3.0 +avro==1.12.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1e535fe.txt b/.riot/requirements/1e535fe.txt deleted file mode 100644 index f04e722a5ff..00000000000 --- a/.riot/requirements/1e535fe.txt +++ /dev/null @@ -1,29 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1e535fe.in -# -attrs==23.2.0 -coverage[toml]==7.4.1 -glob2==0.7 -hypothesis==6.45.0 -iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 -mock==5.1.0 -more-itertools==8.10.0 -msgpack==1.0.7 -opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 -py==1.11.0 -pytest==8.0.0 -pytest-bdd==4.1.0 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/1e53fef.txt b/.riot/requirements/1e53fef.txt index 6908416793c..96e109a75d7 100644 --- a/.riot/requirements/1e53fef.txt +++ b/.riot/requirements/1e53fef.txt @@ -4,22 +4,22 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/1e53fef.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 hypothesis==6.45.0 importlib-metadata==8.5.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.20.2 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/1eef7c1.txt b/.riot/requirements/1eef7c1.txt new file mode 100644 index 00000000000..331cab10062 --- /dev/null +++ b/.riot/requirements/1eef7c1.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/1eef7c1.in +# +aiopg==1.4.0 +async-timeout==4.0.3 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/1efd2cc.txt b/.riot/requirements/1efd2cc.txt deleted file mode 100644 index 7d049eba04a..00000000000 --- a/.riot/requirements/1efd2cc.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1efd2cc.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -typing-extensions==4.10.0 diff --git a/.riot/requirements/16759fe.txt b/.riot/requirements/1f11fb6.txt similarity index 88% rename from .riot/requirements/16759fe.txt rename to .riot/requirements/1f11fb6.txt index 27b3dd8d79e..3dd008ccf49 100644 --- a/.riot/requirements/16759fe.txt +++ b/.riot/requirements/1f11fb6.txt @@ -2,12 +2,12 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/16759fe.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1f11fb6.in # aiofiles==23.2.1 anyio==3.7.1 attrs==24.2.0 -certifi==2024.8.30 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 @@ -23,7 +23,7 @@ mock==5.1.0 opentracing==2.4.0 packaging==24.0 pluggy==1.2.0 -pydantic==1.10.18 +pydantic==1.10.19 pytest==7.4.4 pytest-asyncio==0.21.1 pytest-cov==4.1.0 diff --git a/.riot/requirements/1f1570a.txt b/.riot/requirements/1f1570a.txt deleted file mode 100644 index e1cf44a2660..00000000000 --- a/.riot/requirements/1f1570a.txt +++ /dev/null @@ -1,28 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/1f1570a.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -tomli==2.0.1 -typing-extensions==4.10.0 -zipp==3.18.1 diff --git a/.riot/requirements/1f1e236.txt b/.riot/requirements/1f1e236.txt new file mode 100644 index 00000000000..6b89eac7d7e --- /dev/null +++ b/.riot/requirements/1f1e236.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1f1e236.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/1f8c44d.txt b/.riot/requirements/1f8c44d.txt new file mode 100644 index 00000000000..67857363013 --- /dev/null +++ b/.riot/requirements/1f8c44d.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1f8c44d.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/1f9dd35.txt b/.riot/requirements/1f9dd35.txt new file mode 100644 index 00000000000..63225143f57 --- /dev/null +++ b/.riot/requirements/1f9dd35.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/1f9dd35.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==3.1.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/2502b82.txt b/.riot/requirements/2502b82.txt new file mode 100644 index 00000000000..521082afb6d --- /dev/null +++ b/.riot/requirements/2502b82.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/2502b82.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 diff --git a/.riot/requirements/27d0ff8.txt b/.riot/requirements/27d0ff8.txt index 291fe50cacc..aae68a87555 100644 --- a/.riot/requirements/27d0ff8.txt +++ b/.riot/requirements/27d0ff8.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/27d0ff8.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/2b30eed.txt b/.riot/requirements/2b30eed.txt deleted file mode 100644 index 4666128969f..00000000000 --- a/.riot/requirements/2b30eed.txt +++ /dev/null @@ -1,28 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/2b30eed.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -importlib-metadata==7.1.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -tomli==2.0.1 -typing-extensions==4.10.0 -zipp==3.18.1 diff --git a/.riot/requirements/37847ab.txt b/.riot/requirements/37847ab.txt deleted file mode 100644 index 35ecea5e3c7..00000000000 --- a/.riot/requirements/37847ab.txt +++ /dev/null @@ -1,22 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/37847ab.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 diff --git a/.riot/requirements/38f510f.txt b/.riot/requirements/38f510f.txt new file mode 100644 index 00000000000..17fae77250d --- /dev/null +++ b/.riot/requirements/38f510f.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/38f510f.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==4.0.2 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/3f472ba.txt b/.riot/requirements/3f472ba.txt new file mode 100644 index 00000000000..0e303a01101 --- /dev/null +++ b/.riot/requirements/3f472ba.txt @@ -0,0 +1,23 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/3f472ba.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 diff --git a/.riot/requirements/71adece.txt b/.riot/requirements/4448684.txt similarity index 64% rename from .riot/requirements/71adece.txt rename to .riot/requirements/4448684.txt index 3c7da46fac6..225d852c80b 100644 --- a/.riot/requirements/71adece.txt +++ b/.riot/requirements/4448684.txt @@ -2,19 +2,19 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/71adece.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/4448684.in # aiofiles==24.1.0 annotated-types==0.7.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 -fastapi==0.115.2 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -22,21 +22,21 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 -tomli==2.0.2 +starlette==0.41.3 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 -zipp==3.20.2 +zipp==3.21.0 diff --git a/.riot/requirements/4de03a5.txt b/.riot/requirements/4de03a5.txt index 5f1cc3a70e4..8fa32aa29f3 100644 --- a/.riot/requirements/4de03a5.txt +++ b/.riot/requirements/4de03a5.txt @@ -40,6 +40,7 @@ opentracing==2.4.0 packaging==24.2 platformdirs==4.3.6 pluggy==1.5.0 +psycopg==3.2.3 psycopg2-binary==2.9.10 pyasn1==0.6.1 pyasn1-modules==0.4.1 diff --git a/.riot/requirements/4fe37f9.txt b/.riot/requirements/4fe37f9.txt new file mode 100644 index 00000000000..d23097a4f9f --- /dev/null +++ b/.riot/requirements/4fe37f9.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/4fe37f9.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +protobuf==5.29.1 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/522a546.txt b/.riot/requirements/522a546.txt new file mode 100644 index 00000000000..9fde2ac3f0d --- /dev/null +++ b/.riot/requirements/522a546.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/522a546.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==3.0.1 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/52e614f.txt b/.riot/requirements/52e614f.txt new file mode 100644 index 00000000000..4d72e7c6c5c --- /dev/null +++ b/.riot/requirements/52e614f.txt @@ -0,0 +1,28 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/52e614f.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +tomli==2.2.1 +typing-extensions==4.12.2 +zipp==3.21.0 diff --git a/.riot/requirements/562df6d.txt b/.riot/requirements/562df6d.txt new file mode 100644 index 00000000000..2204cad14fa --- /dev/null +++ b/.riot/requirements/562df6d.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/562df6d.in +# +aiopg==1.4.0 +async-timeout==4.0.3 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/573ce40.txt b/.riot/requirements/573ce40.txt deleted file mode 100644 index ccbcbd82b2b..00000000000 --- a/.riot/requirements/573ce40.txt +++ /dev/null @@ -1,26 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/573ce40.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -tomli==2.0.1 -typing-extensions==4.10.0 diff --git a/.riot/requirements/672002e.txt b/.riot/requirements/672002e.txt new file mode 100644 index 00000000000..d39815f738c --- /dev/null +++ b/.riot/requirements/672002e.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/672002e.in +# +aiomysql==0.2.0 +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pymysql==1.1.1 +pytest==8.3.4 +pytest-asyncio==0.25.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/fa3a84d.txt b/.riot/requirements/6b2bec6.txt similarity index 69% rename from .riot/requirements/fa3a84d.txt rename to .riot/requirements/6b2bec6.txt index c8259b6ba0d..f7bfa544703 100644 --- a/.riot/requirements/fa3a84d.txt +++ b/.riot/requirements/6b2bec6.txt @@ -2,18 +2,18 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/fa3a84d.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/6b2bec6.in # aiofiles==24.1.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 fastapi==0.64.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -21,20 +21,20 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.13.6 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 -zipp==3.20.2 +zipp==3.21.0 diff --git a/.riot/requirements/72c03ec.txt b/.riot/requirements/72c03ec.txt new file mode 100644 index 00000000000..1f8978ea899 --- /dev/null +++ b/.riot/requirements/72c03ec.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/72c03ec.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==4.0.2 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.21.0 diff --git a/.riot/requirements/1a692b1.txt b/.riot/requirements/840eb63.txt similarity index 72% rename from .riot/requirements/1a692b1.txt rename to .riot/requirements/840eb63.txt index a13b449b62b..431128fcb61 100644 --- a/.riot/requirements/1a692b1.txt +++ b/.riot/requirements/840eb63.txt @@ -2,11 +2,11 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1a692b1.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/840eb63.in # -attrs==23.2.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 greenlet==3.0.3 hypothesis==6.45.0 importlib-metadata==6.7.0 @@ -23,7 +23,7 @@ pytest-cov==4.1.0 pytest-mock==3.11.1 pytest-randomly==3.12.0 sortedcontainers==2.4.0 -sqlalchemy==2.0.28 +sqlalchemy==2.0.36 tomli==2.0.1 typing-extensions==4.7.1 zipp==3.15.0 diff --git a/.riot/requirements/8510e2e.txt b/.riot/requirements/8510e2e.txt new file mode 100644 index 00000000000..b03829a2828 --- /dev/null +++ b/.riot/requirements/8510e2e.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/8510e2e.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +falcon==3.0.1 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +tomli==2.2.1 diff --git a/.riot/requirements/ee3bb72.txt b/.riot/requirements/883d27c.txt similarity index 63% rename from .riot/requirements/ee3bb72.txt rename to .riot/requirements/883d27c.txt index 9ba70beec7b..4e9f25badee 100644 --- a/.riot/requirements/ee3bb72.txt +++ b/.riot/requirements/883d27c.txt @@ -2,39 +2,39 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/ee3bb72.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/883d27c.in # aiofiles==24.1.0 annotated-types==0.7.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 -fastapi==0.115.2 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 -tomli==2.0.2 +starlette==0.41.3 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/8a19bdc.txt b/.riot/requirements/8a19bdc.txt deleted file mode 100644 index 4561c44afa0..00000000000 --- a/.riot/requirements/8a19bdc.txt +++ /dev/null @@ -1,29 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/8a19bdc.in -# -attrs==23.2.0 -coverage[toml]==7.4.1 -glob2==0.7 -hypothesis==6.45.0 -iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 -mock==5.1.0 -more-itertools==8.10.0 -msgpack==1.0.7 -opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 -py==1.11.0 -pytest==8.0.0 -pytest-bdd==4.1.0 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/1322180.txt b/.riot/requirements/8b97b54.txt similarity index 69% rename from .riot/requirements/1322180.txt rename to .riot/requirements/8b97b54.txt index d7f77ff6d04..82f79372afe 100644 --- a/.riot/requirements/1322180.txt +++ b/.riot/requirements/8b97b54.txt @@ -2,37 +2,37 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/1322180.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/8b97b54.in # aiofiles==24.1.0 -anyio==4.6.2.post1 -attrs==24.2.0 -certifi==2024.8.30 +anyio==4.7.0 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 +coverage[toml]==7.6.9 exceptiongroup==1.2.2 fastapi==0.64.0 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.13.6 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/1933645.txt b/.riot/requirements/8ef50f6.txt similarity index 66% rename from .riot/requirements/1933645.txt rename to .riot/requirements/8ef50f6.txt index 5e14a046e99..f3a48228267 100644 --- a/.riot/requirements/1933645.txt +++ b/.riot/requirements/8ef50f6.txt @@ -2,20 +2,20 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/1933645.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/8ef50f6.in # -attrs==23.1.0 +attrs==24.2.0 coverage[toml]==7.2.7 -exceptiongroup==1.2.0 +exceptiongroup==1.2.2 falcon==3.0.1 hypothesis==6.45.0 importlib-metadata==6.7.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==23.2 +packaging==24.0 pluggy==1.2.0 -pytest==7.4.3 +pytest==7.4.4 pytest-cov==4.1.0 pytest-mock==3.11.1 pytest-randomly==3.12.0 diff --git a/.riot/requirements/9093195.txt b/.riot/requirements/9093195.txt deleted file mode 100644 index 1d127a8d540..00000000000 --- a/.riot/requirements/9093195.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/9093195.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/9105e5c.txt b/.riot/requirements/9105e5c.txt deleted file mode 100644 index 0e89e7c376d..00000000000 --- a/.riot/requirements/9105e5c.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/9105e5c.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/b48f841.txt b/.riot/requirements/b48f841.txt index 16377236e8d..8143a485259 100644 --- a/.riot/requirements/b48f841.txt +++ b/.riot/requirements/b48f841.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/b48f841.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 mako==1.1.6 -markupsafe==2.1.5 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/bc9aff8.txt b/.riot/requirements/bc9aff8.txt new file mode 100644 index 00000000000..25b83e2618d --- /dev/null +++ b/.riot/requirements/bc9aff8.txt @@ -0,0 +1,25 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/bc9aff8.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 +greenlet==3.0.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==1.3.24 +tomli==2.2.1 diff --git a/.riot/requirements/bdada1a.txt b/.riot/requirements/bdada1a.txt new file mode 100644 index 00000000000..2a394359c49 --- /dev/null +++ b/.riot/requirements/bdada1a.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/bdada1a.in +# +attrs==24.3.0 +coverage[toml]==7.6.1 +exceptiongroup==1.2.2 +falcon==3.1.3 +hypothesis==6.45.0 +importlib-metadata==8.5.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==5.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.15.0 +sortedcontainers==2.4.0 +tomli==2.2.1 +zipp==3.20.2 diff --git a/.riot/requirements/c43afd8.txt b/.riot/requirements/c43afd8.txt deleted file mode 100644 index abca1fbd489..00000000000 --- a/.riot/requirements/c43afd8.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/c43afd8.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/ccf18c9.txt b/.riot/requirements/ccf18c9.txt deleted file mode 100644 index ce270ef4272..00000000000 --- a/.riot/requirements/ccf18c9.txt +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/ccf18c9.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -falcon==3.1.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 diff --git a/.riot/requirements/cdfce2e.txt b/.riot/requirements/cdfce2e.txt new file mode 100644 index 00000000000..1b93f8e5a0e --- /dev/null +++ b/.riot/requirements/cdfce2e.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/cdfce2e.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +falcon==3.1.3 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/f709b80.txt b/.riot/requirements/d8c9ddb.txt similarity index 81% rename from .riot/requirements/f709b80.txt rename to .riot/requirements/d8c9ddb.txt index 4d8eec013bb..3d33b05725f 100644 --- a/.riot/requirements/f709b80.txt +++ b/.riot/requirements/d8c9ddb.txt @@ -2,18 +2,18 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/f709b80.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/d8c9ddb.in # aiofiles==24.1.0 anyio==4.5.2 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 fastapi==0.90.1 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 @@ -21,20 +21,20 @@ importlib-metadata==8.5.0 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==1.10.18 -pytest==8.3.3 +pydantic==1.10.19 +pytest==8.3.4 pytest-asyncio==0.21.1 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 -python-multipart==0.0.12 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 starlette==0.23.1 -tomli==2.0.2 +tomli==2.2.1 typing-extensions==4.12.2 urllib3==2.2.3 zipp==3.20.2 diff --git a/.riot/requirements/dbcf3c6.txt b/.riot/requirements/dbcf3c6.txt new file mode 100644 index 00000000000..40184c2cbde --- /dev/null +++ b/.riot/requirements/dbcf3c6.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/dbcf3c6.in +# +attrs==24.2.0 +coverage[toml]==7.6.9 +greenlet==3.1.0 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/dbdd8c0.txt b/.riot/requirements/dbdd8c0.txt deleted file mode 100644 index 2b366f72c7d..00000000000 --- a/.riot/requirements/dbdd8c0.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/dbdd8c0.in -# -attrs==23.1.0 -coverage[toml]==7.3.4 -exceptiongroup==1.2.0 -falcon==3.1.3 -hypothesis==6.45.0 -importlib-metadata==7.0.0 -iniconfig==2.0.0 -mock==5.1.0 -opentracing==2.4.0 -packaging==23.2 -pluggy==1.3.0 -pytest==7.4.3 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -tomli==2.0.1 -zipp==3.17.0 diff --git a/.riot/requirements/5a5524a.txt b/.riot/requirements/e312e0d.txt similarity index 90% rename from .riot/requirements/5a5524a.txt rename to .riot/requirements/e312e0d.txt index f4faac2d0ad..08cba09f0c4 100644 --- a/.riot/requirements/5a5524a.txt +++ b/.riot/requirements/e312e0d.txt @@ -2,13 +2,13 @@ # This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/5a5524a.in +# pip-compile --allow-unsafe --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/e312e0d.in # aiofiles==23.2.1 annotated-types==0.5.0 anyio==3.7.1 attrs==24.2.0 -certifi==2024.8.30 +certifi==2024.12.14 charset-normalizer==3.4.0 coverage[toml]==7.2.7 exceptiongroup==1.2.2 diff --git a/.riot/requirements/e8d8aa5.txt b/.riot/requirements/e8d8aa5.txt index 32eaaf1e0a5..54a8f705f5c 100644 --- a/.riot/requirements/e8d8aa5.txt +++ b/.riot/requirements/e8d8aa5.txt @@ -4,18 +4,18 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/e8d8aa5.in # -attrs==24.2.0 -coverage[toml]==7.6.1 +attrs==24.3.0 +coverage[toml]==7.6.9 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.5 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 -pytest-cov==5.0.0 +pytest==8.3.4 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 +pytest-randomly==3.16.0 sortedcontainers==2.4.0 diff --git a/.riot/requirements/eda6d79.txt b/.riot/requirements/eda6d79.txt index fd1ab1bf1d4..1cd10ab27f3 100644 --- a/.riot/requirements/eda6d79.txt +++ b/.riot/requirements/eda6d79.txt @@ -4,7 +4,7 @@ # # pip-compile --allow-unsafe --no-annotate .riot/requirements/eda6d79.in # -attrs==24.2.0 +attrs==24.3.0 coverage[toml]==7.6.1 exceptiongroup==1.2.2 hypothesis==6.45.0 @@ -14,12 +14,12 @@ mako==1.1.6 markupsafe==2.1.5 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pytest==8.3.3 +pytest==8.3.4 pytest-cov==5.0.0 pytest-mock==3.14.0 pytest-randomly==3.15.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 zipp==3.20.2 diff --git a/.riot/requirements/edd1c7f.txt b/.riot/requirements/edd1c7f.txt deleted file mode 100644 index 8be2caace8c..00000000000 --- a/.riot/requirements/edd1c7f.txt +++ /dev/null @@ -1,24 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/edd1c7f.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==2.0.28 -typing-extensions==4.10.0 diff --git a/.riot/requirements/eeaed0d.txt b/.riot/requirements/eeaed0d.txt new file mode 100644 index 00000000000..e91eca7391f --- /dev/null +++ b/.riot/requirements/eeaed0d.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with Python 3.13 +# by the following command: +# +# pip-compile --no-annotate .riot/requirements/eeaed0d.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +pyodbc==5.2.0 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 diff --git a/.riot/requirements/f066985.txt b/.riot/requirements/f066985.txt deleted file mode 100644 index debd8ebffab..00000000000 --- a/.riot/requirements/f066985.txt +++ /dev/null @@ -1,31 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/f066985.in -# -attrs==23.2.0 -coverage[toml]==7.4.1 -exceptiongroup==1.2.0 -glob2==0.7 -hypothesis==6.45.0 -iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 -mock==5.1.0 -more-itertools==8.10.0 -msgpack==1.0.7 -opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 -py==1.11.0 -pytest==8.0.0 -pytest-bdd==4.1.0 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 -sortedcontainers==2.4.0 -tomli==2.0.1 diff --git a/.riot/requirements/f15bee1.txt b/.riot/requirements/f15bee1.txt new file mode 100644 index 00000000000..ce381a0ee85 --- /dev/null +++ b/.riot/requirements/f15bee1.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --allow-unsafe --no-annotate .riot/requirements/f15bee1.in +# +attrs==24.3.0 +coverage[toml]==7.6.9 +greenlet==3.1.0 +hypothesis==6.45.0 +iniconfig==2.0.0 +mock==5.1.0 +mysql-connector-python==9.1.0 +opentracing==2.4.0 +packaging==24.2 +pluggy==1.5.0 +psycopg2-binary==2.9.10 +pytest==8.3.4 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +sortedcontainers==2.4.0 +sqlalchemy==2.0.36 +typing-extensions==4.12.2 diff --git a/.riot/requirements/1912989.txt b/.riot/requirements/f781048.txt similarity index 66% rename from .riot/requirements/1912989.txt rename to .riot/requirements/f781048.txt index 3c74ad97a75..1b4a6f72034 100644 --- a/.riot/requirements/1912989.txt +++ b/.riot/requirements/f781048.txt @@ -2,37 +2,37 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --allow-unsafe --no-annotate .riot/requirements/1912989.in +# pip-compile --allow-unsafe --no-annotate .riot/requirements/f781048.in # aiofiles==24.1.0 annotated-types==0.7.0 anyio==3.7.1 -attrs==24.2.0 -certifi==2024.8.30 +attrs==24.3.0 +certifi==2024.12.14 charset-normalizer==3.4.0 -coverage[toml]==7.6.3 -fastapi==0.115.2 +coverage[toml]==7.6.9 +fastapi==0.115.6 h11==0.14.0 -httpcore==1.0.6 +httpcore==1.0.7 httpx==0.27.2 hypothesis==6.45.0 idna==3.10 iniconfig==2.0.0 mock==5.1.0 opentracing==2.4.0 -packaging==24.1 +packaging==24.2 pluggy==1.5.0 -pydantic==2.9.2 -pydantic-core==2.23.4 -pytest==8.3.3 +pydantic==2.10.3 +pydantic-core==2.27.1 +pytest==8.3.4 pytest-asyncio==0.21.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-mock==3.14.0 -pytest-randomly==3.15.0 -python-multipart==0.0.12 +pytest-randomly==3.16.0 +python-multipart==0.0.20 requests==2.32.3 sniffio==1.3.1 sortedcontainers==2.4.0 -starlette==0.40.0 +starlette==0.41.3 typing-extensions==4.12.2 urllib3==2.2.3 diff --git a/.riot/requirements/fb47988.txt b/.riot/requirements/fb47988.txt index 5bb283612e2..e9cc2d8236d 100644 --- a/.riot/requirements/fb47988.txt +++ b/.riot/requirements/fb47988.txt @@ -4,28 +4,28 @@ # # pip-compile --no-annotate .riot/requirements/fb47988.in # -attrs==23.2.0 -coverage[toml]==7.4.1 -exceptiongroup==1.2.0 +attrs==24.3.0 +coverage[toml]==7.6.9 +exceptiongroup==1.2.2 glob2==0.7 hypothesis==6.45.0 iniconfig==2.0.0 -mako==1.3.2 -markupsafe==2.1.5 +mako==1.3.8 +markupsafe==3.0.2 mock==5.1.0 more-itertools==8.10.0 -msgpack==1.0.7 +msgpack==1.1.0 opentracing==2.4.0 -packaging==23.2 -parse==1.20.1 -parse-type==0.6.2 -pluggy==1.4.0 +packaging==24.2 +parse==1.20.2 +parse-type==0.6.4 +pluggy==1.5.0 py==1.11.0 -pytest==8.0.0 +pytest==8.3.4 pytest-bdd==6.0.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -six==1.16.0 +pytest-cov==6.0.0 +pytest-mock==3.14.0 +pytest-randomly==3.16.0 +six==1.17.0 sortedcontainers==2.4.0 -tomli==2.0.1 +tomli==2.2.1 diff --git a/.riot/requirements/fd74210.txt b/.riot/requirements/fd74210.txt deleted file mode 100644 index 33429bf35a5..00000000000 --- a/.riot/requirements/fd74210.txt +++ /dev/null @@ -1,23 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --no-annotate .riot/requirements/fd74210.in -# -attrs==23.2.0 -coverage[toml]==7.4.4 -greenlet==3.0.3 -hypothesis==6.45.0 -iniconfig==2.0.0 -mock==5.1.0 -mysql-connector-python==8.3.0 -opentracing==2.4.0 -packaging==24.0 -pluggy==1.4.0 -psycopg2-binary==2.9.9 -pytest==8.1.1 -pytest-cov==4.1.0 -pytest-mock==3.12.0 -pytest-randomly==3.15.0 -sortedcontainers==2.4.0 -sqlalchemy==1.3.24 diff --git a/ddtrace/_trace/tracer.py b/ddtrace/_trace/tracer.py index fa0c89cdd7f..f815e0f184e 100644 --- a/ddtrace/_trace/tracer.py +++ b/ddtrace/_trace/tracer.py @@ -106,14 +106,11 @@ def _default_span_processors_factory( trace_writer: TraceWriter, partial_flush_enabled: bool, partial_flush_min_spans: int, - appsec_enabled: bool, - iast_enabled: bool, compute_stats_enabled: bool, single_span_sampling_rules: List[SpanSamplingRule], agent_url: str, trace_sampler: BaseSampler, profiling_span_processor: EndpointCallCounterProcessor, - apm_opt_out: bool = False, ) -> Tuple[List[SpanProcessor], Optional[Any], List[SpanProcessor]]: # FIXME: type should be AppsecSpanProcessor but we have a cyclic import here """Construct the default list of span processors to use.""" @@ -121,7 +118,9 @@ def _default_span_processors_factory( trace_processors += [ PeerServiceProcessor(_ps_config), BaseServiceProcessor(), - TraceSamplingProcessor(compute_stats_enabled, trace_sampler, single_span_sampling_rules, apm_opt_out), + TraceSamplingProcessor( + compute_stats_enabled, trace_sampler, single_span_sampling_rules, asm_config._apm_opt_out + ), TraceTagsProcessor(), ] trace_processors += trace_filters @@ -130,7 +129,7 @@ def _default_span_processors_factory( span_processors += [TopLevelSpanProcessor()] if asm_config._asm_libddwaf_available: - if appsec_enabled: + if asm_config._asm_enabled: if asm_config._api_security_enabled: from ddtrace.appsec._api_security.api_manager import APIManager @@ -152,7 +151,7 @@ def _default_span_processors_factory( else: appsec_processor = None - if iast_enabled: + if asm_config._iast_enabled: from ddtrace.appsec._iast.processor import AppSecIastSpanProcessor span_processors.append(AppSecIastSpanProcessor()) @@ -229,14 +228,8 @@ def __init__( self.context_provider = context_provider or DefaultContextProvider() # _user_sampler is the backup in case we need to revert from remote config to local self._user_sampler: Optional[BaseSampler] = DatadogSampler() - self._asm_enabled = asm_config._asm_enabled - self._iast_enabled = asm_config._iast_enabled - self._appsec_standalone_enabled = asm_config._appsec_standalone_enabled self._dogstatsd_url = agent.get_stats_url() if dogstatsd_url is None else dogstatsd_url - self._apm_opt_out = self._appsec_standalone_enabled and ( - self._asm_enabled or self._iast_enabled or config._sca_enabled - ) - if self._apm_opt_out: + if asm_config._apm_opt_out: self.enabled = False # Disable compute stats (neither agent or tracer should compute them) config._trace_compute_stats = False @@ -257,8 +250,10 @@ def __init__( agent_url=self._agent_url, dogstatsd=get_dogstatsd_client(self._dogstatsd_url), sync_mode=self._use_sync_mode(), - headers={"Datadog-Client-Computed-Stats": "yes"} if (self._compute_stats or self._apm_opt_out) else {}, - report_metrics=not self._apm_opt_out, + headers={"Datadog-Client-Computed-Stats": "yes"} + if (self._compute_stats or asm_config._apm_opt_out) + else {}, + report_metrics=not asm_config._apm_opt_out, response_callback=self._agent_response_callback, ) self._single_span_sampling_rules: List[SpanSamplingRule] = get_span_sampling_rules() @@ -266,21 +261,17 @@ def __init__( self._partial_flush_enabled = config._partial_flush_enabled self._partial_flush_min_spans = config._partial_flush_min_spans # Direct link to the appsec processor - self._appsec_processor = None self._endpoint_call_counter_span_processor = EndpointCallCounterProcessor() self._span_processors, self._appsec_processor, self._deferred_processors = _default_span_processors_factory( self._filters, self._writer, self._partial_flush_enabled, self._partial_flush_min_spans, - self._asm_enabled, - self._iast_enabled, self._compute_stats, self._single_span_sampling_rules, self._agent_url, self._sampler, self._endpoint_call_counter_span_processor, - self._apm_opt_out, ) if config._data_streams_enabled: # Inline the import to avoid pulling in ddsketch or protobuf @@ -335,7 +326,7 @@ def sampler(self, value): https://ddtrace.readthedocs.io/en/stable/configuration.html#DD_TRACE_SAMPLING_RULES""", category=DDTraceDeprecationWarning, ) - if self._apm_opt_out: + if asm_config._apm_opt_out: log.warning("Cannot set a custom sampler with Standalone ASM mode") return self._sampler = value @@ -407,7 +398,7 @@ def get_log_correlation_context(self, active: Optional[Union[Context, Span]] = N span id of the current active span, as well as the configured service, version, and environment names. If there is no active span, a dictionary with an empty string for each value will be returned. """ - if active is None and (self.enabled or self._apm_opt_out): + if active is None and (self.enabled or asm_config._apm_opt_out): active = self.context_provider.active() if isinstance(active, Span) and active.service: @@ -489,16 +480,15 @@ def configure( self._partial_flush_min_spans = partial_flush_min_spans if appsec_enabled is not None: - self._asm_enabled = asm_config._asm_enabled = appsec_enabled + asm_config._asm_enabled = appsec_enabled if iast_enabled is not None: - self._iast_enabled = asm_config._iast_enabled = iast_enabled + asm_config._iast_enabled = iast_enabled if appsec_standalone_enabled is not None: - self._appsec_standalone_enabled = asm_config._appsec_standalone_enabled = appsec_standalone_enabled + asm_config._appsec_standalone_enabled = appsec_standalone_enabled - if self._appsec_standalone_enabled and (self._asm_enabled or self._iast_enabled or config._sca_enabled): - self._apm_opt_out = True + if asm_config._apm_opt_out: self.enabled = False # Disable compute stats (neither agent or tracer should compute them) config._trace_compute_stats = False @@ -557,7 +547,7 @@ def configure( if writer is not None: self._writer = writer elif any(x is not None for x in [new_url, api_version, sampler, dogstatsd_url, appsec_enabled]): - if self._asm_enabled: + if asm_config._asm_enabled: api_version = "v0.4" self._writer = AgentWriter( self._agent_url, @@ -566,9 +556,11 @@ def configure( api_version=api_version, # if apm opt out, neither agent or tracer should compute the stats headers=( - {"Datadog-Client-Computed-Stats": "yes"} if (compute_stats_enabled or self._apm_opt_out) else {} + {"Datadog-Client-Computed-Stats": "yes"} + if (compute_stats_enabled or asm_config._apm_opt_out) + else {} ), - report_metrics=not self._apm_opt_out, + report_metrics=not asm_config._apm_opt_out, response_callback=self._agent_response_callback, ) elif writer is None and isinstance(self._writer, LogWriter): @@ -601,14 +593,11 @@ def configure( self._writer, self._partial_flush_enabled, self._partial_flush_min_spans, - self._asm_enabled, - self._iast_enabled, self._compute_stats, self._single_span_sampling_rules, self._agent_url, self._sampler, self._endpoint_call_counter_span_processor, - self._apm_opt_out, ) if context_provider is not None: @@ -667,14 +656,11 @@ def _child_after_fork(self): self._writer, self._partial_flush_enabled, self._partial_flush_min_spans, - self._asm_enabled, - self._iast_enabled, self._compute_stats, self._single_span_sampling_rules, self._agent_url, self._sampler, self._endpoint_call_counter_span_processor, - self._apm_opt_out, ) self._new_process = True @@ -859,7 +845,7 @@ def _start_span( self._services.add(service) # Only call span processors if the tracer is enabled (even if APM opted out) - if self.enabled or self._apm_opt_out: + if self.enabled or asm_config._apm_opt_out: for p in chain(self._span_processors, SpanProcessor.__processors__, self._deferred_processors): p.on_span_start(span) self._hooks.emit(self.__class__.start_span, span) @@ -876,7 +862,7 @@ def _on_span_finish(self, span: Span) -> None: log.debug("span %r closing after its parent %r, this is an error when not using async", span, span._parent) # Only call span processors if the tracer is enabled (even if APM opted out) - if self.enabled or self._apm_opt_out: + if self.enabled or asm_config._apm_opt_out: for p in chain(self._span_processors, SpanProcessor.__processors__, self._deferred_processors): p.on_span_finish(span) diff --git a/ddtrace/appsec/_remoteconfiguration.py b/ddtrace/appsec/_remoteconfiguration.py index 0d470db08c8..1a6fd2e4b6c 100644 --- a/ddtrace/appsec/_remoteconfiguration.py +++ b/ddtrace/appsec/_remoteconfiguration.py @@ -52,12 +52,6 @@ def enable_appsec_rc(test_tracer: Optional[Tracer] = None) -> None: Parameters `test_tracer` and `start_subscribers` are needed for testing purposes """ - # Import tracer here to avoid a circular import - if test_tracer is None: - from ddtrace import tracer - else: - tracer = test_tracer - log.debug("[%s][P: %s] Register ASM Remote Config Callback", os.getpid(), os.getppid()) asm_callback = ( remoteconfig_poller.get_registered(PRODUCTS.ASM_FEATURES) @@ -68,7 +62,7 @@ def enable_appsec_rc(test_tracer: Optional[Tracer] = None) -> None: if _asm_feature_is_required(): remoteconfig_poller.register(PRODUCTS.ASM_FEATURES, asm_callback) - if tracer._asm_enabled and asm_config._asm_static_rule_file is None: + if asm_config._asm_enabled and asm_config._asm_static_rule_file is None: remoteconfig_poller.register(PRODUCTS.ASM_DATA, asm_callback) # IP Blocking remoteconfig_poller.register(PRODUCTS.ASM, asm_callback) # Exclusion Filters & Custom Rules remoteconfig_poller.register(PRODUCTS.ASM_DD, asm_callback) # DD Rules @@ -226,12 +220,12 @@ def _appsec_1click_activation(features: Mapping[str, Any], test_tracer: Optional ) if rc_asm_enabled: - if not tracer._asm_enabled: + if not asm_config._asm_enabled: tracer.configure(appsec_enabled=True) else: asm_config._asm_enabled = True else: - if tracer._asm_enabled: + if asm_config._asm_enabled: tracer.configure(appsec_enabled=False) else: asm_config._asm_enabled = False diff --git a/ddtrace/contrib/aiobotocore/__init__.py b/ddtrace/contrib/aiobotocore/__init__.py index 8869c4647d1..47f16f51796 100644 --- a/ddtrace/contrib/aiobotocore/__init__.py +++ b/ddtrace/contrib/aiobotocore/__init__.py @@ -25,22 +25,19 @@ Default: ``False`` """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["aiobotocore.client"] +# Required to allow users to import from `ddtrace.contrib.aiobotocore.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiobotocore.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.aiobotocore.patch import get_version - from ddtrace.contrib.internal.aiobotocore.patch import patch +# Expose public methods +from ddtrace.contrib.internal.aiobotocore.patch import get_version +from ddtrace.contrib.internal.aiobotocore.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/aiohttp/__init__.py b/ddtrace/contrib/aiohttp/__init__.py index 7ff17c21ec0..2bd88e734de 100644 --- a/ddtrace/contrib/aiohttp/__init__.py +++ b/ddtrace/contrib/aiohttp/__init__.py @@ -84,24 +84,21 @@ async def home_handler(request): :ref:`All HTTP tags ` are supported for this integration. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["aiohttp"] +# Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.aiohttp.middlewares import trace_app - from ddtrace.contrib.internal.aiohttp.patch import get_version +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.aiohttp.middlewares import trace_app +from ddtrace.contrib.internal.aiohttp.patch import get_version - # Expose public methods - from ddtrace.contrib.internal.aiohttp.patch import patch - from ddtrace.contrib.internal.aiohttp.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.aiohttp.patch import patch +from ddtrace.contrib.internal.aiohttp.patch import unpatch - __all__ = ["patch", "unpatch", "trace_app", "get_version"] + +__all__ = ["patch", "unpatch", "trace_app", "get_version"] diff --git a/ddtrace/contrib/aiohttp_jinja2/__init__.py b/ddtrace/contrib/aiohttp_jinja2/__init__.py index fe268b6dc54..ef9c76f3da8 100644 --- a/ddtrace/contrib/aiohttp_jinja2/__init__.py +++ b/ddtrace/contrib/aiohttp_jinja2/__init__.py @@ -13,22 +13,19 @@ from ddtrace import patch patch(aiohttp_jinja2=True) """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["aiohttp_jinja2"] +# Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.aiohttp_jinja2.patch import get_version - from ddtrace.contrib.internal.aiohttp_jinja2.patch import patch - from ddtrace.contrib.internal.aiohttp_jinja2.patch import unpatch +from ddtrace.contrib.internal.aiohttp_jinja2.patch import get_version +from ddtrace.contrib.internal.aiohttp_jinja2.patch import patch +from ddtrace.contrib.internal.aiohttp_jinja2.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/aiomysql/__init__.py b/ddtrace/contrib/aiomysql/__init__.py index 485eb690fed..98f78d3f3ab 100644 --- a/ddtrace/contrib/aiomysql/__init__.py +++ b/ddtrace/contrib/aiomysql/__init__.py @@ -36,22 +36,18 @@ await cur.execute("SELECT 6*7 AS the_answer;") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly +import warnings as _w -required_modules = ["aiomysql"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.aiomysql.patch import get_version +from ddtrace.contrib.internal.aiomysql.patch import patch +from ddtrace.contrib.internal.aiomysql.patch import unpatch - from ddtrace.contrib.internal.aiomysql.patch import get_version - from ddtrace.contrib.internal.aiomysql.patch import patch - from ddtrace.contrib.internal.aiomysql.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/aiopg/__init__.py b/ddtrace/contrib/aiopg/__init__.py index 481f9133e57..11a572d12ed 100644 --- a/ddtrace/contrib/aiopg/__init__.py +++ b/ddtrace/contrib/aiopg/__init__.py @@ -15,21 +15,18 @@ # Use a pin to specify metadata related to this connection Pin.override(db, service='postgres-users') """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["aiopg"] +# Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.aiopg.patch import get_version - from ddtrace.contrib.internal.aiopg.patch import patch +from ddtrace.contrib.internal.aiopg.patch import get_version +from ddtrace.contrib.internal.aiopg.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/aioredis/__init__.py b/ddtrace/contrib/aioredis/__init__.py index 32449af6b6f..2bc3669a340 100644 --- a/ddtrace/contrib/aioredis/__init__.py +++ b/ddtrace/contrib/aioredis/__init__.py @@ -69,22 +69,17 @@ myaioredis = aioredis.Aioredis() Pin.override(myaioredis, service="myaioredis") """ -from ddtrace.internal.utils.importlib import require_modules # noqa:E402 +import warnings as _w # noqa: E402 -required_modules = ["aioredis"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + # Required to allow users to import from `ddtrace.contrib.aioredis.patch` directly + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aioredis.patch` directly - import warnings as _w +from ddtrace.contrib.internal.aioredis.patch import get_version # noqa: E402 +from ddtrace.contrib.internal.aioredis.patch import patch # noqa: E402 +from ddtrace.contrib.internal.aioredis.patch import unpatch # noqa: E402 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.aioredis.patch import get_version - from ddtrace.contrib.internal.aioredis.patch import patch - from ddtrace.contrib.internal.aioredis.patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/algoliasearch/__init__.py b/ddtrace/contrib/algoliasearch/__init__.py index 4b172bca67a..b594d6238cc 100644 --- a/ddtrace/contrib/algoliasearch/__init__.py +++ b/ddtrace/contrib/algoliasearch/__init__.py @@ -22,22 +22,18 @@ .. __: https://www.algolia.com """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.algoliasearch.patch` directly +import warnings as _w -required_modules = ["algoliasearch", "algoliasearch.version"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.algoliasearch.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.algoliasearch.patch import get_version +from ddtrace.contrib.internal.algoliasearch.patch import patch +from ddtrace.contrib.internal.algoliasearch.patch import unpatch - from ddtrace.contrib.internal.algoliasearch.patch import get_version - from ddtrace.contrib.internal.algoliasearch.patch import patch - from ddtrace.contrib.internal.algoliasearch.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/anthropic/__init__.py b/ddtrace/contrib/anthropic/__init__.py index 7a55e6947c9..c43ee4bb43c 100644 --- a/ddtrace/contrib/anthropic/__init__.py +++ b/ddtrace/contrib/anthropic/__init__.py @@ -80,22 +80,19 @@ Pin.override(anthropic, service="my-anthropic-service") """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["anthropic"] +# Required to allow users to import from `ddtrace.contrib.anthropic.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.anthropic.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.anthropic.patch import get_version - from ddtrace.contrib.internal.anthropic.patch import patch - from ddtrace.contrib.internal.anthropic.patch import unpatch +from ddtrace.contrib.internal.anthropic.patch import get_version +from ddtrace.contrib.internal.anthropic.patch import patch +from ddtrace.contrib.internal.anthropic.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/aredis/__init__.py b/ddtrace/contrib/aredis/__init__.py index 17c1408caa5..1af4c5db664 100644 --- a/ddtrace/contrib/aredis/__init__.py +++ b/ddtrace/contrib/aredis/__init__.py @@ -66,21 +66,17 @@ async def example(): await client.get("my-key") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.aredis.patch` directly +import warnings as _w -required_modules = ["aredis", "aredis.client"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.aredis.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.aredis.patch import get_version +from ddtrace.contrib.internal.aredis.patch import patch - from ddtrace.contrib.internal.aredis.patch import get_version - from ddtrace.contrib.internal.aredis.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/asgi/__init__.py b/ddtrace/contrib/asgi/__init__.py index 0bfcd1ade5b..8c30f4e609e 100644 --- a/ddtrace/contrib/asgi/__init__.py +++ b/ddtrace/contrib/asgi/__init__.py @@ -55,18 +55,10 @@ def handle_request(scope, send): .. __: https://asgi.readthedocs.io/ """ -from ddtrace.internal.utils.importlib import require_modules +from ddtrace.contrib.internal.asgi.middleware import TraceMiddleware +from ddtrace.contrib.internal.asgi.middleware import get_version +from ddtrace.contrib.internal.asgi.middleware import span_from_scope -required_modules = [] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.asgi.patch` directly - from . import middleware as _ # noqa: F401, I001 - - from ddtrace.contrib.internal.asgi.middleware import TraceMiddleware - from ddtrace.contrib.internal.asgi.middleware import get_version - from ddtrace.contrib.internal.asgi.middleware import span_from_scope - - __all__ = ["TraceMiddleware", "span_from_scope", "get_version"] +__all__ = ["TraceMiddleware", "span_from_scope", "get_version"] diff --git a/ddtrace/contrib/asyncio/__init__.py b/ddtrace/contrib/asyncio/__init__.py index 5ff3a69adee..205935222fb 100644 --- a/ddtrace/contrib/asyncio/__init__.py +++ b/ddtrace/contrib/asyncio/__init__.py @@ -2,29 +2,24 @@ This integration provides context management for tracing the execution flow of concurrent execution of ``asyncio.Task``. """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.asyncio.patch` directly +# Expose public methods +import warnings as _w # noqa:E402 -required_modules = ["asyncio"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +from ddtrace._trace.provider import DefaultContextProvider +from ddtrace.contrib.internal.asyncio.helpers import ensure_future +from ddtrace.contrib.internal.asyncio.helpers import run_in_executor +from ddtrace.contrib.internal.asyncio.helpers import set_call_context +from ddtrace.contrib.internal.asyncio.patch import get_version +from ddtrace.contrib.internal.asyncio.patch import patch +from ddtrace.contrib.internal.asyncio.patch import unpatch # noqa: F401 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from ddtrace._trace.provider import DefaultContextProvider - context_provider = DefaultContextProvider() +context_provider = DefaultContextProvider() - # Required to allow users to import from `ddtrace.contrib.asyncio.patch` directly - # Expose public methods - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.asyncio.helpers import ensure_future - from ddtrace.contrib.internal.asyncio.helpers import run_in_executor - from ddtrace.contrib.internal.asyncio.helpers import set_call_context - from ddtrace.contrib.internal.asyncio.patch import get_version - from ddtrace.contrib.internal.asyncio.patch import patch - from ddtrace.contrib.internal.asyncio.patch import unpatch # noqa: F401 - - __all__ = ["context_provider", "set_call_context", "ensure_future", "run_in_executor", "patch", "get_version"] +__all__ = ["context_provider", "set_call_context", "ensure_future", "run_in_executor", "patch", "get_version"] diff --git a/ddtrace/contrib/asyncpg/__init__.py b/ddtrace/contrib/asyncpg/__init__.py index 21cc9b613a9..c8e56511469 100644 --- a/ddtrace/contrib/asyncpg/__init__.py +++ b/ddtrace/contrib/asyncpg/__init__.py @@ -43,22 +43,19 @@ conn = asyncpg.connect("postgres://localhost:5432") Pin.override(conn, service="custom-service") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["asyncpg"] +# Required to allow users to import from `ddtrace.contrib.asyncpg.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.asyncpg.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.asyncpg.patch import get_version - from ddtrace.contrib.internal.asyncpg.patch import patch - from ddtrace.contrib.internal.asyncpg.patch import unpatch +from ddtrace.contrib.internal.asyncpg.patch import get_version +from ddtrace.contrib.internal.asyncpg.patch import patch +from ddtrace.contrib.internal.asyncpg.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/avro/__init__.py b/ddtrace/contrib/avro/__init__.py index 6ca7f3c9847..328704bbfea 100644 --- a/ddtrace/contrib/avro/__init__.py +++ b/ddtrace/contrib/avro/__init__.py @@ -15,15 +15,9 @@ ~~~~~~~~~~~~~ """ -from ...internal.utils.importlib import require_modules +# Expose public methods +from ..internal.avro.patch import get_version +from ..internal.avro.patch import patch -required_modules = ["avro"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Expose public methods - from ..internal.avro.patch import get_version - from ..internal.avro.patch import patch - - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/boto/__init__.py b/ddtrace/contrib/boto/__init__.py index e17db53e5ae..6b967b28b2b 100644 --- a/ddtrace/contrib/boto/__init__.py +++ b/ddtrace/contrib/boto/__init__.py @@ -28,21 +28,17 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.boto.patch` directly +import warnings as _w -required_modules = ["boto.connection"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.boto.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.boto.patch import get_version +from ddtrace.contrib.internal.boto.patch import patch - from ddtrace.contrib.internal.boto.patch import get_version - from ddtrace.contrib.internal.boto.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/botocore/__init__.py b/ddtrace/contrib/botocore/__init__.py index 143ef70b9d7..60b01d39839 100644 --- a/ddtrace/contrib/botocore/__init__.py +++ b/ddtrace/contrib/botocore/__init__.py @@ -153,22 +153,17 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.botocore.patch` directly +import warnings as _w -required_modules = ["botocore.client"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.botocore.patch` directly - import warnings as _w +from ddtrace.contrib.internal.botocore.patch import get_version +from ddtrace.contrib.internal.botocore.patch import patch +from ddtrace.contrib.internal.botocore.patch import patch_submodules - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.botocore.patch import get_version - from ddtrace.contrib.internal.botocore.patch import patch - from ddtrace.contrib.internal.botocore.patch import patch_submodules - - __all__ = ["patch", "patch_submodules", "get_version"] +__all__ = ["patch", "patch_submodules", "get_version"] diff --git a/ddtrace/contrib/bottle/__init__.py b/ddtrace/contrib/bottle/__init__.py index 1391f1cd667..448c709b952 100644 --- a/ddtrace/contrib/bottle/__init__.py +++ b/ddtrace/contrib/bottle/__init__.py @@ -33,22 +33,18 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.bottle.patch` directly +import warnings as _w -required_modules = ["bottle"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.bottle.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.bottle.patch import get_version +from ddtrace.contrib.internal.bottle.patch import patch +from ddtrace.contrib.internal.bottle.trace import TracePlugin - from ddtrace.contrib.internal.bottle.patch import get_version - from ddtrace.contrib.internal.bottle.patch import patch - from ddtrace.contrib.internal.bottle.trace import TracePlugin - __all__ = ["TracePlugin", "patch", "get_version"] +__all__ = ["TracePlugin", "patch", "get_version"] diff --git a/ddtrace/contrib/cassandra/__init__.py b/ddtrace/contrib/cassandra/__init__.py index 9c3c1d7de6a..1d0b6ad0afd 100644 --- a/ddtrace/contrib/cassandra/__init__.py +++ b/ddtrace/contrib/cassandra/__init__.py @@ -21,22 +21,19 @@ session = cluster.connect("my_keyspace") session.execute("select id from my_table limit 10;") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["cassandra.cluster"] +# Required to allow users to import from `ddtrace.contrib.cassandra.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.cassandra.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.cassandra.patch import patch - from ddtrace.contrib.internal.cassandra.session import get_version +# Expose public methods +from ddtrace.contrib.internal.cassandra.patch import patch +from ddtrace.contrib.internal.cassandra.session import get_version - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/celery/__init__.py b/ddtrace/contrib/celery/__init__.py index 7b63089e206..83ad7a870a3 100644 --- a/ddtrace/contrib/celery/__init__.py +++ b/ddtrace/contrib/celery/__init__.py @@ -51,25 +51,22 @@ def run(self): Default: ``'celery-worker'`` """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["celery"] +# Required to allow users to import from `ddtrace.contrib.celery.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.celery.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.celery.app import patch_app - from ddtrace.contrib.internal.celery.app import unpatch_app - from ddtrace.contrib.internal.celery.patch import get_version - from ddtrace.contrib.internal.celery.patch import patch - from ddtrace.contrib.internal.celery.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.celery.app import patch_app +from ddtrace.contrib.internal.celery.app import unpatch_app +from ddtrace.contrib.internal.celery.patch import get_version +from ddtrace.contrib.internal.celery.patch import patch +from ddtrace.contrib.internal.celery.patch import unpatch - __all__ = ["patch", "patch_app", "unpatch", "unpatch_app", "get_version"] + +__all__ = ["patch", "patch_app", "unpatch", "unpatch_app", "get_version"] diff --git a/ddtrace/contrib/cherrypy/__init__.py b/ddtrace/contrib/cherrypy/__init__.py index ff072fa426f..efd1210db6c 100644 --- a/ddtrace/contrib/cherrypy/__init__.py +++ b/ddtrace/contrib/cherrypy/__init__.py @@ -53,14 +53,9 @@ def index(self): cherrypy.quickstart(HelloWorld()) """ -from ddtrace.internal.utils.importlib import require_modules +from ddtrace.contrib.internal.cherrypy.middleware import TraceMiddleware +from ddtrace.contrib.internal.cherrypy.middleware import get_version -required_modules = ["cherrypy"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from ddtrace.contrib.internal.cherrypy.middleware import TraceMiddleware - from ddtrace.contrib.internal.cherrypy.middleware import get_version - - __all__ = ["TraceMiddleware", "get_version"] +__all__ = ["TraceMiddleware", "get_version"] diff --git a/ddtrace/contrib/consul/__init__.py b/ddtrace/contrib/consul/__init__.py index 8b7498c80d3..a6317d0bce0 100644 --- a/ddtrace/contrib/consul/__init__.py +++ b/ddtrace/contrib/consul/__init__.py @@ -19,23 +19,19 @@ Pin.override(client, service='consul-kv') """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.consul.patch` directly +import warnings as _w -required_modules = ["consul"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.consul.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.consul.patch import get_version +from ddtrace.contrib.internal.consul.patch import patch +from ddtrace.contrib.internal.consul.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.consul.patch import get_version - from ddtrace.contrib.internal.consul.patch import patch - from ddtrace.contrib.internal.consul.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/coverage/__init__.py b/ddtrace/contrib/coverage/__init__.py index b32d27ebff4..6ae090e3fe0 100644 --- a/ddtrace/contrib/coverage/__init__.py +++ b/ddtrace/contrib/coverage/__init__.py @@ -15,26 +15,21 @@ Note: Coverage.py instrumentation is only enabled if `pytest` or `unittest` instrumentation is enabled. """ -from ddtrace.internal.logger import get_logger -from ddtrace.internal.utils.importlib import require_modules - +# Required to allow users to import from `ddtrace.contrib.internal.coverage.patch` directly +import warnings as _w # noqa:E402 -required_modules = ["coverage"] -log = get_logger(__name__) +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.internal.coverage.patch` directly - import warnings as _w +# Expose public methods +from ddtrace.contrib.internal.coverage.patch import get_version +from ddtrace.contrib.internal.coverage.patch import patch +from ddtrace.contrib.internal.coverage.patch import unpatch +from ddtrace.internal.logger import get_logger - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.coverage.patch import get_version - from ddtrace.contrib.internal.coverage.patch import patch - from ddtrace.contrib.internal.coverage.patch import unpatch +log = get_logger(__name__) - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/django/__init__.py b/ddtrace/contrib/django/__init__.py index 55a867ed560..2eeea57b2c6 100644 --- a/ddtrace/contrib/django/__init__.py +++ b/ddtrace/contrib/django/__init__.py @@ -201,25 +201,20 @@ .. __: https://www.djangoproject.com/ """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.django.patch` directly +import warnings as _w -required_modules = ["django"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.django.patch` directly - import warnings as _w +# Expose public methods +from ddtrace.contrib.internal.django.patch import get_version +from ddtrace.contrib.internal.django.patch import patch +from ddtrace.contrib.internal.django.patch import patch as _patch +from ddtrace.contrib.internal.django.patch import unpatch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.django.patch import get_version - from ddtrace.contrib.internal.django.patch import patch - from ddtrace.contrib.internal.django.patch import patch as _patch - from ddtrace.contrib.internal.django.patch import unpatch - - __all__ = ["patch", "unpatch", "_patch", "get_version"] +__all__ = ["patch", "unpatch", "_patch", "get_version"] diff --git a/ddtrace/contrib/dogpile_cache/__init__.py b/ddtrace/contrib/dogpile_cache/__init__.py index 6e796e93320..63898aa4a5a 100644 --- a/ddtrace/contrib/dogpile_cache/__init__.py +++ b/ddtrace/contrib/dogpile_cache/__init__.py @@ -36,23 +36,20 @@ def hello(name): .. __: https://dogpilecache.sqlalchemy.org/ """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["dogpile.cache"] +# Required to allow users to import from `ddtrace.contrib.dogpile_cache.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.dogpile_cache.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.dogpile_cache.patch import get_version - from ddtrace.contrib.internal.dogpile_cache.patch import patch - from ddtrace.contrib.internal.dogpile_cache.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.dogpile_cache.patch import get_version +from ddtrace.contrib.internal.dogpile_cache.patch import patch +from ddtrace.contrib.internal.dogpile_cache.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/dramatiq/__init__.py b/ddtrace/contrib/dramatiq/__init__.py index ebf2c355743..2e5f37c4cba 100644 --- a/ddtrace/contrib/dramatiq/__init__.py +++ b/ddtrace/contrib/dramatiq/__init__.py @@ -28,23 +28,20 @@ def my_other_task(content): ddtrace-run python app.py """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["dramatiq"] +# Required to allow users to import from `ddtrace.contrib.dramatiq.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.dramatiq.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.dramatiq.patch import get_version - from ddtrace.contrib.internal.dramatiq.patch import patch - from ddtrace.contrib.internal.dramatiq.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.dramatiq.patch import get_version +from ddtrace.contrib.internal.dramatiq.patch import patch +from ddtrace.contrib.internal.dramatiq.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/falcon/__init__.py b/ddtrace/contrib/falcon/__init__.py index e8d2038ccc1..c54b58dbd9c 100644 --- a/ddtrace/contrib/falcon/__init__.py +++ b/ddtrace/contrib/falcon/__init__.py @@ -44,21 +44,18 @@ def on_falcon_request(span, request, response): :ref:`Headers tracing ` is supported for this integration. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["falcon"] +# Required to allow users to import from `ddtrace.contrib.falcon.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.falcon.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.falcon.middleware import TraceMiddleware - from ddtrace.contrib.internal.falcon.patch import get_version - from ddtrace.contrib.internal.falcon.patch import patch +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.falcon.middleware import TraceMiddleware +from ddtrace.contrib.internal.falcon.patch import get_version +from ddtrace.contrib.internal.falcon.patch import patch - __all__ = ["TraceMiddleware", "patch", "get_version"] + +__all__ = ["TraceMiddleware", "patch", "get_version"] diff --git a/ddtrace/contrib/fastapi/__init__.py b/ddtrace/contrib/fastapi/__init__.py index 9931a2d3ea6..df989abf766 100644 --- a/ddtrace/contrib/fastapi/__init__.py +++ b/ddtrace/contrib/fastapi/__init__.py @@ -50,23 +50,20 @@ config.fastapi['request_span_name'] = 'custom-request-span-name' """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["fastapi"] +# Required to allow users to import from `ddtrace.contrib.fastapi.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.fastapi.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.fastapi.patch import get_version - from ddtrace.contrib.internal.fastapi.patch import patch - from ddtrace.contrib.internal.fastapi.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.fastapi.patch import get_version +from ddtrace.contrib.internal.fastapi.patch import patch +from ddtrace.contrib.internal.fastapi.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/flask/__init__.py b/ddtrace/contrib/flask/__init__.py index 47226eed5c6..22e90ffb604 100644 --- a/ddtrace/contrib/flask/__init__.py +++ b/ddtrace/contrib/flask/__init__.py @@ -96,21 +96,17 @@ def index(): """ -from ddtrace.internal.utils.importlib import require_modules +# DEV: We do this so we can `@mock.patch('ddtrace.contrib.flask._patch.')` in tests +import warnings as _w -required_modules = ["flask"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # DEV: We do this so we can `@mock.patch('ddtrace.contrib.flask._patch.')` in tests - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +from ddtrace.contrib.internal.flask.patch import get_version +from ddtrace.contrib.internal.flask.patch import patch +from ddtrace.contrib.internal.flask.patch import unpatch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.flask.patch import get_version - from ddtrace.contrib.internal.flask.patch import patch - from ddtrace.contrib.internal.flask.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/flask_cache/__init__.py b/ddtrace/contrib/flask_cache/__init__.py index 1919f55efb5..f11b006f723 100644 --- a/ddtrace/contrib/flask_cache/__init__.py +++ b/ddtrace/contrib/flask_cache/__init__.py @@ -44,18 +44,9 @@ def counter(): """ -from ddtrace.internal.utils.importlib import require_modules +# Expose public methods +from ddtrace.contrib.internal.flask_cache.tracers import get_traced_cache +from ddtrace.contrib.internal.flask_cache.tracers import get_version -required_modules = ["flask_cache", "flask_caching"] - -with require_modules(required_modules) as missing_modules: - if len(missing_modules) < len(required_modules): - # Required to allow users to import from `ddtrace.contrib.aiohttp.patch` directly - from . import tracers as _ # noqa: F401, I001 - - # Expose public methods - from ddtrace.contrib.internal.flask_cache.tracers import get_traced_cache - from ddtrace.contrib.internal.flask_cache.tracers import get_version - - __all__ = ["get_traced_cache", "get_version"] +__all__ = ["get_traced_cache", "get_version"] diff --git a/ddtrace/contrib/freezegun/__init__.py b/ddtrace/contrib/freezegun/__init__.py index 7e2df3c557c..8c072c74d5a 100644 --- a/ddtrace/contrib/freezegun/__init__.py +++ b/ddtrace/contrib/freezegun/__init__.py @@ -13,16 +13,10 @@ The freezegun integration is not configurable, but may be disabled using DD_PATCH_MODULES=freezegun:false . """ -from ...internal.utils.importlib import require_modules +# Expose public methods +from ..internal.freezegun.patch import get_version +from ..internal.freezegun.patch import patch +from ..internal.freezegun.patch import unpatch -required_modules = ["freezegun"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Expose public methods - from ..internal.freezegun.patch import get_version - from ..internal.freezegun.patch import patch - from ..internal.freezegun.patch import unpatch - - __all__ = ["get_version", "patch", "unpatch"] +__all__ = ["get_version", "patch", "unpatch"] diff --git a/ddtrace/contrib/futures/__init__.py b/ddtrace/contrib/futures/__init__.py index c589912c07a..1ba8741ebe9 100644 --- a/ddtrace/contrib/futures/__init__.py +++ b/ddtrace/contrib/futures/__init__.py @@ -16,27 +16,24 @@ from ddtrace import patch patch(futures=True) """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["concurrent.futures"] +# Required to allow users to import from `ddtrace.contrib.futures.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.futures.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.futures.patch import get_version - from ddtrace.contrib.internal.futures.patch import patch - from ddtrace.contrib.internal.futures.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.futures.patch import get_version +from ddtrace.contrib.internal.futures.patch import patch +from ddtrace.contrib.internal.futures.patch import unpatch - __all__ = [ - "get_version", - "patch", - "unpatch", - ] + +__all__ = [ + "get_version", + "patch", + "unpatch", +] diff --git a/ddtrace/contrib/gevent/__init__.py b/ddtrace/contrib/gevent/__init__.py index 1b8e2811ef5..fb051e5f88b 100644 --- a/ddtrace/contrib/gevent/__init__.py +++ b/ddtrace/contrib/gevent/__init__.py @@ -36,26 +36,23 @@ def worker_function(): with tracer.trace("greenlet.child_call") as child: ... """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.gevent.patch` directly +import warnings as _w -required_modules = ["gevent"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.gevent.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.gevent.patch import get_version - from ddtrace.contrib.internal.gevent.patch import patch - from ddtrace.contrib.internal.gevent.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.gevent.patch import get_version +from ddtrace.contrib.internal.gevent.patch import patch +from ddtrace.contrib.internal.gevent.patch import unpatch - from ...provider import DefaultContextProvider as _DefaultContextProvider +from ...provider import DefaultContextProvider as _DefaultContextProvider - context_provider = _DefaultContextProvider() - __all__ = ["patch", "unpatch", "context_provider", "get_version"] +context_provider = _DefaultContextProvider() + +__all__ = ["patch", "unpatch", "context_provider", "get_version"] diff --git a/ddtrace/contrib/google_generativeai/__init__.py b/ddtrace/contrib/google_generativeai/__init__.py index 03cb35c9eae..d63a1134ab2 100644 --- a/ddtrace/contrib/google_generativeai/__init__.py +++ b/ddtrace/contrib/google_generativeai/__init__.py @@ -77,15 +77,11 @@ Pin.override(genai, service="my-gemini-service") """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["google.generativeai"] +from ..internal.google_generativeai.patch import get_version +from ..internal.google_generativeai.patch import patch +from ..internal.google_generativeai.patch import unpatch -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from ..internal.google_generativeai.patch import get_version - from ..internal.google_generativeai.patch import patch - from ..internal.google_generativeai.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/graphql/__init__.py b/ddtrace/contrib/graphql/__init__.py index 89350191ef1..5394f243533 100644 --- a/ddtrace/contrib/graphql/__init__.py +++ b/ddtrace/contrib/graphql/__init__.py @@ -44,23 +44,20 @@ Pin.override(graphql, service="mygraphql") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["graphql"] +# Required to allow users to import from `ddtrace.contrib.graphql.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.graphql.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.graphql.patch import get_version - from ddtrace.contrib.internal.graphql.patch import patch - from ddtrace.contrib.internal.graphql.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.graphql.patch import get_version +from ddtrace.contrib.internal.graphql.patch import patch +from ddtrace.contrib.internal.graphql.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/grpc/__init__.py b/ddtrace/contrib/grpc/__init__.py index c329762316c..ff5adb86aea 100644 --- a/ddtrace/contrib/grpc/__init__.py +++ b/ddtrace/contrib/grpc/__init__.py @@ -75,23 +75,18 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.grpc.patch` directly +import warnings as _w -required_modules = ["grpc"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.grpc.patch` directly - import warnings as _w +# Expose public methods +from ddtrace.contrib.internal.grpc.patch import get_version +from ddtrace.contrib.internal.grpc.patch import patch +from ddtrace.contrib.internal.grpc.patch import unpatch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.grpc.patch import get_version - from ddtrace.contrib.internal.grpc.patch import patch - from ddtrace.contrib.internal.grpc.patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/httplib/__init__.py b/ddtrace/contrib/httplib/__init__.py index 509e80df270..948b885199a 100644 --- a/ddtrace/contrib/httplib/__init__.py +++ b/ddtrace/contrib/httplib/__init__.py @@ -58,22 +58,18 @@ :ref:`Headers tracing ` is supported for this integration. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["http.client"] +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - from ddtrace.contrib.internal.httplib.patch import get_version - from ddtrace.contrib.internal.httplib.patch import patch - from ddtrace.contrib.internal.httplib.patch import unpatch +from ddtrace.contrib.internal.httplib.patch import get_version +from ddtrace.contrib.internal.httplib.patch import patch +from ddtrace.contrib.internal.httplib.patch import unpatch __all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/httpx/__init__.py b/ddtrace/contrib/httpx/__init__.py index 4575d39e7c6..118d0a738b5 100644 --- a/ddtrace/contrib/httpx/__init__.py +++ b/ddtrace/contrib/httpx/__init__.py @@ -77,23 +77,20 @@ .. __: https://www.python-httpx.org/ """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["httpx"] +# Required to allow users to import from `ddtrace.contrib.httpx.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.httpx.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.httpx.patch import get_version - from ddtrace.contrib.internal.httpx.patch import patch - from ddtrace.contrib.internal.httpx.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.httpx.patch import get_version +from ddtrace.contrib.internal.httpx.patch import patch +from ddtrace.contrib.internal.httpx.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/internal/asgi/middleware.py b/ddtrace/contrib/internal/asgi/middleware.py index e32d2994a3d..98d352cf75f 100644 --- a/ddtrace/contrib/internal/asgi/middleware.py +++ b/ddtrace/contrib/internal/asgi/middleware.py @@ -91,6 +91,18 @@ async def _blocked_asgi_app(scope, receive, send): await send({"type": "http.response.body", "body": b""}) +def _parse_response_cookies(response_headers): + cookies = {} + try: + result = response_headers.get("set-cookie", "").split("=", maxsplit=1) + if len(result) == 2: + cookie_key, cookie_value = result + cookies[cookie_key] = cookie_value + except Exception: + log.debug("failed to extract response cookies", exc_info=True) + return cookies + + class TraceMiddleware: """ ASGI application middleware that traces the requests. @@ -211,7 +223,6 @@ async def __call__(self, scope, receive, send): peer_ip = client[0] else: peer_ip = None - trace_utils.set_http_meta( span, self.integration_config, @@ -234,15 +245,8 @@ async def wrapped_send(message): except Exception: log.warning("failed to extract response headers", exc_info=True) response_headers = None - if span and message.get("type") == "http.response.start" and "status" in message: - cookies = {} - try: - cookie_key, cookie_value = response_headers.get("set-cookie", "").split("=", maxsplit=1) - cookies[cookie_key] = cookie_value - except Exception: - log.debug("failed to extract response cookies", exc_info=True) - + cookies = _parse_response_cookies(response_headers) status_code = message["status"] trace_utils.set_http_meta( span, diff --git a/ddtrace/contrib/internal/django/patch.py b/ddtrace/contrib/internal/django/patch.py index c40f49b627f..d4b14487e39 100644 --- a/ddtrace/contrib/internal/django/patch.py +++ b/ddtrace/contrib/internal/django/patch.py @@ -215,7 +215,7 @@ def traced_cache(django, pin, func, instance, args, kwargs): "django.cache", span_name="django.cache", span_type=SpanTypes.CACHE, - service=config.django.cache_service_name, + service=schematize_service_name(config.django.cache_service_name), resource=utils.resource_from_cache_prefix(func_name(func), instance), tags=tags, pin=pin, diff --git a/ddtrace/contrib/internal/requests/connection.py b/ddtrace/contrib/internal/requests/connection.py index 83c8d82927f..06d3347f0a1 100644 --- a/ddtrace/contrib/internal/requests/connection.py +++ b/ddtrace/contrib/internal/requests/connection.py @@ -15,6 +15,7 @@ from ddtrace.internal.schema.span_attribute_schema import SpanDirection from ddtrace.internal.utils import get_argument_value from ddtrace.propagation.http import HTTPPropagator +from ddtrace.settings.asm import config as asm_config log = get_logger(__name__) @@ -59,7 +60,7 @@ def _wrap_send(func, instance, args, kwargs): tracer = getattr(instance, "datadog_tracer", ddtrace.tracer) # skip if tracing is not enabled - if not tracer.enabled and not tracer._apm_opt_out: + if not tracer.enabled and not asm_config._apm_opt_out: return func(*args, **kwargs) request = get_argument_value(args, kwargs, 0, "request") diff --git a/ddtrace/contrib/jinja2/__init__.py b/ddtrace/contrib/jinja2/__init__.py index af2f6580041..b10c98609a8 100644 --- a/ddtrace/contrib/jinja2/__init__.py +++ b/ddtrace/contrib/jinja2/__init__.py @@ -27,23 +27,19 @@ By default, the service name is set to None, so it is inherited from the parent span. If there is no parent span and the service name is not overridden the agent will drop the traces. """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.jinja2.patch` directly +import warnings as _w -required_modules = ["jinja2"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.jinja2.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.jinja2.patch import get_version +from ddtrace.contrib.internal.jinja2.patch import patch +from ddtrace.contrib.internal.jinja2.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.jinja2.patch import get_version - from ddtrace.contrib.internal.jinja2.patch import patch - from ddtrace.contrib.internal.jinja2.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/kafka/__init__.py b/ddtrace/contrib/kafka/__init__.py index e784e6c9e52..f3cf66f6f23 100644 --- a/ddtrace/contrib/kafka/__init__.py +++ b/ddtrace/contrib/kafka/__init__.py @@ -41,23 +41,20 @@ Pin.override(confluent_kafka, service="custom-service-name") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["confluent_kafka"] +# Required to allow users to import from `ddtrace.contrib.kafka.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.kafka.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.kafka.patch import get_version - from ddtrace.contrib.internal.kafka.patch import patch - from ddtrace.contrib.internal.kafka.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.kafka.patch import get_version +from ddtrace.contrib.internal.kafka.patch import patch +from ddtrace.contrib.internal.kafka.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/langchain/__init__.py b/ddtrace/contrib/langchain/__init__.py index ba42e44af75..9f306fe07ed 100644 --- a/ddtrace/contrib/langchain/__init__.py +++ b/ddtrace/contrib/langchain/__init__.py @@ -207,23 +207,19 @@ Default: ``0.1`` """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.langchain.patch` directly +import warnings as _w -required_modules = ["langchain"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.langchain.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.langchain.patch import get_version +from ddtrace.contrib.internal.langchain.patch import patch +from ddtrace.contrib.internal.langchain.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.langchain.patch import get_version - from ddtrace.contrib.internal.langchain.patch import patch - from ddtrace.contrib.internal.langchain.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/logbook/__init__.py b/ddtrace/contrib/logbook/__init__.py index 1257af21a07..d42491706f2 100644 --- a/ddtrace/contrib/logbook/__init__.py +++ b/ddtrace/contrib/logbook/__init__.py @@ -48,23 +48,19 @@ https://docs.datadoghq.com/logs/log_collection/python/ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.logbook.patch` directly +import warnings as _w -required_modules = ["logbook"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.logbook.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.logbook.patch import get_version +from ddtrace.contrib.internal.logbook.patch import patch +from ddtrace.contrib.internal.logbook.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.logbook.patch import get_version - from ddtrace.contrib.internal.logbook.patch import patch - from ddtrace.contrib.internal.logbook.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/logging/__init__.py b/ddtrace/contrib/logging/__init__.py index 137a8f1a1af..24deca593a5 100644 --- a/ddtrace/contrib/logging/__init__.py +++ b/ddtrace/contrib/logging/__init__.py @@ -61,23 +61,19 @@ def hello(): https://docs.datadoghq.com/logs/guide/logs-not-showing-expected-timestamp/ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.logging.patch` directly +import warnings as _w -required_modules = ["logging"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.logging.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.logging.patch import get_version +from ddtrace.contrib.internal.logging.patch import patch +from ddtrace.contrib.internal.logging.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.logging.patch import get_version - from ddtrace.contrib.internal.logging.patch import patch - from ddtrace.contrib.internal.logging.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/loguru/__init__.py b/ddtrace/contrib/loguru/__init__.py index ef4cf4e8cc0..4fb56886108 100644 --- a/ddtrace/contrib/loguru/__init__.py +++ b/ddtrace/contrib/loguru/__init__.py @@ -63,23 +63,19 @@ def log_format(record): https://docs.datadoghq.com/logs/log_collection/python/ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.loguru.patch` directly +import warnings as _w -required_modules = ["loguru"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.loguru.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.loguru.patch import get_version +from ddtrace.contrib.internal.loguru.patch import patch +from ddtrace.contrib.internal.loguru.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.loguru.patch import get_version - from ddtrace.contrib.internal.loguru.patch import patch - from ddtrace.contrib.internal.loguru.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/mako/__init__.py b/ddtrace/contrib/mako/__init__.py index e76fabc7e2a..2dda665270e 100644 --- a/ddtrace/contrib/mako/__init__.py +++ b/ddtrace/contrib/mako/__init__.py @@ -10,23 +10,20 @@ t = Template(filename="index.html") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["mako"] +# Required to allow users to import from `ddtrace.contrib.mako.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mako.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.mako.patch import get_version - from ddtrace.contrib.internal.mako.patch import patch - from ddtrace.contrib.internal.mako.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.mako.patch import get_version +from ddtrace.contrib.internal.mako.patch import patch +from ddtrace.contrib.internal.mako.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/mariadb/__init__.py b/ddtrace/contrib/mariadb/__init__.py index 976514fadc9..e5c7139ee74 100644 --- a/ddtrace/contrib/mariadb/__init__.py +++ b/ddtrace/contrib/mariadb/__init__.py @@ -52,23 +52,20 @@ cursor.execute("SELECT 6*7 AS the_answer;") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["mariadb"] +# Required to allow users to import from `ddtrace.contrib.mariadb.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mariadb.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.mariadb.patch import get_version - from ddtrace.contrib.internal.mariadb.patch import patch - from ddtrace.contrib.internal.mariadb.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.mariadb.patch import get_version +from ddtrace.contrib.internal.mariadb.patch import patch +from ddtrace.contrib.internal.mariadb.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/molten/__init__.py b/ddtrace/contrib/molten/__init__.py index 624f13ac8e7..4116e4fd8c7 100644 --- a/ddtrace/contrib/molten/__init__.py +++ b/ddtrace/contrib/molten/__init__.py @@ -34,23 +34,20 @@ def hello(name: str, age: int) -> str: :ref:`All HTTP tags ` are supported for this integration. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["molten"] +# Required to allow users to import from `ddtrace.contrib.molten.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.molten.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.molten.patch import get_version - from ddtrace.contrib.internal.molten.patch import patch - from ddtrace.contrib.internal.molten.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.molten.patch import get_version +from ddtrace.contrib.internal.molten.patch import patch +from ddtrace.contrib.internal.molten.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/mongoengine/__init__.py b/ddtrace/contrib/mongoengine/__init__.py index a7ded2176f3..1522ac1438b 100644 --- a/ddtrace/contrib/mongoengine/__init__.py +++ b/ddtrace/contrib/mongoengine/__init__.py @@ -17,22 +17,18 @@ Pin.override(client, service="mongo-master") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.mongoengine.patch` directly +import warnings as _w -required_modules = ["mongoengine"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mongoengine.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.mongoengine.patch import get_version +from ddtrace.contrib.internal.mongoengine.patch import patch - # Expose public methods - from ddtrace.contrib.internal.mongoengine.patch import get_version - from ddtrace.contrib.internal.mongoengine.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/mysql/__init__.py b/ddtrace/contrib/mysql/__init__.py index 2c43bec69c0..1c3f6064e55 100644 --- a/ddtrace/contrib/mysql/__init__.py +++ b/ddtrace/contrib/mysql/__init__.py @@ -62,23 +62,22 @@ Help on mysql.connector can be found on: https://dev.mysql.com/doc/connector-python/en/ """ -from ddtrace.internal.utils.importlib import require_modules # check `mysql-connector` availability -required_modules = ["mysql.connector"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mysql.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Required to allow users to import from `ddtrace.contrib.mysql.patch` directly +import warnings as _w - # Expose public methods - from ddtrace.contrib.internal.mysql.patch import get_version - from ddtrace.contrib.internal.mysql.patch import patch - __all__ = ["patch", "get_version"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 + +# Expose public methods +from ddtrace.contrib.internal.mysql.patch import get_version +from ddtrace.contrib.internal.mysql.patch import patch + + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/mysqldb/__init__.py b/ddtrace/contrib/mysqldb/__init__.py index 6201e7016d7..17bb76b08a8 100644 --- a/ddtrace/contrib/mysqldb/__init__.py +++ b/ddtrace/contrib/mysqldb/__init__.py @@ -75,21 +75,18 @@ https://mysqlclient.readthedocs.io/ """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["MySQLdb"] +# Required to allow users to import from `ddtrace.contrib.mysqldb.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.mysqldb.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.mysqldb.patch import get_version - from ddtrace.contrib.internal.mysqldb.patch import patch +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.mysqldb.patch import get_version +from ddtrace.contrib.internal.mysqldb.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/openai/__init__.py b/ddtrace/contrib/openai/__init__.py index 0f3da05407d..79a5b488834 100644 --- a/ddtrace/contrib/openai/__init__.py +++ b/ddtrace/contrib/openai/__init__.py @@ -246,23 +246,20 @@ Pin.override(openai, service="my-openai-service") """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["openai"] +# Required to allow users to import from `ddtrace.contrib.openai.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.openai.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.openai.patch import get_version - from ddtrace.contrib.internal.openai.patch import patch - from ddtrace.contrib.internal.openai.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.openai.patch import get_version +from ddtrace.contrib.internal.openai.patch import patch +from ddtrace.contrib.internal.openai.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/protobuf/__init__.py b/ddtrace/contrib/protobuf/__init__.py index 4284782cdbf..dd429d3aa83 100644 --- a/ddtrace/contrib/protobuf/__init__.py +++ b/ddtrace/contrib/protobuf/__init__.py @@ -15,16 +15,10 @@ ~~~~~~~~~~~~~ """ -from ...internal.utils.importlib import require_modules +# Expose public methods +from ..internal.protobuf.patch import get_version +from ..internal.protobuf.patch import patch +from ..internal.protobuf.patch import unpatch -required_modules = ["protobuf"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Expose public methods - from ..internal.protobuf.patch import get_version - from ..internal.protobuf.patch import patch - from ..internal.protobuf.patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/pylibmc/__init__.py b/ddtrace/contrib/pylibmc/__init__.py index c7d397153b7..5689fcd9070 100644 --- a/ddtrace/contrib/pylibmc/__init__.py +++ b/ddtrace/contrib/pylibmc/__init__.py @@ -19,22 +19,18 @@ Pin.override(client, service="memcached-sessions") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.pylibmc.patch` directly +import warnings as _w -required_modules = ["pylibmc"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pylibmc.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.pylibmc.client import TracedClient +from ddtrace.contrib.internal.pylibmc.patch import get_version +from ddtrace.contrib.internal.pylibmc.patch import patch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pylibmc.client import TracedClient - from ddtrace.contrib.internal.pylibmc.patch import get_version - from ddtrace.contrib.internal.pylibmc.patch import patch - __all__ = ["TracedClient", "patch", "get_version"] +__all__ = ["TracedClient", "patch", "get_version"] diff --git a/ddtrace/contrib/pymemcache/__init__.py b/ddtrace/contrib/pymemcache/__init__.py index 937b6688895..871d8ee0f6c 100644 --- a/ddtrace/contrib/pymemcache/__init__.py +++ b/ddtrace/contrib/pymemcache/__init__.py @@ -30,22 +30,19 @@ Pymemcache ``HashClient`` will also be indirectly patched as it uses ``Client`` under the hood. """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["pymemcache"] +# Required to allow users to import from `ddtrace.contrib.pymemcache.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pymemcache.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pymemcache.patch import get_version - from ddtrace.contrib.internal.pymemcache.patch import patch - from ddtrace.contrib.internal.pymemcache.patch import unpatch +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.pymemcache.patch import get_version +from ddtrace.contrib.internal.pymemcache.patch import patch +from ddtrace.contrib.internal.pymemcache.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/pymongo/__init__.py b/ddtrace/contrib/pymongo/__init__.py index 66174b10ff5..60394b6c2f3 100644 --- a/ddtrace/contrib/pymongo/__init__.py +++ b/ddtrace/contrib/pymongo/__init__.py @@ -35,22 +35,19 @@ Default: ``"pymongo"`` """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["pymongo"] +# Required to allow users to import from `ddtrace.contrib.pymongo.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pymongo.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pymongo.patch import get_version - from ddtrace.contrib.internal.pymongo.patch import patch +# Expose public methods +from ddtrace.contrib.internal.pymongo.patch import get_version +from ddtrace.contrib.internal.pymongo.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/pymysql/__init__.py b/ddtrace/contrib/pymysql/__init__.py index 4e7b322c5d6..d4b24e2cd5f 100644 --- a/ddtrace/contrib/pymysql/__init__.py +++ b/ddtrace/contrib/pymysql/__init__.py @@ -55,22 +55,18 @@ cursor.execute("SELECT 6*7 AS the_answer;") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.pymysql.patch` directly +import warnings as _w -required_modules = ["pymysql"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pymysql.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.pymysql.patch import get_version +from ddtrace.contrib.internal.pymysql.patch import patch - # Expose public methods - from ddtrace.contrib.internal.pymysql.patch import get_version - from ddtrace.contrib.internal.pymysql.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/pynamodb/__init__.py b/ddtrace/contrib/pynamodb/__init__.py index 12c138f5377..3a84e603243 100644 --- a/ddtrace/contrib/pynamodb/__init__.py +++ b/ddtrace/contrib/pynamodb/__init__.py @@ -29,22 +29,17 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.pynamodb.patch` directly +import warnings as _w -required_modules = ["pynamodb.connection.base"] +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pynamodb.patch` directly - import warnings as _w +# Expose public methods +from ddtrace.contrib.internal.pynamodb.patch import get_version +from ddtrace.contrib.internal.pynamodb.patch import patch - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pynamodb.patch import get_version - from ddtrace.contrib.internal.pynamodb.patch import patch - - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/pyodbc/__init__.py b/ddtrace/contrib/pyodbc/__init__.py index f874f561013..44605b7cdc9 100644 --- a/ddtrace/contrib/pyodbc/__init__.py +++ b/ddtrace/contrib/pyodbc/__init__.py @@ -53,22 +53,19 @@ cursor = db.cursor() cursor.execute("select * from users where id = 1") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["pyodbc"] +# Required to allow users to import from `ddtrace.contrib.pyodbc.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pyodbc.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.pyodbc.patch import get_version - from ddtrace.contrib.internal.pyodbc.patch import patch +# Expose public methods +from ddtrace.contrib.internal.pyodbc.patch import get_version +from ddtrace.contrib.internal.pyodbc.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/pyramid/__init__.py b/ddtrace/contrib/pyramid/__init__.py index b0cb0c9fcb3..72ef2613117 100644 --- a/ddtrace/contrib/pyramid/__init__.py +++ b/ddtrace/contrib/pyramid/__init__.py @@ -40,25 +40,21 @@ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.pyramid.patch` directly +import warnings as _w -required_modules = ["pyramid"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.pyramid.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.pyramid.patch import get_version +from ddtrace.contrib.internal.pyramid.patch import patch +from ddtrace.contrib.internal.pyramid.trace import includeme +from ddtrace.contrib.internal.pyramid.trace import trace_pyramid +from ddtrace.contrib.internal.pyramid.trace import trace_tween_factory - # Expose public methods - from ddtrace.contrib.internal.pyramid.patch import get_version - from ddtrace.contrib.internal.pyramid.patch import patch - from ddtrace.contrib.internal.pyramid.trace import includeme - from ddtrace.contrib.internal.pyramid.trace import trace_pyramid - from ddtrace.contrib.internal.pyramid.trace import trace_tween_factory - __all__ = ["patch", "trace_pyramid", "trace_tween_factory", "includeme", "get_version"] +__all__ = ["patch", "trace_pyramid", "trace_tween_factory", "includeme", "get_version"] diff --git a/ddtrace/contrib/pytest/_plugin_v2.py b/ddtrace/contrib/pytest/_plugin_v2.py index cfcd109f7f9..f15373a776a 100644 --- a/ddtrace/contrib/pytest/_plugin_v2.py +++ b/ddtrace/contrib/pytest/_plugin_v2.py @@ -85,6 +85,7 @@ _NODEID_REGEX = re.compile("^((?P.*)/(?P[^/]*?))::(?P.*?)$") USER_PROPERTY_QUARANTINED = "dd_quarantined" OUTCOME_QUARANTINED = "quarantined" +SKIPPED_BY_QUARANTINE_REASON = "Skipped by Datadog Quarantine" def _handle_itr_should_skip(item, test_id) -> bool: @@ -113,6 +114,19 @@ def _handle_itr_should_skip(item, test_id) -> bool: return False +def _handle_quarantine(item, test_id): + """Add a user property to identify quarantined tests, and mark them for skipping if quarantine is enabled in + skipping mode. + """ + is_quarantined = InternalTest.is_quarantined_test(test_id) + if is_quarantined: + # We add this information to user_properties to have it available in pytest_runtest_makereport(). + item.user_properties += [(USER_PROPERTY_QUARANTINED, True)] + + if InternalTestSession.should_skip_quarantined_tests(): + item.add_marker(pytest.mark.skip(reason=SKIPPED_BY_QUARANTINE_REASON)) + + def _start_collecting_coverage() -> ModuleCodeCollector.CollectInContext: coverage_collector = ModuleCodeCollector.CollectInContext() # TODO: don't depend on internal for telemetry @@ -325,17 +339,13 @@ def _pytest_runtest_protocol_pre_yield(item) -> t.Optional[ModuleCodeCollector.C InternalTest.start(test_id) + _handle_quarantine(item, test_id) _handle_itr_should_skip(item, test_id) item_will_skip = _pytest_marked_to_skip(item) or InternalTest.was_skipped_by_itr(test_id) collect_test_coverage = InternalTestSession.should_collect_coverage() and not item_will_skip - is_quarantined = InternalTest.is_quarantined_test(test_id) - if is_quarantined: - # We add this information to user_properties to have it available in pytest_runtest_makereport(). - item.user_properties += [(USER_PROPERTY_QUARANTINED, True)] - if collect_test_coverage: return _start_collecting_coverage() diff --git a/ddtrace/contrib/redis/__init__.py b/ddtrace/contrib/redis/__init__.py index 6ab85b1a9fa..4fddef1c742 100644 --- a/ddtrace/contrib/redis/__init__.py +++ b/ddtrace/contrib/redis/__init__.py @@ -67,22 +67,18 @@ client.get("my-key") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.redis.patch` directly +import warnings as _w -required_modules = ["redis", "redis.client"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.redis.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.redis.patch import get_version +from ddtrace.contrib.internal.redis.patch import patch - # Expose public methods - from ddtrace.contrib.internal.redis.patch import get_version - from ddtrace.contrib.internal.redis.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/rediscluster/__init__.py b/ddtrace/contrib/rediscluster/__init__.py index 55d20f9d933..cb14eb9aa30 100644 --- a/ddtrace/contrib/rediscluster/__init__.py +++ b/ddtrace/contrib/rediscluster/__init__.py @@ -48,22 +48,18 @@ Default: ``True`` """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.rediscluster.patch` directly +import warnings as _w -required_modules = ["rediscluster", "rediscluster.client"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.rediscluster.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.rediscluster.patch import get_version +from ddtrace.contrib.internal.rediscluster.patch import patch - # Expose public methods - from ddtrace.contrib.internal.rediscluster.patch import get_version - from ddtrace.contrib.internal.rediscluster.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/requests/__init__.py b/ddtrace/contrib/requests/__init__.py index e9a9e973d77..727e8219339 100644 --- a/ddtrace/contrib/requests/__init__.py +++ b/ddtrace/contrib/requests/__init__.py @@ -72,24 +72,21 @@ cfg['service_name'] = 'auth-api' cfg['distributed_tracing'] = False """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["requests"] +# Required to allow users to import from `ddtrace.contrib.requests.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.requests.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.requests.patch import get_version - from ddtrace.contrib.internal.requests.patch import patch - from ddtrace.contrib.internal.requests.patch import unpatch - from ddtrace.contrib.internal.requests.session import TracedSession +# Expose public methods +from ddtrace.contrib.internal.requests.patch import get_version +from ddtrace.contrib.internal.requests.patch import patch +from ddtrace.contrib.internal.requests.patch import unpatch +from ddtrace.contrib.internal.requests.session import TracedSession - __all__ = ["patch", "unpatch", "TracedSession", "get_version"] + +__all__ = ["patch", "unpatch", "TracedSession", "get_version"] diff --git a/ddtrace/contrib/sanic/__init__.py b/ddtrace/contrib/sanic/__init__.py index b68db2efe1c..96f47d156ac 100644 --- a/ddtrace/contrib/sanic/__init__.py +++ b/ddtrace/contrib/sanic/__init__.py @@ -55,23 +55,20 @@ def index(request): .. __: https://sanic.readthedocs.io/en/latest/ """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["sanic"] +# Required to allow users to import from `ddtrace.contrib.sanic.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.sanic.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.sanic.patch import get_version - from ddtrace.contrib.internal.sanic.patch import patch - from ddtrace.contrib.internal.sanic.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.sanic.patch import get_version +from ddtrace.contrib.internal.sanic.patch import patch +from ddtrace.contrib.internal.sanic.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/selenium/__init__.py b/ddtrace/contrib/selenium/__init__.py index d30c896fdd7..f5016ce0254 100644 --- a/ddtrace/contrib/selenium/__init__.py +++ b/ddtrace/contrib/selenium/__init__.py @@ -22,16 +22,10 @@ DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS: The time in milliseconds to wait after flushing the RUM session. """ -from ...internal.utils.importlib import require_modules +# Expose public methods +from ..internal.selenium.patch import get_version +from ..internal.selenium.patch import patch +from ..internal.selenium.patch import unpatch -required_modules = ["selenium"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Expose public methods - from ..internal.selenium.patch import get_version - from ..internal.selenium.patch import patch - from ..internal.selenium.patch import unpatch - - __all__ = ["get_version", "patch", "unpatch"] +__all__ = ["get_version", "patch", "unpatch"] diff --git a/ddtrace/contrib/snowflake/__init__.py b/ddtrace/contrib/snowflake/__init__.py index c89f42cf8c4..e675ff7a067 100644 --- a/ddtrace/contrib/snowflake/__init__.py +++ b/ddtrace/contrib/snowflake/__init__.py @@ -58,23 +58,20 @@ cursor = conn.cursor() cursor.execute("SELECT current_version()") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["snowflake.connector"] +# Required to allow users to import from `ddtrace.contrib.snowflake.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.snowflake.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.snowflake.patch import get_version - from ddtrace.contrib.internal.snowflake.patch import patch - from ddtrace.contrib.internal.snowflake.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.snowflake.patch import get_version +from ddtrace.contrib.internal.snowflake.patch import patch +from ddtrace.contrib.internal.snowflake.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/sqlalchemy/__init__.py b/ddtrace/contrib/sqlalchemy/__init__.py index 15d05aa45f6..c294b8c976c 100644 --- a/ddtrace/contrib/sqlalchemy/__init__.py +++ b/ddtrace/contrib/sqlalchemy/__init__.py @@ -19,24 +19,21 @@ # Use a PIN to specify metadata related to this engine Pin.override(engine, service='replica-db') """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["sqlalchemy", "sqlalchemy.event"] +# Required to allow users to import from `ddtrace.contrib.sqlalchemy.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.sqlalchemy.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.sqlalchemy.engine import trace_engine - from ddtrace.contrib.internal.sqlalchemy.patch import get_version - from ddtrace.contrib.internal.sqlalchemy.patch import patch - from ddtrace.contrib.internal.sqlalchemy.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.sqlalchemy.engine import trace_engine +from ddtrace.contrib.internal.sqlalchemy.patch import get_version +from ddtrace.contrib.internal.sqlalchemy.patch import patch +from ddtrace.contrib.internal.sqlalchemy.patch import unpatch - __all__ = ["trace_engine", "patch", "unpatch", "get_version"] + +__all__ = ["trace_engine", "patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/sqlite3/__init__.py b/ddtrace/contrib/sqlite3/__init__.py index 02624851300..42499cf0447 100644 --- a/ddtrace/contrib/sqlite3/__init__.py +++ b/ddtrace/contrib/sqlite3/__init__.py @@ -53,22 +53,19 @@ cursor = db.cursor() cursor.execute("select * from users where id = 1") """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["sqlite3"] +# Required to allow users to import from `ddtrace.contrib.sqlite3.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.sqlite3.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.sqlite3.patch import get_version - from ddtrace.contrib.internal.sqlite3.patch import patch +# Expose public methods +from ddtrace.contrib.internal.sqlite3.patch import get_version +from ddtrace.contrib.internal.sqlite3.patch import patch - __all__ = ["patch", "get_version"] + +__all__ = ["patch", "get_version"] diff --git a/ddtrace/contrib/starlette/__init__.py b/ddtrace/contrib/starlette/__init__.py index 9413e507759..d3327feded4 100644 --- a/ddtrace/contrib/starlette/__init__.py +++ b/ddtrace/contrib/starlette/__init__.py @@ -57,23 +57,20 @@ config.starlette['request_span_name'] = 'custom-request-span-name' """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["starlette"] +# Required to allow users to import from `ddtrace.contrib.starlette.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.starlette.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.starlette.patch import get_version - from ddtrace.contrib.internal.starlette.patch import patch - from ddtrace.contrib.internal.starlette.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.starlette.patch import get_version +from ddtrace.contrib.internal.starlette.patch import patch +from ddtrace.contrib.internal.starlette.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/structlog/__init__.py b/ddtrace/contrib/structlog/__init__.py index c953b974f34..0a9bcb56395 100644 --- a/ddtrace/contrib/structlog/__init__.py +++ b/ddtrace/contrib/structlog/__init__.py @@ -38,23 +38,19 @@ https://docs.datadoghq.com/logs/log_collection/python/ """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.structlog.patch` directly +import warnings as _w -required_modules = ["structlog"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.structlog.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.structlog.patch import get_version +from ddtrace.contrib.internal.structlog.patch import patch +from ddtrace.contrib.internal.structlog.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.structlog.patch import get_version - from ddtrace.contrib.internal.structlog.patch import patch - from ddtrace.contrib.internal.structlog.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/subprocess/__init__.py b/ddtrace/contrib/subprocess/__init__.py index ea0faae85aa..2e4969648d1 100644 --- a/ddtrace/contrib/subprocess/__init__.py +++ b/ddtrace/contrib/subprocess/__init__.py @@ -19,23 +19,19 @@ ```ddtrace.contrib.subprocess.constants.SENSITIVE_WORDS_WILDCARDS```. """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.subprocess.patch` directly +import warnings as _w -required_modules = ["os", "subprocess"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.subprocess.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.subprocess.patch import get_version +from ddtrace.contrib.internal.subprocess.patch import patch +from ddtrace.contrib.internal.subprocess.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.subprocess.patch import get_version - from ddtrace.contrib.internal.subprocess.patch import patch - from ddtrace.contrib.internal.subprocess.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/tornado/__init__.py b/ddtrace/contrib/tornado/__init__.py index 9d681396810..ad0adef2dd5 100644 --- a/ddtrace/contrib/tornado/__init__.py +++ b/ddtrace/contrib/tornado/__init__.py @@ -104,33 +104,30 @@ def log_exception(self, typ, value, tb): * ``agent_port`` (default: `8126`): define the port of the APM agent. * ``settings`` (default: ``{}``): Tracer extra settings used to change, for instance, the filtering behavior. """ -from ddtrace.internal.utils.importlib import require_modules - - -required_modules = ["tornado"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.tornado.patch` directly - import warnings as _w - - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 - - # Expose public methods - from ddtrace.contrib.internal.tornado.patch import get_version - from ddtrace.contrib.internal.tornado.patch import patch - from ddtrace.contrib.internal.tornado.patch import unpatch - from ddtrace.contrib.internal.tornado.stack_context import TracerStackContext - from ddtrace.contrib.internal.tornado.stack_context import context_provider - from ddtrace.contrib.internal.tornado.stack_context import run_with_trace_context - - __all__ = [ - "patch", - "unpatch", - "context_provider", - "run_with_trace_context", - "TracerStackContext", - "get_version", - ] + + +# Required to allow users to import from `ddtrace.contrib.tornado.patch` directly +import warnings as _w + + +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 + +# Expose public methods +from ddtrace.contrib.internal.tornado.patch import get_version +from ddtrace.contrib.internal.tornado.patch import patch +from ddtrace.contrib.internal.tornado.patch import unpatch +from ddtrace.contrib.internal.tornado.stack_context import TracerStackContext +from ddtrace.contrib.internal.tornado.stack_context import context_provider +from ddtrace.contrib.internal.tornado.stack_context import run_with_trace_context + + +__all__ = [ + "patch", + "unpatch", + "context_provider", + "run_with_trace_context", + "TracerStackContext", + "get_version", +] diff --git a/ddtrace/contrib/unittest/__init__.py b/ddtrace/contrib/unittest/__init__.py index cc15ea375c3..5180b59c959 100644 --- a/ddtrace/contrib/unittest/__init__.py +++ b/ddtrace/contrib/unittest/__init__.py @@ -34,15 +34,11 @@ Default: ``True`` """ -from ddtrace.internal.utils.importlib import require_modules + from .patch import get_version from .patch import patch from .patch import unpatch -required_modules = ["unittest"] - -with require_modules(required_modules) as missing_modules: - if not missing_modules: - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/urllib/__init__.py b/ddtrace/contrib/urllib/__init__.py index 8f22672d3d9..596251e99ad 100644 --- a/ddtrace/contrib/urllib/__init__.py +++ b/ddtrace/contrib/urllib/__init__.py @@ -4,23 +4,20 @@ if ``DD_IAST_ENABLED`` is set to ``True`` (for detecting sink points) and/or ``DD_ASM_ENABLED`` is set to ``True`` (for exploit prevention). """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["urllib"] +# Required to allow users to import from `ddtrace.contrib.urllib.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.urllib.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.urllib.patch import get_version - from ddtrace.contrib.internal.urllib.patch import patch - from ddtrace.contrib.internal.urllib.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.urllib.patch import get_version +from ddtrace.contrib.internal.urllib.patch import patch +from ddtrace.contrib.internal.urllib.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/urllib3/__init__.py b/ddtrace/contrib/urllib3/__init__.py index 71f6ad2eebe..0f2ebf2b12f 100644 --- a/ddtrace/contrib/urllib3/__init__.py +++ b/ddtrace/contrib/urllib3/__init__.py @@ -50,23 +50,20 @@ Default: ``False`` """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["urllib3"] +# Required to allow users to import from `ddtrace.contrib.urllib3.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.urllib3.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.urllib3.patch import get_version - from ddtrace.contrib.internal.urllib3.patch import patch - from ddtrace.contrib.internal.urllib3.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.urllib3.patch import get_version +from ddtrace.contrib.internal.urllib3.patch import patch +from ddtrace.contrib.internal.urllib3.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/vertexai/__init__.py b/ddtrace/contrib/vertexai/__init__.py index acc2417b679..f472d28790d 100644 --- a/ddtrace/contrib/vertexai/__init__.py +++ b/ddtrace/contrib/vertexai/__init__.py @@ -82,15 +82,10 @@ Pin.override(vertexai, service="my-vertexai-service") """ # noqa: E501 -from ddtrace.internal.utils.importlib import require_modules +from ddtrace.contrib.internal.vertexai.patch import get_version +from ddtrace.contrib.internal.vertexai.patch import patch +from ddtrace.contrib.internal.vertexai.patch import unpatch -required_modules = ["vertexai"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from ddtrace.contrib.internal.vertexai.patch import get_version - from ddtrace.contrib.internal.vertexai.patch import patch - from ddtrace.contrib.internal.vertexai.patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/vertica/__init__.py b/ddtrace/contrib/vertica/__init__.py index dfafe39a79f..3ec424fbb53 100644 --- a/ddtrace/contrib/vertica/__init__.py +++ b/ddtrace/contrib/vertica/__init__.py @@ -39,23 +39,19 @@ Pin.override(conn, service='myverticaservice', tracer=custom_tracer) """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.vertica.patch` directly +import warnings as _w -required_modules = ["vertica_python"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.vertica.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.vertica.patch import get_version +from ddtrace.contrib.internal.vertica.patch import patch +from ddtrace.contrib.internal.vertica.patch import unpatch - # Expose public methods - from ddtrace.contrib.internal.vertica.patch import get_version - from ddtrace.contrib.internal.vertica.patch import patch - from ddtrace.contrib.internal.vertica.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/webbrowser/__init__.py b/ddtrace/contrib/webbrowser/__init__.py index e5123725b0c..49a251cad50 100644 --- a/ddtrace/contrib/webbrowser/__init__.py +++ b/ddtrace/contrib/webbrowser/__init__.py @@ -4,23 +4,20 @@ if ``DD_IAST_ENABLED`` is set to ``True`` (for detecting sink points) and/or ``DD_ASM_ENABLED`` is set to ``True`` (for exploit prevention). """ -from ddtrace.internal.utils.importlib import require_modules -required_modules = ["webbrowser"] +# Required to allow users to import from `ddtrace.contrib.webbrowser.patch` directly +import warnings as _w -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.webbrowser.patch` directly - import warnings as _w - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - # Expose public methods - from ddtrace.contrib.internal.webbrowser.patch import get_version - from ddtrace.contrib.internal.webbrowser.patch import patch - from ddtrace.contrib.internal.webbrowser.patch import unpatch +# Expose public methods +from ddtrace.contrib.internal.webbrowser.patch import get_version +from ddtrace.contrib.internal.webbrowser.patch import patch +from ddtrace.contrib.internal.webbrowser.patch import unpatch - __all__ = ["patch", "unpatch", "get_version"] + +__all__ = ["patch", "unpatch", "get_version"] diff --git a/ddtrace/contrib/yaaredis/__init__.py b/ddtrace/contrib/yaaredis/__init__.py index 05396dae7a3..03d76db11c0 100644 --- a/ddtrace/contrib/yaaredis/__init__.py +++ b/ddtrace/contrib/yaaredis/__init__.py @@ -66,22 +66,18 @@ async def example(): await client.get("my-key") """ -from ddtrace.internal.utils.importlib import require_modules +# Required to allow users to import from `ddtrace.contrib.yaaredis.patch` directly +import warnings as _w -required_modules = ["yaaredis", "yaaredis.client"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - # Required to allow users to import from `ddtrace.contrib.yaaredis.patch` directly - import warnings as _w +with _w.catch_warnings(): + _w.simplefilter("ignore", DeprecationWarning) + from . import patch as _ # noqa: F401, I001 - with _w.catch_warnings(): - _w.simplefilter("ignore", DeprecationWarning) - from . import patch as _ # noqa: F401, I001 +# Expose public methods +from ddtrace.contrib.internal.yaaredis.patch import get_version +from ddtrace.contrib.internal.yaaredis.patch import patch - # Expose public methods - from ddtrace.contrib.internal.yaaredis.patch import get_version - from ddtrace.contrib.internal.yaaredis.patch import patch - __all__ = ["patch", "get_version"] +__all__ = ["patch", "get_version"] diff --git a/ddtrace/internal/ci_visibility/_api_client.py b/ddtrace/internal/ci_visibility/_api_client.py index c69e00793a2..49722e51e41 100644 --- a/ddtrace/internal/ci_visibility/_api_client.py +++ b/ddtrace/internal/ci_visibility/_api_client.py @@ -92,6 +92,7 @@ class EarlyFlakeDetectionSettings: @dataclasses.dataclass(frozen=True) class QuarantineSettings: enabled: bool = False + skip_quarantined_tests: bool = False @dataclasses.dataclass(frozen=True) @@ -385,7 +386,9 @@ def fetch_settings(self) -> TestVisibilityAPISettings: quarantine = QuarantineSettings( enabled=attributes.get("quarantine", {}).get("enabled", False) - or asbool(os.getenv("_DD_TEST_FORCE_ENABLE_QUARANTINE")) + or asbool(os.getenv("_DD_TEST_FORCE_ENABLE_QUARANTINE")), + skip_quarantined_tests=attributes.get("quarantine", {}).get("skip_quarantined_tests", False) + or asbool(os.getenv("_DD_TEST_SKIP_QUARANTINED_TESTS")), ) except KeyError: diff --git a/ddtrace/internal/ci_visibility/recorder.py b/ddtrace/internal/ci_visibility/recorder.py index eb8f00d5405..609475506d3 100644 --- a/ddtrace/internal/ci_visibility/recorder.py +++ b/ddtrace/internal/ci_visibility/recorder.py @@ -455,6 +455,14 @@ def is_quarantine_enabled(cls): os.getenv("DD_TEST_QUARANTINE_ENABLED", default=True) ) + @classmethod + def should_skip_quarantined_tests(cls): + if cls._instance is None: + return False + return cls._instance._api_settings.quarantine.skip_quarantined_tests and asbool( + os.getenv("DD_TEST_QUARANTINE_ENABLED", default=True) + ) + @classmethod def should_collect_coverage(cls): return cls._instance._api_settings.coverage_enabled or asbool( @@ -1039,6 +1047,12 @@ def _on_session_should_collect_coverage() -> bool: return CIVisibility.should_collect_coverage() +@_requires_civisibility_enabled +def _on_session_should_skip_quarantined_tests() -> bool: + log.debug("Handling should skip quarantined tests") + return CIVisibility.should_skip_quarantined_tests() + + @_requires_civisibility_enabled def _on_session_get_codeowners() -> Optional[Codeowners]: log.debug("Getting codeowners") @@ -1100,6 +1114,11 @@ def _register_session_handlers(): "is_test_skipping_enabled", ) core.on("test_visibility.session.set_covered_lines_pct", _on_session_set_covered_lines_pct) + core.on( + "test_visibility.session.should_skip_quarantined_tests", + _on_session_should_skip_quarantined_tests, + "should_skip_quarantined_tests", + ) @_requires_civisibility_enabled diff --git a/ddtrace/internal/core/__init__.py b/ddtrace/internal/core/__init__.py index fab9b07c183..da31218f73c 100644 --- a/ddtrace/internal/core/__init__.py +++ b/ddtrace/internal/core/__init__.py @@ -110,7 +110,6 @@ def _on_jsonify_context_started_flask(ctx): from typing import Dict # noqa:F401 from typing import List # noqa:F401 from typing import Optional # noqa:F401 -from typing import Union # noqa:F401 from ddtrace.vendor.debtcollector import deprecate @@ -276,7 +275,11 @@ def root(self): @property def span(self) -> "Span": if self._inner_span is None: - raise ValueError("No span set on ExecutionContext") + log.warning("No span found in ExecutionContext %s", self.identifier) + # failsafe + from ddtrace import tracer + + self._inner_span = tracer.current_span() or tracer.trace("default") return self._inner_span @span.setter @@ -362,15 +365,14 @@ def discard_local_item(data_key: str) -> None: def get_span() -> Optional["Span"]: current: Optional[ExecutionContext] = _CURRENT_CONTEXT.get() while current is not None: - try: - return current.span - except ValueError: - current = current.parent + if current._inner_span is not None: + return current._inner_span + current = current.parent return None def get_root_span() -> Optional["Span"]: - span = _CURRENT_CONTEXT.get().span + span = get_span() if span is None: return None return span._local_root or span diff --git a/ddtrace/internal/coverage/instrumentation.py b/ddtrace/internal/coverage/instrumentation.py index 4a846944efc..19bc61238ff 100644 --- a/ddtrace/internal/coverage/instrumentation.py +++ b/ddtrace/internal/coverage/instrumentation.py @@ -2,7 +2,9 @@ # Import are noqa'd otherwise some formatters will helpfully remove them -if sys.version_info >= (3, 12): +if sys.version_info >= (3, 13): + from ddtrace.internal.coverage.instrumentation_py3_13 import instrument_all_lines # noqa +elif sys.version_info >= (3, 12): from ddtrace.internal.coverage.instrumentation_py3_12 import instrument_all_lines # noqa elif sys.version_info >= (3, 11): from ddtrace.internal.coverage.instrumentation_py3_11 import instrument_all_lines # noqa diff --git a/ddtrace/internal/coverage/instrumentation_py3_13.py b/ddtrace/internal/coverage/instrumentation_py3_13.py new file mode 100644 index 00000000000..2953a514e85 --- /dev/null +++ b/ddtrace/internal/coverage/instrumentation_py3_13.py @@ -0,0 +1,23 @@ +import dis +import sys +from types import CodeType +import typing as t + +from ddtrace.internal.injection import HookType +from ddtrace.internal.test_visibility.coverage_lines import CoverageLines + + +# This is primarily to make mypy happy without having to nest the rest of this module behind a version check +assert sys.version_info >= (3, 13) # nosec + +EXTENDED_ARG = dis.EXTENDED_ARG +IMPORT_NAME = dis.opmap["IMPORT_NAME"] +IMPORT_FROM = dis.opmap["IMPORT_FROM"] +RESUME = dis.opmap["RESUME"] +RETURN_CONST = dis.opmap["RETURN_CONST"] +EMPTY_MODULE_BYTES = bytes([RESUME, 0, RETURN_CONST, 0]) + + +def instrument_all_lines(code: CodeType, hook: HookType, path: str, package: str) -> t.Tuple[CodeType, CoverageLines]: + # No-op + return code, CoverageLines() diff --git a/ddtrace/internal/opentelemetry/span.py b/ddtrace/internal/opentelemetry/span.py index 15f497a358e..acb5e066311 100644 --- a/ddtrace/internal/opentelemetry/span.py +++ b/ddtrace/internal/opentelemetry/span.py @@ -220,9 +220,16 @@ def set_status(self, status, description=None): return if isinstance(status, Status): + if description is not None and description != status.description: + log.warning( + "Conflicting descriptions detected. The following description will not be set on the %s span: %s. " + "Ensure `Span.set_status(...)` is called with `(Status(status_code, description), None)` " + "or `(status_code, description)`", + self._ddspan.name, + description, + ) status_code = status.status_code message = status.description - log.warning("Description %s ignored. Use either `Status` or `(StatusCode, Description)`", description) else: status_code = status message = description diff --git a/ddtrace/internal/test_visibility/api.py b/ddtrace/internal/test_visibility/api.py index c4e25b29e06..4c11135b76d 100644 --- a/ddtrace/internal/test_visibility/api.py +++ b/ddtrace/internal/test_visibility/api.py @@ -116,6 +116,20 @@ def is_test_skipping_enabled() -> bool: return _is_test_skipping_enabled + @staticmethod + @_catch_and_log_exceptions + def should_skip_quarantined_tests() -> bool: + log.debug("Checking if quarantined tests should be skipped") + + should_skip = bool( + core.dispatch_with_results( + "test_visibility.session.should_skip_quarantined_tests" + ).should_skip_quarantined_tests.value + ) + log.debug("Quarantined tests should be skipped: %s", should_skip) + + return should_skip + @staticmethod @_catch_and_log_exceptions def set_covered_lines_pct(coverage_pct: float): diff --git a/ddtrace/pin.py b/ddtrace/pin.py index 7070efcf71c..926918b6cea 100644 --- a/ddtrace/pin.py +++ b/ddtrace/pin.py @@ -144,7 +144,10 @@ def override( def enabled(self): # type: () -> bool """Return true if this pin's tracer is enabled.""" - return bool(self.tracer) and (self.tracer.enabled or self.tracer._apm_opt_out) + # inline to avoid circular imports + from ddtrace.settings.asm import config as asm_config + + return bool(self.tracer) and (self.tracer.enabled or asm_config._apm_opt_out) def onto(self, obj, send=True): # type: (Any, bool) -> None diff --git a/ddtrace/profiling/collector/_memalloc.c b/ddtrace/profiling/collector/_memalloc.c index 3876517baaf..f3de61a7b2c 100644 --- a/ddtrace/profiling/collector/_memalloc.c +++ b/ddtrace/profiling/collector/_memalloc.c @@ -57,6 +57,28 @@ static alloc_tracker_t* global_alloc_tracker; static void memalloc_init(void); +static void +memalloc_prefork(void) +{ + // Lock the mutex prior to forking. This ensures that the memory profiler + // data structures will be in a consistent state in the child process. + // The rest of the memalloc calls do trylock so we don't run the risk + // of deadlocking if some other fork handler allocates + memlock_lock(&g_memalloc_lock); +} + +static void +memalloc_postfork_parent(void) +{ + memlock_unlock(&g_memalloc_lock); +} + +static void +memalloc_postfork_child(void) +{ + memlock_unlock(&g_memalloc_lock); +} + #ifdef _MSC_VER #pragma section(".CRT$XCU", read) __declspec(allocate(".CRT$XCU")) void (*memalloc_init_func)(void) = memalloc_init; @@ -81,6 +103,9 @@ memalloc_init() } } memlock_init(&g_memalloc_lock, crash_on_mutex_pass); +#ifndef _WIN32 + pthread_atfork(memalloc_prefork, memalloc_postfork_parent, memalloc_postfork_child); +#endif } static void diff --git a/ddtrace/profiling/collector/_memalloc_heap.c b/ddtrace/profiling/collector/_memalloc_heap.c index d2a5cc29eee..11e0d8dba8e 100644 --- a/ddtrace/profiling/collector/_memalloc_heap.c +++ b/ddtrace/profiling/collector/_memalloc_heap.c @@ -36,6 +36,25 @@ static heap_tracker_t global_heap_tracker; static void memheap_init(void); +static void +memheap_prefork(void) +{ + // See memalloc_prefork for an explanation of why this is here + memlock_lock(&g_memheap_lock); +} + +static void +memheap_postfork_parent(void) +{ + memlock_unlock(&g_memheap_lock); +} + +static void +memheap_postfork_child(void) +{ + memlock_unlock(&g_memheap_lock); +} + #ifdef _MSC_VER #pragma section(".CRT$XCU", read) __declspec(allocate(".CRT$XCU")) void (*memheap_init_func)(void) = memheap_init; @@ -60,6 +79,9 @@ memheap_init() } } memlock_init(&g_memheap_lock, crash_on_mutex_pass); +#ifndef _WIN32 + pthread_atfork(memheap_prefork, memheap_postfork_parent, memheap_postfork_child); +#endif } static uint32_t diff --git a/ddtrace/profiling/collector/_memalloc_reentrant.h b/ddtrace/profiling/collector/_memalloc_reentrant.h index cb4aa246961..54a07320236 100644 --- a/ddtrace/profiling/collector/_memalloc_reentrant.h +++ b/ddtrace/profiling/collector/_memalloc_reentrant.h @@ -125,19 +125,6 @@ memlock_trylock(memlock_t* lock) if (!lock) return false; -#ifdef __linux__ - // On Linux, we need to make sure we didn't just fork - // pthreads will guarantee the lock is consistent, but we at least need to clear it - static pid_t my_pid = 0; - if (my_pid == 0) { - my_pid = getpid(); - } else if (my_pid != getpid()) { - // We've forked, so we need to free the lock - memlock_unlock(lock); - my_pid = getpid(); - } -#endif - #ifdef _WIN32 bool result = WAIT_OBJECT_0 == WaitForSingleObject(lock->mutex, 0); // 0ms timeout -> no wait #else @@ -153,6 +140,19 @@ memlock_trylock(memlock_t* lock) return result; } +static inline void +memlock_lock(memlock_t* lock) +{ + if (!lock) + return; + +#ifdef _WIN32 + WaitForSingleObject(lock->mutex, INFINITE); +#else + pthread_mutex_lock(&lock->mutex); +#endif +} + // Cleanup function static inline bool memlock_destroy(memlock_t* lock) diff --git a/ddtrace/settings/asm.py b/ddtrace/settings/asm.py index cf20ea08f1a..0aadda674f5 100644 --- a/ddtrace/settings/asm.py +++ b/ddtrace/settings/asm.py @@ -269,6 +269,12 @@ def _eval_asm_can_be_enabled(self): def _api_security_feature_active(self) -> bool: return self._asm_libddwaf_available and self._asm_enabled and self._api_security_enabled + @property + def _apm_opt_out(self) -> bool: + return ( + self._asm_enabled or self._iast_enabled or tracer_config._sca_enabled is True + ) and self._appsec_standalone_enabled + @property def _user_event_mode(self) -> str: if self._asm_enabled and self._auto_user_instrumentation_enabled: diff --git a/docs/conf.py b/docs/conf.py index 84ebe856954..9a20184de0a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -140,6 +140,12 @@ def _skip(self, word): # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] + +# autodoc_mock_imports contains a list of modules to be mocked up. +# This is useful when some external dependencies are installed at build time and break the building process. +# The following modules require third party packages and should be mocked when generating docs: +autodoc_mock_imports = ["ddtrace.contrib.internal"] + # The reST default role (used for this markup: `text`) to use for all # documents. # diff --git a/docs/configuration.rst b/docs/configuration.rst index d36391de07e..35bb63fac20 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -557,10 +557,10 @@ Test Visibility default: True description: | - Configures the ``CIVisibility`` service to query the Datadog API to decide whether to enable the Datadog - `Intelligent Test Runner _`. Setting the variable to - ``false`` will skip querying the API and disable code coverage - collection and test skipping. + Configures the ``CIVisibility`` service to query the Datadog API to decide whether to enable the Datadog `Test + Impact Analysis `_ (formerly Intelligent Test + Runner). Setting the variable to ``false`` will skip querying the API and disable code coverage collection and + test skipping. version_added: v1.13.0: @@ -591,6 +591,22 @@ Test Visibility version_added: v2.16.0: + DD_PYTEST_USE_NEW_PLUGIN_BETA: + type: Boolean + default: False + + description: | + Configures the ``CIVisibility`` service to use a beta release of the new version of the pytest plugin, + supporting `Auto Test Retries `_, + `Early Flake Detection `_, and + improved coverage collection for `Test Impact Analysis + `_. This version of the plugin will become the default in + the future. See the `release notes for v2.18.0 `_ + for more information. + + version_added: + v2.18.0: + DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS: type: Integer default: 500 diff --git a/docs/index.rst b/docs/index.rst index 2435da88217..3d19a4fbf14 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -52,6 +52,8 @@ contacting support. +--------------------------------------------------+---------------+----------------+ | :ref:`algoliasearch` | >= 2.5.0 | Yes | +--------------------------------------------------+---------------+----------------+ +| :ref:`anthropic` | >= 0.28.0 | Yes | ++--------------------------------------------------+---------------+----------------+ | :ref:`aredis` | \* | Yes | +--------------------------------------------------+---------------+----------------+ | :ref:`asgi` | >= 3.0 | No | @@ -172,6 +174,8 @@ contacting support. +--------------------------------------------------+---------------+----------------+ | :ref:`urllib3` | >= 1.25.8 | No | +--------------------------------------------------+---------------+----------------+ +| :ref:`vertexai` | >= 1.71.1 | Yes | ++--------------------------------------------------+---------------+----------------+ | :ref:`vertica` | >= 0.6 | Yes | +--------------------------------------------------+---------------+----------------+ | :ref:`wsgi` | \* | No | diff --git a/docs/integrations.rst b/docs/integrations.rst index 04a94007626..62e096aa668 100644 --- a/docs/integrations.rst +++ b/docs/integrations.rst @@ -55,6 +55,13 @@ aiohttp_jinja2 .. automodule:: ddtrace.contrib.aiohttp_jinja2 +.. _anthropic: + +anthropic +^^^^^^^^^^^^^^ +.. automodule:: ddtrace.contrib.anthropic + + .. _asyncio: asyncio @@ -481,7 +488,7 @@ urllib3 .. _vertexai: vertexai -^^^^^^^^^^^^^^^^^^^ +^^^^^^^^ .. automodule:: ddtrace.contrib.vertexai diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index 6bfa3f90bc1..c9cc13a5a9e 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -9,6 +9,8 @@ aioredis algolia algoliasearch analytics +anthropic +Anthropic AnyCallable api app diff --git a/hatch.toml b/hatch.toml index 614054dbfed..0baca1fd235 100644 --- a/hatch.toml +++ b/hatch.toml @@ -471,7 +471,7 @@ pytest = ["~=6.0", "~=7.0"] [[envs.pytest_plugin_v2.matrix]] -python = ["3.9", "3.10", "3.12", "3.13"] +python = ["3.9", "3.10", "3.12"] pytest = ["~=6.0", "~=7.0", "~=8.0"] [envs.snapshot_viewer] diff --git a/pyproject.toml b/pyproject.toml index 3c83cfc5067..df5fbdcdbb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -175,6 +175,7 @@ exclude-modules = ''' | ddtrace.internal.coverage.instrumentation_py3_10 | ddtrace.internal.coverage.instrumentation_py3_11 | ddtrace.internal.coverage.instrumentation_py3_12 + | ddtrace.internal.coverage.instrumentation_py3_13 ) ''' @@ -203,12 +204,6 @@ test-command = ["python {project}/tests/smoke_test.py"] # Skip trying to test arm64 builds on Intel Macs test-skip = "*-macosx_universal2:arm64" -[tool.cibuildwheel.macos.environment] -# Workaround for Macos 11.0 versioning issue, a.k.a. -# `platform.mac_ver()` reports incorrect MacOS version at 11.0 -# See: https://stackoverflow.com/a/65402241 -SYSTEM_VERSION_COMPAT = "0" - [tool.ruff] exclude = [ ".riot", diff --git a/releasenotes/notes/313-enable-integrations-01990085769ea3f3.yaml b/releasenotes/notes/313-enable-integrations-01990085769ea3f3.yaml new file mode 100644 index 00000000000..cc3c4cc49ab --- /dev/null +++ b/releasenotes/notes/313-enable-integrations-01990085769ea3f3.yaml @@ -0,0 +1,17 @@ +--- +upgrade: + - | + Enables tests with Python 3.13 for the following integrations: + - aiomysql + - aiopg + - asyncpg + - avro + - confluent-kafka + - django + - falcon + - fastapi + - grpcio + - mysqldb + - protobuf + - pyodbc + - sqlalchemy diff --git a/releasenotes/notes/core_context_span_failsafe-8b2f2f5344689c1d.yaml b/releasenotes/notes/core_context_span_failsafe-8b2f2f5344689c1d.yaml new file mode 100644 index 00000000000..e4ef2651f64 --- /dev/null +++ b/releasenotes/notes/core_context_span_failsafe-8b2f2f5344689c1d.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + tracer: This fix resolves an issue where the core instrumentation could raise an uncaught exception. diff --git a/releasenotes/notes/django-cache-service-name-schematization-bef19b44b7414016.yaml b/releasenotes/notes/django-cache-service-name-schematization-bef19b44b7414016.yaml new file mode 100644 index 00000000000..0fbdb9993a5 --- /dev/null +++ b/releasenotes/notes/django-cache-service-name-schematization-bef19b44b7414016.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + tracing(django): Fixes issue where django cache is represented as a django service rather than the third party service. \ No newline at end of file diff --git a/releasenotes/notes/iast-fix-awsgi-368c173e1f012400.yaml b/releasenotes/notes/iast-fix-awsgi-368c173e1f012400.yaml new file mode 100644 index 00000000000..4d40945744a --- /dev/null +++ b/releasenotes/notes/iast-fix-awsgi-368c173e1f012400.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + ASGI: This fix resolves an issue parsing response cookies in FastAPI and awsgi diff --git a/releasenotes/notes/profiling-remove-getpid-from-memalloc-74f54043accdfc9e.yaml b/releasenotes/notes/profiling-remove-getpid-from-memalloc-74f54043accdfc9e.yaml new file mode 100644 index 00000000000..1680dba0673 --- /dev/null +++ b/releasenotes/notes/profiling-remove-getpid-from-memalloc-74f54043accdfc9e.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + profiling: Removed a system call from the memory allocation profiler, used to detect forks, + which ran on every allocation and resulted in a significant slowdown. diff --git a/riotfile.py b/riotfile.py index c674a97ac4b..a9b978195d0 100644 --- a/riotfile.py +++ b/riotfile.py @@ -608,15 +608,30 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT Venv( name="falcon", command="pytest {cmdargs} tests/contrib/falcon", - pys=select_pys(min_version="3.7", max_version="3.12"), pkgs={ - "falcon": [ - "~=3.0.0", - "~=3.0", # latest 3.x - latest, - ], "pytest-randomly": latest, }, + venvs=[ + Venv( + pys=select_pys(min_version="3.7", max_version="3.12"), + pkgs={ + "falcon": [ + "~=3.0.0", + "~=3.0", # latest 3.x + latest, + ], + }, + ), + Venv( + pys=select_pys(min_version="3.13"), + pkgs={ + "falcon": [ + "~=4.0", # latest 4.x + latest, + ], + }, + ), + ], ), Venv( name="bottle", @@ -831,7 +846,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( # django started supporting psycopg3 in 4.2 for versions >3.1.8 - pys=select_pys(min_version="3.8", max_version="3.12"), + pys=select_pys(min_version="3.8", max_version="3.13"), pkgs={ "django": ["~=4.2"], "psycopg": latest, @@ -1334,15 +1349,22 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT command="pytest {cmdargs} tests/contrib/sqlalchemy", pkgs={ "pytest-randomly": latest, - "greenlet": "==3.0.3", + "psycopg2-binary": latest, + "mysql-connector-python": latest, + "sqlalchemy": latest, }, venvs=[ Venv( pys=select_pys(min_version="3.7", max_version="3.12"), pkgs={ + "greenlet": "==3.0.3", "sqlalchemy": ["~=1.3.0", latest], - "psycopg2-binary": latest, - "mysql-connector-python": latest, + }, + ), + Venv( + pys=select_pys(min_version="3.12"), + pkgs={ + "greenlet": "==3.1.0", }, ), ], @@ -1573,7 +1595,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT name="fastapi", command="pytest {cmdargs} tests/contrib/fastapi", pkgs={ - "httpx": latest, + "httpx": "<=0.27.2", "pytest-asyncio": "==0.21.1", "python-multipart": latest, "pytest-randomly": latest, @@ -1587,20 +1609,32 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( # fastapi added support for Python 3.11 in 0.86.0 - pys=select_pys(min_version="3.11", max_version="3.12"), + pys=select_pys(min_version="3.11"), pkgs={"fastapi": ["~=0.86.0", latest], "anyio": ">=3.4.0,<4.0"}, ), ], ), Venv( name="aiomysql", - pys=select_pys(min_version="3.7", max_version="3.12"), command="pytest {cmdargs} tests/contrib/aiomysql", - pkgs={ - "pytest-randomly": latest, - "pytest-asyncio": "==0.21.1", - "aiomysql": ["~=0.1.0", latest], - }, + venvs=[ + Venv( + pys=select_pys(min_version="3.7", max_version="3.12"), + pkgs={ + "pytest-randomly": latest, + "pytest-asyncio": "==0.21.1", + "aiomysql": ["~=0.1.0", latest], + }, + ), + Venv( + pys=select_pys(min_version="3.13"), + pkgs={ + "pytest-randomly": latest, + "pytest-asyncio": latest, + "aiomysql": ["~=0.1.0", latest], + }, + ), + ], ), Venv( name="pytest", @@ -1610,7 +1644,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT }, env={ "DD_AGENT_PORT": "9126", - "DD_PYTEST_USE_NEW_PLUGIN_BETA": "0", + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "1", }, venvs=[ Venv( @@ -1637,6 +1671,18 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT "pytest": ["~=7.0", latest], "pytest-cov": "==2.12.0", }, + venvs=[ + Venv( + env={ + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "0", + }, + ), + Venv( + env={ + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "1", + }, + ), + ], ), ], ), @@ -1653,6 +1699,18 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT "more_itertools": "<8.11.0", "httpx": latest, }, + venvs=[ + Venv( + env={ + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "0", + }, + ), + Venv( + env={ + "DD_PYTEST_USE_NEW_PLUGIN_BETA": "1", + }, + ), + ], ), ], ), @@ -1697,6 +1755,11 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT "msgpack": latest, "more_itertools": "<8.11.0", "pytest-randomly": latest, + "pytest-bdd": [ + ">=4.0,<5.0", + # FIXME: add support for v6.1 + ">=6.0,<6.1", + ], }, venvs=[ Venv( @@ -1725,7 +1788,6 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT pys=select_pys(min_version="3.10", max_version="3.12"), pkgs={ "pytest-bdd": [ - ">=4.0,<5.0", # FIXME: add support for v6.1 ">=6.0,<6.1", ] @@ -1803,12 +1865,19 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( # grpcio added support for Python 3.12 in 1.59 - pys=select_pys(min_version="3.12", max_version="3.12"), + pys="3.12", pkgs={ "grpcio": ["~=1.59.0", latest], "pytest-asyncio": "==0.23.7", }, ), + Venv( + # grpcio added support for Python 3.13 in 1.66.2 + pys=select_pys(min_version="3.13"), + pkgs={ + "grpcio": ["~=1.66.2", latest], + }, + ), ], ), Venv( @@ -2005,7 +2074,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT }, venvs=[ Venv( - pys=select_pys(min_version="3.7", max_version="3.12"), + pys=select_pys(min_version="3.7"), pkgs={ "aiopg": ["~=1.0", "~=1.4.0"], }, @@ -2163,7 +2232,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( name="avro", - pys=select_pys(min_version="3.7", max_version="3.12"), + pys=select_pys(min_version="3.7"), command="pytest {cmdargs} tests/contrib/avro", pkgs={ "avro": latest, @@ -2173,7 +2242,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT Venv( name="protobuf", command="pytest {cmdargs} tests/contrib/protobuf", - pys=select_pys(min_version="3.8", max_version="3.12"), + pys=select_pys(min_version="3.8"), pkgs={ "protobuf": latest, "pytest-randomly": latest, @@ -2325,7 +2394,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT pkgs={"asyncpg": ["~=0.27", latest]}, ), Venv( - pys=select_pys(min_version="3.12", max_version="3.12"), + pys=select_pys(min_version="3.12"), pkgs={"asyncpg": [latest]}, ), ], @@ -2560,7 +2629,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT ), Venv( # pyodbc added support for Python 3.11 in 4.0.35 - pys=select_pys(min_version="3.11", max_version="3.12"), + pys=select_pys(min_version="3.11"), pkgs={"pyodbc": [latest]}, ), ], @@ -2646,6 +2715,10 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT pys=select_pys(min_version="3.9", max_version="3.12"), pkgs={"mysqlclient": ["~=2.1", latest]}, ), + Venv( + pys=select_pys(min_version="3.13"), + pkgs={"mysqlclient": "==2.2.6"}, + ), ], ), Venv( @@ -2823,7 +2896,7 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT pkgs={"confluent-kafka": ["~=1.9.2", latest]}, ), # confluent-kafka added support for Python 3.11 in 2.0.2 - Venv(pys=select_pys(min_version="3.11", max_version="3.12"), pkgs={"confluent-kafka": latest}), + Venv(pys=select_pys(min_version="3.11"), pkgs={"confluent-kafka": latest}), ], ), ], diff --git a/scripts/freshvenvs.py b/scripts/freshvenvs.py index 13cd81a6fcc..22fa848e21d 100644 --- a/scripts/freshvenvs.py +++ b/scripts/freshvenvs.py @@ -123,7 +123,7 @@ def _get_updatable_packages_implementing(modules: typing.Set[str]) -> typing.Set if not _venv_sets_latest_for_package(v, package): pinned_packages.add(package) - packages = {m for m in modules if "." not in m} + packages = {m for m in modules if "." not in m and m not in pinned_packages} return packages diff --git a/templates/integration/__init__.py b/templates/integration/__init__.py index 1fb943b8226..ef19d262e58 100644 --- a/templates/integration/__init__.py +++ b/templates/integration/__init__.py @@ -40,15 +40,10 @@ myfoo = foo.Foo() Pin.override(myfoo, service="myfoo") """ -from ...internal.utils.importlib import require_modules +from .patch import get_version +from .patch import patch +from .patch import unpatch -required_modules = ["foo"] -with require_modules(required_modules) as missing_modules: - if not missing_modules: - from .patch import get_version - from .patch import patch - from .patch import unpatch - - __all__ = ["patch", "unpatch", "get_version"] +__all__ = ["patch", "unpatch", "get_version"] diff --git a/tests/appsec/appsec/test_asm_standalone.py b/tests/appsec/appsec/test_asm_standalone.py index 6841314cea8..3c2ed58caf6 100644 --- a/tests/appsec/appsec/test_asm_standalone.py +++ b/tests/appsec/appsec/test_asm_standalone.py @@ -138,8 +138,6 @@ def test_appsec_standalone_apm_enabled_metric(tracer_appsec_standalone): or args.get("iast_enabled", None) or args.get("DD_APPSEC_SCA_ENABLED", "0") == "1" ): - assert tracer._apm_opt_out is True assert span.get_metric("_dd.apm.enabled") == 0.0 else: - assert tracer._apm_opt_out is False assert span.get_metric("_dd.apm.enabled") is None diff --git a/tests/appsec/contrib_appsec/utils.py b/tests/appsec/contrib_appsec/utils.py index 0d195df764e..315caa49a5d 100644 --- a/tests/appsec/contrib_appsec/utils.py +++ b/tests/appsec/contrib_appsec/utils.py @@ -88,8 +88,6 @@ def check_rules_triggered(self, rule_id: List[str], root_span): assert result == rule_id, f"result={result}, expected={rule_id}" def update_tracer(self, interface): - interface.tracer._asm_enabled = asm_config._asm_enabled - interface.tracer._iast_enabled = asm_config._iast_enabled interface.tracer.configure(api_version="v0.4") assert asm_config._asm_libddwaf_available # Only for tests diagnostics diff --git a/tests/appsec/utils.py b/tests/appsec/utils.py index 9e09b3ae2ad..9df1065f005 100644 --- a/tests/appsec/utils.py +++ b/tests/appsec/utils.py @@ -6,7 +6,6 @@ from ddtrace._trace.span import Span from ddtrace.ext import SpanTypes import ddtrace.internal.core as core -from ddtrace.settings.asm import config as asm_config from tests.utils import override_global_config @@ -35,8 +34,6 @@ def asm_context( with override_global_config(config) if config else contextlib.nullcontext(): if tracer is None: tracer = default_tracer - if asm_config._asm_enabled: - tracer._asm_enabled = True if config: tracer.configure(api_version="v0.4") diff --git a/tests/contrib/asgi/test_asgi.py b/tests/contrib/asgi/test_asgi.py index 40935990fc2..c1e1f1c7328 100644 --- a/tests/contrib/asgi/test_asgi.py +++ b/tests/contrib/asgi/test_asgi.py @@ -1,5 +1,6 @@ import asyncio from functools import partial +import logging import os import random @@ -10,6 +11,7 @@ from ddtrace.constants import ERROR_MSG from ddtrace.contrib.asgi import TraceMiddleware from ddtrace.contrib.asgi import span_from_scope +from ddtrace.contrib.internal.asgi.middleware import _parse_response_cookies from ddtrace.propagation import http as http_propagation from tests.conftest import DEFAULT_DDTRACE_SUBPROCESS_TEST_SERVICE_NAME from tests.utils import DummyTracer @@ -634,6 +636,52 @@ async def test_tasks_asgi_without_more_body(scope, tracer, test_spans): assert request_span.duration < 1 +@pytest.mark.asyncio +async def test_request_parse_response_cookies(tracer, test_spans, caplog): + """ + Regression test https://github.com/DataDog/dd-trace-py/issues/11818 + """ + + async def tasks_cookies(scope, receive, send): + message = await receive() + if message.get("type") == "http.request": + await send({"type": "http.response.start", "status": 200, "headers": [[b"set-cookie", b"test_cookie"]]}) + await send({"type": "http.response.body", "body": b"*"}) + await asyncio.sleep(1) + + with caplog.at_level(logging.DEBUG): + app = TraceMiddleware(tasks_cookies, tracer=tracer) + async with httpx.AsyncClient(app=app) as client: + response = await client.get("http://testserver/") + assert response.status_code == 200 + + assert "failed to extract response cookies" not in caplog.text + + +@pytest.mark.parametrize( + "headers,expected_result", + [ + ({}, {}), + ({"cookie": "cookie1=value1"}, {}), + ({"header-1": ""}, {}), + ({"Set-cookie": "cookie1=value1"}, {}), + ({"set-Cookie": "cookie1=value1"}, {}), + ({"SET-cookie": "cookie1=value1"}, {}), + ({"set-cookie": "a"}, {}), + ({"set-cookie": "1234"}, {}), + ({"set-cookie": "cookie1=value1"}, {"cookie1": "value1"}), + ({"set-cookie": "cookie2=value1=value2"}, {"cookie2": "value1=value2"}), + ({"set-cookie": "cookie3=="}, {"cookie3": "="}), + ], +) +def test__parse_response_cookies(headers, expected_result, caplog): + with caplog.at_level(logging.DEBUG): + result = _parse_response_cookies(headers) + + assert "failed to extract response cookies" not in caplog.text + assert result == expected_result + + @pytest.mark.asyncio async def test_tasks_asgi_with_more_body(scope, tracer, test_spans): """ diff --git a/tests/contrib/django/test_django.py b/tests/contrib/django/test_django.py index cf44ed6bcdd..1bd223539c9 100644 --- a/tests/contrib/django/test_django.py +++ b/tests/contrib/django/test_django.py @@ -30,6 +30,7 @@ from ddtrace.ext import http from ddtrace.ext import user from ddtrace.internal.compat import ensure_text +from ddtrace.internal.schema import schematize_service_name from ddtrace.propagation._utils import get_wsgi_header from ddtrace.propagation.http import HTTP_HEADER_PARENT_ID from ddtrace.propagation.http import HTTP_HEADER_SAMPLING_PRIORITY @@ -769,6 +770,18 @@ def test_cache_get(test_spans): assert_dict_issuperset(span.get_tags(), expected_meta) +def test_cache_service_schematization(test_spans): + cache = django.core.cache.caches["default"] + + with override_config("django", dict(cache_service_name="test-cache-service")): + cache.get("missing_key") + spans = test_spans.get_spans() + assert spans + span = spans[0] + expected_service_name = schematize_service_name(config.django.cache_service_name) + assert span.service == expected_service_name + + def test_cache_get_rowcount_existing_key(test_spans): # get the default cache cache = django.core.cache.caches["default"] diff --git a/tests/contrib/django/test_django_appsec.py b/tests/contrib/django/test_django_appsec.py index fb262918a56..3c5cb399739 100644 --- a/tests/contrib/django/test_django_appsec.py +++ b/tests/contrib/django/test_django_appsec.py @@ -47,8 +47,6 @@ def _aux_appsec_get_root_span( ): if cookies is None: cookies = {} - tracer._asm_enabled = asm_config._asm_enabled - tracer._iast_enabled = asm_config._iast_enabled # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") # Set cookies diff --git a/tests/contrib/django/test_django_appsec_iast.py b/tests/contrib/django/test_django_appsec_iast.py index 7e42e8aa903..ee5cb069331 100644 --- a/tests/contrib/django/test_django_appsec_iast.py +++ b/tests/contrib/django/test_django_appsec_iast.py @@ -14,7 +14,6 @@ from ddtrace.appsec._iast.constants import VULN_INSECURE_COOKIE from ddtrace.appsec._iast.constants import VULN_SQL_INJECTION from ddtrace.internal.compat import urlencode -from ddtrace.settings.asm import config as asm_config from tests.appsec.iast.iast_utils import get_line_and_hash from tests.utils import override_env from tests.utils import override_global_config @@ -66,8 +65,6 @@ def _aux_appsec_get_root_span( ): if cookies is None: cookies = {} - tracer._asm_enabled = asm_config._asm_enabled - tracer._iast_enabled = asm_config._iast_enabled # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") # Set cookies diff --git a/tests/contrib/djangorestframework/test_appsec.py b/tests/contrib/djangorestframework/test_appsec.py index cf2985f32f3..68489f99be0 100644 --- a/tests/contrib/djangorestframework/test_appsec.py +++ b/tests/contrib/djangorestframework/test_appsec.py @@ -11,7 +11,6 @@ @pytest.mark.skipif(django.VERSION < (1, 10), reason="requires django version >= 1.10") def test_djangorest_request_body_urlencoded(client, test_spans, tracer): with override_global_config(dict(_asm_enabled=True)): - tracer._asm_enabled = True # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") payload = urlencode({"mytestingbody_key": "mytestingbody_value"}) diff --git a/tests/contrib/falcon/app/resources.py b/tests/contrib/falcon/app/resources.py index 74bb5b2a2e3..0b6df3bfaa5 100644 --- a/tests/contrib/falcon/app/resources.py +++ b/tests/contrib/falcon/app/resources.py @@ -1,5 +1,11 @@ import falcon +from ddtrace.internal.utils.version import parse_version + + +FALCON_VERSION = parse_version(falcon.__version__) +TEXT_ATTR = "text" if FALCON_VERSION >= (3, 0, 0) else "body" + class Resource200(object): """Throw a handled exception here to ensure our use of @@ -13,26 +19,26 @@ def on_get(self, req, resp, **kwargs): pass resp.status = falcon.HTTP_200 - resp.body = "Success" + setattr(resp, TEXT_ATTR, "Success") resp.append_header("my-response-header", "my_response_value") class DynamicURIResource(object): def on_get(self, req, resp, name): resp.status = falcon.HTTP_200 - resp.body = name + setattr(resp, TEXT_ATTR, name) class Resource201(object): def on_post(self, req, resp, **kwargs): resp.status = falcon.HTTP_201 - resp.body = "Success" + setattr(resp, TEXT_ATTR, "Success") class Resource500(object): def on_get(self, req, resp, **kwargs): resp.status = falcon.HTTP_500 - resp.body = "Failure" + setattr(resp, TEXT_ATTR, "Failure") class ResourceException(object): diff --git a/tests/contrib/fastapi/test_fastapi_appsec.py b/tests/contrib/fastapi/test_fastapi_appsec.py index 69284807d09..d2f1b6492f9 100644 --- a/tests/contrib/fastapi/test_fastapi_appsec.py +++ b/tests/contrib/fastapi/test_fastapi_appsec.py @@ -9,7 +9,6 @@ def _aux_appsec_prepare_tracer(tracer, asm_enabled=True): - tracer._asm_enabled = asm_enabled # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") diff --git a/tests/contrib/fastapi/test_fastapi_appsec_iast.py b/tests/contrib/fastapi/test_fastapi_appsec_iast.py index 1a5db995af4..980a1297a69 100644 --- a/tests/contrib/fastapi/test_fastapi_appsec_iast.py +++ b/tests/contrib/fastapi/test_fastapi_appsec_iast.py @@ -39,7 +39,6 @@ def _aux_appsec_prepare_tracer(tracer): patch_sqlite_sqli() oce.reconfigure() - tracer._iast_enabled = True # Hack: need to pass an argument to configure so that the processors are recreated tracer.configure(api_version="v0.4") diff --git a/tests/contrib/flask/test_flask_appsec.py b/tests/contrib/flask/test_flask_appsec.py index 82433e63b64..7fd045c61f2 100644 --- a/tests/contrib/flask/test_flask_appsec.py +++ b/tests/contrib/flask/test_flask_appsec.py @@ -30,7 +30,6 @@ def setUp(self): patch() def _aux_appsec_prepare_tracer(self, appsec_enabled=True): - self.tracer._asm_enabled = appsec_enabled # Hack: need to pass an argument to configure so that the processors are recreated self.tracer.configure(api_version="v0.4") diff --git a/tests/contrib/flask/test_flask_appsec_iast.py b/tests/contrib/flask/test_flask_appsec_iast.py index 238d0630549..94948bde0b2 100644 --- a/tests/contrib/flask/test_flask_appsec_iast.py +++ b/tests/contrib/flask/test_flask_appsec_iast.py @@ -48,9 +48,7 @@ def setUp(self): patch_header_injection() patch_json() - self.tracer._iast_enabled = True - self.tracer._asm_enabled = True - self.tracer.configure(api_version="v0.4") + self.tracer.configure(api_version="v0.4", appsec_enabled=True, iast_enabled=True) oce.reconfigure() @pytest.mark.skipif(not python_supported_by_iast(), reason="Python version not supported by IAST") @@ -1381,8 +1379,6 @@ def setUp(self): ) ): super(FlaskAppSecIASTDisabledTestCase, self).setUp() - self.tracer._iast_enabled = False - self.tracer._asm_enabled = False self.tracer.configure(api_version="v0.4") @pytest.mark.skipif(not python_supported_by_iast(), reason="Python version not supported by IAST") diff --git a/tests/contrib/flask/test_flask_appsec_telemetry.py b/tests/contrib/flask/test_flask_appsec_telemetry.py index 499d806f56f..df21a2b508b 100644 --- a/tests/contrib/flask/test_flask_appsec_telemetry.py +++ b/tests/contrib/flask/test_flask_appsec_telemetry.py @@ -16,7 +16,6 @@ def inject_fixtures(self, telemetry_writer): # noqa: F811 self.telemetry_writer = telemetry_writer def _aux_appsec_prepare_tracer(self, appsec_enabled=True): - self.tracer._asm_enabled = appsec_enabled # Hack: need to pass an argument to configure so that the processors are recreated self.tracer.configure(api_version="v0.4") diff --git a/tests/contrib/kafka/test_kafka.py b/tests/contrib/kafka/test_kafka.py index d49f85f26b2..9d2786151da 100644 --- a/tests/contrib/kafka/test_kafka.py +++ b/tests/contrib/kafka/test_kafka.py @@ -37,6 +37,7 @@ SNAPSHOT_IGNORES = [ "metrics.kafka.message_offset", "meta.error.stack", + "meta.error.message", "meta.messaging.kafka.bootstrap.servers", "meta.peer.service", ] diff --git a/tests/contrib/pytest/test_pytest_quarantine.py b/tests/contrib/pytest/test_pytest_quarantine.py index 93e7fe5dbde..93b0b07eade 100644 --- a/tests/contrib/pytest/test_pytest_quarantine.py +++ b/tests/contrib/pytest/test_pytest_quarantine.py @@ -183,6 +183,8 @@ def test_quarantine_outcomes_without_atr(self): ("teardown", "passed"), ] + assert len(rec.getcalls("pytest_pyfunc_call")) == 1 + def test_quarantine_outcomes_with_atr(self): self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) @@ -211,6 +213,8 @@ def test_quarantine_outcomes_with_atr(self): ("teardown", "passed"), ] + assert len(rec.getcalls("pytest_pyfunc_call")) == 6 + def test_quarantine_fail_setup(self): self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_SETUP_QUARANTINED) @@ -222,7 +226,7 @@ def test_quarantine_fail_setup(self): assert len(self.pop_spans()) > 0 def test_quarantine_fail_teardown(self): - self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_SETUP_QUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_TEARDOWN_QUARANTINED) rec = self.inline_run("--ddtrace", "-q") @@ -292,3 +296,149 @@ def test_quarantine_spans_with_atr(self): [test_span_pass_quarantined] = _get_spans_from_list(spans, "test", "test_pass_quarantined") assert test_span_pass_quarantined.get_tag("test.quarantine.is_quarantined") == "true" assert test_span_pass_quarantined.get_tag("test.status") == "pass" + + +class PytestQuarantineSkippingTestCase(PytestTestCaseBase): + @pytest.fixture(autouse=True, scope="function") + def set_up_quarantine(self): + with mock.patch( + "ddtrace.internal.ci_visibility.recorder.CIVisibility._check_enabled_features", + return_value=TestVisibilityAPISettings( + quarantine=QuarantineSettings(enabled=True, skip_quarantined_tests=True), + flaky_test_retries_enabled=False, + ), + ): + yield + + def test_fail_quarantined_no_ddtrace_does_not_quarantine(self): + self.testdir.makepyfile(test_pass_quarantined=_TEST_PASS_QUARANTINED) + self.testdir.makepyfile(test_pass_normal=_TEST_PASS_UNQUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + self.testdir.makepyfile(test_fail_normal=_TEST_FAIL_UNQUARANTINED) + rec = self.inline_run("-q") + assert rec.ret == 1 + assert_stats(rec, passed=2, failed=2) + assert len(self.pop_spans()) == 0 # ddtrace disabled, not collecting traces + + def test_fail_quarantined_with_ddtrace_does_not_fail_session(self): + self.testdir.makepyfile(test_pass_quarantined=_TEST_PASS_QUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=2) + + assert len(self.pop_spans()) > 0 + + def test_failing_and_passing_quarantined_and_unquarantined_tests(self): + self.testdir.makepyfile(test_pass_quarantined=_TEST_PASS_QUARANTINED) + self.testdir.makepyfile(test_pass_normal=_TEST_PASS_UNQUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + self.testdir.makepyfile(test_fail_normal=_TEST_FAIL_UNQUARANTINED) + + rec = self.inline_run("--ddtrace", "-q") + assert rec.ret == 1 + assert_stats(rec, quarantined=2, passed=1, failed=1) + + assert len(self.pop_spans()) > 0 + + def test_quarantine_outcomes_without_atr(self): + return self._test_quarantine_outcomes(atr_enabled=False) + + def test_quarantine_outcomes_with_atr(self): + return self._test_quarantine_outcomes(atr_enabled=True) + + def _test_quarantine_outcomes(self, atr_enabled): + # ATR should not retry tests skipped by quarantine. + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + + with mock.patch( + "ddtrace.internal.ci_visibility.recorder.CIVisibility._check_enabled_features", + return_value=TestVisibilityAPISettings( + quarantine=QuarantineSettings(enabled=True, skip_quarantined_tests=True), + flaky_test_retries_enabled=atr_enabled, + ), + ): + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=1) + + outcomes = [(call.report.when, call.report.outcome) for call in rec.getcalls("pytest_report_teststatus")] + assert outcomes == [ + ("setup", "skipped"), + ("teardown", "passed"), + ] + + assert len(rec.getcalls("pytest_pyfunc_call")) == 0 # test function is not called + + def test_quarantine_fail_setup(self): + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_SETUP_QUARANTINED) + + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=1) + + assert len(self.pop_spans()) > 0 + + def test_quarantine_fail_teardown(self): + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_TEARDOWN_QUARANTINED) + + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=1) + + assert len(self.pop_spans()) > 0 + + def test_quarantine_skipping_spans_atr_disabled(self): + return self._test_quarantine_skipping_spans(atr_enabled=False) + + def test_quarantine_skipping_spans_atr_enabled(self): + return self._test_quarantine_skipping_spans(atr_enabled=True) + + def _test_quarantine_skipping_spans(self, atr_enabled): + # ATR should not affect spans for skipped quarantined tests. + self.testdir.makepyfile(test_pass_quarantined=_TEST_PASS_QUARANTINED) + self.testdir.makepyfile(test_fail_quarantined=_TEST_FAIL_QUARANTINED) + self.testdir.makepyfile(test_fail_setup_quarantined=_TEST_FAIL_SETUP_QUARANTINED) + self.testdir.makepyfile(test_fail_teardown_quarantined=_TEST_FAIL_TEARDOWN_QUARANTINED) + + with mock.patch( + "ddtrace.internal.ci_visibility.recorder.CIVisibility._check_enabled_features", + return_value=TestVisibilityAPISettings( + quarantine=QuarantineSettings(enabled=True, skip_quarantined_tests=True), + flaky_test_retries_enabled=atr_enabled, + ), + ): + rec = self.inline_run("--ddtrace", "-q") + + assert rec.ret == 0 + assert_stats(rec, quarantined=4) + + spans = self.pop_spans() + + [session_span] = _get_spans_from_list(spans, "session") + assert session_span.get_tag("test_session.quarantine.enabled") == "true" + + [module_span] = _get_spans_from_list(spans, "module") + [suite_span_fail_quarantined] = _get_spans_from_list(spans, "suite", "test_fail_quarantined.py") + [suite_span_pass_quarantined] = _get_spans_from_list(spans, "suite", "test_pass_quarantined.py") + + [test_span_fail_quarantined] = _get_spans_from_list(spans, "test", "test_fail_quarantined") + assert test_span_fail_quarantined.get_tag("test.quarantine.is_quarantined") == "true" + assert test_span_fail_quarantined.get_tag("test.status") == "skip" + + [test_span_pass_quarantined] = _get_spans_from_list(spans, "test", "test_pass_quarantined") + assert test_span_pass_quarantined.get_tag("test.quarantine.is_quarantined") == "true" + assert test_span_pass_quarantined.get_tag("test.status") == "skip" + + [test_span_fail_setup] = _get_spans_from_list(spans, "test", "test_fail_setup") + assert test_span_fail_setup.get_tag("test.quarantine.is_quarantined") == "true" + assert test_span_fail_setup.get_tag("test.status") == "skip" + + [test_span_fail_teardown] = _get_spans_from_list(spans, "test", "test_fail_teardown") + assert test_span_fail_teardown.get_tag("test.quarantine.is_quarantined") == "true" + assert test_span_fail_teardown.get_tag("test.status") == "skip" diff --git a/tests/contrib/requests/test_requests_distributed.py b/tests/contrib/requests/test_requests_distributed.py index bda32171f6b..b3974700f87 100644 --- a/tests/contrib/requests/test_requests_distributed.py +++ b/tests/contrib/requests/test_requests_distributed.py @@ -1,6 +1,7 @@ from requests_mock import Adapter from ddtrace import config +from ddtrace.settings.asm import config as asm_config from tests.utils import TracerTestCase from tests.utils import get_128_bit_trace_id_from_headers @@ -117,47 +118,48 @@ def matcher(request): def test_propagation_apm_opt_out_true(self): # ensure distributed tracing works when APM is opted out - self.tracer._apm_opt_out = True - self.tracer.enabled = False + with self.override_global_config(dict(_appsec_standalone_enabled=True, _asm_enabled=True)): + assert asm_config._apm_opt_out + self.tracer.enabled = False + cfg = config.get_from(self.session) + cfg["distributed_tracing"] = True + adapter = Adapter() + self.session.mount("mock", adapter) - cfg = config.get_from(self.session) - cfg["distributed_tracing"] = True - adapter = Adapter() - self.session.mount("mock", adapter) + with self.tracer.trace("root") as root: - with self.tracer.trace("root") as root: + def matcher(request): + return self.headers_not_here(self.tracer, request) - def matcher(request): - return self.headers_here(self.tracer, request, root) + adapter.register_uri("GET", "mock://datadog/foo", additional_matcher=matcher, text="bar") + resp = self.session.get("mock://datadog/foo") + assert 200 == resp.status_code + assert "bar" == resp.text - adapter.register_uri("GET", "mock://datadog/foo", additional_matcher=matcher, text="bar") - resp = self.session.get("mock://datadog/foo") - assert 200 == resp.status_code - assert "bar" == resp.text - - spans = self.pop_spans() - root, req = spans - assert "root" == root.name - assert "requests.request" == req.name - assert root.trace_id == req.trace_id - assert root.span_id == req.parent_id + spans = self.pop_spans() + root, req = spans + assert "root" == root.name + assert "requests.request" == req.name + assert root.trace_id == req.trace_id + assert root.span_id == req.parent_id def test_propagation_apm_opt_out_false(self): # ensure distributed tracing doesn't works when APM is disabled but not opted out - self.tracer._apm_opt_out = False - self.tracer.enabled = False + with self.override_global_config(dict(_appsec_standalone_enabled=False, _asm_enabled=True)): + assert not asm_config._apm_opt_out + self.tracer.enabled = False - cfg = config.get_from(self.session) - cfg["distributed_tracing"] = True - adapter = Adapter() - self.session.mount("mock", adapter) + cfg = config.get_from(self.session) + cfg["distributed_tracing"] = True + adapter = Adapter() + self.session.mount("mock", adapter) - with self.tracer.trace("root"): + with self.tracer.trace("root"): - def matcher(request): - return self.headers_not_here(self.tracer, request) + def matcher(request): + return self.headers_not_here(self.tracer, request) - adapter.register_uri("GET", "mock://datadog/foo", additional_matcher=matcher, text="bar") - resp = self.session.get("mock://datadog/foo") - assert 200 == resp.status_code - assert "bar" == resp.text + adapter.register_uri("GET", "mock://datadog/foo", additional_matcher=matcher, text="bar") + resp = self.session.get("mock://datadog/foo") + assert 200 == resp.status_code + assert "bar" == resp.text diff --git a/tests/contrib/urllib3/test_urllib3.py b/tests/contrib/urllib3/test_urllib3.py index 8aa92a4dfb0..2f0c447ee65 100644 --- a/tests/contrib/urllib3/test_urllib3.py +++ b/tests/contrib/urllib3/test_urllib3.py @@ -532,7 +532,6 @@ def test_distributed_tracing_apm_opt_out_true(self): # Check that distributed tracing headers are passed down; raise an error rather than make the # request since we don't care about the response at all config.urllib3["distributed_tracing"] = True - self.tracer._apm_opt_out = True self.tracer.enabled = False with mock.patch( "urllib3.connectionpool.HTTPConnectionPool._make_request", side_effect=ValueError @@ -580,7 +579,6 @@ def test_distributed_tracing_apm_opt_out_true(self): def test_distributed_tracing_apm_opt_out_false(self): """Test with distributed tracing disabled does not propagate the headers""" config.urllib3["distributed_tracing"] = True - self.tracer._apm_opt_out = False self.tracer.enabled = False with mock.patch( "urllib3.connectionpool.HTTPConnectionPool._make_request", side_effect=ValueError diff --git a/tests/opentelemetry/test_span.py b/tests/opentelemetry/test_span.py index 8909f3db07f..24b2f1524f3 100644 --- a/tests/opentelemetry/test_span.py +++ b/tests/opentelemetry/test_span.py @@ -119,8 +119,9 @@ def test_otel_span_status_with_status_obj(oteltracer, caplog): assert errspan_dup_des._ddspan.error == 1 assert errspan_dup_des._ddspan.get_tag("error.message") in "main otel err message" assert ( - "Description ot_duplicate_message ignored. Use either `Status` or `(StatusCode, Description)`" - in caplog.text + "Conflicting descriptions detected. The following description will not be set " + "on the otel-error-dup-description span: ot_duplicate_message. Ensure `Span.set_status(...)` " + "is called with `(Status(status_code, description), None)` or `(status_code, description)`" in caplog.text ) with oteltracer.start_span("set-status-on-otel-span") as span1: diff --git a/tests/profiling_v2/collector/test_memalloc.py b/tests/profiling_v2/collector/test_memalloc.py index 2787507bdce..881a64a162c 100644 --- a/tests/profiling_v2/collector/test_memalloc.py +++ b/tests/profiling_v2/collector/test_memalloc.py @@ -1,7 +1,10 @@ import os +import threading -from ddtrace.profiling import Profiler -from ddtrace.settings.profiling import config +import pytest + +from ddtrace.internal.datadog.profiling import ddup +from ddtrace.profiling.collector import memalloc from tests.profiling.collector import pprof_utils @@ -9,12 +12,22 @@ def _allocate_1k(): return [object() for _ in range(1000)] -def test_heap_samples_collected(tmp_path, monkeypatch): +_ALLOC_LINE_NUMBER = _allocate_1k.__code__.co_firstlineno + 1 + + +# This test is marked as subprocess as it changes default heap sample size +@pytest.mark.subprocess( + env=dict(DD_PROFILING_HEAP_SAMPLE_SIZE="1024", DD_PROFILING_OUTPUT_PPROF="/tmp/test_heap_samples_collected") +) +def test_heap_samples_collected(): + import os + + from ddtrace.profiling import Profiler + from tests.profiling.collector import pprof_utils + from tests.profiling_v2.collector.test_memalloc import _allocate_1k + # Test for https://github.com/DataDog/dd-trace-py/issues/11069 - test_name = "test_heap" - pprof_prefix = str(tmp_path / test_name) - monkeypatch.setattr(config, "output_pprof", pprof_prefix) - monkeypatch.setattr(config.heap, "sample_size", 1024) + pprof_prefix = os.environ["DD_PROFILING_OUTPUT_PPROF"] output_filename = pprof_prefix + "." + str(os.getpid()) p = Profiler() @@ -25,3 +38,92 @@ def test_heap_samples_collected(tmp_path, monkeypatch): profile = pprof_utils.parse_profile(output_filename) samples = pprof_utils.get_samples_with_value_type(profile, "heap-space") assert len(samples) > 0 + + +def test_memory_collector(tmp_path): + test_name = "test_memory_collector" + pprof_prefix = str(tmp_path / test_name) + output_filename = pprof_prefix + "." + str(os.getpid()) + + ddup.config( + service=test_name, + version="test", + env="test", + output_filename=pprof_prefix, + ) + ddup.start() + + mc = memalloc.MemoryCollector(None) + with mc: + _allocate_1k() + mc.periodic() + + ddup.upload() + + profile = pprof_utils.parse_profile(output_filename) + # Gets samples with alloc-space > 0 + samples = pprof_utils.get_samples_with_value_type(profile, "alloc-space") + + assert len(samples) > 0 + + alloc_samples_idx = pprof_utils.get_sample_type_index(profile, "alloc-samples") + for sample in samples: + # We also want to check 'alloc-samples' is > 0. + assert sample.value[alloc_samples_idx] > 0 + + # We also want to assert that there's a sample that's coming from _allocate_1k() + # And also assert that it's actually coming from _allocate_1k() + pprof_utils.assert_profile_has_sample( + profile, + samples, + expected_sample=pprof_utils.StackEvent( + thread_name="MainThread", + thread_id=threading.main_thread().ident, + locations=[ + pprof_utils.StackLocation( + function_name="_allocate_1k", filename="test_memalloc.py", line_no=_ALLOC_LINE_NUMBER + ) + ], + ), + ) + + +def test_memory_collector_ignore_profiler(tmp_path): + test_name = "test_memory_collector_ignore_profiler" + pprof_prefix = str(tmp_path / test_name) + output_filename = pprof_prefix + "." + str(os.getpid()) + + ddup.config( + service=test_name, + version="test", + env="test", + output_filename=pprof_prefix, + ) + ddup.start() + + mc = memalloc.MemoryCollector(None, ignore_profiler=True) + quit_thread = threading.Event() + + with mc: + + def alloc(): + _allocate_1k() + quit_thread.wait() + + alloc_thread = threading.Thread(name="allocator", target=alloc) + alloc_thread._ddtrace_profiling_ignore = True + alloc_thread.start() + + mc.periodic() + + # We need to wait for the data collection to happen so it gets the `_ddtrace_profiling_ignore` Thread attribute from + # the global thread list. + quit_thread.set() + alloc_thread.join() + + ddup.upload() + + try: + pprof_utils.parse_profile(output_filename) + except AssertionError as e: + assert "No samples found" in str(e) diff --git a/tests/tracer/test_tracer.py b/tests/tracer/test_tracer.py index 4cdcf876aba..cae00259086 100644 --- a/tests/tracer/test_tracer.py +++ b/tests/tracer/test_tracer.py @@ -2054,15 +2054,8 @@ def test_asm_standalone_configuration(sca_enabled, appsec_enabled, iast_enabled) ddtrace.config._reset() tracer = ddtrace.Tracer() tracer.configure(appsec_enabled=appsec_enabled, iast_enabled=iast_enabled, appsec_standalone_enabled=True) - if appsec_enabled: - assert tracer._asm_enabled is True - if iast_enabled: - assert tracer._iast_enabled is True if sca_enabled == "true": assert bool(ddtrace.config._sca_enabled) is True - - assert tracer._appsec_standalone_enabled is True - assert tracer._apm_opt_out is True assert tracer.enabled is False assert isinstance(tracer._sampler.limiter, RateLimiter)