Disable Undo for Non-Custom (Official) Operators

Hi,

How I disable undo for non-custom (official) operators and how I can disable undo a code block?

I could do this in old Blender versions, but for new versions how I can do that?