Skip to content

Commit 7014785

Browse files
author
Aaron Gonzales
authored
Version compatibility (#19)
* updated merge_dicts to work with lower python versions * updated minimum python version in setup.py
1 parent a8fdd27 commit 7014785

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

searchtweets/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def merge_dicts(*dicts):
6363
dictionary.
6464
6565
Args:
66-
dicts (list or Iterable): iterable set of dictionarys for merging.
66+
dicts (list or Iterable): iterable set of dictionaries for merging.
6767
6868
Returns:
6969
dict: dict with all keys from the passed list. Later dictionaries in
@@ -77,7 +77,9 @@ def merge_dicts(*dicts):
7777
{"maxResults": 1000, "rule": "something has:geo"}
7878
"""
7979
def _merge_dicts(dict1, dict2):
80-
return {**dict1, **dict2}
80+
merged = dict1.copy()
81+
merged.update(dict2)
82+
return merged
8183

8284
return reduce(_merge_dicts, dicts)
8385

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
author_email='agonzales@twitter.com',
99
license='MIT',
1010
version='1.2.1',
11+
python_requires='>=3.3',
1112
install_requires=["requests", "tweet_parser", "pyyaml"],
1213
packages=find_packages(),
1314
scripts=["tools/search_tweets.py"],

0 commit comments

Comments
 (0)