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

error message for bad raw readinto #72743

Closed
davidszotten mannequin opened this issue Oct 29, 2016 · 2 comments
Closed

error message for bad raw readinto #72743

davidszotten mannequin opened this issue Oct 29, 2016 · 2 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes topic-IO

Comments

@davidszotten
Copy link
Mannequin

davidszotten mannequin commented Oct 29, 2016

BPO 28557
Nosy @benjaminp, @davidszotten
PRs
  • bpo-28557: error message for bad raw readinto #7496
  • Files
  • readinto_error.patch
  • 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 = None
    closed_at = <Date 2020-06-15.23:54:01.440>
    created_at = <Date 2016-10-29.17:07:24.961>
    labels = ['3.10', '3.7', '3.8', '3.9', 'expert-IO']
    title = 'error message for bad raw readinto'
    updated_at = <Date 2020-06-15.23:54:01.439>
    user = 'https://github.com/davidszotten'

    bugs.python.org fields:

    activity = <Date 2020-06-15.23:54:01.439>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-06-15.23:54:01.440>
    closer = 'benjamin.peterson'
    components = ['IO']
    creation = <Date 2016-10-29.17:07:24.961>
    creator = 'davidszotten@gmail.com'
    dependencies = []
    files = ['45265']
    hgrepos = []
    issue_num = 28557
    keywords = ['patch']
    message_count = 2.0
    messages = ['279685', '371606']
    nosy_count = 3.0
    nosy_names = ['benjamin.peterson', 'stutzbach', 'davidszotten@gmail.com']
    pr_nums = ['7496']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue28557'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10']

    @davidszotten
    Copy link
    Mannequin Author

    davidszotten mannequin commented Oct 29, 2016

    Was just tracking down a bug in eventlet, which manifested as "OSError: raw readinto() returned invalid length -1 (should have been between 0 and 8192)"

    I was misled for a while by the fact that readinto was in fact returning b'', not -1. This improves the error message in that case by including the TypeError from the failed conversion of b'' to an int.

    Would prefer to still return an OSError with the TypeError as a cause, but couldn't figure out how to do that. Hints/help would be appreciated.

    @davidszotten davidszotten mannequin added 3.7 (EOL) end of life topic-IO labels Oct 29, 2016
    @remilapeyre remilapeyre mannequin added 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes labels Jun 11, 2020
    @benjaminp
    Copy link
    Contributor

    New changeset 8666356 by David Szotten in branch 'master':
    closes bpo-28557: error message for bad raw readinto (GH-7496)
    8666356

    @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
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes topic-IO
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant