It's legally mandated in my city so I guess the polite thing to do is ring a bell, you know, just stick to the protocol, for everyone's sake. A bell however seems at least as likely to startle someone into behaving erratically as not.
As far as the pedestrian's safety is concerned what matters is either giving them a wide berth or slowing right down when passing.
Whether on a bike or not I'm sick of all the modern world's beeping and ringing and buzzing and blaring and if I'm wearing noise cancelling headphones that means I don't want to hear it. Don't tell you're being annoying for my own good because you aren't.
First reaction to warning tone should always be to (safely!) stop and assess.
Considering that the persons involved can't be expected to not be deaf, or functionally so via e.g. headphones, and thus you always have to be able to brake anyways. Running onto a driving lane (be it bikes or cars doesn't matter) without looking especially if the direction you didn't look just gave an audible warning is always reckless.