Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: redis/redis-py
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.6.0
Choose a base ref
...
head repository: redis/redis-py
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.0.0
Choose a head ref
  • 20 commits
  • 166 files changed
  • 38 contributors

Commits on Jul 16, 2023

  1. Merge 5.0 to master (#2849)

    * Reorganizing the parsers code, and add support for RESP3 (#2574)
    
    * Reorganizing the parsers code
    
    * fix build package
    
    * fix imports
    
    * fix flake8
    
    * add resp to Connection class
    
    * core commands
    
    * python resp3 parser
    
    * pipeline
    
    * async resp3 parser
    
    * some asymc tests
    
    * resp3 parser for async cluster
    
    * async commands tests
    
    * linters
    
    * linters
    
    * linters
    
    * fix ModuleNotFoundError
    
    * fix tests
    
    * fix assert_resp_response_in
    
    * fix command_getkeys in cluster
    
    * fail-fast false
    
    * version
    
    ---------
    
    Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
    
    * Fix async client with resp3 (#2657)
    
    * Add support for PubSub with RESP3 parser (#2721)
    
    * add resp3 pubsub
    
    * linters
    
    * _set_info_logger func
    
    * async pubsun
    
    * docstring
    
    * 5.0.0b2 (#2723)
    
    * Fix `COMMAND` response in resp3 (redis 7+) (#2740)
    
    * Fix protocol version checking (#2737)
    
    * bumping beta version to 5.0.0b3 (#2743)
    
    * Fix parse resp3 dict response: don't use dict comprehension (#2757)
    
    * Fix parse respp3 dict response
    
    * linters
    
    * pin urlib version
    
    * Sharded pubsub (#2762)
    
    * sharded pubsub
    
    * sharded pubsub
    
    Co-authored-by: Leibale Eidelman <me@leibale.com>
    
    * Shrded Pubsub TestPubSubSubscribeUnsubscribe
    
    * fix TestPubSubSubscribeUnsubscribe
    
    * more tests
    
    * linters
    
    * TestPubSubSubcommands
    
    * fix @leibale comments
    
    * linters
    
    * fix @chayim comments
    
    ---------
    
    Co-authored-by: Leibale Eidelman <me@leibale.com>
    
    * 5.0.0b4 (#2781)
    
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * RESP3 tests (#2780)
    
    * fix command response in resp3
    
    * linters
    
    * acl_log & acl_getuser
    
    * client_info
    
    * test_commands and test_asyncio/test_commands
    
    * fix test_command_parser
    
    * fix asyncio/test_connection/test_invalid_response
    
    * linters
    
    * all the tests
    
    * push handler sharded pubsub
    
    * Use assert_resp_response wherever possible
    
    * fix test_xreadgroup
    
    * fix cluster_zdiffstore and cluster_zinter
    
    * fix review comments
    
    * fix review comments
    
    * linters
    
    * Fixing asyncio import (#2759)
    
    * asyncio import fix
    
    * pinning urllib3 to fix CI (#2748)
    
    * noqa
    
    * fixint linters
    
    * fix (#2799)
    
    * RESP3 response callbacks (#2798)
    
    * start cleaning
    
    * clean sone callbacks
    
    * response callbacks
    
    * revert redismod-url change
    
    * fix async tests
    
    * linters
    
    * async cluster
    
    ---------
    
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    
    * RESP3 modules support (#2803)
    
    * start cleaning
    
    * clean sone callbacks
    
    * response callbacks
    
    * modules
    
    * tests
    
    * finish sync search tests
    
    * linters
    
    * async modules
    
    * linters
    
    * revert redismod-url change
    
    * RESP3 fix async tests (#2806)
    
    * fix tests
    
    * add stralgo callback in resp2
    
    * add callback to acl list in resp2
    
    * Adding RESP3 tests support (#2793)
    
    * start cleaning
    
    * clean sone callbacks
    
    * first phase
    
    * tox wrap back
    
    * changing cancel format
    
    * syntax
    
    * lint
    
    * docker
    
    * contain the docker
    
    * tox dev reqs
    
    * back to testing
    
    * response callbacks
    
    * protocol into async conftest
    
    * fix for 3.11 invoke
    
    * docker changes
    
    * fix tests
    
    * linters
    
    * adding
    
    * resp3 tox, until killed
    
    * remove tox
    
    * tests
    
    * requirements.txt
    
    * restoring requirements.txt
    
    * adding a sleep, hopefully enough time for the cluster dockers to settle
    
    * fix search tests
    
    * search test, disable uvloop for pypy due to bug
    
    * syn
    
    * reg
    
    * dialect test improvement
    
    * sleep+, xfail
    
    * tests
    
    * resp
    
    * flaky search test too
    
    * timing
    
    * timing for async test
    
    * test changes
    
    * fix assert_interval_advanced
    
    * revert
    
    * mark async health_check tests with xfail
    
    * change strict to false
    
    * fix github actions package validation
    
    ---------
    
    Co-authored-by: dvora-h <dvora.heller@redis.com>
    
    * change sismember return type (#2813)
    
    * Version 5.0.0rc1 (#2815)
    
    * Merge master to 5.0 (#2827)
    
    * fix: do not use asyncio's timeout lib before 3.11.2 (#2659)
    
    There's an issue in asyncio's timeout lib before 3.11.3 that causes
    async calls to raise `CancelledError`.
    
    This is a cpython issue that was fixed in this commit [1] and
    cherry-picked to previous versions, meaning 3.11.3 will work correctly.
    
    Check [2] for more info.
    
    [1] python/cpython@04adf2d
    [2] #2633
    
    * UnixDomainSocketConnection missing constructor argument (#2630)
    
    * removing useless files (#2642)
    
    * Fix issue 2660: PytestUnraisableExceptionWarning from asycio client (#2669)
    
    * Fixing cancelled async futures (#2666)
    
    Co-authored-by: James R T <jamestiotio@gmail.com>
    Co-authored-by: dvora-h <dvora.heller@redis.com>
    
    * Fix async (#2673)
    
    * Version 4.5.4 (#2674)
    
    * Really do not use asyncio's timeout lib before 3.11.2 (#2699)
    
    4802530 made async-timeout required
    only on Python 3.11.2 and earlier. However, according to PEP-508,
    python_version marker is compared to first two numbers of Python version
    tuple - so it will evaluate to True also on 3.11.3, and install a
    package as a dependency.
    
    * asyncio: Fix memory leak caused by hiredis (#2693) (#2694)
    
    * Update example of Redisearch creating index (#2703)
    
    When creating index, fields should be passed inside an iterable (e.g. list or tuple)
    
    * Improving Vector Similarity Search Example (#2661)
    
    * update vss docs
    
    * add embeddings creation and storage examples
    
    * update based on feedback
    
    * fix version and link
    
    * include more realistic search examples and clean up indices
    
    * completely remove initial cap reference
    
    ---------
    
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    
    * Fix incorrect usage of once flag in async Sentinel (#2718)
    
    In the execute_command of the async Sentinel, the once flag was being
    used incorrectly, with its meaning inverted. To fix we just needed to invert
    the if and else bodies. This isn't being caught by the tests currently
    because the tests of commands that use this flag do not check their
    results/effects (for example the "test_ckquorum" test).
    
    * Fix topk list example. (#2724)
    
    * Improve error output for master discovery (#2720)
    
    Make MasterNotFoundError exception more precise in the case of
    ConnectionError and TimeoutError to help the user to identify
    configuration errors
    
    Co-authored-by: Marc Schöchlin <marc.schoechlin@flipapp.de>
    
    * return response in case of KeyError (#2628)
    
    * return response in case of KeyError
    
    * fix code linters error
    
    * fix linters 2
    
    * fix linters 3
    
    * Add WITHSCORES to ZREVRANK Command (#2725)
    
    * add withscores to zrevrank
    
    * change 0 -> 2
    
    * fix errors
    
    * split test
    
    * Fix `ClusterCommandProtocol` not itself being marked as a protocol (#2729)
    
    * Fix `ClusterCommandProtocol` not itself being marked as a protocol
    
    * Update CHANGES
    
    * Fix potential race condition during disconnection (#2719)
    
    When the disconnect() function is called twice in parallel it is possible that
    one thread deletes the self._sock reference, while the other thread will
    attempt to call .close() on it, leading to an AttributeError.
    
    This situation can routinely be encountered by closing the connection in a
    PubSubWorkerThread error handler in a blocking thread (ie. with
    sleep_time==None), and then calling .close() on the PubSub object.
    The main thread will then run into the disconnect() function, and the listener
    thread is woken up by the closure and will race into the disconnect()
    function, too.
    
    This can be fixed easily by copying the object reference before doing the
    None-check, similar to what we do in the redis.client.close() function.
    
    * add "address_remap" feature to RedisCluster (#2726)
    
    * add cluster "host_port_remap" feature for asyncio.RedisCluster
    
    * Add a unittest for asyncio.RedisCluster
    
    * Add host_port_remap to _sync_ RedisCluster
    
    * add synchronous tests
    
    * rename arg to `address_remap` and take and return an address tuple.
    
    * Add class documentation
    
    * Add CHANGES
    
    * nermina changes from NRedisStack (#2736)
    
    * Updated AWS Elasticache IAM Connection Example (#2702)
    
    Co-authored-by: Nick Gerow <nick.gerow@enlightedinc.com>
    
    * pinning urllib3 to fix CI (#2748)
    
    * Add RedisCluster.remap_host_port, Update tests for CWE 404 (#2706)
    
    * Use provided redis address. Bind to IPv4
    
    * Add missing "await" and perform the correct test for pipe eimpty
    
    * Wait for a send event, rather than rely on sleep time. Excpect cancel errors.
    
    * set delay to 0 except for operation we want to cancel
    This speeds up the unit tests considerably by eliminating unnecessary delay.
    
    * Release resources in test
    
    * Fix cluster test to use address_remap and multiple proxies.
    
    * Use context manager to manage DelayProxy
    
    * Mark failing pipeline tests
    
    * lint
    
    * Use a common "master_host" test fixture
    
    * Update redismodules.rst (#2747)
    
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * Add support for cluster myshardid (#2704)
    
    * feat: adding support for cluster myshardid
    
    * lint fix
    
    * fix: comment fix and async test
    
    * fix: adding version check
    
    * fix lint:
    
    * linters
    
    ---------
    
    Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com>
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    Co-authored-by: dvora-h <dvora.heller@redis.com>
    
    * clean warnings (#2731)
    
    * fix parse_slowlog_get (#2732)
    
    * Optionally disable disconnects in read_response (#2695)
    
    * Add regression tests and fixes for issue #1128
    
    * Fix tests for resumable read_response to use "disconnect_on_error"
    
    * undo prevision fix attempts in async client and cluster
    
    * re-enable cluster test
    
    * Suggestions from code review
    
    * Add CHANGES
    
    * Add client no-touch (#2745)
    
    * Add client no-touch
    
    * Update redis/commands/core.py
    
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * Update test_commands.py
    
    Improve test_client_no_touch
    
    * Update test_commands.py
    
    Add async version test case
    
    * Chore remove whitespace
    
    Oops
    
    ---------
    
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * fix create single_connection_client from url (#2752)
    
    * Fix `xadd` allow non negative maxlen (#2739)
    
    * Fix xadd allow non negative maxlen
    
    * Update change log
    
    ---------
    
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * Version 4.5.5 (#2753)
    
    * Kristjan/issue #2754: Add missing argument to SentinelManagedConnection.read_response() (#2756)
    
    * Increase timeout for a test which would hang completely if failing.
    Timeouts in virtualized CI backends can occasionally fail if too short.
    
    * add "disconnect_on_error" argument to SentinelManagedConnection
    
    * update Changes
    
    * lint
    
    * support JSON.MERGE Command (#2761)
    
    * support JSON.MERGE Command
    
    * linters
    
    * try with abc instead person
    
    * change @skip_ifmodversion_lt to latest ReJSON 2.4.7
    
    * change version
    
    * fix test
    
    * linters
    
    * add async test
    
    * Issue #2749: Remove unnecessary __del__ handlers (#2755)
    
    * Remove unnecessary __del__ handlers
    There normally should be no logic attached to del.  Cleanly disconnecting network resources is not needed at that time.
    
    * add CHANGES
    
    * Add WITHSCORE to ZRANK (#2758)
    
    * add withscore to zrank with tests
    
    * fix test
    
    * Fix JSON.MERGE Summary (#2786)
    
    * Fix JSON.MERGE Summary
    
    * linters
    
    * Fixed key error in parse_xinfo_stream (#2788)
    
    * insert newline to prevent sphinx from assuming code block (#2796)
    
    * Introduce OutOfMemoryError exception for Redis write command rejections due to OOM errors (#2778)
    
    * expose OutOfMemoryError as explicit exception type
    
    - handle "OOM" error code string by raising explicit
      exception type instance
    - enables callers to avoid string matching after
      catching ResponseError
    
    * add OutOfMemoryError exception class docstring
    
    * Provide more info in the exception docstring
    
    * Fix formatting
    
    * Again
    
    * linters
    
    ---------
    
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * Add unit tests for the `connect` method of all Redis connection classes (#2631)
    
    * tests: move certificate discovery to a separate module
    
    * tests: add 'connect' tests for all Redis connection classes
    
    ---------
    
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * Fix dead weakref in sentinel connection causing ReferenceError (#2767) (#2771)
    
    * Fix dead weakref in sentinel conn (#2767)
    
    * Update CHANGES
    
    ---------
    
    Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * chore(documentation): fix redirects and some small cleanups (#2801)
    
    * Add waitaof (#2760)
    
    * Add waitaof
    
    * Update test_commands.py
    
    add test_waitaof
    
    * Update test_commands.py
    
    Add test_waitaof
    
    * Fix doc string
    
    ---------
    
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
    
    * Extract abstract async connection class (#2734)
    
    * make 'socket_timeout' and 'socket_connect_timeout' equivalent for TCP and UDS connections
    
    * abstract asynio connection in analogy with the synchronous connection
    
    ---------
    
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * Fix type hint for retry_on_error in async cluster (#2804)
    
    * fix(asyncio.cluster): fixup retry_on_error type hint
    
    This parameter accepts a list of _classes of Exceptions_, not a list of instantiated Exceptions. Fixup the type hint accordingly.
    
    * chore: update changelog
    
    ---------
    
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    
    * Fix CI (#2809)
    
    * Support JSON.MSET Command (#2766)
    
    * support JSON.MERGE Command
    
    * linters
    
    * try with abc instead person
    
    * change @skip_ifmodversion_lt to latest ReJSON 2.4.7
    
    * change version
    
    * fix test
    
    * linters
    
    * add async test
    
    * Support JSON.MSET command
    
    * trying to run CI
    
    * linters
    
    * add async test
    
    * reminder do delete the integration changes
    
    * delete the line from integration
    
    * fix the interface
    
    * change docstring
    
    ---------
    
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    Co-authored-by: dvora-h <dvora.heller@redis.com>
    
    * Version 4.6.0 (#2810)
    
    * master changes
    
    * linters
    
    * fix test_cwe_404 cluster test
    
    ---------
    
    Co-authored-by: Thiago Bellini Ribeiro <hackedbellini@gmail.com>
    Co-authored-by: woutdenolf <woutdenolf@users.sf.net>
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    Co-authored-by: shacharPash <93581407+shacharPash@users.noreply.github.com>
    Co-authored-by: James R T <jamestiotio@gmail.com>
    Co-authored-by: Mirek Długosz <miniopl+github@gmail.com>
    Co-authored-by: Oran Avraham <252748+oranav@users.noreply.github.com>
    Co-authored-by: mzdehbashi-github <85902780+mzdehbashi-github@users.noreply.github.com>
    Co-authored-by: Tyler Hutcherson <tyler.hutcherson@redis.com>
    Co-authored-by: Felipe Machado <462154+felipou@users.noreply.github.com>
    Co-authored-by: AYMEN Mohammed <53928879+AYMENJD@users.noreply.github.com>
    Co-authored-by: Marc Schöchlin <ms-github@256bit.org>
    Co-authored-by: Marc Schöchlin <marc.schoechlin@flipapp.de>
    Co-authored-by: Avasam <samuel.06@hotmail.com>
    Co-authored-by: Markus Gerstel <2102431+Anthchirp@users.noreply.github.com>
    Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
    Co-authored-by: Nick Gerow <Nick.G.123@hotmail.com>
    Co-authored-by: Nick Gerow <nick.gerow@enlightedinc.com>
    Co-authored-by: Cristian Matache <cristianmatache@hotmail.com>
    Co-authored-by: Anurag Bandyopadhyay <angbpy@gmail.com>
    Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com>
    Co-authored-by: Seongchuel Ahn <aciddust20@gmail.com>
    Co-authored-by: Alibi <aliby.bbb@gmail.com>
    Co-authored-by: Smit Parmar <smitraj333@gmail.com>
    Co-authored-by: Brad MacPhee <macphee@gmail.com>
    Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
    Co-authored-by: Shahar Lev <shahar_lev@hotmail.com>
    Co-authored-by: Vladimir Mihailenco <vladimir.webdev@gmail.com>
    Co-authored-by: Kevin James <KevinJames@thekev.in>
    
    * RESP3 response-callbacks cleanup (#2841)
    
    * cluenup
    
    * sentinel callbacks
    
    * move callbacks
    
    * fix async cluster tests
    
    * _parsers and import fix in tests
    
    * linters
    
    * make modules callbacks private
    
    * fix async search
    
    * fix
    
    ---------
    
    Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
    
    * Version 5.0.0rc2 (#2843)
    
    * linters
    
    ---------
    
    Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    Co-authored-by: Leibale Eidelman <me@leibale.com>
    Co-authored-by: Thiago Bellini Ribeiro <hackedbellini@gmail.com>
    Co-authored-by: woutdenolf <woutdenolf@users.sf.net>
    Co-authored-by: shacharPash <93581407+shacharPash@users.noreply.github.com>
    Co-authored-by: James R T <jamestiotio@gmail.com>
    Co-authored-by: Mirek Długosz <miniopl+github@gmail.com>
    Co-authored-by: Oran Avraham <252748+oranav@users.noreply.github.com>
    Co-authored-by: mzdehbashi-github <85902780+mzdehbashi-github@users.noreply.github.com>
    Co-authored-by: Tyler Hutcherson <tyler.hutcherson@redis.com>
    Co-authored-by: Felipe Machado <462154+felipou@users.noreply.github.com>
    Co-authored-by: AYMEN Mohammed <53928879+AYMENJD@users.noreply.github.com>
    Co-authored-by: Marc Schöchlin <ms-github@256bit.org>
    Co-authored-by: Marc Schöchlin <marc.schoechlin@flipapp.de>
    Co-authored-by: Avasam <samuel.06@hotmail.com>
    Co-authored-by: Markus Gerstel <2102431+Anthchirp@users.noreply.github.com>
    Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
    Co-authored-by: Nick Gerow <Nick.G.123@hotmail.com>
    Co-authored-by: Nick Gerow <nick.gerow@enlightedinc.com>
    Co-authored-by: Cristian Matache <cristianmatache@hotmail.com>
    Co-authored-by: Anurag Bandyopadhyay <angbpy@gmail.com>
    Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com>
    Co-authored-by: Seongchuel Ahn <aciddust20@gmail.com>
    Co-authored-by: Alibi <aliby.bbb@gmail.com>
    Co-authored-by: Smit Parmar <smitraj333@gmail.com>
    Co-authored-by: Brad MacPhee <macphee@gmail.com>
    Co-authored-by: Igor Malinovskiy <u.glide@gmail.com>
    Co-authored-by: Shahar Lev <shahar_lev@hotmail.com>
    Co-authored-by: Vladimir Mihailenco <vladimir.webdev@gmail.com>
    Co-authored-by: Kevin James <KevinJames@thekev.in>

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2732a85 View commit details

Commits on Jul 26, 2023

  1. Change cluster docker to edge and enable debug command (#2853)

    * debug in cluster docker, replace for master
    
    * sleep time for cluster to settle...
    
    * fix test_cluster_delslotsrange
    
    * fix tests
    
    ---------
    
    Co-authored-by: dvora-h <dvora.heller@redis.com>
    chayim and dvora-h authored Jul 26, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2c2860d View commit details

Commits on Jul 31, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8e5d5ce View commit details

Commits on Aug 2, 2023

  1. Fixing doc builds (#2869)

    chayim authored Aug 2, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    471f860 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a49e656 View commit details
  3. EOL for Python 3.7 (#2852)

    chayim authored Aug 2, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dc62e19 View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7d70c91 View commit details

Commits on Aug 3, 2023

  1. Add sync modules (except search) tests to cluster CI (#2850)

    * Add modules to cluster ci
    
    * remove async tests
    
    * fix protocol checking
    
    * fix tests
    
    * revert cluster docker change
    
    * skip json 2.6.0 tests
    
    * remove breakpoint
    
    * skip test_get_latest
    
    * skip json.mset
    
    * type hint
    
    * revert type hints
    
    * ilnters
    
    ---------
    
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    dvora-h and chayim authored Aug 3, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    66bad8e View commit details
  2. Fix timeout retrying on Redis pipeline execution (#2812)

    Achieved by modifying Pipeline._disconnect_raise_reset
    
    Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
    pall-j and dvora-h authored Aug 3, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    da27f4b View commit details

Commits on Aug 6, 2023

  1. Fix type hints in SearchCommands (#2817)

    * fix type hints
    
    * fix lint error
    
    * fix linters
    
    ---------
    
    Co-authored-by: dvora-h <dvora.heller@redis.com>
    JoanFM and dvora-h authored Aug 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3e50d28 View commit details

Commits on Aug 7, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8370c4a View commit details

Commits on Aug 8, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    38c7de6 View commit details
  2. Bump pypa/gh-action-pip-audit from 1.0.0 to 1.0.8 (#2879)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0ed8077 View commit details
  3. Bump actions/upload-artifact from 2 to 3 (#2877)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    673617d View commit details
  4. Add py.typed in accordance with PEP-561 (#2738)

    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    zmievsa and chayim authored Aug 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a532f89 View commit details
  5. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b0abd55 View commit details
  6. Adding support for triggered functions (TFUNCTION) (#2861)

    Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
    Co-authored-by: dvora-h <dvora.heller@redis.com>
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    4 people authored Aug 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d5c2d1d View commit details

Commits on Aug 9, 2023

  1. Add support for CLIENT SETINFO (#2857)

    Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
    Co-authored-by: Chayim <chayim@users.noreply.github.com>
    Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
    4 people authored Aug 9, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f121cf2 View commit details
  2. Version 5.0.0 (#2874)

    chayim authored Aug 9, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2f67926 View commit details

Commits on Aug 10, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    28cc65c View commit details
Showing with 11,051 additions and 6,852 deletions.
  1. +26 −0 .flake8
  2. +8 −0 .github/dependabot.yml
  3. +29 −0 .github/spellcheck-settings.yml
  4. +142 −0 .github/wordlist.txt
  5. +47 −0 .github/workflows/docs.yaml
  6. +64 −15 .github/workflows/integration.yaml
  7. +14 −0 .github/workflows/spellcheck.yml
  8. +5 −0 .isort.cfg
  9. +536 −534 CHANGES
  10. +3 −3 CONTRIBUTING.md
  11. +1 −1 LICENSE
  12. +16 −2 README.md
  13. +2 −2 benchmarks/socket_read_size.py
  14. +2 −3 dev_requirements.txt
  15. +109 −0 docker-compose.yml
  16. +0 −4 docker/base/Dockerfile
  17. +0 −11 docker/base/Dockerfile.cluster
  18. +0 −9 docker/base/Dockerfile.cluster4
  19. +0 −9 docker/base/Dockerfile.cluster5
  20. +0 −4 docker/base/Dockerfile.redis4
  21. +0 −4 docker/base/Dockerfile.redis5
  22. +0 −12 docker/base/Dockerfile.redismod_cluster
  23. +0 −4 docker/base/Dockerfile.sentinel
  24. +0 −4 docker/base/Dockerfile.sentinel4
  25. +0 −4 docker/base/Dockerfile.sentinel5
  26. +0 −11 docker/base/Dockerfile.stunnel
  27. +0 −18 docker/base/Dockerfile.unstable
  28. +0 −11 docker/base/Dockerfile.unstable_cluster
  29. +0 −17 docker/base/Dockerfile.unstable_sentinel
  30. +0 −1 docker/base/README.md
  31. +0 −26 docker/base/create_cluster4.sh
  32. +0 −26 docker/base/create_cluster5.sh
  33. +0 −46 docker/base/create_redismod_cluster.sh
  34. +0 −3 docker/cluster/redis.conf
  35. +0 −2 docker/redis4/master/redis.conf
  36. +0 −6 docker/redis4/sentinel/sentinel_1.conf
  37. +0 −6 docker/redis4/sentinel/sentinel_2.conf
  38. +0 −6 docker/redis4/sentinel/sentinel_3.conf
  39. +0 −2 docker/redis5/master/redis.conf
  40. +0 −3 docker/redis5/replica/redis.conf
  41. +0 −6 docker/redis5/sentinel/sentinel_1.conf
  42. +0 −6 docker/redis5/sentinel/sentinel_2.conf
  43. +0 −6 docker/redis5/sentinel/sentinel_3.conf
  44. +0 −2 docker/redis6.2/master/redis.conf
  45. +0 −3 docker/redis6.2/replica/redis.conf
  46. +0 −6 docker/redis6.2/sentinel/sentinel_2.conf
  47. +0 −6 docker/redis6.2/sentinel/sentinel_3.conf
  48. +0 −4 docker/redis7/master/redis.conf
  49. +0 −8 docker/redismod_cluster/redis.conf
  50. +0 −3 docker/unstable/redis.conf
  51. +0 −4 docker/unstable_cluster/redis.conf
  52. +7 −0 dockers/Dockerfile.cluster
  53. +8 −0 dockers/cluster.redis.conf
  54. +4 −3 {docker/base → dockers}/create_cluster.sh
  55. +1 −3 docker/redis6.2/sentinel/sentinel_1.conf → dockers/sentinel.conf
  56. 0 {docker → dockers}/stunnel/README
  57. +1 −1 {docker → dockers}/stunnel/conf/redis.conf
  58. 0 {docker → dockers}/stunnel/create_certs.sh
  59. 0 {docker → dockers}/stunnel/keys/ca-cert.pem
  60. 0 {docker → dockers}/stunnel/keys/ca-key.pem
  61. 0 {docker → dockers}/stunnel/keys/client-cert.pem
  62. 0 {docker → dockers}/stunnel/keys/client-key.pem
  63. 0 {docker → dockers}/stunnel/keys/client-req.pem
  64. 0 {docker → dockers}/stunnel/keys/server-cert.pem
  65. 0 {docker → dockers}/stunnel/keys/server-key.pem
  66. 0 {docker → dockers}/stunnel/keys/server-req.pem
  67. +53 −21 docs/advanced_features.rst
  68. +10 −10 docs/clustering.rst
  69. +2 −2 docs/conf.py
  70. +142 −68 docs/examples/asyncio_examples.ipynb
  71. +50 −15 docs/examples/connection_examples.ipynb
  72. +1 −2 docs/examples/opentelemetry/main.py
  73. +1 −1 docs/examples/redis-stream-example.ipynb
  74. +5 −4 docs/index.rst
  75. +4 −4 docs/lua_scripting.rst
  76. +1 −0 docs/requirements.txt
  77. +69 −0 docs/resp3_features.rst
  78. +13 −0 pytest.ini
  79. +1 −0 redis/__init__.py
  80. +20 −0 redis/_parsers/__init__.py
  81. +232 −0 redis/_parsers/base.py
  82. +158 −43 redis/{commands/parser.py → _parsers/commands.py}
  83. +44 −0 redis/_parsers/encoders.py
  84. +852 −0 redis/_parsers/helpers.py
  85. +217 −0 redis/_parsers/hiredis.py
  86. +132 −0 redis/_parsers/resp2.py
  87. +261 −0 redis/_parsers/resp3.py
  88. +162 −0 redis/_parsers/socket.py
  89. +0 −2 redis/asyncio/__init__.py
  90. +62 −16 redis/asyncio/client.py
  91. +20 −11 redis/asyncio/cluster.py
  92. +103 −373 redis/asyncio/connection.py
  93. +0 −94 redis/asyncio/parser.py
  94. +118 −807 redis/client.py
  95. +136 −10 redis/cluster.py
  96. +0 −2 redis/commands/__init__.py
  97. +64 −21 redis/commands/bf/__init__.py
  98. +0 −3 redis/commands/bf/commands.py
  99. +33 −0 redis/commands/bf/info.py
  100. +10 −0 redis/commands/cluster.py
  101. +235 −28 redis/commands/core.py
  102. +8 −0 redis/commands/helpers.py
  103. +29 −17 redis/commands/json/__init__.py
  104. +23 −4 redis/commands/search/__init__.py
  105. +113 −106 redis/commands/search/commands.py
  106. +24 −14 redis/commands/timeseries/__init__.py
  107. +9 −0 redis/commands/timeseries/info.py
  108. +2 −5 redis/compat.py
  109. +94 −482 redis/connection.py
  110. +0 −1 redis/ocsp.py
  111. 0 redis/py.typed
  112. +15 −4 redis/typing.py
  113. +35 −0 redis/utils.py
  114. +5 −1 setup.py
  115. +39 −27 tasks.py
  116. +50 −43 tests/conftest.py
  117. +2 −2 tests/ssl_utils.py
  118. +27 −17 tests/test_asyncio/conftest.py
  119. +267 −247 tests/test_asyncio/test_bloom.py
  120. +246 −137 tests/test_asyncio/test_cluster.py
  121. +388 −207 tests/test_asyncio/test_commands.py
  122. +0 −1 tests/test_asyncio/test_connect.py
  123. +71 −25 tests/test_asyncio/test_connection.py
  124. +6 −4 tests/test_asyncio/test_connection_pool.py
  125. +0 −1 tests/test_asyncio/test_credentials.py
  126. +1 −2 tests/test_asyncio/test_cwe_404.py
  127. +1 −1 tests/test_asyncio/test_encoding.py
  128. +65 −66 tests/test_asyncio/test_graph.py
  129. +390 −354 tests/test_asyncio/test_json.py
  130. +0 −1 tests/test_asyncio/test_lock.py
  131. +0 −1 tests/test_asyncio/test_monitor.py
  132. +0 −3 tests/test_asyncio/test_pipeline.py
  133. +27 −12 tests/test_asyncio/test_pubsub.py
  134. +0 −1 tests/test_asyncio/test_retry.py
  135. +0 −1 tests/test_asyncio/test_scripting.py
  136. +1,045 −517 tests/test_asyncio/test_search.py
  137. +0 −1 tests/test_asyncio/test_sentinel.py
  138. +0 −1 tests/test_asyncio/test_sentinel_managed_connection.py
  139. +540 −330 tests/test_asyncio/test_timeseries.py
  140. +67 −64 tests/test_bloom.py
  141. +311 −100 tests/test_cluster.py
  142. +40 −10 tests/test_command_parser.py
  143. +580 −253 tests/test_commands.py
  144. +21 −15 tests/test_connect.py
  145. +13 −17 tests/test_connection.py
  146. +3 −3 tests/test_connection_pool.py
  147. +6 −1 tests/test_credentials.py
  148. +0 −1 tests/test_encoding.py
  149. +33 −13 tests/test_function.py
  150. +6 −27 tests/test_graph.py
  151. +0 −1 tests/test_graph_utils/test_edge.py
  152. +0 −1 tests/test_graph_utils/test_node.py
  153. +0 −1 tests/test_graph_utils/test_path.py
  154. +223 −148 tests/test_json.py
  155. +4 −3 tests/test_lock.py
  156. +0 −1 tests/test_multiprocessing.py
  157. +0 −3 tests/test_pipeline.py
  158. +401 −23 tests/test_pubsub.py
  159. +0 −1 tests/test_retry.py
  160. +0 −1 tests/test_scripting.py
  161. +1,164 −533 tests/test_search.py
  162. +0 −1 tests/test_sentinel.py
  163. +0 −1 tests/test_ssl.py
  164. +421 −207 tests/test_timeseries.py
  165. +0 −379 tox.ini
  166. +0 −1 whitelist.py
26 changes: 26 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[flake8]
max-line-length = 88
exclude =
*.egg-info,
*.pyc,
.git,
.tox,
.venv*,
build,
docs/*,
dist,
docker,
venv*,
.venv*,
whitelist.py,
tasks.py
ignore =
E126
E203
F405
N801
N802
N803
N806
N815
W503
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
labels:
- "maintenance"
schedule:
interval: "monthly"
29 changes: 29 additions & 0 deletions .github/spellcheck-settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
matrix:
- name: Markdown
expect_match: false
apsell:
lang: en
d: en_US
ignore-case: true
dictionary:
wordlists:
- .github/wordlist.txt
output: wordlist.dic
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- markdown.extensions.extra:
- pyspelling.filters.html:
comments: false
attributes:
- alt
ignores:
- ':matches(code, pre)'
- code
- pre
- blockquote
- img
sources:
- '*.md'
- 'docs/*.rst'
- 'docs/*.ipynb'
142 changes: 142 additions & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
APM
ARGV
BFCommands
CFCommands
CMSCommands
ClusterNode
ClusterNodes
ClusterPipeline
ClusterPubSub
ConnectionPool
CoreCommands
EVAL
EVALSHA
GraphCommands
Grokzen's
INCR
IOError
Instrumentations
JSONCommands
Jaeger
Ludovico
Magnocavallo
McCurdy
NOSCRIPT
NUMPAT
NUMPT
NUMSUB
OSS
OpenCensus
OpenTelemetry
OpenTracing
Otel
PubSub
READONLY
RediSearch
RedisBloom
RedisCluster
RedisClusterCommands
RedisClusterException
RedisClusters
RedisGraph
RedisInstrumentor
RedisJSON
RedisTimeSeries
SHA
SearchCommands
SentinelCommands
SentinelConnectionPool
Sharded
Solovyov
SpanKind
Specfiying
StatusCode
TCP
TOPKCommands
TimeSeriesCommands
Uptrace
ValueError
WATCHed
WatchError
api
args
async
asyncio
autoclass
automodule
backoff
bdb
behaviour
bool
boolean
booleans
bysource
charset
del
dev
eg
exc
firsttimersonly
fo
genindex
gmail
hiredis
http
idx
iff
ini
json
keyslot
keyspace
kwarg
linters
localhost
lua
makeapullrequest
maxdepth
mget
microservice
microservices
mset
multikey
mykey
nonatomic
observability
opentelemetry
oss
performant
pmessage
png
pre
psubscribe
pubsub
punsubscribe
py
pypi
quickstart
readonly
readwrite
redis
redismodules
reinitialization
replicaof
repo
runtime
sedrik
sharded
ssl
str
stunnel
subcommands
thevalueofmykey
timeseries
toctree
topk
tox
triaging
txt
un
unicode
url
virtualenv
www
47 changes: 47 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docs CI

on:
push:
branches:
- master
- '[0-9].[0-9]'
pull_request:
branches:
- master
- '[0-9].[0-9]'
schedule:
- cron: '0 1 * * *' # nightly build

concurrency:
group: ${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:

build-docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
- name: install deps
run: |
sudo apt-get update -yqq
sudo apt-get install -yqq pandoc make
- name: run code linters
run: |
pip install -r requirements.txt -r dev_requirements.txt -r docs/requirements.txt
invoke build-docs
- name: upload docs
uses: actions/upload-artifact@v3
with:
name: redis-py-docs
path: |
docs/_build/html
79 changes: 64 additions & 15 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -16,6 +16,10 @@ on:
schedule:
- cron: '0 1 * * *' # nightly build

concurrency:
group: ${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

@@ -26,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pypa/gh-action-pip-audit@v1.0.0
- uses: pypa/gh-action-pip-audit@v1.0.8
with:
inputs: requirements.txt dev_requirements.txt
ignore-vulns: |
@@ -48,7 +52,7 @@ jobs:
run-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 60
strategy:
max-parallel: 15
fail-fast: false
@@ -68,32 +72,77 @@ jobs:
- name: run tests
run: |
pip install -U setuptools wheel
pip install -r requirements.txt
pip install -r dev_requirements.txt
tox -e ${{matrix.test-type}}-${{matrix.connection-type}}
- uses: actions/upload-artifact@v2
if [ "${{matrix.connection-type}}" == "hiredis" ]; then
pip install hiredis
fi
invoke devenv
sleep 10 # time to settle
invoke ${{matrix.test-type}}-tests
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: pytest-results-${{matrix.test-type}}
name: pytest-results-${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.python-version}}
path: '${{matrix.test-type}}*results.xml'

- name: Upload codecov coverage
uses: codecov/codecov-action@v3
if: ${{matrix.python-version == '3.11'}}
with:
fail_ci_if_error: false
# - name: View Test Results
# uses: dorny/test-reporter@v1
# if: success() || failure()
# with:
# name: Test Results ${{matrix.python-version}} ${{matrix.test-type}}-${{matrix.connection-type}}
# path: '${{matrix.test-type}}*results.xml'
# reporter: java-junit
# list-suites: failed
# list-tests: failed
# max-annotations: 10

- name: View Test Results
uses: dorny/test-reporter@v1
if: success() || failure()
continue-on-error: true
with:
name: Test Results ${{matrix.python-version}} ${{matrix.test-type}}-${{matrix.connection-type}}
path: '*.xml'
reporter: java-junit
list-suites: all
list-tests: all
max-annotations: 10
fail-on-error: 'false'

resp3_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.11']
test-type: ['standalone', 'cluster']
connection-type: ['hiredis', 'plain']
protocol: ['3']
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: RESP3 [${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}}]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: run tests
run: |
pip install -U setuptools wheel
pip install -r requirements.txt
pip install -r dev_requirements.txt
if [ "${{matrix.connection-type}}" == "hiredis" ]; then
pip install hiredis
fi
invoke devenv
sleep 5 # time to settle
invoke ${{matrix.test-type}}-tests
invoke ${{matrix.test-type}}-tests --uvloop
build_and_test_package:
name: Validate building and installing the package
runs-on: ubuntu-latest
needs: [run-tests]
strategy:
fail-fast: false
matrix:
extension: ['tar.gz', 'whl']
steps:
14 changes: 14 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: spellcheck
on:
pull_request:
jobs:
check-spelling:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check Spelling
uses: rojopolis/spellcheck-github-actions@0.33.1
with:
config_path: .github/spellcheck-settings.yml
task_name: Markdown
5 changes: 5 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[settings]
profile=black
multi_line_output=3
src_paths = ["redis", "tests"]
skip_glob=benchmarks/*
Loading