memcached assumes Unix sockets
Today I wanted to use the memcached service fixture in the CherryPy project, but because the fixture here doesn't support Windows, I had chose instead to write our own. Perhaps this project would consider using TCP ports for the memcached service for Windows compatibility.
Another issue with Windows is that this dist unconditionally imports fcntl, which crashes tests during setup time, when pytest looks up for and tries to import fixtures: https://ci.appveyor.com/project/CherryPy/cherrypy/build/1.0.444/job/seei217vtwplqk6h#L500
(created #23 for that)
The services_log fixture also assumes Unix sockets:
___________ ERROR at setup of test_devpi_upload[twine-1.5.0.tar.gz] ___________
slave_id = 'local'
@pytest.fixture(scope='session')
def services_log(slave_id):
"""A services_logger with the slave id."""
handler = None
for kwargs in (dict(socktype=socket.SOCK_RAW), dict(socktype=socket.SOCK_STREAM), dict()):
try:
> handler = logging.handlers.SysLogHandler(
facility=logging.handlers.SysLogHandler.LOG_LOCAL7, address='/dev/log', **kwargs)
.tox\py\lib\site-packages\pytest_services\log.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\hostedtoolcache\windows\Python\3.8.3\x64\lib\logging\handlers.py:821: in __init__
self._connect_unixsocket(address)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <SysLogHandler (NOTSET)>, address = '/dev/log'
def _connect_unixsocket(self, address):
use_socktype = self.socktype
if use_socktype is None:
use_socktype = socket.SOCK_DGRAM
> self.socket = socket.socket(socket.AF_UNIX, use_socktype)
E AttributeError: module 'socket' has no attribute 'AF_UNIX'
C:\hostedtoolcache\windows\Python\3.8.3\x64\lib\logging\handlers.py:853: AttributeError
@di please submit a PR addressing it