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

HTTPError doesn't support http.client constants. #1646

coady opened this issue Oct 18, 2017 · 1 comment

HTTPError doesn't support http.client constants. #1646

coady opened this issue Oct 18, 2017 · 1 comment


Copy link

coady commented Oct 18, 2017

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?

  • What is the current behavior?
    http.client constants aren't accepted as valid input to HTTPError.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a screenshots and logs of the problem.

In []: cherrypy.HTTPError(http.client.NOT_FOUND)
Out []: HTTPError: (500, "Illegal response status from server ('HTTPStatus.NOT_FOUND' is non-numeric).")
  • What is the expected behavior?
    The same as with any int.

  • What is the motivation / use case for changing the behavior?
    It's effectively a Python 3 regression, since Python 2 httplib constants work, and an IntEnum is a valid int.

  • Please tell us about your environment:

  • Cheroot version: X.X.X
  • CherryPy version: 11.X.X
  • Python version: 3.6.X
  • OS: XXX
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, e.g. stackoverflow, gitter, etc.)
Copy link

Hi @coady,

Thanks for letting us know. While I cannot promise you an instant fix, I'll gladly accept any contributions (e.g. tests, patch, docs) helping to improve this behavior.

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

No branches or pull requests

2 participants