Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

asyncioProactorEventLoop didn't check if thesocket is blocking #113892

Closed
Assignees
Eclips4
Labels
@NewUserHa

Description

@NewUserHa

Bug report

Bug description:

importasyncioimportsockets=socket.socket()awaitasyncio.get_running_loop().sock_connect(s,('127.0.0.1',80))

according tohttps://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.sock_connect and

asyncdefsock_connect(self,sock,address):
"""Connect to a remote socket at address.
This method is a coroutine.
"""
base_events._check_ssl_socket(sock)
ifself._debugandsock.gettimeout()!=0:
raiseValueError("the socket must be non-blocking")
ifsock.family==socket.AF_INETor (
base_events._HAS_IPv6andsock.family==socket.AF_INET6):
resolved=awaitself._ensure_resolved(
address,family=sock.family,type=sock.type,proto=sock.proto,
loop=self,

it should raise. however,ProactorEventLoop doesn't follow the rule

should we fix this, any thoughts

CPython versions tested on:

3.12

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp