You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Everything in Mock should inherit from Base #82289
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/lisroach'closed_at=<Date2019-09-30.04:21:10.488>created_at=<Date2019-09-11.13:24:30.491>labels= ['3.8', '3.9']
title='Everything in Mock should inherit from Base'updated_at=<Date2019-09-30.04:21:10.488>user='https://github.com/lisroach'
Activity
lisroach commentedon Sep 11, 2019
Everything within Mock should be inheriting from the top-level parent class, Base (and properly call super).
For multiple inheritance to work correctly they all should be inheriting from the same parent class ultimately.
Classes that need update:
MagicMixin
AsyncMagicMixin
NonCallableMock (instance = object.__new__(new) should be switched to a super call here)
lisroach commentedon Sep 11, 2019
Also:
_AsyncIterator
_AwaitEvent
Some of the code in AsyncMagicMixin might be able to be simplified if we inherit from MagicMixin instead, right now we might be duplicating work.
In general we have to watch out for duplication/overwriting of attributes with this change.
lisroach commentedon Sep 29, 2019
New changeset 9a7d951 by Lisa Roach in branch 'master':
bpo-38108: Makes mock objects inherit from Base (GH-16060)
9a7d951
lisroach commentedon Sep 30, 2019
New changeset b76ab35 by Lisa Roach (Miss Islington (bot)) in branch '3.8':
bpo-38108: Makes mock objects inherit from Base (GH-16060) (GH-16470)
b76ab35