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

Add request argument to TemplateResponse (v1.x) #2199

Closed

Conversation

alex-oleshkevich
Copy link
Member

@alex-oleshkevich alex-oleshkevich commented Jun 30, 2023

This PR removes backward compatibility done in #2191
To be merged after 1.0 release.

@alex-oleshkevich alex-oleshkevich changed the title Add request argument to TemplateResponse (Post v1.0) Add request argument to TemplateResponse (v1.x) Jun 30, 2023
@@ -142,17 +142,16 @@ def get_template(self, name: str) -> "jinja2.Template":

def TemplateResponse(
self,
request: Request,
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why this is not an optional argument so it can be released without breaking?

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

This was discussed on #2191.

The diff here is actually incomplete.

@Kludex
Copy link
Sponsor Member

Kludex commented Jul 3, 2023

I meant to create a PR so I could see the diff between the PR that adds deprecation and what is supposed to be refactor for v1.

I mean, target the PR you are building from this one.

@alex-oleshkevich
Copy link
Member Author

@Kludex this PR is the target repo state after removing all deprecations.

@Kludex
Copy link
Sponsor Member

Kludex commented Jul 3, 2023

Screenshot 2023-07-03 at 17 16 06

I need instead of "encode:master" to be "alex-oleshkevich:templates-request". 🤔

@alex-oleshkevich
Copy link
Member Author

See it here https://github.com/alex-oleshkevich/starlette/pull/56/files

@Kludex
Copy link
Sponsor Member

Kludex commented Jul 5, 2023

To be merged after 1.0 release.

Not after, but for 1.0.

@Kludex Kludex added this to the Version 1.0 milestone Jul 5, 2023
@Kludex
Copy link
Sponsor Member

Kludex commented Dec 23, 2023

I've applied this on #2384, and given co-author to @alex-oleshkevich . FYI

@Kludex Kludex closed this Dec 23, 2023
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.

None yet

3 participants