Cannons definitely have their place and are just as medieval as full plate and rapiers, crows' nests, abundant currency, standing armies, and stable nation state monarchies and republics.
I've never seen one true medieval town in all of my time playing the game.
In my own campaign it's...