summaryrefslogtreecommitdiff
path: root/redis/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* OCSP stapling support (#1820)Chayim2021-12-261-0/+7
|
* Added black and isort (#1734)Anas2021-11-301-4/+3
|
* Adding RedisCluster client to support Redis Cluster Mode (#1660)Bar Shaul2021-11-251-0/+36
| | | | Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Anas <anas.el.amraoui@live.com>
* fix: Align from_url in utils.py to remove DB as a 2nd paramTom King2020-08-171-2/+2
|
* Remove support for end-of-life Python 2.7 (#1318)Jon Dufresne2020-08-061-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove support for end-of-life Python 2.7 Python 2.7 is end of life. It is no longer receiving bug fixes, including for security issues. Python 2.7 went EOL on 2020-01-01. For additional details on support Python versions, see: Supported: https://devguide.python.org/#status-of-python-branches EOL: https://devguide.python.org/devcycle/#end-of-life-branches Removing support for EOL Pythons will reduce testing and maintenance resources while allowing the library to move towards a modern Python 3 style. Python 2.7 users can continue to use the previous version of redis-py. Was able to simplify the code: - Removed redis._compat module - Removed __future__ imports - Removed object from class definition (all classes are new style) - Removed long (Python 3 unified numeric types) - Removed deprecated __nonzero__ method - Use simpler Python 3 super() syntax - Use unified OSError exception - Use yield from syntax Co-authored-by: Andy McCurdy <andy@andymccurdy.com>
* Switch to flake8 for static code analysis (#1328)Jon Dufresne2020-04-161-1/+1
| | | | | | | | | flake8 catches a wider net of mistakes than pycodestyle and is more commonly used by the larger community. For example, it catches unused imports, a few of which existed. These have since been removed. Two "noqa" comments were added. One ignores the _compat.py file as it has a large amount of Python version specific code. The second is in utils.py which intentionally does not use an import.
* restore default Lock token storage, add toggle to make it thread-localwil paredes2014-06-061-0/+7
| | | | | * add thread_local=False parameter to Lock.__init__() and StrictRedis.lock() * use thread_local to decide whether to put token in thread-local storage
* Move import statement on top for PEP8 compliancy.Nicola Miotto2013-11-131-1/+3
|
* Add utility for pipelining within 'with' statement.sirnicolaz2013-08-171-0/+8
|
* encoding testsandy2013-06-061-2/+8
|
* Format code per pep8 guidelinesPaul Belanger2013-03-301-0/+1
| | | | | | A simple patch to enable pep8 in tox and format our code properly. Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
* Merge remote-tracking branch 'jparise/cls-from_url'andy2012-08-141-24/+2
|\ | | | | | | | | | | Conflicts: redis/client.py redis/utils.py
| * Improved `from_url()` support.Jon Parise2012-07-061-24/+2
| | | | | | | | | | | | | | | | | | | | | | | | `from_url()` is now implemented as a classmethod. The previous implementation always returned instances of the `Redis` class. This new approach lets us construct StrictRedis instances (or any other class derived from StrictRedis, including Redis). `utils.from_url()` has been preserved for backwards compatibility. Also, both versions of `from_url()` now pass along any additional keyword arguments to the class's initializer.
* | Fixed Python 3.2+ compatibilityAlex Grönholm2012-08-071-3/+2
| |
* | Cleaned up code for PEP 8 complianceAlex Grönholm2012-08-061-1/+2
|/
* assert url.schemeKenneth Reitz2012-05-181-1/+5
|
* redis.from_urlKenneth Reitz2012-05-181-0/+27