fastmcp/tests/server/tasks
Jeremiah Lowin caeaa86394
Simplify .key as computed property (#2648)
* Simplify .key as computed property

Keep .key as the standard lookup interface for all components but
implement it as a computed property instead of a stored field.

- Remove _key private attribute and custom model_copy(key=...)
- .key returns .name for tools/prompts, str(.uri) for resources,
  .uri_template for templates
- Use .key universally for component lookups in managers
- MountedProvider: prefix URIs only for resources/templates, not names
- Docket registration: tools/prompts use .key, resources use .name
  (matches fn.__name__ for function lookup)

* Simplify .key as computed property

Keep .key as the standard lookup interface for all components but
implement it as a computed property instead of a stored field.

- Remove _key private attribute and custom model_copy(key=...)
- .key returns .name for tools/prompts, str(.uri) for resources,
  .uri_template for templates
- Use .key universally for component lookups and Docket registration
- MountedProvider: prefix URIs only for resources/templates, not names
- Add _backend_* fields to proxy classes to preserve original identifiers
  for backend calls when prefixed via import_server

* Standardize .key as computed property

- .key is now a read-only computed property:
  - Tools/Prompts: returns .name
  - Resources: returns str(.uri)
  - Templates: returns .uri_template
- Prefixing uses model_copy(update={...}) to change underlying field
- Resource/template names are NOT prefixed, only URIs
- Move import_server tests to tests/deprecated/
2025-12-18 14:48:47 -05:00
..
__init__.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
conftest.py Remove enable_tasks setting, enable task protocol by default 2025-12-09 09:34:42 -05:00
test_progress_dependency.py Remove enable_docket setting; Docket is now always on 2025-12-05 11:40:04 -05:00
test_server_tasks_parameter.py Simplify .key as computed property (#2648) 2025-12-18 14:48:47 -05:00
test_sync_function_task_disabled.py Add TaskConfig for SEP-1686 execution modes 2025-12-06 21:01:11 -05:00
test_task_capabilities.py Centralize task capabilities, add component filtering 2025-12-09 10:02:38 -05:00
test_task_config_modes.py Remove TaskConfig and client from root exports (#2580) 2025-12-09 12:28:01 -05:00
test_task_dependencies.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_task_metadata.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_task_methods.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_task_mount.py Remove TaskConfig and client from root exports (#2580) 2025-12-09 12:28:01 -05:00
test_task_prompts.py Add TaskConfig for SEP-1686 execution modes 2025-12-06 21:01:11 -05:00
test_task_protocol.py Remove enable_tasks setting, enable task protocol by default 2025-12-09 09:34:42 -05:00
test_task_proxy.py Proxy tasks forbidden, mount tasks working 2025-12-08 11:44:28 -05:00
test_task_resources.py Add TaskConfig for SEP-1686 execution modes 2025-12-06 21:01:11 -05:00
test_task_return_types.py [SEP-1686] Raise ValueError when sync functions have task=True (#2554) 2025-12-05 11:31:28 -05:00
test_task_security.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_task_status_notifications.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00
test_task_tools.py Add TaskConfig for SEP-1686 execution modes 2025-12-06 21:01:11 -05:00
test_task_ttl.py [2.14] SEP-1686 tasks (#2378) 2025-12-04 20:10:35 -05:00