Skip to content

Commit

Permalink
remove ujson for json
Browse files Browse the repository at this point in the history
  • Loading branch information
grutz committed Mar 8, 2016
1 parent 92fab69 commit 07d2f00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions random_words/lorem_ipsum.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

import os
import ujson
import json
import random

main_dir = os.path.split(os.path.abspath(__file__))[0]
Expand All @@ -13,7 +13,7 @@ class LoremIpsum(object):

def __init__(self):
with open(os.path.join(main_dir, 'lorem_ipsum.dat'), 'r') as f:
self.words = frozenset(ujson.load(f))
self.words = frozenset(json.load(f))

def get_sentence(self):
"""
Expand Down
8 changes: 4 additions & 4 deletions random_words/random_words.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

import os
import ujson
import json
from random import sample
from itertools import chain

Expand Down Expand Up @@ -32,7 +32,7 @@ def load_nouns(self, file):
:param str file: filename
"""
with open(os.path.join(main_dir, file + '.dat'), 'r') as f:
self.nouns = ujson.load(f)
self.nouns = json.load(f)

def load_dmails(self, file):
"""
Expand All @@ -41,7 +41,7 @@ def load_dmails(self, file):
:param str file: filename
"""
with open(os.path.join(main_dir, file + '.dat'), 'r') as f:
self['domains'] = frozenset(ujson.load(f))
self['domains'] = frozenset(json.load(f))

def load_nicknames(self, file):
"""
Expand All @@ -50,7 +50,7 @@ def load_nicknames(self, file):
:param str file: filename
"""
with open(os.path.join(main_dir, file + '.dat'), 'r') as f:
self.nicknames = ujson.load(f)
self.nicknames = json.load(f)

def check_count(self, count):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def run_tests(self):
'Topic :: Software Development :: Libraries :: Python Modules',
],
include_package_data=True,
install_requires=['ujson'],
install_requires=[],
tests_require=['pytest'],
cmdclass={'test': PyTest},
test_suite='random_words.test.test_random_words',
Expand Down

0 comments on commit 07d2f00

Please sign in to comment.