◐ Shell
clean mode source ↗

Message 365908 - Python tracker

It seems that people usually use the socket module like this, I think it's safe to respect this habit:

    if hasattr(socket, "FLAG_NAME"):
        do_something

If use PR19402, your program will have problem on the older version system, not only "don't break existing code".

So I think delete-at-runtime is a suitable way.