Repository navigation
feat(client)!: remove get_dataset_run, get_dataset_runs and delete_dataset_run - #1933
Conversation
Python 3.10 reaches end of life in October 2026. Raise requires-python to >=3.11, target py311 in ruff, drop 3.10 from the CI unit matrix, and remove the pre-3.11 fallbacks for asyncio.create_task(context=...) and typing.NotRequired. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
The OpenAI integration now always uses the v1 client shapes. Remove the pre-1.0 method definitions and every _is_openai_v1() branch, and raise the dev dependency floor to openai>=1.0.0. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
The default OTLP exporter now sends x-langfuse-ingestion-version: 4 so servers in dual-write or preview mode process exported spans directly. It is a no-op on events_only deployments, and additional_headers can still override it. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
blocked_instrumentation_scopes was deprecated in favor of should_export_span. Remove it from Langfuse, the resource manager and the span processor, and drop the leftover is_active entry from the create_prompt docstring. LANGFUSE_HOST and host keep working, but now log a deprecation warning when they decide the base URL. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
propagate_attributes(metadata=...) coerced non-string values with str(), so a boolean became "True" and a list became its Python repr. Serialize them as JSON instead, like observation metadata, and drop None values instead of sending "None". Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…taset_run These helpers call the dataset-run endpoints that Langfuse v4 no longer serves, so they always fail with a 404. Read experiment runs through langfuse.api.experiments.list() and list_items() instead. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@claude review |
There was a problem hiding this comment.
Claude Code Review
No review was started: this request came from a bot account. Manual reviews can only be requested by someone with write access to this repository. Ask a maintainer to comment @claude review, or have your automation post the comment from a user account with write access.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
Looks good — a clean, mechanical removal with no leftover references.
Reviewed: the import block diff (three now-unused imports removed), the three deleted methods for any stray usages elsewhere in langfuse/_client/ and tests (none found), and confirmed remaining references to the removed types/methods are confined to the generated langfuse/api client, which per the PR description is left untouched pending a separate regeneration.
Extended reasoning...
Pure deletion of three public wrapper methods (get_dataset_run, get_dataset_runs, delete_dataset_run) and their three now-unused imports from langfuse/_client/client.py, with no other files touched. No security-sensitive surface (no auth/crypto/permissions logic); it is a breaking API removal but is simple, self-contained, and verified by grep to leave no dangling references outside the untouched generated API client. Decided approve based on the change's small size, mechanical nature, and absence of any findings or outstanding objections in the timeline.
Use compact separators, keep non-ASCII characters, and send None as "null", so the Python and JS SDKs emit byte-identical propagated metadata values. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…ata-align-with' into lfe-16769-bug-get_dataset_run-get_dataset_runs-delete_dataset_run-are Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
inspect.iscoroutinefunction ignores asyncio's _is_coroutine marker, which asgiref's markcoroutinefunction sets on Python < 3.12. Accept both so such functions keep the async wrapper and their observation ends after the coroutine runs. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…o lfe-17074-python-sdk-v5-send-x-langfuse-ingestion-version-4-by-default Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…scopes-and' into lfe-17061-python-sdk-v5-json-serialize-propagated-metadata-align-with Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…on-4-by-default' into lfe-17078-python-sdk-v5-remove-blocked_instrumentation_scopes-and Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…ata-align-with' into lfe-16769-bug-get_dataset_run-get_dataset_runs-delete_dataset_run-are Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…0' into lfe-17080-python-sdk-v5-drop-openai-sdk-10-support Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…on-4-by-default' into lfe-17078-python-sdk-v5-remove-blocked_instrumentation_scopes-and Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…scopes-and' into lfe-17061-python-sdk-v5-json-serialize-propagated-metadata-align-with Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…ata-align-with' into lfe-16769-bug-get_dataset_run-get_dataset_runs-delete_dataset_run-are Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…penai-sdk-10-support Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…o lfe-17074-python-sdk-v5-send-x-langfuse-ingestion-version-4-by-default Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…on-4-by-default' into lfe-17078-python-sdk-v5-remove-blocked_instrumentation_scopes-and Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…scopes-and' into lfe-17061-python-sdk-v5-json-serialize-propagated-metadata-align-with Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…ata-align-with' into lfe-16769-bug-get_dataset_run-get_dataset_runs-delete_dataset_run-are Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
Integers keep their exact digits as JSON numbers at any depth, and propagated metadata values containing NaN or Infinity are dropped with a warning instead of being stored, matching the JS SDK. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…ata-align-with' into lfe-16769-bug-get_dataset_run-get_dataset_runs-delete_dataset_run-are Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…-blocked_instrumentation_scopes-and Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…scopes-and' into lfe-17061-python-sdk-v5-json-serialize-propagated-metadata-align-with Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…ata-align-with' into lfe-16769-bug-get_dataset_run-get_dataset_runs-delete_dataset_run-are Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
…get_dataset_runs-delete_dataset_run-are Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
What does this PR do?
Langfuse.get_dataset_run(),get_dataset_runs()anddelete_dataset_run()callGET|DELETE /api/public/datasets/{name}/runs[/{run}], which Langfuse v4 (events_only) rejects with a 404. The v5 SDK is v4-only, so they are removed rather than rerouted. The v4 shape (cursor pagination, requiredfrom_start_time, nodataset_name) is not a drop-in for the old return types.Migration:
langfuse.api.experiments.list(...)andlangfuse.api.experiments.list_items(...)langfuse.api.trace.delete_multiple(trace_ids=...)The now-unused
DatasetRunWithItems,DeleteDatasetRunResponseandPaginatedDatasetRunsimports go too. The generated client inlangfuse/apiis untouched; the platform regen removes those endpoints later.Stack: 6 of 10. Base: #1932. Merge after #1932.
Type of change
Verification
No test referenced the removed helpers. Adding a test that they are gone would only restate the diff, so I skipped it.
Checklist
code_review.md..env.templateif needed.The PR appears safe to merge as the intended breaking change.
Summary
The PR removes three high-level dataset-run methods that target endpoints unavailable to the v5 SDK, along with their unused type imports.
Reviews (1) · Last reviewed commit: "feat(client)!: remove get_dataset_run, g..."