Visitar URL original
Wrong base class for transport returned by loop.create_datagram_endpoint() · Issue #90352 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20221223071117/https://github.com/python/cpython/issues/90352
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

Wrong base class for transport returned by loop.create_datagram_endpoint() #90352

Closed
asvetlov opened this issue Dec 29, 2021 · 3 comments · Fixed by #98844
Closed

Wrong base class for transport returned by loop.create_datagram_endpoint() #90352

asvetlov opened this issue Dec 29, 2021 · 3 comments · Fixed by #98844
Assignees
Labels
3.10 3.11 3.12 expert-asyncio type-bug An unexpected behavior, bug, or error

Comments

@asvetlov
Copy link
Contributor

asvetlov commented Dec 29, 2021

BPO 46194
Nosy @asvetlov, @1st1, @carlosdamazio, @carlosdamazio
PRs
  • bpo-46194: Make selector inherit asyncio.DatagramTransport #30291
  • 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 = None
    created_at = <Date 2021-12-29.14:56:23.713>
    labels = ['3.11', '3.8', '3.9', '3.10', 'expert-asyncio']
    title = 'Wrong base class for transport returned by loop.create_datagram_endpoint()'
    updated_at = <Date 2021-12-29.20:44:28.023>
    user = 'https://github.com/asvetlov'

    bugs.python.org fields:

    activity = <Date 2021-12-29.20:44:28.023>
    actor = 'carlosdamazio'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['asyncio']
    creation = <Date 2021-12-29.14:56:23.713>
    creator = 'asvetlov'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46194
    keywords = ['patch']
    message_count = 2.0
    messages = ['409309', '409326']
    nosy_count = 4.0
    nosy_names = ['asvetlov', 'yselivanov', 'dmzz', 'carlosdamazio']
    pr_nums = ['30291']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46194'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10', 'Python 3.11']

    @asvetlov
    Copy link
    Contributor Author

    asvetlov commented Dec 29, 2021

    Selector-based event loops returns _SelectorDatagramTransport which inherits asyncio.Transport instead of asyncio.DatagramTransport.

    isinstance(transp, asyncio.DatagramTransport) fails.
    It doesn't affect the actual execution since transp.sendto() and transp.error_received() are correctly implemented.

    The bug doesn't affect Windows proactor-based implementation.

    The fix is relatively easy, a champion is welcome!

    @carlosdamazio
    Copy link
    Mannequin

    carlosdamazio mannequin commented Dec 29, 2021

    I think I have a fix for this, I opened a PR. Let me know if you have any questions.

    @CAM-Gerlach
    Copy link
    Member

    CAM-Gerlach commented Oct 15, 2022

    For reference, that PR is #30291

    @CAM-Gerlach CAM-Gerlach added type-bug An unexpected behavior, bug, or error and removed 3.9 3.8 labels Oct 15, 2022
    @kumaraditya303 kumaraditya303 self-assigned this Oct 22, 2022
    miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 29, 2022
    …amTransport (pythonGH-98844)
    
    (cherry picked from commit 9bdec0a)
    
    Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 3.11 3.12 expert-asyncio type-bug An unexpected behavior, bug, or error
    Projects
    Status: Done
    Development

    Successfully merging a pull request may close this issue.

    3 participants