Migration guide¶
Migrating from sync-flow APIs¶
Starting with pyNetX v2.0.5, explicit synchronous flow APIs are deprecated. They remain available for compatibility but should not be used in new code.
Before:
client.connect_sync()
reply = client.get_config_sync(source="running")
client.disconnect_sync()
After:
await client.connect_async()
reply = await client.get_config_async(source="running")
await client.disconnect_async()
Deprecated methods¶
connect_syncdisconnect_syncsend_rpc_syncreceive_notification_syncget_syncget_config_synccopy_config_syncdelete_config_syncvalidate_syncedit_config_syncsubscribe_synclock_syncunlock_synccommit_synclocked_edit_config_sync
Still-supported helper APIs¶
These APIs are not deprecated:
next_notificationnext_notification_asyncpeek_notificationsnotification_queue_sizeis_subscription_activedelete_subscriptionnext_notification_eventnext_notification_event_asyncpending_notification_event_countclear_notification_eventsset_threadpool_sizeset_notification_reactor_count
Adopting labels in v2.0.6¶
Before v2.0.6, health events identified devices by hostname and port. Starting with v2.0.6, pass a label during client construction:
client = pyNetX.NetconfClient(
hostname="172.24.30.116",
username="admin",
password="admin",
label="blr-dc1-leaf-01",
)
Health events now include:
{
"label": "blr-dc1-leaf-01",
"hostname": "172.24.30.116",
"timestamp": "2026-06-25T05:35:15.123Z",
}
If no label is provided, the default label is "None".
Adopting timestamps in v2.0.6¶
Consumers of event.as_dict() should expect a new timestamp key. The
value is a UTC ISO-8601 string with millisecond precision and Z suffix.
Timeout events are not associated with a specific client and use
label == "None".
Notification behavior in v2.0.7¶
Applications that consume notifications should be aware of the stricter stream
parser diagnostics added in v2.0.7. Valid EOM-delimited notifications are still
returned with ]]>]]> included. When a device sends malformed stream data,
pyNetX may also queue diagnostic payloads exactly as received and emit either
malformed_notification or incomplete_notification health events.
Consumers that previously assumed every queued item was a valid full notification should monitor the health event stream and treat queued payloads associated with parser diagnostics as device evidence for logging or investigation.