Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Jinja2TemplatesDeprecationWarningを解消 #1398

Merged
merged 3 commits into from
Jun 16, 2024

Conversation

sabonerune
Copy link
Contributor

内容

Jinja2Templates周りのDeprecationWarningを解消します。

Before FastAPI 0.108.0, Starlette 0.29.0, the name was the first parameter.

Also, before that, in previous versions, the request object was passed as part of the key-value pairs in the context for Jinja2.

@sabonerune sabonerune requested a review from a team as a code owner June 12, 2024 22:09
@sabonerune sabonerune requested review from Hiroshiba and removed request for a team June 12, 2024 22:09
Copy link
Contributor

@tarepan tarepan left a comment

Choose a reason for hiding this comment

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

LGTM👍️

  • TemplateResponse の引数変更により DeprecationWarning: The name is not the first parameter anymore. が消失することを確認しました。nice!
  • Jinja2Templates の引数変更により DeprecationWarning: Extra environment options are deprecated. が消失することを確認しました。good work!
    • FastAPI 側であまり丁寧に説明されていない directory 周りの移行が正しくおこなわれています。great!

Copy link
Contributor

@tarepan tarepan left a comment

Choose a reason for hiding this comment

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

(レビュー抜けがありました🙇)

  • jinja2 の直接インポートにより pyproject.tomljinja2 に対する # NOTE: required by fastapi が古い記述になったため、これを消す必要があります

@sabonerune
Copy link
Contributor Author

@tarepan 修正しました。

Copy link
Contributor

@tarepan tarepan left a comment

Choose a reason for hiding this comment

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

LGTM👍️

@tarepan
Copy link
Contributor

tarepan commented Jun 16, 2024

@sabonerune
レビューで指摘し修正して頂いた # NOTE: required by fastapi に関してです。
削除は私の考慮が足りておらず、維持が望ましいということが判明しました(ref. #1400)。
修正のリバートをお願いします、お手数おかけします🙇

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

LGTM!!

なんか危ない記法だよなぁと思ってたのでこの変更はありがたいですね!!

pyproject.toml内のコメント、こちらでrevertさせていただきます!

pyproject.toml Outdated Show resolved Hide resolved
@Hiroshiba Hiroshiba merged commit bcb0c30 into VOICEVOX:master Jun 16, 2024
4 checks passed
@sabonerune sabonerune deleted the fix/jinja2-deprecation-warning branch June 16, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants