-
-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Since 2.30.0 release fakeredis
stopped working with python 3.8. Based on my investigation the breaking changes have been introduced #388.
Given that python 3.8 is already EOL, I don't think that losing this compatibility is a problem by itself. Yet I think it should be reflected in metadata where currently required version is set to >= 3.7 to prevent installation of latest version on systems still using python 3.8 or older.
I can provide a PR if needed.
To Reproduce
(venv) ➜ /tmp/fakeredis_report_sample uv run --python 3.8 --with fakeredis==2.30.1 --with redis python
Installed 5 packages in 7ms
Python 3.8.20 (default, Sep 7 2024, 18:35:07)
[GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fakeredis
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/[email protected]/.cache/uv/archive-v0/JMGy-t0wLnTZY2K0UrNGm/lib/python3.8/site-packages/fakeredis/__init__.py", line 3, in <module>
from ._connection import (
File "/home/[email protected]/.cache/uv/archive-v0/JMGy-t0wLnTZY2K0UrNGm/lib/python3.8/site-packages/fakeredis/_connection.py", line 8, in <module>
from fakeredis._fakesocket import FakeSocket
File "/home/[email protected]/.cache/uv/archive-v0/JMGy-t0wLnTZY2K0UrNGm/lib/python3.8/site-packages/fakeredis/_fakesocket.py", line 3, in <module>
from fakeredis.commands_mixins import (
File "/home/[email protected]/.cache/uv/archive-v0/JMGy-t0wLnTZY2K0UrNGm/lib/python3.8/site-packages/fakeredis/commands_mixins/__init__.py", line 3, in <module>
from .acl_mixin import AclCommandsMixin
File "/home/[email protected]/.cache/uv/archive-v0/JMGy-t0wLnTZY2K0UrNGm/lib/python3.8/site-packages/fakeredis/commands_mixins/acl_mixin.py", line 7, in <module>
from fakeredis.model import AccessControlList
File "/home/[email protected]/.cache/uv/archive-v0/JMGy-t0wLnTZY2K0UrNGm/lib/python3.8/site-packages/fakeredis/model/__init__.py", line 4, in <module>
from ._timeseries_model import TimeSeries, TimeSeriesRule, AGGREGATORS
File "/home/[email protected]/.cache/uv/archive-v0/JMGy-t0wLnTZY2K0UrNGm/lib/python3.8/site-packages/fakeredis/model/_timeseries_model.py", line 191, in <module>
AGGREGATORS: Dict[bytes, Callable[[List[float]], float]] = {
TypeError: 'ABCMeta' object is not subscriptable
>>>
Expected behavior
I would expect similar behavior when trying to install latest redis-py
with python 3.8, which officially dropped support for python 3.8 already:
(venv) ➜ /tmp/fakeredis_report_sample uv run --python 3.8 --with redis==6.2.0 python
× No solution found when resolving `--with` dependencies:
╰─▶ Because the current Python version (3.8.20) does not satisfy Python>=3.9 and redis==6.2.0 depends on Python>=3.9, we can conclude that redis==6.2.0 cannot be used.
And because you require redis==6.2.0, we can conclude that your requirements are unsatisfiable.
Desktop (please complete the following information):
- OS: Ubuntu 24.04
- python version: 3.8.20
- redis-py version: 6.1.1
alexeiz
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working