Sync python.el with upstream

Upstream commit: ffb28c52853efd6991b2dc7ea79765caa5ab020a