Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Fix readline error

Jeremiah Lowin915f66a42549
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 3aea8fdff..f07597d36 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -34,6 +34,13 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10"]
+ # Use Python 3.11 for Windows to avoid the AttributeError with pyreadline in Python 3.10
+ exclude:
+ - os: windows-latest
+ python-version: "3.10"
+ include:
+ - os: windows-latest
+ python-version: "3.11"
fail-fast: false
steps:
diff --git a/pyproject.toml b/pyproject.toml
index 1985171a5..05b572621 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,8 +5,6 @@ description = "An ergonomic MCP interface"
authors = [{ name = "Jeremiah Lowin" }]
dependencies = [
"mcp>=1.6.0,<2.0.0",
- # include to avoid AttributeError: module 'collections' has no attribute 'Callable'
- "pyreadline3>=3.5.4",
"rich>=13.9.4",
]
requires-python = ">=3.10"
diff --git a/uv.lock b/uv.lock
index d6893bbfc..d301adf5f 100644
--- a/uv.lock
+++ b/uv.lock
@@ -220,11 +220,10 @@ wheels = [
[[package]]
name = "fastmcp"
-version = "0.4.2.dev16+g70fcc6f.d20250407"
+version = "0.4.2.dev17+gfc3fc4e.d20250407"
source = { editable = "." }
dependencies = [
{ name = "mcp" },
- { name = "pyreadline3" },
{ name = "rich" },
]
@@ -245,7 +244,6 @@ dev = [
[package.metadata]
requires-dist = [
{ name = "mcp", specifier = ">=1.6.0,<2.0.0" },
- { name = "pyreadline3", specifier = ">=3.5.4" },
{ name = "rich", specifier = ">=13.9.4" },
]
@@ -717,15 +715,6 @@ version = "2.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/bc/7c/d724ef1ec3ab2125f38a1d53285745445ec4a8f19b9bb0761b4064316679/pyreadline-2.1.zip", hash = "sha256:4530592fc2e85b25b1a9f79664433da09237c1a270e4d78ea5aa3a2c7229e2d1", size = 109189 }
-[[package]]
-name = "pyreadline3"
-version = "3.5.4"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/0f/49/4cea918a08f02817aabae639e3d0ac046fef9f9180518a3ad394e22da148/pyreadline3-3.5.4.tar.gz", hash = "sha256:8d57d53039a1c75adba8e50dd3d992b28143480816187ea5efbd5c78e6c885b7", size = 99839 }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/5a/dc/491b7661614ab97483abf2056be1deee4dc2490ecbf7bff9ab5cdbac86e1/pyreadline3-3.5.4-py3-none-any.whl", hash = "sha256:eaf8e6cc3c49bcccf145fc6067ba8643d1df34d604a1ec0eccbf7a18e6d3fae6", size = 83178 },
-]
-
[[package]]
name = "pyrepl"
version = "0.9.0"