Error overriding default property for MESH_OT_primitive_torus_add?
The issue seems to be where you are trying to do the import, I expect the script you are adding is read too early to get access to bpy.types. While there is a way to alter the default setting, it doesn't seem to effect creating new objects, my guess is that the presets system overrides the defaults.

If you are adding a torus with a python script you can set the parameters used in your script.

bpy.ops.mesh.primitive_torus_add(major_segments=12, minor_segments=8)


For adding objects manually, the best way I can see is to use the presets system. You do this by adding a torus, then use the operator properties panel to adjust the options used, then click the + next to operator Presets and give it a name.



then your preset options will be available.