Skip to content

Commit

Permalink
fix:import from typing_extensions/typing
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Apr 19, 2024
1 parent 1ec2939 commit 1e52036
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ description: Change log of all fakeredis releases

- Fix the type hint for the version parameter in the async client #302
- Using LUA 5.1 like real redis #287
- fix: FakeRedisMixin.from_url() return type is really Self. @ben-xo #305

## v2.21.3

Expand Down
6 changes: 5 additions & 1 deletion fakeredis/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
import weakref
from collections import defaultdict
from typing import Dict, Tuple, Any, List, Optional, Union, Set
from typing_extensions import Self

try:
from typing_extensions import Self
except ImportError:
from typing import Self

This comment has been minimized.

Copy link
@PyTorr

PyTorr Apr 21, 2024

It did not work for me:

ImportError: cannot import name 'Self' from 'typing'

Why not add typing_extensions to requirements?

This comment has been minimized.

Copy link
@cunla

cunla Apr 21, 2024

Author Owner

what version of python are you using?


import redis

Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions test/test_lua_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import pytest
import redis

import fakeredis

pytestmark = [
]
pytestmark.extend([
Expand Down

0 comments on commit 1e52036

Please sign in to comment.