--fd argument doesn't work with socketpair

I'd like this to work:

#!/usr/bin/env python3

import socket
import subprocess

fd1, fd2 = socket.socketpair()
subprocess.run(
    ["./virtiofsd", "--shared-dir=/", "--sandbox=none", f"--fd={fd1.fileno()}"],
    pass_fds=[fd1.fileno()],
    close_fds=True,
)

But it doesn't work because the --fd argument expects a socket that isn't connected yet. Seems like accepting an already connected socket would be easier.