Skip to content

Commit

Permalink
Merge pull request #1909 from sopel-irc/update-geoip2-reqs
Browse files Browse the repository at this point in the history
build: fix/upgrade `geoip2` requirements where possible
  • Loading branch information
dgw committed Jul 25, 2020
2 parents 18509dc + 76adfa7 commit 17a9d91
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ xmltodict<0.12.0; python_version == '3.3'
xmltodict==0.12; python_version != '3.3'
pytz
praw>=4.0.0,<6.0.0
geoip2<3.0.0
geoip2<3.0; python_version <= '3.5' and python_version != '2.7'
geoip2>=3.0,<4.0; python_version == '2.7'
geoip2>=4.0,<5.0; python_version >= '3.6'
# transitive dependency of geoip2; v2 dropped py2.7 & py3 < 3.6
maxminddb<2.0; python_version < '3.6'
ipaddress<2.0; python_version < '3.3'
requests>=2.0.0,<3.0.0
urllib3<1.23; python_version == '3.3'
Expand Down
2 changes: 1 addition & 1 deletion sopel/modules/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _find_geoip_db(bot):

@commands('iplookup', 'ip')
@example('.ip 8.8.8.8',
r'\[IP\/Host Lookup\] Hostname: \S*dns\S*\.google\S* \| Location: United States \| ISP: AS15169 \S+',
r'\[IP\/Host Lookup\] Hostname: \S*dns\S*\.google\S*( \| .+?: .+?)+ \| ISP: AS15169 \S+',
re=True,
ignore='Downloading GeoIP database, please wait...',
online=True)
Expand Down
2 changes: 1 addition & 1 deletion sopel/modules/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def duck_api(query):
# the last example (in source line order) is what .help displays
@example(
'.duck sopel.chat irc bot',
r'https?:\/\/(sopel\.chat\/?|github\.com\/sopel-irc\/sopel)',
r'https?:\/\/.*sopel.*',
re=True,
online=True)
def duck(bot, trigger):
Expand Down

0 comments on commit 17a9d91

Please sign in to comment.