| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…what should happen here
If I've done this correctly, this irons out the errors that are different depending on python version, leaving just the errors that show up for every version of linux.
There was a problem hiding this comment.
Let's not comment out any of these constants. They're all defined with IFDEF in CPython and presumably exist somewhere, though I suspect some may exist only on versions of FreeBSD from the mid-1990s compiled while Mars is in retrograde. If you want a rabbit hole to dig into, you could try to figure out exactly where those constants come from (e.g., by digging through CPython git blame or Googling for manpages from the right OS).
Sorry, something went wrong.
| SOL_IPX: int | ||
| SOL_NETROM: int | ||
| SOL_ROSE: int | ||
| # if sys.platform != "win32" and sys.platform != "darwin": |
There was a problem hiding this comment.
Let's not comment these out; they definitely exist on some platforms.
Sorry, something went wrong.
|
I'll do some more digging on the mystery constants. |
Sorry, something went wrong.
|
Thanks! To be clear, I don't think it's too important to figure out exactly when these constants exist, and I'd be fine with defining them under if sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin" if we know they don't exist on any of the three major platforms. |
Sorry, something went wrong.
|
Okay, that makes sense. In the case of the ones I commented out, I also confirmed that they didn't exist on (my local version of) FreeBSD either. |
Sorry, something went wrong.
|
Updated, with 7 constants still commented out. 6 of these are linux-only NETLINK_* constants that haven't been in linux for almost 20 years now. One is the linux-only RDS_CMSG_RDMA_UPDATE which I couldn't find in any version of linux and I think is a typo for the actually existing RDS_CMSG_CONG_UPDATE. Most of the rest I confirmed are in linux header files to this day, so I restored them to both _socket and socket without adding them to __all__. Those that I couldn't find in a linux header file went to platform != the big three branches. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
| RDS_RDMA_USE_ONCE: int | ||
| RDS_RECVERR: int | ||
|
|
||
| # This is supported by cpython but doesn't seem to be a real thing. |
There was a problem hiding this comment.
| # This is supported by cpython but doesn't seem to be a real thing. | |
| # This is supported by CPython but doesn't seem to be a real thing. |
Sorry, something went wrong.
There was a problem hiding this comment.
If you want extra brownie points, you could consider opening an issue at CPython about this ;)
Sorry, something went wrong.
There was a problem hiding this comment.
CPython issue for this constant: python/cpython#127069
Sorry, something went wrong.
| NETLINK_USERSOCK: int | ||
| NETLINK_W1: int | ||
| NETLINK_XFRM: int | ||
| # Technically still supported by cpython |
There was a problem hiding this comment.
| # Technically still supported by cpython | |
| # Technically still supported by CPython |
Sorry, something went wrong.
There was a problem hiding this comment.
And a CPython issue for these outdated Netlink constants as well: python/cpython#127072
Sorry, something went wrong.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
|
This should not have disabled all of the Bluetooth-related socket constants on Linux. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I didn't realize there were so many errors being hidden for linux in here when I started. I only have access to MacOS and FreeBSD locally, so I just took the linux pipeline results at mostly face value. In working through all the things that don't exist in the Linux pipeline, I tested against my BSD machine to sort out what was for example, platform = "win32" versus platform != "darwin" and platform != "linux" or platform = "darwin" versus "platform != "win32" and platform != "linux", etc.
When it didn't seem like any system that had a thing, I commented it out in _socket and removed it from socket. I expect many of these exist on some linux system somewhere - there's a lot of variance in that space. It seemed like leaving them as a comment in _socket was a good placeholder for now.