Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jlowin
Copy link
Owner

@jlowin jlowin commented Apr 15, 2025

When duplicate behavior was set to IGNORE, the new object was assigned anyway.

Very minor breaking change: replaces the DuplicateBehavior ENUM with a Literal[str] for easier serialization

@jlowin jlowin added the bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. label Apr 15, 2025
Copilot AI review requested due to automatic review settings April 15, 2025 13:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 7 out of 12 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • docs/servers/fastmcp.mdx: Language not supported
  • docs/servers/prompts.mdx: Language not supported
  • docs/servers/resources.mdx: Language not supported
  • docs/servers/resources_backup.mdx: Language not supported
  • docs/servers/tools.mdx: Language not supported
Comments suppressed due to low confidence (1)

src/fastmcp/resources/resource_manager.py:192

  • Inconsistent key handling: the template key is looked up using str(template.uri_template) but stored directly as template.uri_template, which may lead to unexpected duplicate detection. Consider consistently converting the key to a string when storing.
self._templates[template.uri_template] = template

@jlowin jlowin merged commit e7145a1 into main Apr 15, 2025
4 checks passed
@jlowin jlowin deleted the manager-bug branch April 15, 2025 13:41
jordicore pushed a commit to jordicore/fastmcp that referenced this pull request Jul 2, 2025
Fix bug with duplicate behavior == ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants