From 89da5c92420177e88e1a2c975481a7abef2ede17 Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Mon, 1 Jan 2024 11:58:53 +0100 Subject: [PATCH 1/5] Upgrade markupsafe in tox tracecontext --- tox.ini | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index 646d3bb58e4..fdfcdf01244 100644 --- a/tox.ini +++ b/tox.ini @@ -247,12 +247,9 @@ deps = # needed for tracecontext aiohttp~=3.6 # needed for example trace integration - flask~=1.1 + flask~=3.0 requests~=2.7 - # temporary fix. we should update the jinja, flask deps - # See https://github.com/pallets/markupsafe/issues/282 - # breaking change introduced in markupsafe causes jinja, flask to break - markupsafe==2.0.1 + markupsafe~=2.1 commands_pre = pip install -e {toxinidir}/opentelemetry-api \ From af2f1ef8ab8daeb25fe57dc4cf937728859b63d1 Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Mon, 1 Jan 2024 12:11:21 +0100 Subject: [PATCH 2/5] Upgrade markupsafe in tox docs, lint and tests --- dev-requirements.txt | 5 +---- docs-requirements.txt | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 613b5984c15..11adfa75665 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -10,10 +10,7 @@ sphinx-autodoc-typehints==1.25.2 pytest==7.1.3 pytest-cov==4.1.0 readme-renderer==42.0 -# temporary fix. we should update the jinja, flask deps -# See https://github.com/pallets/markupsafe/issues/282 -# breaking change introduced in markupsafe causes jinja, flask to break -markupsafe==2.0.1 +markupsafe==2.1.3 bleach==4.1.0 # This dependency was updated to a breaking version. codespell==2.1.0 requests==2.31.0 diff --git a/docs-requirements.txt b/docs-requirements.txt index dcbcd41bfa7..748f37dc86b 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -16,14 +16,11 @@ sphinx-jekyll-builder==0.3.0 grpcio~=1.27 Deprecated~=1.2 django~=4.2 -flask~=1.0 +flask~=3.0 opentracing~=2.2.0 thrift~=0.10 wrapt>=1.0.0,<2.0.0 -# temporary fix. we should update the jinja, flask deps -# See https://github.com/pallets/markupsafe/issues/282 -# breaking change introduced in markupsafe causes jinja, flask to break -markupsafe==2.0.1 +markupsafe~=2.0 # Jaeger generated protobufs do not currently support protobuf 4.x. This can be removed once # they're regenerated. From 3b27cbf0997cad76026105853fb361b8ec5184ec Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Mon, 1 Jan 2024 12:27:41 +0100 Subject: [PATCH 3/5] Upgrade markupsafe in fork-process-model examples --- .../flask-gunicorn/requirements.txt | 16 ++++++++-------- .../flask-uwsgi/requirements.txt | 16 ++++++++-------- docs/getting_started/tests/requirements.txt | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/examples/fork-process-model/flask-gunicorn/requirements.txt b/docs/examples/fork-process-model/flask-gunicorn/requirements.txt index 8f7a7bbf319..8a18f71c883 100644 --- a/docs/examples/fork-process-model/flask-gunicorn/requirements.txt +++ b/docs/examples/fork-process-model/flask-gunicorn/requirements.txt @@ -1,20 +1,20 @@ -click==7.1.2 -Flask==2.3.2 +click==8.1.7 +Flask==3.0.0 googleapis-common-protos==1.52.0 grpcio==1.56.0 gunicorn==20.0.4 -itsdangerous==1.1.0 -Jinja2==2.11.3 -MarkupSafe==1.1.1 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.3 opentelemetry-api==1.20.0 opentelemetry-exporter-otlp==1.20.0 opentelemetry-instrumentation==0.41b0 opentelemetry-instrumentation-flask==0.41b0 opentelemetry-instrumentation-wsgi==0.41b0 opentelemetry-sdk==1.20.0 -protobuf==3.18.3 +protobuf==3.19.4 six==1.15.0 thrift==0.13.0 uWSGI==2.0.22 -Werkzeug==2.2.3 -wrapt==1.12.1 +Werkzeug==3.0.1 +wrapt==1.16.0 diff --git a/docs/examples/fork-process-model/flask-uwsgi/requirements.txt b/docs/examples/fork-process-model/flask-uwsgi/requirements.txt index 8f7a7bbf319..8a18f71c883 100644 --- a/docs/examples/fork-process-model/flask-uwsgi/requirements.txt +++ b/docs/examples/fork-process-model/flask-uwsgi/requirements.txt @@ -1,20 +1,20 @@ -click==7.1.2 -Flask==2.3.2 +click==8.1.7 +Flask==3.0.0 googleapis-common-protos==1.52.0 grpcio==1.56.0 gunicorn==20.0.4 -itsdangerous==1.1.0 -Jinja2==2.11.3 -MarkupSafe==1.1.1 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.3 opentelemetry-api==1.20.0 opentelemetry-exporter-otlp==1.20.0 opentelemetry-instrumentation==0.41b0 opentelemetry-instrumentation-flask==0.41b0 opentelemetry-instrumentation-wsgi==0.41b0 opentelemetry-sdk==1.20.0 -protobuf==3.18.3 +protobuf==3.19.4 six==1.15.0 thrift==0.13.0 uWSGI==2.0.22 -Werkzeug==2.2.3 -wrapt==1.12.1 +Werkzeug==3.0.1 +wrapt==1.16.0 diff --git a/docs/getting_started/tests/requirements.txt b/docs/getting_started/tests/requirements.txt index c4c62067ac4..0aac6f4ceec 100644 --- a/docs/getting_started/tests/requirements.txt +++ b/docs/getting_started/tests/requirements.txt @@ -5,7 +5,7 @@ charset-normalizer==2.0.12 click==8.1.7 Deprecated==1.2.14 flaky==3.7.0 -Flask==2.0.1 +Flask==3.0.0 idna==3.4 importlib-metadata==6.8.0 iniconfig==2.0.0 @@ -22,6 +22,6 @@ requests==2.26.0 tomli==2.0.1 typing_extensions==4.8.0 urllib3==1.26.18 -Werkzeug==2.3.7 +Werkzeug==3.0.1 wrapt==1.15.0 zipp==3.17.0 From 77271e379618c92e2f5ca6d87de9f2304dabc7b6 Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Mon, 1 Jan 2024 19:47:20 +0100 Subject: [PATCH 4/5] Add changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f359c6b633f..89d8599419d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Upgrade markupsafe, Flask and related dependencies to dev and test + environments ([#3609](https://github.com/open-telemetry/opentelemetry-python/pull/3609)) + ## Version 1.22.0/0.43b0 (2023-12-15) - Prometheus exporter sanitize info metric ([#3572](https://github.com/open-telemetry/opentelemetry-python/pull/3572)) From b9c84a1ba231d7330844b611111646d2230970af Mon Sep 17 00:00:00 2001 From: Iuri de Silvio Date: Mon, 8 Jan 2024 19:37:55 +0100 Subject: [PATCH 5/5] Use Flask<3 --- docs-requirements.txt | 2 +- .../examples/fork-process-model/flask-gunicorn/requirements.txt | 2 +- docs/examples/fork-process-model/flask-uwsgi/requirements.txt | 2 +- docs/getting_started/tests/requirements.txt | 2 +- tox.ini | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs-requirements.txt b/docs-requirements.txt index 748f37dc86b..983fcddd8a4 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -16,7 +16,7 @@ sphinx-jekyll-builder==0.3.0 grpcio~=1.27 Deprecated~=1.2 django~=4.2 -flask~=3.0 +flask~=2.3 opentracing~=2.2.0 thrift~=0.10 wrapt>=1.0.0,<2.0.0 diff --git a/docs/examples/fork-process-model/flask-gunicorn/requirements.txt b/docs/examples/fork-process-model/flask-gunicorn/requirements.txt index 8a18f71c883..0323bd5c5eb 100644 --- a/docs/examples/fork-process-model/flask-gunicorn/requirements.txt +++ b/docs/examples/fork-process-model/flask-gunicorn/requirements.txt @@ -1,5 +1,5 @@ click==8.1.7 -Flask==3.0.0 +Flask==2.3.3 googleapis-common-protos==1.52.0 grpcio==1.56.0 gunicorn==20.0.4 diff --git a/docs/examples/fork-process-model/flask-uwsgi/requirements.txt b/docs/examples/fork-process-model/flask-uwsgi/requirements.txt index 8a18f71c883..0323bd5c5eb 100644 --- a/docs/examples/fork-process-model/flask-uwsgi/requirements.txt +++ b/docs/examples/fork-process-model/flask-uwsgi/requirements.txt @@ -1,5 +1,5 @@ click==8.1.7 -Flask==3.0.0 +Flask==2.3.3 googleapis-common-protos==1.52.0 grpcio==1.56.0 gunicorn==20.0.4 diff --git a/docs/getting_started/tests/requirements.txt b/docs/getting_started/tests/requirements.txt index 0aac6f4ceec..962008c6488 100644 --- a/docs/getting_started/tests/requirements.txt +++ b/docs/getting_started/tests/requirements.txt @@ -5,7 +5,7 @@ charset-normalizer==2.0.12 click==8.1.7 Deprecated==1.2.14 flaky==3.7.0 -Flask==3.0.0 +Flask==2.3.3 idna==3.4 importlib-metadata==6.8.0 iniconfig==2.0.0 diff --git a/tox.ini b/tox.ini index fdfcdf01244..efce521d42d 100644 --- a/tox.ini +++ b/tox.ini @@ -247,7 +247,7 @@ deps = # needed for tracecontext aiohttp~=3.6 # needed for example trace integration - flask~=3.0 + flask~=2.3 requests~=2.7 markupsafe~=2.1