summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2018-11-01 21:48:59 -0700
committerAndy McCurdy <andy@andymccurdy.com>2018-11-01 21:48:59 -0700
commit92c9c5f198d1839d97c648208136600015a3dbb7 (patch)
treeebafac0897c0190edc7526e994d3ee38e2304574
parentff3bbdf903f10fe48bc36b43e4b682e89ad86295 (diff)
parentd14f929ef024d62148b317f5e4197349d548e6a2 (diff)
downloadredis-py-92c9c5f198d1839d97c648208136600015a3dbb7.tar.gz
Merge branch 'master' of github.com:andymccurdy/redis-py
-rw-r--r--CHANGES6
-rw-r--r--README.rst31
-rwxr-xr-xredis/client.py4
-rwxr-xr-xredis/connection.py7
-rw-r--r--redis/lock.py2
-rw-r--r--setup.py2
-rw-r--r--tox.ini2
7 files changed, 21 insertions, 33 deletions
diff --git a/CHANGES b/CHANGES
index d048ea5..fb10389 100644
--- a/CHANGES
+++ b/CHANGES
@@ -190,7 +190,7 @@
for the report.
* Connections now call socket.shutdown() prior to socket.close() to
ensure communication ends immediately per the note at
- http://docs.python.org/2/library/socket.html#socket.socket.close
+ https://docs.python.org/2/library/socket.html#socket.socket.close
Thanks to David Martin for pointing this out.
* Lock checks are now based on floats rather than ints. Thanks
Vitja Makarov.
@@ -224,11 +224,11 @@
* Prevent DISCARD from being called if MULTI wasn't also called. Thanks
Pete Aykroyd.
* SREM now returns an integer indicating the number of items removed from
- the set. Thanks http://github.com/ronniekk.
+ the set. Thanks https://github.com/ronniekk.
* Fixed a bug with BGSAVE and BGREWRITEAOF response callbacks with Python3.
Thanks Nathan Wan.
* Added CLIENT GETNAME and CLIENT SETNAME commands.
- Thanks http://github.com/bitterb.
+ Thanks https://github.com/bitterb.
* It's now possible to use len() on a pipeline instance to determine the
number of commands that will be executed. Thanks Jon Parise.
* Fixed a bug in INFO's parse routine with floating point numbers. Thanks
diff --git a/README.rst b/README.rst
index a21c13a..fce61fd 100644
--- a/README.rst
+++ b/README.rst
@@ -4,7 +4,7 @@ redis-py
The Python interface to the Redis key-value store.
.. image:: https://secure.travis-ci.org/andymccurdy/redis-py.png?branch=master
- :target: http://travis-ci.org/andymccurdy/redis-py
+ :target: https://travis-ci.org/andymccurdy/redis-py
.. image:: https://readthedocs.org/projects/redis-py/badge/?version=latest&style=flat
:target: https://redis-py.readthedocs.io/en/latest/
.. image:: https://badge.fury.io/py/redis.svg
@@ -14,7 +14,7 @@ Installation
------------
redis-py requires a running Redis server. See `Redis's quickstart
-<http://redis.io/topics/quickstart>`_ for installation instructions.
+<https://redis.io/topics/quickstart>`_ for installation instructions.
To install redis-py, simply:
@@ -22,12 +22,6 @@ To install redis-py, simply:
$ sudo pip install redis
-or alternatively (you really should be using pip though):
-
-.. code-block:: bash
-
- $ sudo easy_install redis
-
or from source:
.. code-block:: bash
@@ -59,7 +53,7 @@ specified.
API Reference
-------------
-The `official Redis command documentation <http://redis.io/commands>`_ does a
+The `official Redis command documentation <https://redis.io/commands>`_ does a
great job of explaining each command in detail. redis-py exposes two client
classes that implement these commands. The StrictRedis class attempts to adhere
to the official command syntax. There are a few exceptions:
@@ -162,19 +156,12 @@ kind enough to create Python bindings. Using Hiredis can provide up to a
performance increase is most noticeable when retrieving many pieces of data,
such as from LRANGE or SMEMBERS operations.
-Hiredis is available on PyPI, and can be installed via pip or easy_install
-just like redis-py.
+Hiredis is available on PyPI, and can be installed via pip just like redis-py.
.. code-block:: bash
$ pip install hiredis
-or
-
-.. code-block:: bash
-
- $ easy_install hiredis
-
Response Callbacks
^^^^^^^^^^^^^^^^^^
@@ -276,7 +263,7 @@ could do something like this:
.. code-block:: pycon
>>> with r.pipeline() as pipe:
- ... while 1:
+ ... while True:
... try:
... # put a WATCH on the key that holds our sequence value
... pipe.watch('OUR-SEQUENCE-KEY')
@@ -309,7 +296,7 @@ explicitly calling reset():
.. code-block:: pycon
>>> pipe = r.pipeline()
- >>> while 1:
+ >>> while True:
... try:
... pipe.watch('OUR-SEQUENCE-KEY')
... ...
@@ -626,7 +613,7 @@ execution.
Sentinel support
^^^^^^^^^^^^^^^^
-redis-py can be used together with `Redis Sentinel <http://redis.io/topics/sentinel>`_
+redis-py can be used together with `Redis Sentinel <https://redis.io/topics/sentinel>`_
to discover Redis nodes. You need to have at least one Sentinel daemon running
in order to use redis-py's Sentinel support.
@@ -667,7 +654,7 @@ If no slaves can be connected to, a connection will be established with the
master.
See `Guidelines for Redis clients with support for Redis Sentinel
-<http://redis.io/topics/sentinel-clients>`_ to learn more about Redis Sentinel.
+<https://redis.io/topics/sentinel-clients>`_ to learn more about Redis Sentinel.
Scan Iterators
^^^^^^^^^^^^^^
@@ -691,7 +678,7 @@ Author
^^^^^^
redis-py is developed and maintained by Andy McCurdy (sedrik@gmail.com).
-It can be found here: http://github.com/andymccurdy/redis-py
+It can be found here: https://github.com/andymccurdy/redis-py
Special thanks to:
diff --git a/redis/client.py b/redis/client.py
index e095455..160cfb6 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -533,7 +533,7 @@ class StrictRedis(object):
"""
Return a Redis client object configured from the given URL, which must
use either `the ``redis://`` scheme
- <http://www.iana.org/assignments/uri-schemes/prov/redis>`_ for RESP
+ <https://www.iana.org/assignments/uri-schemes/prov/redis>`_ for RESP
connections or the ``unix://`` scheme for Unix domain sockets.
For example::
@@ -649,7 +649,7 @@ class StrictRedis(object):
value_from_callable = kwargs.pop('value_from_callable', False)
watch_delay = kwargs.pop('watch_delay', None)
with self.pipeline(True, shard_hint) as pipe:
- while 1:
+ while True:
try:
if watches:
pipe.watch(*watches)
diff --git a/redis/connection.py b/redis/connection.py
index 1190260..9893191 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -799,11 +799,11 @@ class ConnectionPool(object):
Three URL schemes are supported:
- ```redis://``
- <http://www.iana.org/assignments/uri-schemes/prov/redis>`_ creates a
+ <https://www.iana.org/assignments/uri-schemes/prov/redis>`_ creates a
normal TCP socket connection
- ```rediss://``
- <http://www.iana.org/assignments/uri-schemes/prov/rediss>`_ creates a
- SSL wrapped TCP socket connection
+ <https://www.iana.org/assignments/uri-schemes/prov/rediss>`_ creates
+ a SSL wrapped TCP socket connection
- ``unix://`` creates a Unix Domain Socket connection
There are several ways to specify a database number. The parse function
@@ -829,6 +829,7 @@ class ConnectionPool(object):
True/False, Yes/No values to indicate state. Invalid types cause a
``UserWarning`` to be raised. In the case of conflicting arguments,
querystring arguments always win.
+
"""
url_string = url
url = urlparse(url)
diff --git a/redis/lock.py b/redis/lock.py
index 732568b..bc7e850 100644
--- a/redis/lock.py
+++ b/redis/lock.py
@@ -107,7 +107,7 @@ class Lock(object):
stop_trying_at = None
if blocking_timeout is not None:
stop_trying_at = mod_time.time() + blocking_timeout
- while 1:
+ while True:
if self.do_acquire(token):
self.local.token = token
return True
diff --git a/setup.py b/setup.py
index 0e8f07d..da0afc5 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@ setup(
version=__version__,
description='Python client for Redis key-value store',
long_description=long_description,
- url='http://github.com/andymccurdy/redis-py',
+ url='https://github.com/andymccurdy/redis-py',
author='Andy McCurdy',
author_email='sedrik@gmail.com',
maintainer='Andy McCurdy',
diff --git a/tox.ini b/tox.ini
index ac086ed..ab7cb7c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
minversion = 1.8
-envlist = {py26,py27,py32,py33,py34,py35,py36}-{plain,hiredis}, pycodestyle
+envlist = {py26,py27,py33,py34,py35,py36}-{plain,hiredis}, pycodestyle
[testenv]
deps =