Skip to contentSkip to conversation

python3-opentelemetry-api: Add recipe

PATCH New Leon Anavi 1 participant 4 messages Oct 29

lore
Share & tools
lore

Leon Anavi

author
#0 lore raw

PATCH v2 1/4 python3-opentelemetry-api: Add recipe

Add recipe for OpenTelemetry Python API, release 1.45.1:

- Make AnyValue and AttributeValue explicit type aliases
- Fix quadratic time parsing of the tracestate header and discard tracestate headers longer than 8192 characters

---
 .../python/python3-opentelemetry-api_1.45.1.bb           | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-opentelemetry-api_1.45.1.bb
meta-python/recipes-devtools/python/python3-opentelemetry-api_1.45.1.bb new file +9 -0
new file mode 100644
index 0000000000..6e2018a808
@@ -0,0 +1,9 @@
+SUMMARY = "OpenTelemetry Python API"
+DESCRIPTION = "Python API for OpenTelemetry, an open source \
+observability framework for cloud native software."
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+SRC_URI[sha256sum] = "aa38ed19bcc084ba42782a73255b3582283eced7ad6dddbd6695189e69adfb75"
+
+inherit pypi python_hatchling
Signature · 1 line
2.47.3
author
#1 lore raw

PATCH v2 2/4 python3-opentelemetry-sdk: Add recipe

Add recipe for OpenTelemetry Python SDK, release 1.45.1:

- Fix thread leak bug in resource initialization logic for long running resource detectors

---
 .../python/python3-opentelemetry-sdk_1.45.1.bb           | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-opentelemetry-sdk_1.45.1.bb
meta-python/recipes-devtools/python/python3-opentelemetry-sdk_1.45.1.bb new file +9 -0
new file mode 100644
index 0000000000..3f7bdd725b
@@ -0,0 +1,9 @@
+SUMMARY = "OpenTelemetry Python SDK"
+DESCRIPTION = "Python SDK for OpenTelemetry, an open source \
+observability framework for cloud native software."
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+SRC_URI[sha256sum] = "63d24a6ca645019a631e6a51999c73e93adcac1196ca640b8ae78a7cc4762bf3"
+
+inherit pypi python_hatchling
Signature · 1 line
2.47.3
author
#2 lore raw

PATCH v2 3/4 python3-opentelemetry-semantic-conventions: Add

In reply to Leon Anavi

Add recipe for python3-opentelemetry-semantic-conventions, release 1.45.1/0.66b1.

---
 ...ython3-opentelemetry-semantic-conventions_0.66b1.bb | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-opentelemetry-semantic-conventions_0.66b1.bb
meta-python/recipes-devtools/python/python3-opentelemetry-semantic-conventions_0.66b1.bb new file +10 -0
new file mode 100644
index 0000000000..8684b0e35d
@@ -0,0 +1,10 @@
+SUMMARY = "OpenTelemetry Semantic Conventions"
+DESCRIPTION = "Semantic conventions for OpenTelemetry, an open source \
+observability framework for cloud native software."
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+SRC_URI[sha256sum] = "497ca63bf383723411e8eaf60c8779e9877633c936bb641080adab59d0eb6ec8"
+
+inherit pypi python_hatchling
Signature · 1 line
2.47.3
author
#3 lore raw

PATCH v2 4/4 python3-starlette: Upgrade 1.6.0 -> 1.10.0

In reply to Leon Anavi

Upgrade to release 1.10.0:

Leaner URL-encoded form parsing:

Starlette 1.10.0 parses URL-encoded forms with less memory and CPU, no longer drops the last field when a stream ends early, and lets you compare FormData that holds several uploads under one key.

