Skip to content

Rename ResourceReference to ResourceTemplateReference #947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 13, 2025
Merged

Conversation

ihrpr
Copy link
Contributor

@ihrpr ihrpr commented Jun 12, 2025

@Kludex
Copy link
Member

Kludex commented Jun 12, 2025

Those are breaking changes - fyi

@ihrpr
Copy link
Contributor Author

ihrpr commented Jun 12, 2025

Those are breaking changes - fyi

@Kludex , have type alias for this in case anyone is using it directly, any other use case is missing?

# Deprecated: Use ResourceTemplateReference instead
ResourceReference = ResourceTemplateReference

@Kludex
Copy link
Member

Kludex commented Jun 12, 2025

Those are breaking changes - fyi

@Kludex , have type alias for this in case anyone is using it directly, any other use case is missing?

# Deprecated: Use ResourceTemplateReference instead
ResourceReference = ResourceTemplateReference

ah, then sorry, all good.

@ihrpr
Copy link
Contributor Author

ihrpr commented Jun 12, 2025

Those are breaking changes - fyi

@Kludex , have type alias for this in case anyone is using it directly, any other use case is missing?

# Deprecated: Use ResourceTemplateReference instead
ResourceReference = ResourceTemplateReference

ah, then sorry, all good.

thanks for checking!!

src/mcp/types.py Outdated
Comment on lines 965 to 966
# Deprecated: Use ResourceTemplateReference instead
ResourceReference = ResourceTemplateReference
Copy link
Member

Choose a reason for hiding this comment

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

You want something like this:

Suggested change
# Deprecated: Use ResourceTemplateReference instead
ResourceReference = ResourceTemplateReference
@deprecated("`ResourceReference` is deprecated, you should use `ResourceTemplateReference`.")
class ResourceReference(ResourceTemplateReference):
"""A reference to a resource or resource template definition."""

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, thank you!

@ihrpr ihrpr requested a review from Kludex June 13, 2025 15:31
@ihrpr ihrpr merged commit f3cd20c into main Jun 13, 2025
12 checks passed
@ihrpr ihrpr deleted the ihrpr/916 branch June 13, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename ResourceReference to ResourceTemplateReference
2 participants