GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — gh-74895: getaddrinfo no longer raises OverflowError by smejkar · Pull Request #2435 · python/cpython Conversation
|
|
@serhiy-storchaka to pass checks, should I (a) wait till #2436 is merged, (b) relax test_getaddrinfo_overflow, or (c) rebase this onto #2436? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Traceback (most recent call last):
File "/home/me/Documents/cpython/Lib/test/test_socket.py", line 1370, in test_getaddrinfo_overflow
socket.getaddrinfo(None, _testcapi.LONG_MAX + 1)
AssertionError: gaierror not raised
`
Please fix.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@giampaolo, @gpshead (as network experts) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Some systems treat it as unsigned internally so ULONG_MAX+1 is needed, not LONG_MAX+1.
Also updates our canned getaddrinfo.c implementation to actually report an error for values outside of the u_short range it casts the value to instead of ignoring them.
I effectively reworked the test, we don't actually want an error behavior on specific numeric values as we had in the past, we just want to report and error if the underlying platform's getaddrinfo() call reports an error. Not all of them do, or at least not all at the same values. for all practical purposes I doubt it matters much. it'd be nice for values outside of 16-bit unsigned to be rejected, but that only makes strict sense for IPv4 and IPv6. Other protocols are free to treat numeric service names (aka port) differently. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.