Mail Archives: cygwin/2021/01/23/16:10:47
X-Recipient: | archive-cygwin AT delorie DOT com
|
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 404883861032
|
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
|
| s=default; t=1611436204;
|
| bh=Ruizm5c7lWYauBryQsg4+DnhkHQiHJ/MZMwqv5jaytA=;
|
| h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
|
| List-Help:List-Subscribe:From:Reply-To:From;
|
| b=bsHx2BXJvbGEiGkYP2rtGlHPGqS9gr7c6mG2Ew5Og+dxhwBtfT4SbOKU6sRE5oVpA
|
| rdpRlelsLbaWo4CE2kZ53lyQNMEM3mbvkFLZ16mkfDfFR/m1r8WXiEXeGoGJuUS1f/
|
| MKH40e4rRrBhCTu8iT/udx9Dd0z3tm3ik5AZBtBk=
|
X-Original-To: | cygwin AT cygwin DOT com
|
Delivered-To: | cygwin AT cygwin DOT com
|
DMARC-Filter: | OpenDMARC Filter v1.3.2 sourceware.org 61D453858006
|
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed;
|
| d=1e100.net; s=20161025;
|
| h=x-gm-message-state:to:from:subject:message-id:date:user-agent
|
| :mime-version:content-language:content-transfer-encoding;
|
| bh=eCh2P6SDKMsiIxCJ64yEDzaAfhAMJGYgksJF26+97cM=;
|
| b=JmeusnJZ7iAqdJum7JKepbAicoJT+PPPc0OvW8VdjLx2CAdeJjEnu1lfxdLXb5aF0B
|
| gGqurmFJjys5ABY11qraqmzbSY/evGUcwifMPabsdqcvGv/hCZHcx1WRLP2Vw+cIzHH+
|
| Nq+WW5w0PDIS3/obb8JP/Y6S+0UPVF4knQ9OWFtIpTLU/ZEkIjRJ82s5xHv4O7hLCoHp
|
| F3lqUD3FLaqVgbwR5IkKs/tATgI7v6xvIfzuHCq0W2CSHSo3XzlDwMEVlhJqKHUU2BHy
|
| YZulrUrOa4dfYpPrCf25xKEsTAZPyjupTDmqzAcTHNhBQ7k454MAsaypRMfSEGUNKDuq
|
| dv3g==
|
X-Gm-Message-State: | AOAM5329hUL+x3qMMBJu/dKv1qFeyogmL4nAUabfwIwgjRu6tUcq1mMa
|
| 0CEvqk0ADYp1fp5xzK2d408=
|
X-Google-Smtp-Source: | ABdhPJyEwfrZzcOqef9zkOMbkTed7kWe1Ozy3ea9jVAmhweR947lKz3Wq43WMhKEpcFA0k3OrV90xg==
|
X-Received: | by 2002:a17:902:ff0a:b029:de:1d1f:8558 with SMTP id
|
| f10-20020a170902ff0ab02900de1d1f8558mr4501258plj.85.1611436200566;
|
| Sat, 23 Jan 2021 13:10:00 -0800 (PST)
|
To: | cygwin AT cygwin DOT com
|
Subject: | python doesn't work with asyncio library
|
Message-ID: | <5ce60195-9b4f-a54d-491d-fb0c361586d4@gmail.com>
|
Date: | Sun, 24 Jan 2021 06:09:57 +0900
|
User-Agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
|
| Thunderbird/78.6.1
|
MIME-Version: | 1.0
|
X-Spam-Status: | No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
|
| DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT,
|
| FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
|
| TXREP autolearn=ham autolearn_force=no version=3.4.2
|
X-Spam-Checker-Version: | SpamAssassin 3.4.2 (2018-09-13) on
|
| server2.sourceware.org
|
X-BeenThere: | cygwin AT cygwin DOT com
|
X-Mailman-Version: | 2.1.29
|
List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com>
|
List-Archive: | <https://cygwin.com/pipermail/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help>
|
List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>,
|
| <mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
|
From: | ggl329 via Cygwin <cygwin AT cygwin DOT com>
|
Reply-To: | ggl329 <ggl329 AT gmail DOT com>
|
Sender: | "Cygwin" <cygwin-bounces AT cygwin DOT com>
|
Hi Marco,
Thank you for maintaining python related packages.
I found that the updated python38 (3.8.6-2, 3.8.7-1) and python36 (3.6.12-2) don't
work with asyncio library. The "Hello World!" sample in python documentation fails.
Using python38 (3.8.3-1) or python36 (3.6.10-1), it succeeds.
This issue prevents ipython from starting up.
Could you check if this issue is reproducible on your environment?
=====
$ cat hello38.py
# hello38.py (https://docs.python.org/3.8/library/asyncio.html)
import asyncio
async def main():
print('Hello ...')
await asyncio.sleep(1)
print('... World!')
asyncio.run(main())
$ python3.8 hello38.py
Traceback (most recent call last):
File "hello38.py", line 7, in <module>
asyncio.run(main())
File "/usr/lib/python3.8/asyncio/runners.py", line 39, in run
loop = events.new_event_loop()
File "/usr/lib/python3.8/asyncio/events.py", line 758, in new_event_loop
return get_event_loop_policy().new_event_loop()
File "/usr/lib/python3.8/asyncio/events.py", line 656, in new_event_loop
return self._loop_factory()
File "/usr/lib/python3.8/asyncio/unix_events.py", line 54, in __init__
super().__init__(selector)
File "/usr/lib/python3.8/asyncio/selector_events.py", line 61, in __init__
self._make_self_pipe()
File "/usr/lib/python3.8/asyncio/selector_events.py", line 108, in _make_self_pipe
self._ssock, self._csock = socket.socketpair()
File "/usr/lib/python3.8/socket.py", line 571, in socketpair
a, b = _socket.socketpair(family, type, proto)
SystemError: <built-in function socketpair> returned NULL without setting an error
Exception ignored in: <function BaseEventLoop.__del__ at 0x6fffffb49d30>
Traceback (most recent call last):
File "/usr/lib/python3.8/asyncio/base_events.py", line 656, in __del__
self.close()
File "/usr/lib/python3.8/asyncio/unix_events.py", line 58, in close
super().close()
File "/usr/lib/python3.8/asyncio/selector_events.py", line 92, in close
self._close_self_pipe()
File "/usr/lib/python3.8/asyncio/selector_events.py", line 99, in _close_self_pipe
self._remove_reader(self._ssock.fileno())
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
sys:1: RuntimeWarning: coroutine 'main' was never awaited
=====
$ cat hello36.py
# hello36.py (https://docs.python.org/3.6/library/asyncio-task.html#example-hello-world-coroutine)
import asyncio
async def hello_world():
print("Hello World!")
loop = asyncio.get_event_loop()
loop.run_until_complete(hello_world())
loop.close()
$ python3.6 hello36.py
Traceback (most recent call last):
File "hello36.py", line 5, in <module>
loop = asyncio.get_event_loop()
File "/usr/lib/python3.6/asyncio/events.py", line 694, in get_event_loop
return get_event_loop_policy().get_event_loop()
File "/usr/lib/python3.6/asyncio/events.py", line 599, in get_event_loop
self.set_event_loop(self.new_event_loop())
File "/usr/lib/python3.6/asyncio/events.py", line 617, in new_event_loop
return self._loop_factory()
File "/usr/lib/python3.6/asyncio/unix_events.py", line 56, in __init__
super().__init__(selector)
File "/usr/lib/python3.6/asyncio/selector_events.py", line 56, in __init__
self._make_self_pipe()
File "/usr/lib/python3.6/asyncio/selector_events.py", line 118, in _make_self_pipe
self._ssock, self._csock = self._socketpair()
File "/usr/lib/python3.6/asyncio/unix_events.py", line 60, in _socketpair
return socket.socketpair()
File "/usr/lib/python3.6/socket.py", line 488, in socketpair
a, b = _socket.socketpair(family, type, proto)
SystemError: <built-in function socketpair> returned NULL without setting an error
Exception ignored in: <bound method BaseEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=False debug=False>>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/base_events.py", line 533, in __del__
self.close()
File "/usr/lib/python3.6/asyncio/unix_events.py", line 63, in close
super().close()
File "/usr/lib/python3.6/asyncio/selector_events.py", line 99, in close
self._close_self_pipe()
File "/usr/lib/python3.6/asyncio/selector_events.py", line 109, in _close_self_pipe
self._remove_reader(self._ssock.fileno())
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
--
ggl329
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
- Raw text -