From 7f6c664d64141f54dd44e16f02d5a0fd87c08114 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Wed, 2 Oct 2024 21:47:43 +0100 Subject: [PATCH 1/5] Configure CI --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..d24926c46 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,19 @@ +on: + push: + branches: + - main + + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.8 + + - run: pip install . + - run: pytest From 2f5574917aae5676a732e5a0de4a835e97bb18ae Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Wed, 2 Oct 2024 21:52:43 +0100 Subject: [PATCH 2/5] Install pytest on CI --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d24926c46..bf805c40b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,4 +16,5 @@ jobs: python-version: 3.8 - run: pip install . + - run: pip install -U pytest - run: pytest From a684ef1ccc321e655a1d47d5dc3cf7e59a1788b7 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Wed, 2 Oct 2024 21:54:00 +0100 Subject: [PATCH 3/5] Require Python 3.10 --- .github/workflows/main.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf805c40b..4b0e0c591 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.10" - run: pip install . - run: pip install -U pytest diff --git a/pyproject.toml b/pyproject.toml index 9b01f455d..3f9dfde75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "mcp-python" version = "0.1.3" description = "Model Context Protocol implementation for Python" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.10" dependencies = [ "anyio", "httpx", From fed5304b0917e2788f37abf70e12b735fbed01dc Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Wed, 2 Oct 2024 21:55:53 +0100 Subject: [PATCH 4/5] Remove Python 3.12 syntax --- tests/server/test_session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/server/test_session.py b/tests/server/test_session.py index 50994cc9b..eae7a778b 100644 --- a/tests/server/test_session.py +++ b/tests/server/test_session.py @@ -53,7 +53,7 @@ async def run_server(): tg.start_soon(run_server) await client_session.initialize() - except* anyio.ClosedResourceError: + except anyio.ClosedResourceError: pass assert received_initialized From 7b55252c873f21d87dbeda863e7984d84ae52848 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Wed, 2 Oct 2024 21:57:04 +0100 Subject: [PATCH 5/5] Install trio on CI --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b0e0c591..0e47666d7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,5 +16,5 @@ jobs: python-version: "3.10" - run: pip install . - - run: pip install -U pytest + - run: pip install -U pytest trio - run: pytest