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

Friendly status code names #308

Closed
kgriffs opened this issue Aug 21, 2014 · 7 comments · Fixed by #481
Closed

Friendly status code names #308

kgriffs opened this issue Aug 21, 2014 · 7 comments · Fixed by #481

Comments

@kgriffs
Copy link
Member

kgriffs commented Aug 21, 2014

Add friendly names for common status codes ala https://docs.python.org/3.0/library/http.client.html

@kgriffs kgriffs added this to the 0.2 milestone Aug 21, 2014
@etscrivner
Copy link

Would love to help out with this. Do you want to completely convert falcon.status_codes from HTTP_XXX to this model or would you prefer to keep both?

@kgriffs
Copy link
Member Author

kgriffs commented Sep 25, 2014

@etscrivner Thanks! I think we ought to keep both, if nothing else for backwards-compat. Also, some people may prefer the more succinct, code-based names. We can always deprecate the codes later if it turns out most people have stopped using them.

@kgriffs kgriffs modified the milestones: 0.2.1, 0.2.0 Sep 26, 2014
@Neetuj
Copy link

Neetuj commented Jan 29, 2015

we are already facing this issue

using this in our code base :-

def on_get(self, req, resp):
    resp.status = falcon.HTTP_300

and travis complaints :-

************* Module jumpgate.identity.drivers.sl.versions

E: 9,22: Module 'falcon' has no 'HTTP_300' member (no-member)

ERROR: InvocationError: '/home/travis/build/softlayer/jumpgate/.tox/pep8/bin/pylint -E jumpgate'

should i open a new bug? have the old status codes been deprecated?

@kgriffs
Copy link
Member Author

kgriffs commented Jan 30, 2015

@Neetuj That's odd; HTTP_300 has not been removed. In fact, this work item hasn't been started yet (at least I haven't seen any PRs referencing it). Maybe this is a false positive from pylint for some reason?

@Neetuj
Copy link

Neetuj commented Jan 30, 2015

Yes seems like so .. since i also did not see any work or check in related
to it.

On Thu, Jan 29, 2015 at 8:03 PM, Kurt Griffiths notifications@github.com
wrote:

@Neetuj https://github.com/Neetuj That's odd; HTTP_300 has not been
removed. In fact, this work item hasn't been started yet (at least I
haven't seen any PRs referencing it). Maybe this is a false positive from
pylint for some reason?


Reply to this email directly or view it on GitHub
#308 (comment).

@kgriffs
Copy link
Member Author

kgriffs commented Mar 6, 2015

@Neetuj Any update on this issue? Is there a way to reproduce the issue outside of Travis?

@mcm
Copy link
Contributor

mcm commented Apr 13, 2015

I am working on this at the Pycon sprints

kgriffs pushed a commit to kgriffs/falcon that referenced this issue Apr 14, 2015
Add verbose status constants to the RST docs so that developers can discover
them without having to use help().

See also falconry#308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants