Commit.extra is deprecated in favor of Commit._extra which is just an alias for it, see https://github.com/jelmer/dulwich/blob/02b2eed189750eb35e07e3849c01ea213ccb2b98/dulwich/objects.py#L1600
Commit.extra
Commit._extra