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

httplib and http.client are missing response messages for defined WEBDAV responses, e.g., UNPROCESSABLE_ENTITY (422) #59230

Closed
craigloftus mannequin opened this issue Jun 7, 2012 · 4 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@craigloftus
Copy link
Mannequin

craigloftus mannequin commented Jun 7, 2012

BPO 15025
Nosy @rhettinger, @bitdancer, @florentx, @berkerpeksag, @demianbrecht
Files
  • issue15025_a.diff
  • issue15025_b.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/rhettinger'
    closed_at = <Date 2014-12-31.09:34:10.508>
    created_at = <Date 2012-06-07.11:15:42.316>
    labels = ['type-bug', 'library']
    title = 'httplib and http.client are missing response messages for defined WEBDAV responses, e.g., UNPROCESSABLE_ENTITY (422)'
    updated_at = <Date 2014-12-31.09:34:10.506>
    user = 'https://bugs.python.org/craigloftus'

    bugs.python.org fields:

    activity = <Date 2014-12-31.09:34:10.506>
    actor = 'berker.peksag'
    assignee = 'rhettinger'
    closed = True
    closed_date = <Date 2014-12-31.09:34:10.508>
    closer = 'berker.peksag'
    components = ['Library (Lib)']
    creation = <Date 2012-06-07.11:15:42.316>
    creator = 'craigloftus'
    dependencies = []
    files = ['35664', '35665']
    hgrepos = []
    issue_num = 15025
    keywords = ['patch']
    message_count = 4.0
    messages = ['162470', '220641', '220790', '233235']
    nosy_count = 7.0
    nosy_names = ['rhettinger', 'r.david.murray', 'flox', 'BreamoreBoy', 'berker.peksag', 'craigloftus', 'demian.brecht']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue15025'
    versions = ['Python 2.7', 'Python 3.4']

    @craigloftus
    Copy link
    Mannequin Author

    craigloftus mannequin commented Jun 7, 2012

    Calling httplib.responses[httplib.UNPROCESSABLE_ENTITY] in 2.7, or http.client.responses[http.client.UNPROCESSABLE_ENTITY] raises "KeyError: 422".

    The expected behaviour would be to return "Unprocessable Entity".

    This is the specific issue that I have hit, but the same is true of all the WEBDAV status codes that constants are defined for.

    @craigloftus craigloftus mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jun 7, 2012
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jun 15, 2014

    Can someone take a look please as nobody is given against http in the experts index.

    @demianbrecht
    Copy link
    Mannequin

    demianbrecht mannequin commented Jun 17, 2014

    Indeed the WEBDAV codes were missing across the board. I've added a couple patches: One (_a) that just adds the missing constants, and another (_b) that changes how they're defined altogether. The advantage of the second is that there is much less chance of running into this desync going forward. Having said that, I have no false hope that anyone will think it's a sane or obvious way of going about defining them ;)

    @rhettinger rhettinger self-assigned this Jun 21, 2014
    @berkerpeksag
    Copy link
    Member

    This was fixed by bpo-21793.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants