Visitar URL original
⬆️ Bump ty to 0.0.84 by YuriiMotov · Pull Request #16452 · fastapi/fastapi · GitHub
Skip to content

⬆️ Bump ty to 0.0.84 - #16452

Open
YuriiMotov wants to merge 6 commits into
masterfrom
bump-ty-0.0.84
Open

YuriiMotov wants to merge 6 commits into
masterfrom
bump-ty-0.0.84

Conversation

@YuriiMotov

@YuriiMotov YuriiMotov commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Description

Upgrading to the latest ty requires some changes. Added some inline review comments to clarify decisions

AI Disclaimer

Used Codex (Astra high) to investigate warnings and apply changes. Verified manually

Checklist

  • This PR links to a GitHub Discussion for the proposed code change.
  • I added tests for the change.
  • The new or updated tests fail on the main branch and pass on this PR.
  • Coverage stays at 100%.
  • The documentation explains the change if needed.

@YuriiMotov YuriiMotov added dependencies Pull requests that update a dependency file internal Internal changes python:uv Pull requests that update python:uv code labels Oct 2, 2026
@codspeed

codspeed Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing bump-ty-0.0.84 (76c9e5d) with master (5eb7186)1

Open in CodSpeed

Footnotes

  1. No successful run was found on master (02912c3) during the generation of this report, so 5eb7186 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

📝 Docs preview

Last commit 76c9e5d at: https://ebe45e51.fastapitiangolo.pages.dev

parse_options_header, # noqa: F401
)

assert parse_options_header

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand these asserts were added just to suppress the "Unused import" warnings.

Comment thread fastapi/openapi/utils.py
field_mapping=field_mapping,
separate_input_output_schemas=separate_input_output_schemas,
)
if result:

@YuriiMotov YuriiMotov Oct 2, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A non-empty tuple is always evaluated to True. And get_openapi_path always returns a tuple with 3 dicts:

return path, security_schemes, definitions

"/simple_include",
response_model=Model2,
response_model_include={"baz": ..., "ref": {"foo"}},
response_model_include={"baz": True, "ref": {"foo"}},

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand it, old Pydantic docs recommended this syntax (with ...), but current version uses True: https://docs.pydantic.dev/latest/concepts/serialization/#excluding-and-including-specific-fields

@YuriiMotov
YuriiMotov requested a review from tiangolo October 2, 2026 10:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file internal Internal changes python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant