Merge pull request #1960 from pipecat-ai/aleix/disable-uvloop

disable uvloop by default and just let the user set it
This commit is contained in:
Aleix Conchillo Flaqué
2025-06-05 12:12:47 -07:00
committed by GitHub
3 changed files with 15 additions and 21 deletions

View File

@@ -5,9 +5,19 @@ All notable changes to **Pipecat** will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
### Changed
- Pipecat 0.0.69 forced `uvloop` event loop on Linux on macOS. Unfortunately,
this is causing issue in some systems. So, `uvloop` is not enabled by default
anymore. If you want to use `uvloop` you can just set the `asyncio` event
policy before starting your agent with:
```python
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
```
### Fixed ### Fixed
- Fixed an issue where `OutputAudioRawFrame.transport_destination` was being - Fixed an issue where `OutputAudioRawFrame.transport_destination` was being

View File

@@ -31,8 +31,7 @@ dependencies = [
"pyloudnorm~=0.1.1", "pyloudnorm~=0.1.1",
"resampy~=0.4.3", "resampy~=0.4.3",
"soxr~=0.5.0", "soxr~=0.5.0",
"openai~=1.70.0", "openai~=1.70.0"
"uvloop~=0.21.0; sys_platform!='win32'"
] ]
[project.urls] [project.urls]

View File

@@ -4,7 +4,6 @@
# SPDX-License-Identifier: BSD 2-Clause License # SPDX-License-Identifier: BSD 2-Clause License
# #
import asyncio
import sys import sys
from importlib.metadata import version from importlib.metadata import version
@@ -12,18 +11,4 @@ from loguru import logger
__version__ = version("pipecat-ai") __version__ = version("pipecat-ai")
event_loop = "asyncio" logger.info(f"ᓚᘏᗢ Pipecat {__version__} (Python {sys.version}) ᓚᘏᗢ")
if sys.platform in ("linux", "darwin"):
try:
import asyncio
import uvloop
event_loop = f"uvloop {uvloop.__version__}"
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
except ImportError:
logger.debug(f"Couldn't find `uvloop`")
pass
logger.info(f"ᓚᘏᗢ Pipecat {__version__} ({event_loop}; Python {sys.version}) ᓚᘏᗢ")