In my experience, only in the United States or any US Preclearance security checking areas (like Dublin, Toronto, etc.). But I haven't seen it in any other countries so far. Even India, which is the personification of inefficiency in the airport security front, doesn't do this. The only exceptions are for footwear with metallic parts, or high heeled shoes/boots. But trainers are almost universally ok except in the US.