Closed relativityspace-jsmith closed 4 months ago
I could NOT resist renaming some of the linux_xxx functions to posix_xxx ones, because I'm kinda triggered by the fact that they say linux but work for mac as well
I like that thinking ;) Gotta make sure it's fully posix-compliant however. I'll setup a more complete test setup
Thanks for the feedback! Any way you could approve my workflow run so I can see how badly I broke the CI?
Also, re the Windows memory issue, I do not see the issue on my machine and will keep an eye out for any machines that do have it!
Also, should mention, there is still one serious issue with netifaces-2 that would keep me from using it with multicast_expert: currently, loopback interfaces are not returned by netifaces.interfaces() on Windows (though they are on other platforms). I suspect this is related to using GetAdaptersInfo() in this library verseus netifaces using GetAdaptersAddresses(), because the original netifaces is able to find the loopback interface somehow.
Will have to look into this in a subsequent MR.
Also, re the Windows memory issue, I do not see the issue on my machine and will keep an eye out for any machines that do have it!
I was never able to reproducer either :/ the code looks right also, but apparently is not. See issue https://github.com/SamuelYvon/netifaces-2/issues/21
loopback interfaces are not returned Will have to look into this in a subsequent MR.
I would greatly appreciate! If you don't have the time I can also take a look this weekend but I'm not sure how much time I actually have to put towards this
Workflow approve again? It looks like it needs approval each time X_X
Also, side note, I'm having an issue that's really annoying. It seems like ruff is enforcing a line length of <=88 characters, but black is not configured to reformat down to that line length. So, running black doesn't make my line lengths correct and I have to enforce that manually. Any idea how to fix this? I tried setting the black line length in pyproject.toml but that didn't fix it.
P.S. I would be really happy if we could increase the line length to be a bit more generous, like 120 chars. 88 chars feels like I'm being squeezed into a tiny box...
Yep, I agree. I'll fix that ASAP
If you rebase on dev you'll have the changes.
hooks:
- id: black
args: [--config=./pyproject.toml]
ohhh, thaaaaat's what I was missing 🤦♂️
Workflow approve again? It looks like it needs approval each time X_X
Should be more lenient now
OK I think this is ready for merge!
Thanks for the hard work!
Hello! After what we talked about last week, I prototyped a way to add interface indices to the netifaces2 API. Along the way, I also found some bugs on Windows and am working through fixing them.
Changes made so far:
netifaces.interfaces_by_index()
API function. This is similar tonetifaces.interfaces()
, except that it returns a dictionary of interface index to interface name instead of just the interface name.