Files
typeshed/stdlib/2and3
Matthew Wilkes d149fe435c Represent the use of IntEnums in functions in socket.py. (#3009)
The Pull Request #1121 added the `AddressFamily` type to `socket.pyi`
for Python 3.4+, so constants such as `AF_INET` are correctly
represented as being an enum member rather than an int. The same is
true of the `SocketKind` enums in the `SOCK_*` family.

Various functions in the socket module can accept either an int
or an `AF_*` enum member as arguments, which is allowed by the
int argument type. However the `getaddrinfo` function returns an
`AddressFamily` member rather than an int in the first position
of its list members, so code that access enum specific members
such as the `name` attribute causes a typing error to be found.

This change corrects the return type of `getaddrinfo` but leaves
the family parameters as int, given that `AddressFamily` members
are `IntEnum` and only ever treated as `int`s internally.
2019-06-19 15:14:15 -07:00
..
2018-09-25 20:23:02 -07:00
2018-10-24 07:20:53 -07:00
2019-05-31 07:22:36 -07:00
2018-10-24 07:20:53 -07:00
2019-05-07 17:21:54 +02:00
2019-02-23 10:26:51 +01:00
2018-06-11 11:26:32 -07:00
2019-03-16 22:14:16 +01:00
2019-05-04 16:13:53 -04:00
2018-04-06 11:09:11 -07:00
2018-04-06 11:09:11 -07:00