unstale

pypi / fakeredis

fakeredis

What changed in fakeredis 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.

5 breaking23 new APIs and options8 performance3 behavior and defaults27 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.6 on npm

fakeredis 266 changes

Breaking changes 5

  • Instances with version 10 no longer share a server with instances with version 1.

    2.39.0release notes

  • Unsorted SORT results are now sorted in scripts and with STORE.

    2.39.0release notes

  • Returns unsorted results in geohash order rather than insertion order.

    2.38.0release notes

  • Does not raise WRONGTYPE for a wrongly typed destination when the source key is missing.

    2.38.0release notes

  • Moves an entry's pending count to the claiming consumer instead of leaving it on the previous owner.

    2.38.0release notes

New APIs and options 23

  • Implements the Redis 8.4 DELEX command.

    2.40.0release notes

  • Implements the Redis 8.4 DIGEST command.

    2.40.0release notes

  • DIGEST requires the new digest extra, installable with pip install "fakeredis[digest]".

    2.40.0release notes

  • Implements the Redis 8.10 HIMPORT DISCARD command.

    2.40.0release notes

  • Implements the Redis 8.10 HIMPORT DISCARDALL command.

    2.40.0release notes

  • Implements the Redis 8.10 HIMPORT PREPARE command.

    2.40.0release notes

  • Implements the Redis 8.10 HIMPORT SET command.

    2.40.0release notes

  • Implements the JSON.NUMPOWBY command.

    2.40.0release notes

  • Async connections report addr, laddr, and fd.

    2.39.0release notes

  • Adds support for the Redis 8.10 BLMOVEM command.

    2.39.0release notes

  • Adds the kividb server type, matching KiviDB 1.0.4's command surface.

    2.39.0release notes

  • Adds support for the Redis 8.10 LMOVEM command.

    2.39.0release notes

  • Adds support for the Redis 8.10 SDIFFCARD command.

    2.39.0release notes

  • Adds support for SORT_RO.

    2.39.0release notes

  • Adds support for the Redis 8.10 SUNIONCARD command.

    2.39.0release notes

  • Adds support for the Redis 8.10 TS.NRANGE command.

    2.39.0release notes

  • Adds support for the Redis 8.10 TS.NREVRANGE command.

    2.39.0release notes

  • Adds support for the Redis 8.10 TS.QUERYLABELS command.

    2.39.0release notes

  • Adds support for the Redis 8.10 TS.READ command.

    2.39.0release notes

  • Accepts the KEEPREF, DELREF, and ACKED reference policies.

    2.39.0release notes

  • Accepts the KEEPREF, DELREF, and ACKED reference policies.

    2.39.0release notes

  • Implements Dragonfly's rate-limiting command, including its time-field rounding, remaining-count truncation, and oversized-request behavior.

    2.38.0release notes

  • Supports redis.setresp(2) and redis.setresp(3); the setting resets to RESP2 for each run and is not exposed when emulating Dragonfly.

    2.38.0release notes

Performance 8

Behavior and default changes 3

  • Each connection gets one client ID and a new one on reconnect.

    2.39.0release notes

  • Matches Dragonfly's command errors, validation, limits, and selected command behavior, including expiry handling, string limits, sorting, copying, geospatial ordering, watched-key dirtiness, scripting, and JSON quirks.

    2.38.0release notes

  • Matches Dragonfly's command replies for numeric results, blocking reads, sorted-set replies, empty streams, unknown lag, pending lookups, and pub/sub namespaces.

    2.38.0release notes

Fixes and other changes 27

  • Pads shorter operands and treats missing keys as empty.

    2.39.0release notes

  • Searches on a missing member return Redis'/Valkey 9's error instead of crashing.

    2.39.0release notes

  • Commands on a missing key return Redis' errors.

    2.39.0release notes

  • Keeps the member when clearing its TTL.

    2.39.0release notes

  • Raises valkey exceptions.

    2.39.0release notes

  • Works for FakeValkey, FakeStrictValkey, and FakeAsyncValkey.

    2.39.0release notes

  • Searches on a missing member return Redis'/Valkey 9's error instead of crashing.

    2.39.0release notes

  • Stops polling when called with timeout=....

    2.39.0release notes

  • Invalidates WATCH like Redis.

    2.39.0release notes

  • Invalidates WATCH like Redis.

    2.39.0release notes

  • Answers RESP2 clients in RESP2.

    2.39.0release notes

  • A single observation now follows Redis 8.10 behavior.

    2.39.0release notes

  • Never reuses deleted IDs and rejects invalid IDs like Redis.

    2.39.0release notes

  • SETID and CREATE, entries-read, and lag follow Redis' rules.

    2.39.0release notes

  • An end ID without a sequence is treated as the whole millisecond.

    2.39.0release notes

  • An end ID without a sequence is treated as the whole millisecond.

    2.39.0release notes

  • An end ID without a sequence is treated as the whole millisecond.

    2.39.0release notes

  • Approximate trimming drops whole nodes.

    2.39.0release notes

  • Fixes ZSCAN while deleting.

    2.39.0release notes

  • On pre-7.0 servers, reports a syntax error before decoding range arguments.

    2.38.0release notes

  • Cancelling a blocking async command no longer returns a connection to the pool with its socket paused, which previously caused later commands to hang.

    2.38.0release notes

  • Lua scripts now receive RESP2-shaped replies from redis.call regardless of the negotiated client protocol, matching Redis.

    2.38.0release notes

  • No longer raises a raw Python KeyError when a pending entry has no live consumer.

    2.38.0release notes

  • Returns the cursor for the next pending-entry scan, and returns 0-0 when the pending list is exhausted.

    2.38.0release notes

  • Honours JUSTID when updating an entry's delivery counter; RETRYCOUNT takes precedence when both are supplied.

    2.38.0release notes

  • Honours RETRYCOUNT when updating an entry's delivery counter; a negative value means it was not given.

    2.38.0release notes

  • Removes entries owned by the deleted consumer and returns how many entries it dropped.

    2.38.0release notes