mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-15 11:02:36 +02:00
Merge branch 'main' of github.com:geekan/MetaGPT into main
This commit is contained in:
commit
7968e76d5a
1 changed files with 7 additions and 2 deletions
|
|
@ -3,13 +3,18 @@ import sys
|
|||
import warnings
|
||||
|
||||
if sys.implementation.name == "cpython" and platform.system() == "Windows" and sys.version_info[:2] == (3, 9):
|
||||
# https://github.com/python/cpython/pull/92842
|
||||
|
||||
import asyncio
|
||||
from asyncio.proactor_events import _ProactorBasePipeTransport
|
||||
|
||||
from semantic_kernel.orchestration import sk_function as _ # noqa: F401
|
||||
|
||||
# https://github.com/python/cpython/pull/92842
|
||||
def pacth_del(self, _warn=warnings.warn):
|
||||
if self._sock is not None:
|
||||
_warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
|
||||
self._sock.close()
|
||||
|
||||
_ProactorBasePipeTransport.__del__ = pacth_del
|
||||
|
||||
# caused by https://github.com/microsoft/semantic-kernel/pull/1416
|
||||
asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue