GeezerVison is showing github.com — feat(types): export Attributes from the public types module by sansynx · Pull Request #8019 · getsentry/sentry-python
Conversation
sansynx
commented
Oct 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Description
Expose Attributes from sentry_sdk.types so callers can annotate span attributes without importing the private sentry_sdk._types module
The export follows the existing public type pattern:
- Re-export the original definition during type checking
- Provide an
Any fallback for runtime annotation imports
- Include
Attributes in __all__
This is a three-line change in sentry_sdk/types.py. No test files are changed
The internal type definition remains unchanged. No dependencies or configuration changes are needed
Validation
Local checks run on Windows with Python 3.12:
- Focused tox run of
tests/test_types.py: 2 existing tests passed
- Public
Attributes import checked at runtime
- SDK mypy check: no issues in 202 source files
- Consumer mypy checks: supported attribute values accepted, unsupported object values rejected, and wildcard import accepted
- Ruff lint and formatting checks passed for the export module and existing type tests
- Wheel build passed
git diff --check passed
The full integration matrix has not been run locally. GitHub's CI and Test workflows currently report action_required; no jobs have run
AI assistance was used for implementation and local validation
Issues
Reminders
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
+9
to
+12
|
|
def test_attributes_optional_runtime():
|
|
|
from sentry_sdk.types import Attributes
|
|
|
|
|
|
Optional[Attributes]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this test is doing, can remove
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sansynx
Oct 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the test and pushed the update
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 21, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|