Skip to content

Commit

Permalink
Merge pull request #29 from RedisJSON/fix-28
Browse files Browse the repository at this point in the history
* Use io.open() and 'utf-8' encoding to read version
* Version bump
* Removes extraneous hiredis import
  • Loading branch information
gkorland authored Dec 1, 2019
2 parents 0e77bcd + 2b8ef37 commit 22135ba
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# rejson-py changelog

## 0.5.1 20191129

* #29 Use io.open() and 'utf-8' encoding to read version

## 0.5.0 20190901

* #26 Fixing retrieving non-ascii string with JSON.GET, added no_escape flag

## 0.4.0 20190308

* Add exception handler for .jsonget for non-existent keys

## 0.3.0 20190107

*upgrade dependency to redis-py >=3.0.0
* Upgrade dependency to redis-py >=3.0.0

## 0.2.1 20170605

Expand Down
2 changes: 1 addition & 1 deletion rejson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ def decode(self, obj):
obj = rj.jsonget('custom', Path.rootPath())
```
"""
__version__ = "0.5.0"
__version__ = "0.5.1"
from .client import Client
from .path import Path
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
hiredis==0.2.0
redis>=3.0.0
six>=1.10
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
#!/usr/bin/env python

from setuptools import setup, find_packages
import io
import os
import sys
import re
import shutil


def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
init_py = io.open(os.path.join(package, '__init__.py'), encoding='utf-8').read()
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)


def read_all(f):
with open(f) as I:
return I.read()
Expand Down

0 comments on commit 22135ba

Please sign in to comment.