Skip to content

Commit 22135ba

Browse files
authored
Merge pull request #29 from RedisJSON/fix-28
* Use io.open() and 'utf-8' encoding to read version * Version bump * Removes extraneous hiredis import
2 parents 0e77bcd + 2b8ef37 commit 22135ba

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

CHANGELOG.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
# rejson-py changelog
22

3+
## 0.5.1 20191129
4+
5+
* #29 Use io.open() and 'utf-8' encoding to read version
6+
7+
## 0.5.0 20190901
8+
9+
* #26 Fixing retrieving non-ascii string with JSON.GET, added no_escape flag
10+
11+
## 0.4.0 20190308
12+
13+
* Add exception handler for .jsonget for non-existent keys
14+
315
## 0.3.0 20190107
416

5-
*upgrade dependency to redis-py >=3.0.0
17+
* Upgrade dependency to redis-py >=3.0.0
618

719
## 0.2.1 20170605
820

rejson/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ def decode(self, obj):
120120
obj = rj.jsonget('custom', Path.rootPath())
121121
```
122122
"""
123-
__version__ = "0.5.0"
123+
__version__ = "0.5.1"
124124
from .client import Client
125125
from .path import Path

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
hiredis==0.2.0
21
redis>=3.0.0
32
six>=1.10

setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
#!/usr/bin/env python
22

33
from setuptools import setup, find_packages
4+
import io
45
import os
56
import sys
67
import re
78
import shutil
89

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

17-
1817
def read_all(f):
1918
with open(f) as I:
2019
return I.read()

0 commit comments

Comments
 (0)