1. Python Software Foundation. (2023). socket — Low-level networking interface. Python 3.12.0 documentation.
Section: socket Module Exceptions
Reference: The documentation explicitly states, "A subclass of OSError, this exception is raised for address-related errors by getaddrinfo() and getnameinfo()." This directly supports option D. It also defines socket.timeout separately, invalidating option A.
2. Van Rossum, G., & Drake, F. L. (Eds.). (2009). Python 3 Tutorial. Python Software Foundation.
Section: 11.2. Sockets
Reference: While not a deep dive, tutorials on socket programming consistently introduce socket.gaierror in the context of hostname lookup failures (e.g., with socket.gethostbyname() or socket.getaddrinfo()), reinforcing that it is an address-related error.
3. Stevens, W. R., Fenner, B., & Rudoff, A. M. (2004). Unix Network Programming, Volume 1: The Sockets Networking API (3rd ed.). Addison-Wesley Professional.
Section: Chapter 9: Elementary Name and Address Conversions, specifically the getaddrinfo function.
Reference: This foundational text on sockets programming explains that the getaddrinfo C function returns an error code for failures (like EAINONAME for name not found), which is what Python's socket.gaierror exception encapsulates. This confirms the direct link between the function and the exception.