I looked this up a bit:
Copper = 0.016mm/m per degK
416 Stainless = 0.010mm/m per degK
Various Lead Alloys = around 0.028mm/m per degK
So if there’s going to be a problem, it’ll be in the bullet itself. The worst problem that can happen with the casing is that the gun will jam or improperly feed, and in that case it won’t explode anyway. So let’s take a common military caliber: 5.56×45mm NATO
The Earth-nominal diameter for the bullet itself is 5.7mm (or 0.0057m) @68 degF (293 degK).
By your cite, the nominal black-body temperature of an object in space will end up at 394 degK–a difference of 101 degK. We’ll use that number since it gives us the greatest temperature difference likely to be in play.
With that difference in temperature, you’d expect to see the bullet expand by 0.00571010.028 = 0.000016m, or 0.016mm, an increase of 0.28%.
In the same heat, the barrel expands by 0.00571010.010 = 0.0000057m, or 0.0057mm, an increase of 0.10%
The difference in the two diameter increases is 0.010mm
So the question then becomes, “Is a typical rifle capable of dealing with being 0.010mm out of tolerance without exploding?” I don’t honestly know the answer to this question, and I can’t find one in limited googling. Given, however, that I know people who routinely feed 5.56x45mm through .223 Remington rifles and vice-versa (the latter case makes me be very far away just in case they are unclear on the pressure differences from the powder loads, granted), I expect the answer to be “yes”–especially since the ANSI B4.1 tolerance grade 8 (the highest generally specified for “boring” operations like machining a rifle barrel) is 0.0177mm or thereabouts.
Now, if they’re using diamond-drill boring for those gun barrels or a different process altogether, then we can talk, but right now I’m personally comfortable with “won’t explode”.
I’m also willing to bet that, given the relative speed of conduction in metal vs. radiation received in terms of transferring heat, the situation where part of a gun is in sunlight and part is in shadow is not especially relevant.