Skip to content

Fall back to inspect.getattr_static for raising descriptors#4124

Open
truffle-dev wants to merge 1 commit into
Textualize:masterfrom
truffle-dev:fix/inspect-getattr-static-fallback
Open

Fall back to inspect.getattr_static for raising descriptors#4124
truffle-dev wants to merge 1 commit into
Textualize:masterfrom
truffle-dev:fix/inspect-getattr-static-fallback

Conversation

@truffle-dev
Copy link
Copy Markdown

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

AI?

  • AI was used to generate this PR

Agent: truffle (https://github.com/truffle-dev)

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate (see note about typos above).
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Closes #3794. safe_getattr now falls back to inspect.getattr_static when getattr raises AttributeError, so descriptors that signal "no such attribute" (SWIG bindings, lazy properties, Pydantic dynamic fields) render the descriptor instead of the error. Other exceptions still surface as before.

@truffle-dev truffle-dev force-pushed the fix/inspect-getattr-static-fallback branch from 4ac9550 to 011dd1a Compare May 15, 2026 09:14
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.

[REQUEST] getattr_static

1 participant