Commit graph python-sdk/tests/server/test_lifespan.py
Author SHA1 Message Date
Max Isbey
0a22a9dc33
refactor: replace lowlevel Server decorators with on_* constructor kwargs (#1985) 2026-02-12 15:55:54 +00:00
Marcelo Trylesinski
65c614e48e
Rename FastMCP to MCPServer (#1951) 2026-01-25 14:45:52 +01:00
Marcelo Trylesinski
f4672c5084
Drop RootModel from JSONRPCMessage (#1908) 2026-01-19 14:04:15 +01:00
Marcelo Trylesinski
e94b386a13
refactor: use snake case instead of camel case in types (#1894) 2026-01-16 15:51:27 +01:00
Marcelo Trylesinski
c7671e470c
Add pyright strict mode on the whole project (#1254) 2025-08-11 18:56:37 +01:00
ihrpr
9d99aee014
Revert "Add message queue for SSE messages POST endpoint (#459)" (#649) 2025-05-07 16:35:20 +01:00
Akash D
3b1b213a96
Add message queue for SSE messages POST endpoint (#459) 2025-05-06 17:10:43 -07:00
ihrpr
da0cf22355
Wrap JSONRPC messages with SessionMessage for metadata support (#590) 2025-05-02 14:29:00 +01:00
Marcelo Trylesinski
ae77772ea8
Add strict mode to pyright (#315)
* Add strict mode to pyright

* Apply UP rule

* fix readme

* More correct

* Leave wrong Context for now

* Add strict mode to pyright

* Apply UP rule

* fix readme

* fix

* ignore
2025-03-20 09:13:08 +00:00
Marcelo Trylesinski
7196604468
Revert "refactor: reorganize message handling for better type safety and clar…" (#282)
Some checks failed
Main branch checks / checks (push) Has been cancelled
This reverts commit 9d0f2daddb.
2025-03-14 09:50:46 +00:00
David Soria Parra
9d0f2daddb
refactor: reorganize message handling for better type safety and clarity (#239)
Some checks failed
Main branch checks / checks (push) Has been cancelled
* refactor: improve typing with memory stream type aliases

Move memory stream type definitions to models.py and use them throughout
the codebase for better type safety and maintainability.

GitHub-Issue:#201

* refactor: move streams to ParsedMessage

* refactor: update test files to use ParsedMessage

Updates test files to work with the ParsedMessage stream type aliases
and fixes a line length issue in test_201_client_hangs_on_logging.py.

Github-Issue:#201

* refactor: rename ParsedMessage to MessageFrame for clarity

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: move MessageFrame class to types.py for better code organization

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

* fix pyright

* refactor: update websocket client to use MessageFrame

Modified the websocket client to work with the new MessageFrame type,
preserving raw message text and properly extracting the root JSON-RPC
message when sending.

Github-Issue:#204

* fix: use NoneType instead of None for type parameters in MessageFrame

🤖 Generated with [Claude Code](https://claude.ai/code)

* refactor: rename root to message
2025-03-13 13:44:55 +00:00
Marcelo Trylesinski
94d326dbf1
Close unclosed resources in the whole project (#267)
* Close resources

* Close all resources

* Update pyproject.toml

* Close all resources

* Close all resources

* try now...

* try to ignore this

* try again

* try adding one more..

* try now

* try now

* revert ci changes
2025-03-13 10:59:45 +00:00
David Soria Parra
e598750cba
test: add tests for server lifespan support
Adds comprehensive tests for lifespan functionality:
- Tests for both low-level Server and FastMCP classes
- Coverage for startup, shutdown, and context access
- Verifies context passing to request handlers
2025-02-11 12:16:47 +00:00