The Holy verse says:
"If the hypocrites and those in whose hearts is disease and those who spread rumors in al-Madinah do not cease, We will surely incite you against them; then they will not remain your neighbors therein except for a little.(33:60) They shall be cursed from all around and they shall be ruthlessly killed wherever they are seized. (33:61). This has been Allah's Way with those who have gone before, and you shall find no change in Allah's Way. (33:62)"
Whenever a society reaches a state of corruption that is unacceptable, God would send prophets to help the sufferer and confront the tyrants. That is why they were always faced by three types of people.
First there was the sufferer who regard the prophet as his savoiur from a life he can no longer endure.
Second is the tyrant who was benefiting from this corrupt system and hence would make one hell of a fight to keep situations as they were.
The third and most dangerous type were the hypocrites who claim to believe but in their hearts they are not. That is what Prophet Mohammed, peace and blessings be upon him, faced but that third type (the hypocrites) appeared only in Medinah when the Muslims emigrated to it because hypocrites appear only when you are strong and in Medinah Islam was strong.
These people actually behaved like a fifth column in the Islamic territory. They would spread rumors that Arabic tribes were gathering to fight Muslims, they would go to a new believer and tell him that they knew someone who became a Muslim and was brutally killed by the unbelievers because of his faith and by that they actually fight Islam from within like any -by the book- fifth column and so they had to be faced.
In the first verse God is threatening those fifth column people that if they do not stop their malicious deeds against Islam God will tempt the noble prophet, peace and blessings be upon him, to fight them. From this we conclude that:
1- Hypocrites, whoever they were, were living in peace with the Muslims (hence the word "tempt" which proves that fighting them was not the prophet's intention).
2- God was giving them a last warning to cease trying to shake the society from inside and He didn't tell the prophet to kill them right away.
3- Let's speak about what you think should be done today if the authorities discover someone of the fifth column who is trying to disrupt the society from inside, what should the nation do to him, should we leave him and say it's freedom of opinion or seize him, judge him and if he was found guilty of treason then he should have the death penalty. If you can't decide then please check the story of Vidkun Quisling, one of the most famous fifth-column members against his country Norway and how he was sentenced to death and killed by a firing squad.
4- in the verse God says: " hypocrites and those in whose hearts is disease and those who spread rumors" Actually the "and" here doesn't mean they were three types of people. It's actually one type having three different qualities. They were hypocrites whose hearts were so full of ill-feelings towards Muslims and Islam who decided to shake the stability of the society by spreading rumors i.e. their version of the fifth column.
5- The verse orders the Prophet, peace and blessings be upon him, to kill them if they insist on their heinous behaviour which is, I assure you, what we all believe should be done to any traitor.
6- The verdict of killing the traitors is not specific to Islam it has been the same for all nations long before Islam.
Honestly, I don't think killing a traitor is an act of violence, I think it is the only logical way to deal with that kind of people..If you don't believe me check your country's laws and tell me how they deal with someone proved to be a traitor.