Skip to content

AF_BLUETOOTH mssing on win32, but available at runtime #5696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
graingert opened this issue Jun 26, 2021 · 1 comment · Fixed by #8099
Closed

AF_BLUETOOTH mssing on win32, but available at runtime #5696

graingert opened this issue Jun 26, 2021 · 1 comment · Fixed by #8099
Labels
stubs: false negative Type checkers do not report an error, but should stubs: false positive Type checkers report false errors

Comments

@graingert
Copy link
Contributor

graingert commented Jun 26, 2021

C:\Users\IEUser>py
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.AF_BLUETOOTH
<AddressFamily.AF_BLUETOOTH: 32>
>>>

also AF_UNIX is available in typeshed, but missing on win32 at runtime

@graingert
Copy link
Contributor Author

also the contents of socket.AddressFamilly is defined unconditionally:

AF_BLUETOOTH: int

however socket.AF_* is only defined in socket.AddressFamily.AF_* is defined and vice versa

@srittau srittau added stubs: false negative Type checkers do not report an error, but should stubs: false positive Type checkers report false errors labels Jun 28, 2021
AlexWaygood pushed a commit that referenced this issue Jun 19, 2022
This matches what happens at runtime, from Enum._convert_
Helps with #8098. Closes #5696.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: false negative Type checkers do not report an error, but should stubs: false positive Type checkers report false errors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants