Skip to content

Remove TaskConfig and client from root exports#2580

Merged
jlowin merged 1 commit intomainfrom
remove-taskconfig-from-root-exports
Dec 9, 2025
Merged

Remove TaskConfig and client from root exports#2580
jlowin merged 1 commit intomainfrom
remove-taskconfig-from-root-exports

Conversation

@jlowin
Copy link
Copy Markdown
Member

@jlowin jlowin commented Dec 9, 2025

Removes TaskConfig and client from the root __all__ exports to encourage more explicit imports.

TaskConfig should now be imported from its public API:

from fastmcp.server.tasks import TaskConfig

The client module remains accessible via explicit import (from fastmcp import client) but is no longer included in from fastmcp import * exports.

All documentation and tests have been updated to use the correct import paths.

@marvin-context-protocol marvin-context-protocol Bot added breaking change Breaks backward compatibility. Requires minor version bump. Critical for maintainer attention. enhancement Improvement to existing functionality. For issues and smaller PR improvements. labels Dec 9, 2025
@jlowin jlowin removed the breaking change Breaks backward compatibility. Requires minor version bump. Critical for maintainer attention. label Dec 9, 2025
@jlowin
Copy link
Copy Markdown
Member Author

jlowin commented Dec 9, 2025

This is not a breaking change as TaskConfig has not been released and client remains accessible via import statement

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 9, 2025

Walkthrough

The changes modify the public API of the fastmcp package by removing TaskConfig and client from the top-level fastmcp module's __all__ export. TaskConfig is no longer imported at the module level in src/fastmcp/__init__.py. The documentation example in docs/servers/tasks.mdx is updated to reflect this by importing TaskConfig directly from the fastmcp.server.tasks module path instead of from the top-level fastmcp package.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove TaskConfig and client from root exports' directly and clearly summarizes the primary change: removing these two entities from the package's public API.
Description check ✅ Passed The description clearly explains what was removed (TaskConfig and client from root exports) and provides the new import paths. However, the description does not follow the repository's template structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-taskconfig-from-root-exports

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ea57f9 and 10dd604.

⛔ Files ignored due to path filters (2)
  • tests/server/tasks/test_task_config_modes.py is excluded by none and included by none
  • tests/server/tasks/test_task_mount.py is excluded by none and included by none
📒 Files selected for processing (2)
  • docs/servers/tasks.mdx (1 hunks)
  • src/fastmcp/__init__.py (0 hunks)
💤 Files with no reviewable changes (1)
  • src/fastmcp/init.py
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/.cursor/rules/mintlify.mdc)

docs/**/*.mdx: Use clear, direct language appropriate for technical audiences
Write in second person ('you') for instructions and procedures in MDX documentation
Use active voice over passive voice in MDX technical documentation
Employ present tense for current states and future tense for outcomes in MDX documentation
Maintain consistent terminology throughout all MDX documentation
Keep sentences concise while providing necessary context in MDX documentation
Use parallel structure in lists, headings, and procedures in MDX documentation
Lead with the most important information using inverted pyramid structure in MDX documentation
Use progressive disclosure in MDX documentation: present basic concepts before advanced ones
Break complex procedures into numbered steps in MDX documentation
Include prerequisites and context before instructions in MDX documentation
Provide expected outcomes for each major step in MDX documentation
End sections with next steps or related information in MDX documentation
Use descriptive, keyword-rich headings for navigation and SEO in MDX documentation
Focus on user goals and outcomes rather than system features in MDX documentation
Anticipate common questions and address them proactively in MDX documentation
Include troubleshooting for likely failure points in MDX documentation
Provide multiple pathways (beginner vs advanced) but offer an opinionated path to avoid overwhelming users in MDX documentation
Always include complete, runnable code examples that users can copy and execute in MDX documentation
Show proper error handling and edge case management in MDX code examples
Use realistic data instead of placeholder values in MDX code examples
Include expected outputs and results for verification in MDX code examples
Test all code examples thoroughly before publishing in MDX documentation
Specify language and include filename when relevant in MDX code examples
Add explanatory comments for complex logic in MDX code examples
Document all API...

Files:

  • docs/servers/tasks.mdx
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: jlowin/fastmcp PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T00:17:41.256Z
Learning: Applies to tests/**/*.py : Pass FastMCP servers directly to clients for testing using in-memory transport; only use HTTP transport when explicitly testing network features
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Run tests with lowest-direct dependencies
  • GitHub Check: Run tests: Python 3.10 on windows-latest
  • GitHub Check: Run tests: Python 3.10 on ubuntu-latest
🔇 Additional comments (2)
docs/servers/tasks.mdx (2)

63-95: No additional verification needed—TaskConfig documentation is localized to this file.

The code example correctly uses the import path from fastmcp.server.tasks import TaskConfig. A search across all documentation files found no other references to TaskConfig, migration guides, or related documentation pages that would require consistency updates. The import statement in this file stands alone.


72-73: Import path correctly reflects TaskConfig's new location.

The change from the top-level fastmcp module to fastmcp.server.tasks is properly implemented across all code examples (lines 78, 83, 88) and text references (lines 63, 94–95). The import statement is clear, consistently applied throughout the file, and aligns with the explicit module organization.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jlowin jlowin merged commit b20de51 into main Dec 9, 2025
14 checks passed
@jlowin jlowin deleted the remove-taskconfig-from-root-exports branch December 9, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to existing functionality. For issues and smaller PR improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant