Skip to content

Allow omitted owner in proxy descriptor binding - #352

Merged
GrahamDumpleton merged 1 commit into
GrahamDumpleton:developfrom
jakezwang:fix/optional-descriptor-owner
Sep 20, 2026
Merged

GrahamDumpleton merged 1 commit into
GrahamDumpleton:developfrom
jakezwang:fix/optional-descriptor-owner

Conversation

@jakezwang

Copy link
Copy Markdown
Contributor

Calling AutoObjectProxy(descriptor).__get__(instance) raises TypeError because the forwarding method requires owner, although built-in descriptors accept it as an optional argument. LazyObjectProxy has the same behavior.

Default owner to None in the shared forwarding method. Add regressions for wrapped functions and properties, including explicit None and class access.

Validation: just test (Python 3.9–3.15, including 3.14t and 3.15t; pure Python, C extension, and runtime-disabled C extension variants).

@GrahamDumpleton
GrahamDumpleton merged commit 9c3a9d4 into GrahamDumpleton:develop Sep 20, 2026
49 checks passed
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.

2 participants