Skip to content

Commit

Permalink
Merge branch 'master' into client-setinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
chayim authored Aug 3, 2023
2 parents 31aaadb + da27f4b commit 416645c
Show file tree
Hide file tree
Showing 23 changed files with 380 additions and 281 deletions.
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,6 @@ you would like and how it should work.
## Code review process

The core team regularly looks at pull requests. We will provide
feedback as as soon as possible. After receiving our feedback, please respond
feedback as soon as possible. After receiving our feedback, please respond
within two weeks. After that time, we may close your PR if it isn't
showing any activity.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ The Python interface to the Redis key-value store.

---------------------------------------------

**Note: ** redis-py 5.0 will be the last version of redis-py to support Python 3.7, as it has reached [end of life](https://devguide.python.org/versions/). redis-py 5.1 will support Python 3.8+.

---------------------------------------------

## Installation

Start a redis via docker:
Expand Down Expand Up @@ -45,7 +49,8 @@ The table below higlights version compatibility of the most-recent library versi
| Library version | Supported redis versions |
|-----------------|-------------------|
| 3.5.3 | <= 6.2 Family of releases |
| >= 4.1.0 | Version 5.0 to current |
| >= 4.5.0 | Version 5.0 to 7.0 |
| >= 5.0.0 | Versiond 5.0 to current |


## Usage
Expand All @@ -63,6 +68,15 @@ b'bar'

The above code connects to localhost on port 6379, sets a value in Redis, and retrieves it. All responses are returned as bytes in Python, to receive decoded strings, set *decode_responses=True*. For this, and more connection options, see [these examples](https://redis.readthedocs.io/en/stable/examples.html).


#### RESP3 Support
To enable support for RESP3, ensure you have at least version 5.0 of the client, and change your connection object to include *protocol=3*

``` python
>>> import redis
>>> r = redis.Redis(host='localhost', port=6379, db=0, protocol=3)
```

### Connection Pools

By default, redis-py uses a connection pool to manage connections. Each instance of a Redis class receives its own connection pool. You can however define your own [redis.ConnectionPool](https://redis.readthedocs.io/en/stable/connections.html#connection-pools).
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

# General information about the project.
project = "redis-py"
copyright = "2022, Redis Inc"
copyright = "2023, Redis Inc"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -287,4 +287,4 @@
epub_title = "redis-py"
epub_author = "Redis Inc"
epub_publisher = "Redis Inc"
epub_copyright = "2022, Redis Inc"
epub_copyright = "2023, Redis Inc"
Loading

0 comments on commit 416645c

Please sign in to comment.