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: Make error initializers more consistent #1655
Merged
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
4d6873d
refactor(errors.py): unify init signature of the error classes
CaselIT 137cee8
refactor(errors.py): remove NoRepresentation, HTTPRangeNotSatisfiable…
CaselIT 2ac519f
refactor(errors.py): use py3 style super
CaselIT 7bab132
test(errors): add tests to changes in errors, update other tests
CaselIT 0ffb44b
chore(news): add news fragment for changelog
CaselIT c98c7f3
docs: remove references to NoRepresentation in documentation
CaselIT ea554a3
Merge branch 'master' into fix-777-errors
kgriffs 8a95c65
Merge branch 'master' into fix-777-errors
vytas7 569cabf
refactor(errors): make the arguments kwonly
CaselIT 6695d36
refactor(errors): ensure that the arguments of the error override the…
CaselIT a48e8c5
docs(errors): update error documentation adding kw arguments
CaselIT a55f940
refactor(error): use kw args when creating errors
CaselIT 5e04469
chore(cython): fix errors on cython
CaselIT 055cb04
refactor(errors): make the arguments kwonly in httperror
CaselIT 992a2b3
docs(errors): update error documentation adding kw arguments to httpe…
CaselIT f3aefc4
chore(pep): fix pep errors
CaselIT 2fef4e4
docs(news): update new for changelog
CaselIT c0b2ec6
fix(errors): allow a list of two tuples as the headers of the errors …
CaselIT af547cd
docs(error): add note about headers
CaselIT f1d1765
test(httperror): add missing test
CaselIT 4109f27
Merge branch 'master' into fix-777-errors
CaselIT 6969e0c
refactor(errors): deprecate positional arguments instead of making th…
CaselIT 89e137a
style(pep8): fix pep8 errors
CaselIT e875d15
chore: add missing tests and address review
CaselIT ab3645a
docs: be polite
CaselIT c13bd66
docs(changelog): update changelog
CaselIT 9fef3b3
docs(changelog): address review comments
CaselIT 769de42
Merge branch 'master' into fix-777-errors
kgriffs 8793055
Merge branch 'master' into fix-777-errors
kgriffs File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The error classes in ``falcon.errors`` were updated to have the ``title`` and | ||
``description`` keyword arguments and to correctly handle headers passed as | ||
list of tuples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
The class :class:`~.falcon.http_error.NoRepresentation` was removed since | ||
all :class:`~.falcon.HTTPError` have optional representation. | ||
Deprecate the use of positional arguments for the optional kw args of | ||
the HTTPError subclasses |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this deprecation could be its own news fragment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to name them. They should be 777 since that is the issue, and I think are both removal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could make the other one "misc" since it hasn't been removed (as a breaking change) yet, per se. Also, I think it is reasonable to add a few (hyphenated) words of description after the issue number (as has been done with other fragments.
@csojinb @vytas7 thoughts? Related: #1621 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used only the numbers as the names since I though that we wanted to use towncrier to automatically add the link to the issue for every changelog file.
If we don't need to only use the number as the name I'll make a new misc file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I see. I just tried that and indeed it drops a
(#{number})
reference in there, although it doesn't generate a GH link by default. That is nice, but on the other hand it seems like there should be a way to (1) have towncrier allow multiple entries for the same issue and (2) to better support items that don't have an associated issue, perhaps by simply not appending the(name-of-news-fragment)
. Perhaps we need a post-processing script?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a configuration parameter for towncrier to make it apply the gh link. We were trying it in gitter with @vytas7
I can just change the name for now, and then the names of the newsitems will be changed after the configuration for towncrier is figured out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the config was
issue_format = "https://github.com/falconry/falcon/issues/{issue}"