redis-python-tutorial
redis-python-tutorial copied to clipboard
Update dependency redis to v5
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| redis (changelog) | ==4.4.4 -> ==5.2.1 |
Release Notes
redis/redis-py (redis)
v5.2.1: 5.2.1
Changes
🐛 Bug Fixes
- Fixed unsecured tempfile.mktemp() command usage (#3446)
- Fixed bug with SLOWLOG GET response parsing on Redis Software (#3441)
- Fixed issue with invoking _close() on closed event loop (#3438)
🧰 Maintenance
- Migrate test infrastructure to new custom docker images (#3415)
- Fixed flacky test with HEXPIREAT command (#3437)
Contributors
We'd like to thank all the contributors who worked on this release!
@IlianIliev @uglide @vladvildanov @teodorfn @akx
v5.2.0: 5.2.0
Changes
🚀 New Features
- Extend AggregateRequest with scorer argument (#3409)
🧰 Maintenance
- Pin pytest-profiling version due to the bug (#3417)
Contributors
We'd like to thank all the contributors who worked on this release!
@uglide @rbs333 @vladvildanov @dwdougherty
v5.1.1: 5.1.1
Changes
5.1.1
🐛 Bug Fixes
- Fixed return type for Redis Set commands to be Set instead of List (#3399)
- Fixed bug with partial Hiredis availability (#3400)
- Fixed bug with async pipeline and cluster fails with some commands (#3402)
5.1.0
🚀 New Features
How to start with Client-side caching?
- Install redis-py 5.1.0
- Use the following code snippet:
r = Redis(protocol=3, cache_config=CacheConfig())
cache = r.get_cache()
r.set("foo", "bar")
### get key from redis and save in local cache
print(r.get("foo"))
### get key from local cache
print(cache.get(CacheKey(command="GET", redis_keys=("foo",))).cache_value)
### change key in redis (cause invalidation)
r.set("foo", "barbar")
### Retrieves a new value from server and cache it
print(r.get("foo"))
### Make sure that new value was cached
print(cache.get(CacheKey(command="GET", redis_keys=("foo",))).cache_value)
Check documentation to get more examples
🔥 Breaking Changes
- Timeseries insertion filters for close samples (#3228)
- Enhanced classes string representation (#3001)
- Partial clean up of Python 3.7 compatibility (#2928)
- Handle Redis Set data type as Python list to avoid a limitations with nested dictionaries (#3324)
Contributors
We'd like to thank all the contributors who worked on this release!
@vladvildanov @dmaier-redislabs @vineethvkumar @ramchandra-st @RafalBielickiIM @jules-ch
v5.1.0: 5.1.0
Changes
🚀 New Features
How to start with Client-side caching?
- Install redis-py 5.1.0
- Use the following code snippet:
r = Redis(protocol=3, cache_config=CacheConfig())
cache = r.get_cache()
r.set("foo", "bar")
### get key from redis and save in local cache
print(r.get("foo"))
### get key from local cache
print(cache.get(CacheKey(command="GET", redis_keys=("foo",))).cache_value)
### change key in redis (cause invalidation)
r.set("foo", "barbar")
### Retrieves a new value from server and cache it
print(r.get("foo"))
### Make sure that new value was cached
print(cache.get(CacheKey(command="GET", redis_keys=("foo",))).cache_value)
Check documentation to get more examples
🔥 Breaking Changes
- Timeseries insertion filters for close samples (#3228)
- Enhanced classes string representation (#3001)
- Partial clean up of Python 3.7 compatibility (#2928)
- Handle RESP3 sets as Python lists (#3324)
🐛 Bug Fixes
- Handle RESP3 sets as Python lists (#3324)
- Prevent async ClusterPipeline instances from becoming "false-y" (#3068)
- Add hostname field to _parse_node_line (#3343)
- More docs fixes (#3326)
- Delete the first-defined (and thus "duplicate") Script class (#3333)
- Catch a known DeprecationWarning when calling .close() (#3335)
- Add missed redismod at test_commands.py (#3369)
🧰 Maintenance
- Update README.md - mentioning redis 7.4 support (#3375)
- Update PyPy 3.8 to 3.10 in CI (#3370)
- Updated commands from docker-compose to docker compose (#3352)
- Added version restrictions for pytest-asyncio (#3362)
- Documentation examples (#3361, #3372, #3374, #3377, #3378)
Contributors
We'd like to thank all the contributors who worked on this release!
@AYMENJD, @AniketP04, @BackflipPenguin, @ING-XIAOJIAN, @MrDenkoV, @Pedram-Parsian, @TheBlusky, @TomerHekmati, @Wh1isper, @Zaczero, @ahmedabdou14, @akx, @andy-stark-redis, @catap, @chayim, @d184230, @danielzhangau, @daveisfera, @dependabot, @dependabot[bot], @dkuser, @dmaier-redislabs, @dmkulazhenko, @dudizimber, @dvora-h, @dwdougherty, @enjoy-binbin, @gerzse, @hongqn, @jakob-keller, @kristjanvalur, @kurtmckee, @matrey, @mattwang44, @max-muoto, @parmenashp, @poiuj, @r0ro, @sjpotter, @tbbream, @trkwyk, @uglide, @vladvildanov, @w-miller, @wKollendorf, @willfrey, @willianmrs, @zakaf, @zware and @zxjlm
v5.0.8: 5.0.8
Changes
🔥 Breaking Changes
- Timeseries insertion filters for close samples (#3228)
🚀 New Features
- Hash field expiration commands (#3218)
- Support the MAXAGE option for CLIENT KILL (#3187)
- Support NOVALUES parameter for HSCAN (#3157)
- Document XREAD of last message (+) (#3187)
- Support missing/empty values in search (#3231)
- Timeseries insertion filters for close samples (#3228)
🧰 Maintenance
🐛 Bug Fixes
- Decode search results at field level (#3309)
v5.0.7: 5.0.7
Changes
🐛 Bug Fixes
- None UnixDomainSocket timeout (#3293)
🧰 Maintenance
- Updated redis version to represent latest available build (#3296)
Contributors
We'd like to thank all the contributors who worked on this release!
@vladvildanov @dmaier-redislabs
v5.0.6: 5.0.6
Changes
🐛 Bug Fixes
- Handle lists in the response of INFO
v5.0.5: 5.0.5
Changes
🐛 Bug Fixes
- Fix parsing of INFO response (#3265)
v5.0.4: 5.0.4
Changes
🐛 Bug Fixes
- Make it possible to customize SSL ciphers (#3212)
v5.0.3: 5.0.3
Changes
🐛 Bug Fixes
- Fix breaking change: message in LockError is now optional (#3176)
🧰 Maintenance
- Bump release-drafter/release-drafter from 5 to 6 (#3171)
- Bump rojopolis/spellcheck-github-actions from 0.35.0 to 0.36.0 (#3172)
- Remove redundant async-timeout dependency (#3177)
v5.0.2: 5.0.2
Changes
🚀 New Features
- Allow to control the minimum SSL version (#3127)
- Add modules support to async RedisCluster (#3115)
- Adding lock_name to LockError (#3023)
- Add GEOSHAPE field type for index creation of RediSearch (#2957)
🐛 Bug Fixes
- Fix retry logic for pubsub and pipeline (#3134)
- Ignore TypeError on disconnect (within multiprocess) (#3149)
- Release already acquired connections on ClusterPipeline, when get_connection raises an exception (#3133)
- Fix possible pipeline connections leak (#3104)
- Return a copy of the response from cache (#3106)
- Fix:
HSETunexpectedly mutates the list passed to items (#3103) - Fix
acl_genpasswith bits (#3062) - Allow the parsing of the asking command to forward original options (#3012)
- Fix parsing of
FT.PROFILEresult (#3063) - Use
disable_decodingin asyncread_responsewith hiredis parser. (#3042) - Fix return types in json commands (#3071)
- Fix Specifying Target Nodes broken hyperlink (#3072)
🧰 Maintenance
- Fix incorrect asserts in test and ensure connections are closed (#3004)
- Revert stale issue version update (#3142)
- Docs: Add timeout parameter for get_message example (#3129)
- Bump codecov/codecov-action from 3 to 4 (#3131)
- Bump actions/stale from 3 to 9 (#3132)
- Fix grammer in BlockingConnectionPool class documentation (#3120)
- Updating async-timeout to 4.0.3 (#3109)
- Fix type hint of arbitrary argument lists (#2908)
- Fix
JSON.OBJLENtype hint (#2966) - Fix
HDELtype hint (#3029) - Docs: organize cluster mode part of lua scripting (#3073)
- Update reported version deprecation in asyncio.client (#2968)
- Make the connection callback methods public again, add documentation (#2980)
- Update repr of important classes with module name and recommended "< … (#3001)
- Typo in advanced features documentation (#3019)
- Fix typos in documentation (#3016
- Add "sum" to DUPLICATE_POLICY documentation of TS.CREATE, TS.ADD and TS.ALTER (#3027)
- Fixed typo in ocsp.py (#3022)
- Creating CODEOWNERS for documentation (#2993)
Contributors
We'd like to thank all the contributors who worked on this release!
@AYMENJD, @AniketP04, @BackflipPenguin, @ING-XIAOJIAN, @MrDenkoV, @Pedram-Parsian, @TheBlusky, @ahmedabdou14, @akx, @chayim, @d184230, @danielzhangau, @dependabot, @dependabot[bot], @dmkulazhenko, @dvora-h, @enjoy-binbin, @hongqn, @jakob-keller, @kristjanvalur, @mattwang44, @parmenashp, @poiuj, @r0ro, @sjpotter, @tbbream, @trkwyk, @w-miller, @wKollendorf, @zakaf, @zware and @zxjlm
v5.0.1: 5.0.1
Changes
🚀 New Features
- Provide aclose() / close() for classes requiring lifetime management (#2898)
- Add support for
ModuleCommandsin cluster (#2951) - Add support for multiple values in
RPUSHX(#2949) - Add
Redis.from_pool()class method, for explicitly owning and closing a ConnectionPool (#2913)
🐛 Bug Fixes
- Fixing monitor parsing for messages containing specific substrings (#2950)
- Cluster determine slot command name need to be upper (#2919)
- Support timeout = 0 in search query (#2934)
- Fix async sentinel: add
push_requestkeyword argument toread_response(#2922) - Fix protocol checking for search commands (#2923)
- Fix: SentinelManagedConnection.read_response() got an unexpected keyword argument 'push_request' (#2894)
- Fix: automatically close connection pool for async Sentinel (#2900)
- Save a reference to created async tasks, to avoid tasks potentially disappearing (#2816)
- Avoid reference cycling by the garbage collector during response reading (#2932)
🧰 Maintenance
- Type hint improvements (#2952)
- Replace
clear_connect_callbackswith_deregister_connect_callback(#2955) - Async fixes, remove del and other things (#2870)
- Add pagination, sorting and grouping examples to search json example (#2890)
- Remove process-id checks from asyncio. Asyncio and fork() does not mix. (#2911)
- Fix resource usage and cleanup Mocks in the unit tests (#2936)
- Remove mentions of tox (#2929)
- Add 7.2 to supported Redis versions (#2896)
- Fix resource warnings in unit tests (#2899)
- Fix typo in redis-stream-example.ipynb (#2918)
- Deprecate RedisGraph (#2927)
- Fix redis 7.2.0 tests (#2902)
- Fix test_scorer (search) (#2920)
Contributors
We'd like to thank all the contributors who worked on this release!
@AOrazaev, @akx, @anio, @chayim, @dvora-h, @elfkuzco, @hauntsaninja, @kristjanvalur, @meiravgri, @uglide and @yangbodong22011
v5.0.0: 5.0.0
What's new?
Triggers and Functions support
Triggers and Functions allow you to execute server-side functions triggered when key values are modified or created in Redis, a stream entry arrival, or explicitly calling them. Simply put, you can replace Lua scripts with easy-to-develop JavaScript or TypeScript code. Move your business logic closer to the data to ensure a lower latency, and forget about updating dependent key values manually in your code. Try it for yourself with Quick start
Full Redis 7.2 and RESP3 support
Python 3.7 End-of-Life
Python 3.7 has reached its end-of-life (EOL) as of June 2023. This means that starting from this date, Python 3.7 will no longer receive any updates, including security patches, bug fixes, or improvements. If you continue to use Python 3.7 post-EOL, you may expose your projects and systems to potential security vulnerabilities. We ended its support in this version and strongly recommend migrating to Python 3.10.
🐛 Bug Fixes
🧰 Maintenance
- Updating client license to clear, MIT (#2884)
- Add py.typed in accordance with PEP-561 (#2738)
- Dependabot label change (#2880)
- Fix type hints in SearchCommands (#2817)
- Add sync modules (except search) tests to cluster CI (#2850)
- Fix a duplicate word in
CONTRIBUTING.md(#2848) - Fixing doc builds (#2869)
- Change cluster docker to edge and enable debug command (#2853)
Contributors
We'd like to thank all the contributors who worked on this release!
@JoanFM, @Ovsyanka83, @chayim, @dependabot, @dependabot[bot], @dvora-h, @kristjanvalur, @kurtmckee, @pall-j and @shacharPash
v4.6.0: 4.6.0
Changes
🧪 Experimental Features
🚀 New Features
- Extract abstract async connection class (#2734)
- Add support for
WAITAOF(#2760) - Introduce OutOfMemoryError exception for Redis write command rejections due to OOM errors (#2778)
- Add
WITHSCOREargument toZRANK(#2758)
🐛 Bug Fixes
- Fix dead weakref in sentinel connection causing ReferenceError (#2767) (#2771)
- Fix Key Error in parse_xinfo_stream (#2788)
- Remove unnecessary __del__ handlers (#2755)
- Added support for missing argument to SentinelManagedConnection.read_response() (#2756)
🧰 Maintenance
- Fix type hint for retry_on_error in async cluster (#2804)
- Clean up documents and fix some redirects (#2801)
- Add unit tests for the
connectmethod of all Redis connection classes (#2631) - Docstring formatting fix (#2796)
Contributors
We'd like to thank all the contributors who worked on this release!
@Smit-Parmar, @TheKevJames, @aciddust, @bmacphee, @bodevone, @dvora-h, @kristjanvalur, @shacharPash, @shahar-lev, @vmihailenco and @woutdenolf
v4.5.5: 4.5.5
Changes
🚀 New Features
- Add support for
CLIENT NO-TOUCH(#2745) - Add support for
CLUSTER MYSHARDID(#2704) - Add "address_remap" feature to RedisCluster (#2726)
- Add
WITHSCORESargument toZREVRANKcommand (#2725) - Improve error output for master discovery (#2720)
🐛 Bug Fixes
- Fix
XADD: allow non negative maxlen (#2739) - Fix create single connection client from url (#2752)
- Optionally disable disconnects in read_response (#2695)
- Fix
SLOWLOG GETreturn value (#2732) - Fix potential race condition during disconnection (#2719)
- Return response in case of KeyError (#2628)
- Fix incorrect usage of once flag in async Sentinel (#2718)
- Fix memory leak caused by hiredis in asyncio case (#2694)
- Really do not use asyncio's timeout lib before 3.11.2 (#2699)
🧰 Maintenance
- Clean PytestUnraisableExceptionWarning from asycio client (#2731)
- Add RedisCluster.remap_host_port, Update tests for CWE 404 (#2706)
- Updated AWS Elasticache IAM connection example (#2702)
- Update CONTRIBUTING guidelines (#2736)
- Fix
ClusterCommandProtocoltype (#2729) - Fix
TOPKlist example. (#2724) - Improving vector similarity search example (#2661)
- Update example of Redisearch creating index (#2703)
Contributors
We'd like to thank all the contributors who worked on this release!
@AYMENJD, @Anthchirp, @Avasam, @NickG123, @SoulPancake, @aciddust, @chayim, @cristianmatache, @dvora-h, @felipou, @kristjanvalur, @mirekdlugosz, @mzdehbashi-github, @oranav, @scoopex, @shacharPash and @tylerhutcherson
v4.5.4: 4.5.4
Changes
Upgrade urgency: SECURITY, contains fixes to security issues.
- (CVE-2023-28859) - Cancelling an async future does not, properly trigger, leading to a potential data leak in specific cases.
- (CVE-2023-28858) - Cancelling an async future does not, properly trigger, leading to a potential data leak in specific cases.
🐛 Bug Fixes
- Fixing cancelled async futures (#2666)
- Fix: do not use asyncio's timeout lib before 3.11.2 (#2659)
- Fix UDS in v4.5.2: UnixDomainSocketConnection missing constructor argument (#2630)
🧰 Maintenance
- Minor fixes for #2666 and enhanced async test (#2673)
- Fix issue 2660: PytestUnraisableExceptionWarning from asycio client (#2669)
- Removing accidentally checked in files (#2642)
Contributors
We'd like to thank all the contributors who worked on this release!
@bellini666, @chayim, @dvora-h, @shacharPash and @woutdenolf
v4.5.3: 4.5.3
Changes
Update urgency: HIGH: There is a critical bug that may affect a subset of users. Upgrade!
🐛 Bug Fixes
v4.5.2: 4.5.2
Changes
🚀 New Features
- Introduce AbstractConnection so that UnixDomainSocketConnection can call super().init (#2588)
- Added queue_class to REDIS_ALLOWED_KEYS (#2577)
- Made search document subscriptable (#2615)
- Sped up the protocol parsing (#2596)
🐛 Bug Fixes
- Fix behaviour of async PythonParser to match RedisParser as for issue #2349 (#2582)
- Replace async_timeout by asyncio.timeout (#2602)
- Update json().arrindex() default values (#2611)
🧰 Maintenance
- Coverage for pypy-3.9 (#2608)
- Developer Experience: Adding redis version compatibility details to the README (#2621)
- Remove redundant assignment to RedisCluster.nodes_manager. (#2620)
- Developer Experience: [types] update return type of smismember to list[int] (#2617)
- Developer Experience: [docs] ConnectionPool SSL example (#2605)
- Developer Experience: Fixed CredentialsProvider examples (#2587)
- Developer Experience: Update README to make pip install copy-pastable on zsh (#2584)
- Developer Experience: Fix for
lpopandrpopreturn typing (#2590)
Contributors
We'd like to thank all the contributors who worked on this release!
@CrimsonGlory, @Galtozzy, @aksinha334, @barshaul, @chayim, @davemcphee, @dvora-h, @kristjanvalur, @ryin1, @sileht, @thebarbershop, @uglide, @woutdenolf and @zakaf
v4.5.1: 4.5.1
Changes
🐛 Bug Fixes
Contributors
We'd like to thank all the contributors who worked on this release!
@dvora-h and @prokazov
v4.5.0: 4.5.0
Changes
Special Note: This redis-py release introduces the ability to write to Redis, using hiredis. If you're using hiredis as an optional requirement, please upgrade to hiredis 2.2.1. In many cases, writes times decrease by > 25%.
🧪 Experimental Features
- Add TS.MGET example for OS Redis Cluster (#2507)
🚀 New Features
- Use hiredis::pack_command to serialized the commands. (#2570)
- Add support for
unlinkin cluster pipeline (#2562)
🐛 Bug Fixes
- Fix issue with
pack_commandsreturning an empty byte sequence (#2416) - Async HiredisParser should finish parsing after a Connection.disconnect() (#2557)
- Check for none, prior to raising exception (#2569)
- Tuple function cannot be passed more than one argument (#2573)
- Synchronise concurrent command calls to single-client to single-client mode (#2568)
🧰 Maintenance
- Add TS.MGET example for OS Redis Cluster (#2507)
- Documentation changes: typo fix (#2566)
- Simplify the sync SocketBuffer, add type hints (#2543)
- Add missing
Uniontype in methodStreamCommands.xclaim()(#2553) - Change redismod docker to redis-stack-server (#2556)
Contributors
We'd like to thank all the contributors who worked on this release!
@SoulPancake, @Vivanov98, @ant1fact, @dvora-h, @gmbnomis, @jmcbailey, @kosuke-zhang, @kristjanvalur, @prokazov, @rbowen and @uglide
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code