Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependencies on latest pypi version: 1.7.6 #23

Closed
JoseKilo opened this issue May 25, 2022 · 1 comment
Closed

Missing dependencies on latest pypi version: 1.7.6 #23

JoseKilo opened this issue May 25, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@JoseKilo
Copy link

Describe the bug

It looks like fakeredis still depends on six and sortedcontainers, but the dependencies were removed in this PR #12 while migrating to poetry.

Before #12 :

install_requires =
    packaging
    redis<=4.3.1
    six>=1.12
    sortedcontainers

After #12 :

python = "^3.8"
lupa = "1.13"
redis = "4.3.1"
aioredis = "^2.0.1"

Current master:

[tool.poetry.dependencies]
python = "^3.8"
lupa = { version = "^1.13", optional = true }
redis = "<=4.3.1"
aioredis = { version = "^2.0.1", optional = true }

[tool.poetry.extras]
lua = ["lupa"]
aioredis = ["aioredis"]

I'm getting an error when I try to import using the latest version:

ImportError while loading conftest '/home/lyst/code/tests/conftest.py'.
tests/conftest.py:8: in <module>
    from fakeredis import FakeRedis
../venv/lib/python3.9/site-packages/fakeredis/__init__.py:1: in <module>
    from ._server import FakeServer, FakeRedis, FakeStrictRedis, FakeConnection   # noqa: F401
../venv/lib/python3.9/site-packages/fakeredis/_server.py:21: in <module>
    from ._zset import ZSet
../venv/lib/python3.9/site-packages/fakeredis/_zset.py:1: in <module>
    import sortedcontainers
E   ModuleNotFoundError: No module named 'sortedcontainers'

To Reproduce
Steps to reproduce the behavior:

  1. Install version 1.7.6 on a clean environment
  2. Open a python shell
  3. import fakeredis
  4. See error:
(.venv) AA> python
Python 3.10.4 (main, Apr  9 2022, 21:27:52) [GCC 7.5.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/jose/workspace/lyst/braze-api/AA/.venv/lib/python3.10/site-packages/fakeredis/__init__.py", line 1, in <module>
    from ._server import FakeServer, FakeRedis, FakeStrictRedis, FakeConnection   # noqa: F401
  File "/home/jose/workspace/lyst/braze-api/AA/.venv/lib/python3.10/site-packages/fakeredis/_server.py", line 19, in <module>
    import six
ModuleNotFoundError: No module named 'six'

Expected behavior
No import errors.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Linux
  • python version: 3.10.4
  • redis-py version: pip install fakeredis==1.7.6
  • full requirements.txt?: N/A

Additional context
Add any other context about the problem here.

@cunla
Copy link
Owner

cunla commented May 25, 2022

Thanks for the fix, I'll publish it now and write a test for it later.

@cunla cunla closed this as completed May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants