-
Couldn't load subscription status.
- Fork 32
Open
Description
Environment
- DiffSync version: 1.9.0
Proposed Functionality
- Remove the
diffsyncfield from DiffSyncModel - Add
diffsyncto DiffSyncModel.update and DiffSyncModel.create method signatures
There are a few reasons behind my thinking: 1) It makes the API a bit more consistent 2) It might make it easier for Python to run GC if there's no/fewer cyclical references between objects 3) I didn't see a lot of references to this field outside of create/update/delete
This is likely appropriate for diffsync v2 #232 since it breaks the API.
Other feature requests like #255 may benefit from this change since it would mean there is no assumption that DiffSyncModel has a reference to a given DIffSync
Use Case
class DiffSyncModel(BaseModel):
@classmethod
def create(cls, diffsync: "DiffSync", ids: Dict, attrs: Dict) -> Optional[Self]:
# Method signature remains the same
...
def update(self, diffsync: "DiffSync", attrs: Dict):
...
def delete(self, diffsync: "DiffSync"):
...Metadata
Metadata
Assignees
Labels
No labels