Haven't you figured this out yet? Of course we've executed people for treason. Methinks you're googlin' whilst you ought be reading something else. There is no crime of "spying" in the Constitution.
Which spy are you refering to who has been executed? All the ones I know of lately have all gotten off.
Treason is hard to try since you have to find direct intent against the people of this country and such, so we've been good at finding other charges with comprable punishments in the past