- Forms with many fields parse faster and use less memory (#3724). FormParser builds each field in the parser callbacks instead of queueing every event and replaying it. On CodSpeed, 1000 fields went from 42.8 ms to 34.9 ms and from 63.5 KB to 54.5 KB, and the max_fields limit case went from 6,880 B to 864 B.
- The last field is kept when the request stream ends without an empty chunk (#3599). The parser is now finalized once the stream is exhausted, so custom streams that never yield a final b"" no longer lose their last field.
- FormData with repeated uploads can be compared (#3619). Comparing two FormData objects with several UploadFile values under the same key used to raise TypeError.

Behaviour changes:

- Multidict equality keeps the order of values under a repeated key (#3619). Keys can still appear in any order, but QueryParams("a=1&a=2") and QueryParams("a=2&a=1") are no longer equal, matching what getlist() returns.
- starlette.formparsers.FormMessage is deprecated (#3724). The parser no longer uses it, and FormParser.messages is gone. Calling FormMessage(...) emits a StarletteDeprecationWarning.

Routing and URL generation:

- Path parameter values that look like a placeholder are kept as they are (#3725). url_path_for("route", category="{id}", id="42") on /{category}/{id} now returns /{id}/42 instead of /42/42. Substitution also got faster, from 549 ns to 520 ns with two parameters and from 1,078 ns to 779 ns with five.
- Route matching does less work per request (#3665, #3722). Match members are compared by identity, cutting up to 4.9% of the instructions per dispatch in the routing benchmarks.
- WSGIMiddleware strips root_path only at a path segment boundary (#3718). A request to /application under a root_path of /app no longer becomes /lication.
- FloatConvertor reports NaN and infinity correctly (#3716). NaN was reported as a negative float.

Middleware, responses and config:

- Handled exceptions no longer keep requests alive (#3205). Starlette clears the traceback after an exception handler runs, so an exception instance reused across requests, such as a module-level HTTPException, no longer pins per-request objects in memory.
- Middlewares accept http.response.start without headers (#3721). BaseHTTPMiddleware, GZipMiddleware and SessionMiddleware default the omitted field to an empty list instead of raising KeyError.
- FileResponse ignores Range on methods other than GET and HEAD (#3679). A POST endpoint that returns a file now sends the full file, as RFC 9110 requires.
- Config strips one pair of matching outer quotes from env file values (#3720). KEY='say "hi"' now reads as say "hi" instead of say "hi.

Extend the ptest runtime dependencies to fix test cases from tests/middleware/test_opentelemetry.py.

---
 ...ython3-starlette_1.6.0.bb => python3-starlette_1.10.0.bb} | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
 rename meta-python/recipes-devtools/python/{python3-starlette_1.6.0.bb => python3-starlette_1.10.0.bb} (82%)
meta-python/recipes-devtools/python/python3-starlette_1.10.0.bb renamed from meta-python/recipes-devtools/python/python3-starlette_1.6.0.bb +4 -1
similarity index 82%
rename from meta-python/recipes-devtools/python/python3-starlette_1.6.0.bb
rename to meta-python/recipes-devtools/python/python3-starlette_1.10.0.bb
index 45ba3a5311..d8d19053c6 100644
@@ -2,7 +2,7 @@ SUMMARY = "Starlette is a lightweight ASGI framework/toolkit, which is ideal for
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=11e8c8dbfd5fa373c703de492140ff7a"
 
-SRC_URI[sha256sum] = "d4e3ac5e546444960c710297a3c9fc3f7ebae1b7e963f3d36173b49da535be9b"
+SRC_URI[sha256sum] = "b8399098d4c1e3522734f7235dc79b1fc967f96cf139c81e0fa30479e0685f9b"
 
 inherit pypi python_hatchling ptest
 
@@ -30,6 +30,9 @@ RDEPENDS:${PN}-ptest += " \
         python3-unittest-automake-output \
         python3-pyyaml \
         python3-httpx2 \
+        python3-opentelemetry-api \
+        python3-opentelemetry-sdk \
+        python3-opentelemetry-semantic-conventions \
 "
 
 do_install_ptest() {
Signature · 1 line
2.47.3