Source: python-fakeredis Version: 1.6.1-1 Severity: serious X-Debbugs-CC: debian...@lists.debian.org Tags: sid bookworm User: debian...@lists.debian.org Usertags: needs-update Control: affects -1 src:python3-defaults
Dear maintainer(s),We are in the transition of adding python2.10 to the supported Python versions [0]. With a recent upload of python3-defaults the autopkgtest of python-fakeredis fails in testing when that autopkgtest is run with the binary packages of python3-defaults from unstable. It passes when run with only packages from testing. In tabular form:
pass fail python3-defaults from testing 3.9.8-1 python-fakeredis from testing 1.6.1-1 all others from testing from testing I copied some of the output at the bottom of this report.Currently this regression is blocking the migration of python3-defaults to testing [1]. https://docs.python.org/3/whatsnew/3.10.html lists what's new in Python2.10, it may help to identify what needs to be updated.
More information about this bug and the reason for filing it can be found on https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation Paul [1] https://qa.debian.org/excuses.php?package=python3-defaults https://ci.debian.net/data/autopkgtest/testing/amd64/p/python-fakeredis/16956477/log.gz==================================== ERRORS ==================================== _____________ ERROR at teardown of test_failed_script_error[fake] ______________
request = <SubRequest 'r' for <Function test_failed_script_error[fake]>> @pytest.fixture( params=[ pytest.param('fake', marks=pytest.mark.fake), pytest.param('real', marks=pytest.mark.real) ] ) async def r(request): if request.param == 'fake': ret = await fakeredis.aioredis.create_redis_pool() else: if not request.getfixturevalue('is_redis_running'): pytest.skip('Redis is not running') ret = await aioredis.create_redis_pool('redis://localhost') await ret.flushall() yield ret > await ret.flushall()test/test_aioredis1.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Redis <FakeConnectionsPool [db:0, size:[1:10], free:1]>> async_op = False def flushall(self, async_op=False): """ Remove all keys from all databases.:param async_op: lets the entire dataset to be freed asynchronously. \
Defaults to False """ if async_op: fut = self.execute(b'FLUSHALL', b'ASYNC') else:
fut = self.execute(b'FLUSHALL')
/usr/lib/python3/dist-packages/aioredis/commands/server.py:141: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Redis <FakeConnectionsPool [db:0, size:[1:10], free:1]>> command = b'FLUSHALL', args = (), kwargs = {} def execute(self, command, *args, **kwargs):
return self._pool_or_conn.execute(command, *args, **kwargs)
/usr/lib/python3/dist-packages/aioredis/commands/__init__.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <FakeConnectionsPool [db:0, size:[1:10], free:1]>, command = b'FLUSHALL'
args = (), kw = {}, conn = <RedisConnection [db:0]>, address = 'fakeredis' def execute(self, command, *args, **kw): """Executes redis command in a free connection and returns future waiting for result. Picks connection from free pool and send command through that connection. If no connection is found, returns coroutine waiting for free connection to execute command. """ conn, address = self.get_connection(command, args) if conn is not None:
fut = conn.execute(command, *args, **kw)
/usr/lib/python3/dist-packages/aioredis/pool.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <RedisConnection [db:0]>, command = b'FLUSHALL', encoding = None args = (), is_pubsub = False def execute(self, command, *args, encoding=_NOTSET):"""Executes redis command and returns Future waiting for the answer.
Raises: * TypeError if any of args can not be encoded as bytes. * ReplyError on redis '-ERR' responses. * ProtocolError when response can not be decoded meaning connection is broken. * ConnectionClosedError when either client or server has closed the connection. """ if self._reader is None or self._reader.at_eof(): msg = self._close_msg or "Connection closed or corrupted" raise ConnectionClosedError(msg) if command is None: raise TypeError("command must not be None") if None in args: raise TypeError("args must not contain None") command = command.upper().strip() is_pubsub = command in _PUBSUB_COMMANDS is_ping = command in ('PING', b'PING') if self._in_pubsub and not (is_pubsub or is_ping): raise RedisError("Connection in SUBSCRIBE mode") elif is_pubsub:logger.warning("Deprecated. Use `execute_pubsub` method directly")
return self.execute_pubsub(command, *args) if command in ('SELECT', b'SELECT'): cb = partial(self._set_db, args=args) elif command in ('MULTI', b'MULTI'): cb = self._start_transaction elif command in ('EXEC', b'EXEC'): cb = partial(self._end_transaction, discard=False) encoding = None elif command in ('DISCARD', b'DISCARD'): cb = partial(self._end_transaction, discard=True) else: cb = None if encoding is _NOTSET: encoding = self._encoding fut = get_event_loop().create_future() if self._pipeline_buffer is None:
self._writer.write(encode_command(command, *args))
/usr/lib/python3/dist-packages/aioredis/connection.py:351: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <fakeredis._aioredis1.FakeWriter object at 0x7fbc50bf3cd0> data = bytearray(b'*1\r\n$8\r\nFLUSHALL\r\n') def write(self, data):
self.transport.sendall(data)
fakeredis/_aioredis1.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <fakeredis._aioredis1.FakeSocket object at 0x7fbc50bf2a40> data = bytearray(b'*1\r\n$8\r\nFLUSHALL\r\n') def sendall(self, data): if not self._server.connected: raise self._connection_error_class(CONNECTION_ERROR_MSG) if isinstance(data, str): data = data.encode('ascii')
self._parser.send(data)
E StopIteration fakeredis/_server.py:832: StopIteration The above exception was the direct cause of the following exception: def finalizer(): """Yield again, to finalize.""" async def async_finalizer(): try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > loop.run_until_complete(async_finalizer())/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/asyncio/base_events.py:641: in run_until_complete
return future.result()_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
async def async_finalizer(): try:
await gen_obj.__anext__()
E RuntimeError: async generator raised StopIteration /usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:131: RuntimeError=================================== FAILURES =================================== ________________________ test_failed_script_error[fake] ________________________
r = <Redis <FakeConnectionsPool [db:0, size:[1:10], free:1]>> async def test_failed_script_error(r): await r.set('foo', 'bar')with pytest.raises(aioredis.ReplyError, match='^ERR Error running script'):
await r.eval('return redis.call("ZCOUNT", KEYS[1])', ['foo'])
test/test_aioredis1.py:158: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/aioredis/commands/scripting.py:12: in eval
return self.execute(b'EVAL', script, len(keys), *(keys + args)) /usr/lib/python3/dist-packages/aioredis/commands/__init__.py:51: in execute return self._pool_or_conn.execute(command, *args, **kwargs) /usr/lib/python3/dist-packages/aioredis/pool.py:196: in execute fut = conn.execute(command, *args, **kw) /usr/lib/python3/dist-packages/aioredis/connection.py:351: in execute self._writer.write(encode_command(command, *args)) fakeredis/_aioredis1.py:48: in write self.transport.sendall(data) fakeredis/_server.py:832: in sendall self._parser.send(data) fakeredis/_server.py:749: in _parse_commands self._process_command(fields) fakeredis/_server.py:862: in _process_command result = self._run_command(func, sig, fields[1:], False) fakeredis/_server.py:765: in _run_command result = func(*args) fakeredis/_server.py:2494: in eval from lupa import LuaRuntime, LuaError, as_attrgetter_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
from __future__ import absolute_import# We need to enable global symbol visibility for lupa in order to
# support binary module loading in Lua. If we can enable it here, we # do it temporarily. def _try_import_with_global_library_symbols(): try: from os import RTLD_NOW, RTLD_GLOBAL except ImportError: from DLFCN import RTLD_NOW, RTLD_GLOBAL # Py2.7 dlopen_flags = RTLD_NOW | RTLD_GLOBAL import sys old_flags = sys.getdlopenflags() try: sys.setdlopenflags(dlopen_flags) import lupa._lupa finally: sys.setdlopenflags(old_flags) try: _try_import_with_global_library_symbols() except: pass del _try_import_with_global_library_symbols # the following is all that should stay in the namespace: > from lupa._lupa import * E ModuleNotFoundError: No module named 'lupa._lupa' /usr/lib/python3/dist-packages/lupa/__init__.py:32: ModuleNotFoundError=============================== warnings summary ===============================
../../../../../usr/lib/python3/dist-packages/redis/connection.py:2/usr/lib/python3/dist-packages/redis/connection.py:2: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import StrictVersion -- Docs: https://docs.pytest.org/en/stable/warnings.html=========================== short test summary info ============================ FAILED test/test_aioredis1.py::test_failed_script_error[fake] - ModuleNotFoun... ERROR test/test_aioredis1.py::test_failed_script_error[fake] - RuntimeError: ... !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 2 failures !!!!!!!!!!!!!!!!!!!!!!!!!!! =============== 1 failed, 24 passed, 1 warning, 1 error in 6.59s ===============
Task was destroyed but it is pending!task: <Task pending name='Task-213' coro=<RedisConnection._read_data() running at /usr/lib/python3/dist-packages/aioredis/connection.py:186> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[RedisConnection.__init__.<locals>.<lambda>() at /usr/lib/python3/dist-packages/aioredis/connection.py:168]> Exception ignored in: <coroutine object RedisConnection._read_data at 0x7fbc4ecad3f0>
Traceback (most recent call last):File "/usr/lib/python3/dist-packages/aioredis/connection.py", line 218, in _read_data
RuntimeError: no running event loop autopkgtest [11:15:04]: test command1
OpenPGP_signature
Description: OpenPGP digital signature