Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.

Commit 061c2d2

Browse files
committed
chore(release): release 2.0.0
1 parent 72e3f62 commit 061c2d2

File tree

3 files changed

+211
-33
lines changed

3 files changed

+211
-33
lines changed

CHANGELOG.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
<a name="2.0.0"></a>
2+
## 2.0.0 (2021-06-08)
3+
4+
This is a breaking change! As of v1.1.8+, `aredis` has been hard-forked and
5+
renamed to `yaaredis`. The `aredis` changelog is maintained below (see
6+
`1.1.8`_) for posterity.
7+
8+
#### Breaking Changes
9+
10+
* rename package to `yaaredis` ([1ea13dd](1ea13dd))
11+
* remove all deprecated features ([f4699a45](f4699a45)):
12+
* deprecated methods have been removed
13+
* deprecated options now raise Exceptions
14+
* some ignorable deprecations have been replaced with error logs
15+
* **pipeline:** auto-execute all remaining commands at end of `with` block ([814ca2bb](814ca2bb))
16+
* **pool**: `ConnectionPool.get_connection()` is now a coroutine ([32969ed9](32969ed9))
17+
18+
#### Features
19+
20+
* **auth:** add support for Redis 5+ user&pass auth ([ca96dc6d](ca96dc6d))
21+
* **client:** add option to init with client name ([f00c361a](f00c361a))
22+
* **commands:** add support for SET's KEEPTTL option ([22c62f04](22c62f04))
23+
* **pool:** implement blocking connection pool ([32969ed9](32969ed9)):
24+
* this is available as the `BlockingConnectionPool` class; note that it does
25+
not yet support cluster mode
26+
* **scan:** add TYPE option ([0625dd8c](0625dd8c))
27+
28+
#### Bug Fixes
29+
30+
* **client:** prevent retry_on_timeout from affecting ConnectionError ([6626ebce](6626ebce)):
31+
* ie. `retry_on_timeout` now only comes into play for timeouts
32+
* **cluster:** avoid runtime error on disconnected client ([740ea19f](740ea19f)):
33+
* prevents a race condition within `yaaredis` from raising occasional errors
34+
* **connection:**
35+
* always reduce count on force disconnect ([b49b3c65](b49b3c65)):
36+
* fixes some instances of "connection leaking"
37+
* expose initial `connect()` error message ([2073f576](2073f576)):
38+
* by forwarding this message, this should make some debugging a bit easier
39+
* **pubsub:** reraise CancelledError during _execute ([90dd2641](90dd2641)):
40+
* prevents an issue where a cancelled coroutine may continue indefinitely
41+
42+
#### Performance
43+
44+
* **cluster:** support MGET and MSET for hashed keys ([08180835](08180835)):
45+
* see the following redis documentation for more info:
46+
https://redis.io/topics/cluster-tutorial#redis-cluster-data-sharding
47+
you'll need to make use of "hash slots" to get the full benefit of this
48+
feature
49+
50+
#### Internal
51+
52+
* convert build system to poetry ([b86d695](b86d695)):
53+
* note that this should not affect end-users, only yaaredis developers
54+
* publish pypi wheels from CI ([05c2265](05c2265)):
55+
* we should now have wheels for various versions of Python for all releases
56+
* we currently support manylinux wheels for all compatible Python versions
57+
58+
<a name="1.1.8"></a>
59+
## 1.1.8
60+
* Fixbug: connection is disconnected before idel check, valueError will be raised if a connection(not exist) is removed from connection list
61+
* Fixbug: abstract compat.py to handle import problem of asyncio.future
62+
* Fixbug: When cancelling a task, CancelledError exception is not propagated to client
63+
* Fixbug: XREAD command should accept 0 as a block argument
64+
* Fixbug: In redis cluster mode, XREAD command does not function properly
65+
* Fixbug: slave connection params when there are no slaves
66+
67+
<a name="1.1.7"></a>
68+
## 1.1.7
69+
* Fixbug: ModuleNotFoundError raised when install aredis 1.1.6 with Python3.6
70+
71+
<a name="1.1.6"></a>
72+
## 1.1.6
73+
* Fixbug: parsing stream messgae with empty payload will cause error(#116)
74+
* Fixbug: Let ClusterConnectionPool handle skip_full_coverage_check (#118)
75+
* New: threading local issue in coroutine, use contextvars instead of threading local in case of the safety of thread local mechanism being broken by coroutine (#120)
76+
* New: support Python 3.8
77+
78+
<a name="1.1.5"></a>
79+
## 1.1.5
80+
* new: Dev conn pool max idle time (#111) release connection if max-idle-time exceeded
81+
* update: discard travis-CI
82+
* Fix bug: new stream id used for test_streams
83+
84+
<a name="1.1.4"></a>
85+
## 1.1.4
86+
* fix bug: fix cluster port parsing for redis 4+(node info)
87+
* fix bug: wrong parse method of scan_iter in cluster mode
88+
* fix bug: When using "zrange" with "desc=True" parameter, it returns a coroutine without "await"
89+
* fix bug: do not use stream_timeout in the PubSubWorkerThread
90+
* opt: add socket_keepalive options
91+
* new: add ssl param in get_redis_link to support ssl mode
92+
* new: add ssl_context to StrictRedis constructor and make it higher priority than ssl parameter
93+
94+
<a name="1.1.3"></a>
95+
## 1.1.3
96+
* allow use of zadd options for zadd in sorted sets
97+
* fix bug: use inspect.isawaitable instead of typing.Awaitable to judge if an object is awaitable
98+
* fix bug: implicitly disconnection on cancelled error (#84)
99+
* new: add support for `streams`(including commands not officially released, see `streams <http://aredis.readthedocs.io/en/latest/streams.html>`_ )
100+
101+
<a name="1.1.2"></a>
102+
## 1.1.2
103+
* fix bug: redis command encoding bug
104+
* optimization: sync change on acquring lock from redis-py
105+
* fix bug: decrement connection count on connection disconnected
106+
* fix bug: optimize code proceed single node slots
107+
* fix bug: initiation error of aws cluster client caused by not appropiate function list used
108+
* fix bug: use `ssl_context` instead of ssl_keyfile,ssl_certfile,ssl_cert_reqs,ssl_ca_certs in intialization of connection_pool
109+
110+
<a name="1.1.1"></a>
111+
## 1.1.1
112+
* fix bug: connection with unread response being released to connection pool will lead to parse error, now this kind of connection will be destructed directly. `related issue <https://github.com/NoneGG/aredis/issues/52>`_
113+
* fix bug: remove Connection.can_read check which may lead to block in awaiting pubsub message. Connection.can_read api will be deprecated in next release. `related issue <https://github.com/NoneGG/aredis/issues/56>`_
114+
* add c extension to speedup crc16, which will speedup cluster slot hashing
115+
* add error handling for asyncio.futures.Cancelled error, which may cause error in response parsing.
116+
* sync optimization of client list made by swilly22 from redis-py
117+
* add support for distributed lock using redis cluster
118+
119+
<a name="1.1.0"></a>
120+
## 1.1.0
121+
* sync optimization of scripting from redis-py made by `bgreenberg <https://github.com/bgreenberg-eb>`_ `related pull request <https://github.com/andymccurdy/redis-py/pull/867>`_
122+
* sync bug fixed of `geopos` from redis-py made by `categulario <https://github.com/categulario>`_ `related pull request <https://github.com/andymccurdy/redis-py/pull/888>`_
123+
* fix bug which makes pipeline callback function not executed
124+
* fix error caused by byte decode issues in sentinel
125+
* add basic transaction support for single node in cluster
126+
* fix bug of get_random_connection reported by myrfy001
127+
128+
<a name="1.0.9"></a>
129+
## 1.0.9
130+
* fix bug of pubsub, in some env AssertionError is raised because connection is used again after reader stream being fed eof
131+
* add reponse decoding related options(`encoding` & `decode_responses`), make client easier to use
132+
* add support for command `cluster forget`
133+
* add support for command option `spop count`
134+
135+
<a name="1.0.8"></a>
136+
## 1.0.8
137+
* fix initialization bug of redis cluster client
138+
* add example to explain how to use `client reply on | off | skip`
139+
140+
<a name="1.0.7"></a>
141+
## 1.0.7
142+
* introduce loop argument to aredis
143+
* add support for command `cluster slots`
144+
* add support for redis cluster
145+
146+
<a name="1.0.6"></a>
147+
## 1.0.6
148+
* bitfield set/get/incrby/overflow supported
149+
* new command `hstrlen` supported
150+
* new command `unlink` supported
151+
* new command `touch` supported
152+
153+
<a name="1.0.5"></a>
154+
## 1.0.5
155+
* fix bug in setup.py when using pip to install aredis
156+
157+
<a name="1.0.4"></a>
158+
## 1.0.4
159+
* add support for command `pubsub channel`, `pubsub numpat` and `pubsub numsub`
160+
* add support for command `client pause`
161+
* reconsitution of commands to make develop easier(which is transparent to user)
162+
163+
<a name="1.0.2"></a>
164+
## 1.0.2
165+
* add support for cache (Cache and HerdCache class)
166+
* fix bug of `PubSub.run_in_thread`
167+
168+
<a name="1.0.1"></a>
169+
## 1.0.1
170+
* add scan_iter, sscan_iter, hscan_iter, zscan_iter and corresponding unit tests
171+
* fix bug of `PubSub.run_in_thread`
172+
* add more examples
173+
* change `Script.register` to `Script.execute`

README.rst

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
talkiq/yaaredis
22
===============
33

4-
|circleci|
4+
|circleci| |pypi-version| |python-versions|
55

66
.. |circleci| image:: https://img.shields.io/circleci/project/github/talkiq/yaaredis/master.svg?style=flat-square
77
:alt: CircleCI Test Status
88
:target: https://circleci.com/gh/talkiq/yaaredis/tree/master
99

10+
.. |pypi-version| image:: https://img.shields.io/pypi/v/yaaredis.svg?style=flat-square&label=PyPI
11+
:alt: Latest PyPI Release
12+
:target: https://pypi.org/project/yaaredis/
13+
14+
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/yaaredis.svg?style=flat-square&label=Python%20Versions
15+
:alt: Compatible Python Versions
16+
:target: https://pypi.org/project/yaaredis/
17+
1018
``yaaredis`` (Yet Another Async Redis (client)) is a fork of
1119
`aredis <https://github.com/NoneGG/aredis>`_, which itself was ported from
1220
`redis-py <https://github.com/andymccurdy/redis-py>`_. ``yaaredis`` provides an
1321
efficient and user-friendly async redis client with support for Redis Server,
1422
Cluster, and Sentinels.
1523

16-
To get more information please read the `full document`_ managed by the
17-
upstream ``aredis`` repo.
18-
19-
.. _full document: http://aredis.readthedocs.io/en/latest/
24+
To get more information please read the `full documentation`_ managed by the
25+
upstream ``aredis`` repo. We are working on hosting our own as the projects
26+
diverge -- stay tuned!
2027

2128
Installation
2229
------------
@@ -25,28 +32,29 @@ Installation
2532

2633
.. code-block:: console
2734
28-
python3 -m pip install yaaredis[hiredis]
35+
python3 -m pip install yaaredis
2936
3037
or from source:
3138

3239
.. code-block:: console
3340
3441
python3 -m pip install .
3542
36-
Getting started
37-
---------------
43+
Note that ``yaaredis`` also supports using ``hiredis`` as a drop-in performance
44+
improvements. You can either install ``hiredis`` separately or make use of the
45+
PyPI extra to make use of this functionality:
3846

39-
`More examples`_
40-
41-
.. _More examples: https://github.com/talkiq/yaaredis/tree/master/examples
47+
.. code-block:: console
4248
43-
Tip: since python 3.8 you can use asyncio REPL:
49+
python3 -m pip install yaaredis[hiredis]
4450
45-
.. code-block:: bash
51+
Getting started
52+
---------------
4653

47-
$ python3 -m asyncio
54+
We have `various examples`_ in this repo which you may find useful. A few more
55+
specific cases are listed below.
4856

49-
single node client
57+
Single Node Client
5058
^^^^^^^^^^^^^^^^^^
5159

5260
.. code-block:: python
@@ -68,10 +76,9 @@ single node client
6876
await asyncio.sleep(1)
6977
assert not await client.exists('foo')
7078
71-
loop = asyncio.get_event_loop()
72-
loop.run_until_complete(example())
79+
asyncio.run(example())
7380
74-
cluster client
81+
Cluster Client
7582
^^^^^^^^^^^^^^
7683

7784
.. code-block:: python
@@ -89,29 +96,27 @@ cluster client
8996
await client.rpoplpush('a', 'b')
9097
assert await client.rpop('b') == b'1'
9198
92-
loop = asyncio.get_event_loop()
93-
loop.run_until_complete(example())
94-
# {(10923, 16383): [{'host': b'172.17.0.2', 'node_id': b'332f41962b33fa44bbc5e88f205e71276a9d64f4', 'server_type': 'master', 'port': 7002},
95-
# {'host': b'172.17.0.2', 'node_id': b'c02deb8726cdd412d956f0b9464a88812ef34f03', 'server_type': 'slave', 'port': 7005}],
96-
# (5461, 10922): [{'host': b'172.17.0.2', 'node_id': b'3d1b020fc46bf7cb2ffc36e10e7d7befca7c5533', 'server_type': 'master', 'port': 7001},
97-
# {'host': b'172.17.0.2', 'node_id': b'aac4799b65ff35d8dd2ad152a5515d15c0dc8ab7', 'server_type': 'slave', 'port': 7004}],
98-
# (0, 5460): [{'host': b'172.17.0.2', 'node_id': b'0932215036dc0d908cf662fdfca4d3614f221b01', 'server_type': 'master', 'port': 7000},
99-
# {'host': b'172.17.0.2', 'node_id': b'f6603ab4cb77e672de23a6361ec165f3a1a2bb42', 'server_type': 'slave', 'port': 7003}]}
99+
asyncio.run(example())
100+
# {(10923, 16383): [{'host': b'172.17.0.2', 'node_id': b'332f41962b33fa44bbc5e88f205e71276a9d64f4', 'server_type': 'master', 'port': 7002},
101+
# {'host': b'172.17.0.2', 'node_id': b'c02deb8726cdd412d956f0b9464a88812ef34f03', 'server_type': 'slave', 'port': 7005}],
102+
# (5461, 10922): [{'host': b'172.17.0.2', 'node_id': b'3d1b020fc46bf7cb2ffc36e10e7d7befca7c5533', 'server_type': 'master', 'port': 7001},
103+
# {'host': b'172.17.0.2', 'node_id': b'aac4799b65ff35d8dd2ad152a5515d15c0dc8ab7', 'server_type': 'slave', 'port': 7004}],
104+
# (0, 5460): [{'host': b'172.17.0.2', 'node_id': b'0932215036dc0d908cf662fdfca4d3614f221b01', 'server_type': 'master', 'port': 7000},
105+
# {'host': b'172.17.0.2', 'node_id': b'f6603ab4cb77e672de23a6361ec165f3a1a2bb42', 'server_type': 'slave', 'port': 7003}]}
100106
101107
Benchmark
102108
---------
103109

104110
Please run test scripts in the ``benchmarks`` directory to confirm the
105-
benchmarks.
106-
107-
For a benchmark in the original yaaredis author's environment please see:
108-
`benchmark`_.
109-
110-
.. _benchmark: http://aredis.readthedocs.io/en/latest/benchmark.html
111+
benchmarks. For a benchmark in the original yaaredis author's environment
112+
please see: `benchmark`_.
111113

112114
Contributing
113115
------------
114116

115117
Developer? See our `guide`_ on how you can contribute.
116118

119+
.. _benchmark: http://aredis.readthedocs.io/en/latest/benchmark.html
120+
.. _full documentation: http://aredis.readthedocs.io/en/latest/
117121
.. _guide: https://github.com/talkiq/yaaredis/blob/master/.github/CONTRIBUTING.rst
122+
.. _various examples: https://github.com/talkiq/yaaredis/tree/master/examples

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "yaaredis"
3-
version = "2.0.0-alpha.3"
3+
version = "2.0.0"
44
description = "Python async client for Redis key-value store"
55
readme = "README.rst"
66

0 commit comments

Comments
 (0)