This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kulikjak
Recipients The Compiler, barry, christian.heimes, eli.bendersky, ethan.furman, ezio.melotti, kulikjak, mrabarnett, mscuthbert, pablogsal, rhettinger, scoder, serhiy.storchaka, veky
Date 2022-01-17.11:24:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642418656.85.0.0885483880647.issue40066@roundup.psfhosted.org>
In-reply-to
Content
This also broke our Solaris build with the following error:

======================================================================
FAIL: testGetaddrinfo (test.test_socket.GeneralModuleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/..../cpython-main/Lib/test/test_socket.py", line 1523, in testGetaddrinfo
    self.assertEqual(repr(type), '<SocketKind.SOCK_STREAM: 1>')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '<SocketKind.SOCK_STREAM: 2>' != '<SocketKind.SOCK_STREAM: 1>'
- <SocketKind.SOCK_STREAM: 2>
?                          ^
+ <SocketKind.SOCK_STREAM: 1>
?                          ^

(test.test_socket.GeneralModuleTests fails with the same error).

The issue is almost certainly that on Solaris, SOCK_STREAM is defined as 2 rather than 1; the following simple program confirms that:

#include <stdio.h>
#include <sys/socket.h>

void main() {
	printf("%d\n", SOCK_STREAM);
}

I'm just not sure whether to fix this with `assertRegex` or a special branch for Solaris (though I am not sure whether everybody else uses 1 or it's more varied).
History
Date User Action Args
2022-01-17 11:24:16kulikjaksetrecipients: + kulikjak, barry, rhettinger, scoder, christian.heimes, ezio.melotti, mrabarnett, eli.bendersky, ethan.furman, serhiy.storchaka, The Compiler, veky, mscuthbert, pablogsal
2022-01-17 11:24:16kulikjaksetmessageid: <1642418656.85.0.0885483880647.issue40066@roundup.psfhosted.org>
2022-01-17 11:24:16kulikjaklinkissue40066 messages
2022-01-17 11:24:16kulikjakcreate