Skip to content

Improve werkzeug exceptions slightly #3178

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

Merged
merged 3 commits into from
Aug 9, 2019

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Aug 9, 2019

  • Use Text for HTTPException.description
  • Add Unauthorized.www_authenticate
  • Remove wrong get_headers() overrides

* Use Text for HTTPException.description
* Add Unauthorized.www_authenticate
* Remove wrong get_headers() overrides
self,
description: Optional[Text] = ...,
response: Optional[Response] = ...,
www_authenticate: Union[None, Tuple[object], List[object], object] = ...,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This union could technically be reduced to just object, but I like the fact that it expresses the different cases handled by the implementation better.

Copy link
Member

Choose a reason for hiding this comment

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

Tuple[object, ...] surely?

self,
description: Optional[Text] = ...,
response: Optional[Response] = ...,
www_authenticate: Union[None, Tuple[object], List[object], object] = ...,
Copy link
Member

Choose a reason for hiding this comment

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

Tuple[object, ...] surely?

@srittau srittau merged commit c579f91 into python:master Aug 9, 2019
@srittau srittau deleted the werkzeug-exception branch August 9, 2019 18:06
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.

2 participants