For civilians like the Rosenbergs they should get the chair, just like they did. For those in the military like the Walkers, They should be Keelhauled on an Aircraft carrier during winter in the North Atlantic!
Historically spies from foreign nations get death. That's just the way it was/is. One has to ask though how is a foreign national that spies on a country any different from a foreign soldier that makes war on a country. Both are doing the job that their county asked them to do. Both are responsible for damaging the other country.