Repository navigation
Fix tests on Python 3.13+, add 3.13/3.14 to CI, bump to 2.73.1 - #898
Conversation
- Normalize docstrings with inspect.cleandoc in the create_and_wait signature test; Python 3.13+ strips docstring indentation at compile time, which broke the split on the indented "Parameters" header. - Use asyncio.run in the realtime close event tests; get_event_loop() no longer creates a loop when none is set. - Add 3.13 (poetry lockfile) and 3.14 (latest deps via pip, since the locked pydantic-core can't install on 3.14) to the CI test matrix. Fixes #897 Co-Authored-By: Claude Opus 5.5 <[email protected]>
PR SummaryLow Risk Overview Tests: CI: The Release: Bumps package/SDK version strings to 2.73.1 in Reviewed by Cursor Bugbot for commit b580e5e. Bugbot is set up for automated code reviews on this repo. Configure here. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.64.1 * [fern-replay] Applied customizations Patches with unresolved conflicts (2): - patch-560b8934: fix: send list-of-primitive multipart fields as repeated form fields (#819) (#825) - patch-a8e155fd: Fix tests on Python 3.13+, add 3.13/3.14 to CI, bump to 2.73.1 (#898) Run `fern-replay resolve` to apply these customizations. * Restore repeated form fields for dubbing project create Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Kræn Hansen <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
* [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.64.1 * [fern-replay] Applied customizations Patches with unresolved conflicts (3): - patch-560b8934: fix: send list-of-primitive multipart fields as repeated form fields (#819) (#825) - patch-a8e155fd: Fix tests on Python 3.13+, add 3.13/3.14 to CI, bump to 2.73.1 (#898) - patch-f5d53e09: Bump version to 2.74.1 (#902) Run `fern-replay resolve` to apply these customizations. * Restore repeated form fields for dubbing project create Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Kræn Hansen <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
* [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.64.1 * [fern-replay] Applied customizations Patches with unresolved conflicts (3): - patch-560b8934: fix: send list-of-primitive multipart fields as repeated form fields (#819) (#825) - patch-a8e155fd: Fix tests on Python 3.13+, add 3.13/3.14 to CI, bump to 2.73.1 (#898) - patch-f5d53e09: Bump version to 2.74.1 (#902) Run `fern-replay resolve` to apply these customizations. * Restore repeated form fields for dubbing project create Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Kræn Hansen <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
* [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.64.1 * [fern-replay] Applied customizations Patches with unresolved conflicts (3): - patch-560b8934: fix: send list-of-primitive multipart fields as repeated form fields (#819) (#825) - patch-a8e155fd: Fix tests on Python 3.13+, add 3.13/3.14 to CI, bump to 2.73.1 (#898) - patch-f5d53e09: Bump version to 2.74.1 (#902) Run `fern-replay resolve` to apply these customizations. * Send dubbing project list fields as repeated form fields fern-replay's patch for #825 conflicted on the new dubbing project endpoint: it dropped the json import but left json.dumps on keyterms and webhook_ids, breaking mypy. Finish applying the customization. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Paul Asjes <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
* [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.64.1 * [fern-replay] Applied customizations Patches with unresolved conflicts (3): - patch-560b8934: fix: send list-of-primitive multipart fields as repeated form fields (#819) (#825) - patch-a8e155fd: Fix tests on Python 3.13+, add 3.13/3.14 to CI, bump to 2.73.1 (#898) - patch-f5d53e09: Bump version to 2.74.1 (#902) Run `fern-replay resolve` to apply these customizations. * Restore repeated form fields for dubbing project create Co-Authored-By: Claude Opus 5.5 <[email protected]> * Send secondary_language_codes as repeated form fields Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Kræn Hansen <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
* [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.64.1 * [fern-replay] Applied customizations Patches with unresolved conflicts (3): - patch-560b8934: fix: send list-of-primitive multipart fields as repeated form fields (#819) (#825) - patch-a8e155fd: Fix tests on Python 3.13+, add 3.13/3.14 to CI, bump to 2.73.1 (#898) - patch-f5d53e09: Bump version to 2.74.1 (#902) Run `fern-replay resolve` to apply these customizations. * Restore repeated form fields for dubbing project create Co-Authored-By: Claude Opus 5.5 <[email protected]> * Send secondary_language_codes as repeated form fields Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Kræn Hansen <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
* [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.64.1 * [fern-replay] Applied customizations Patches with unresolved conflicts (3): - patch-560b8934: fix: send list-of-primitive multipart fields as repeated form fields (#819) (#825) - patch-a8e155fd: Fix tests on Python 3.13+, add 3.13/3.14 to CI, bump to 2.73.1 (#898) - patch-f5d53e09: Bump version to 2.74.1 (#902) Run `fern-replay resolve` to apply these customizations. * Restore repeated form fields for dubbing project create Co-Authored-By: Claude Opus 5.5 <[email protected]> * Send secondary_language_codes as repeated form fields Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Kræn Hansen <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Eleven tests failed when Debian packaged 2.73.0 on Python 3.14 (#897). They fail on 3.13 too. Both causes were in the tests, not the SDK. CI only ran on 3.8, so it never caught them. This fixes the tests, adds 3.13 and 3.14 to the test matrix, and bumps the version to 2.73.1 so packagers can pick up the fix.
Fixes #897
Details
test_flows_create_and_wait.py: Python 3.13+ strips the leading indentation from docstrings at compile time._param_doc_entriessplit on"Parameters\n ----------\n"(with an 8-space indent), so the split found nothing and indexing raisedIndexError. Both the generated and wrapper docstrings now go throughinspect.cleandocbefore splitting and comparing, which works the same on every version. The helper still finds the expected entries on 3.14 (1 forImageClient, 4 forRunsClient), so the staleness check still works.test_realtime_close_event.py:asyncio.get_event_loop()raises when no loop is set, so therun()helper now usesasyncio.run(coro).poetry.lockas before. 3.14 can't, because the lockedpydantic-core2.27.2 has no 3.14 wheels and its PyO3 refuses to build for anything newer than 3.13. The lock is resolved forpython = "^3.8", and pydantic 2.11+ dropped 3.8, so re-locking doesn't help.pyproject.tomlandpoetry.lockare Fern-managed anyway. The 3.14 job runspip install -e .plus the test deps, which picks up the latest pydantic. That's also what users and downstream packagers on 3.14 get.verify_types.pyhardcodespoetry run python, so it's skipped on the pip job. The Poetry jobs still run it.pyproject.tomland theUser-Agent/X-Fern-SDK-Versionheaders inclient_wrapper.py. These files are Fern-managed, but this follows the v2.49.1 hand patch bump, and the next regeneration sets its own version..fern/metadata.jsonis left alone, as it was in v2.49.1.fail-fast: falseso one version failing doesn't hide results on the others.ELEVENLABS_API_KEY) now run three times per push instead of once. If that's too much, we could pass the key only to the 3.8 job.Testing
verify_types.pyOK, 245 passed. The 16 failures are live-API tests that need an API key, which I didn't have locally.pydantic-corebuild fails, as described above. 3.14 with the pip step: pydantic 2.14.1 / pydantic-core 2.50.1, 245 passed, the same 16 key-only failures.actionlintpasses on the workflow. I haven't seen the matrix run on GitHub yet; this PR's CI run is the first.🤖 Generated with Claude Code