I wouldn’t tell anybody because I’m very leery of telling someone and they repeat it because they’re gossipy, and I’m also leery of being mocked and talked about. I have a friend who will talk to me about her other friends, and she’s judgemental, so I know I can’t tell her anything personal.
I do think, however, that if your spouse told you something heavy, like if he is sick or if he is changing jobs to another city, or something big that is going to affect you (as I would think most things that affect him are going to affect you), it’s kind of unfair of him to tell you and not want you to process this information with a trusted friend or family member. If it’s really big or really life altering, and he insisted I can’t tell anybody, I might tell a therapist.