fix: avoid changing class outside of GIL
1 file changed