The docs indicate that "Alternately, you may use the mode kwarg to specify an exact mode, in the same vein as os.chmod or the Unix chmod command."
The docs should point out that a four-digit mode mask must be provided. Three-digit mask or letter mask (like u+x) are not allowed or yield the wrong result, whereas the chmod command does allow these