GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(types): export Attributes from the public types module by sansynx · Pull Request #8019 · getsentry/sentry-python

Conversation

@sansynx

@sansynx sansynx commented Oct 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

  • resolves: Expose Attributes type definition in public place #6970
  • resolves: PY-2639

Reminders

  • Please add tests to validate your changes, and lint your code using uv run ruff.
  • Add GH Issue ID & Linear ID (if applicable)
  • PR title should use conventional commit style (feat:, fix:, ref:, meta:)
  • For external contributors: CONTRIBUTING.md, Sentry SDK development docs, Discord community

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sansynx
feat(types): export Attributes from the public types module
72742cc
@sansynx sansynx mentioned this pull request Oct 13, 2026
Expose Attributes type definition in public place #6970
Closed
alexander-alderman-webb
alexander-alderman-webb reviewed Oct 13, 2026
View reviewed changes
Comment thread tests/test_types.py Outdated
Comment on lines +9 to +12
def test_attributes_optional_runtime():
from sentry_sdk.types import Attributes

Optional[Attributes]

@alexander-alderman-webb alexander-alderman-webb Oct 13, 2026

Copy link
Copy Markdown
Collaborator

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.

All reactions

@sansynx sansynx Oct 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

All reactions
@sansynx
test: remove redundant Attributes annotation test
378dc63
@sansynx
sansynx marked this pull request as ready for review October 13, 2026 12:29
@sansynx
sansynx requested a review from a team as a code owner October 13, 2026 12:29
Copilot AI balanced review requested due to automatic review settings October 13, 2026 12:29
Copilot AI reviewed Oct 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown

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.

All reactions
sentrivana
sentrivana approved these changes Oct 13, 2026
View reviewed changes
@sentrivana

sentrivana commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

LGTM, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sentrivana
sentrivana enabled auto-merge (squash) October 13, 2026 12:39
@sentrivana
sentrivana merged commit 916942d into getsentry:master Oct 13, 2026
309 of 311 checks passed

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Oct 21, 2026
publish: getsentry/[email protected] getsentry/publish#9946
Closed
publish: getsentry/[email protected] getsentry/publish#9970
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@alexander-alderman-webb alexander-alderman-webb alexander-alderman-webb left review comments
@sentrivana sentrivana sentrivana approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Expose Attributes type definition in public place

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@sansynx @sentrivana @alexander-alderman-webb
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.