The diffsync.DiffSync class was changed to a function
|
def DiffSync(*args: Any, **kwargs: Any) -> Adapter: # noqa pylint: disable=invalid-name |
|
"""For backwards-compatibility, keep around the old name.""" |
|
|
|
warnings.warn( |
|
"'diffsync.DiffSync' is deprecated and will be removed with 2.1, use 'diffsync.Adapter' instead.", |
|
DeprecationWarning, |
|
) |
|
return Adapter(*args, **kwargs) |
This causes the import of any class using this as a base class to fail:
import diffsync
class TestAdapter(diffsync.DiffSync):
"""A simple DiffSync adapter for testing purposes."""
Traceback (most recent call last):
File "/home/gary/github/nautobot/nautobot-app-device-onboarding/test_diffsync.py", line 4, in <module>
class TestAdapter(diffsync.DiffSync):
TypeError: function() argument 'code' must be code, not str
The
diffsync.DiffSyncclass was changed to a functiondiffsync/diffsync/__init__.py
Lines 897 to 904 in 7ca1717
This causes the import of any class using this as a base class to fail: