summaryrefslogtreecommitdiff
path: root/benchmarks/command_packer_benchmark.py
Commit message (Collapse)AuthorAgeFilesLines
* Added black and isort (#1734)Anas2021-11-301-22/+27
|
* Pyupgrade + flynt + f-strings (#1759)Aarni Koskela2021-11-301-7/+4
| | | @akx Thank you so much for this! Thanks again for introducing me to a new tool that I'm sliding into my workflow as well.
* Remove support for end-of-life Python 2.7 (#1318)Jon Dufresne2020-08-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+0
| | | | | | | | | 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.
* Simplify exception handlers (#1319)Jon Dufresne2020-04-111-8/+6
| | | | | | | | | Use the "as" keyword to capture the exception in a variable instead of sys.exc_info(). Re-raise exception with the bare "raise" syntax. Avoid "# noqa: E722" by catching BaseException, which includes all exceptions including SystemExit.
* Add missing check_health argument to Connection overrides (#1323)Jon Dufresne2020-04-111-2/+2
| | | | | | Now matches the parent class signature. Running the benchmark previously failed with the error: TypeError: send_packed_command() got an unexpected keyword argument 'check_health'
* Drop unused variables and imports (#1284)Jon Dufresne2020-02-121-1/+1
|
* Use unicode literals throughout projectJon Dufresne2018-11-031-5/+6
| | | | Remove workaround for handling unicode with older Pythons.
* pycodestyle changes in benchmarkingRoey Prat2018-10-281-4/+4
|
* Fix bench command_packerroot2018-05-201-2/+2
|
* benchmark of the old and new pack_command implementationsAndy McCurdy2014-04-291-0/+104