Skip to content

ref(scm): Initialize in '__init__' instead of '__new__'#111389

Merged
jacquev6 merged 1 commit intomasterfrom
jacquev6/scm-platform/facade-init
Mar 24, 2026
Merged

ref(scm): Initialize in '__init__' instead of '__new__'#111389
jacquev6 merged 1 commit intomasterfrom
jacquev6/scm-platform/facade-init

Conversation

@jacquev6
Copy link
Collaborator

Colton, I was double-checking why you said that initializing the SCM Facade in its __init__ method did not work, which I felt could be hiding something more serious.

My conclusion is that you observed that behavior on an intermediate version of #111113, when _facade_type_for_provider_class was returning a subclass of Facade. You then fixed the main issue by making it return a subclass of cls, but did not realize this allowed moving the initialization back to __init__.

I did that, and added a test.

Reference: object.__new__ and object.__init__.

@jacquev6 jacquev6 requested a review from cmanallen March 24, 2026 08:48
@jacquev6 jacquev6 requested a review from a team as a code owner March 24, 2026 08:48
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 24, 2026
Copy link
Member

@cmanallen cmanallen left a comment

Choose a reason for hiding this comment

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

Easy enough! Nice work figuring this out.

@jacquev6 jacquev6 merged commit ffcb11a into master Mar 24, 2026
65 checks passed
@jacquev6 jacquev6 deleted the jacquev6/scm-platform/facade-init branch March 24, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants