Merged
Conversation
There is probably some code cleanup that could be done, but it probably isn't worth doing that now. When we eventually drop 2.7 support, we can make everything more modern.
2fee8f1 to
ad69357
Compare
horgh
requested changes
Feb 13, 2018
| :param account_id: Your MaxMind account ID. | ||
| :param license_key: Your MaxMind license key. | ||
|
|
||
| Go to https://www.maxmind.com/en/my_license_key to see your MaxMind |
Contributor
There was a problem hiding this comment.
On the next line we say "User ID". Should we update that too?
geoip2/webservice.py
Outdated
|
|
||
| def __init__(self, | ||
| user_id, | ||
| account_id, |
Contributor
There was a problem hiding this comment.
Is there any concern that this might break backwards compatibility?
I am not very familiar with Python, but it looks like named parameters are supported:
>>> client = geoip2.webservice.Client(account_id=1, license_key='test123')
>>> client = geoip2.webservice.Client(user_id=1, license_key='test123')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'user_id'Maybe it's uncommon enough that we don't need to worry though.
Member
Author
There was a problem hiding this comment.
Yeah, that is a good point. Calling it like that would be pretty uncommon for parameters that are not optional, but I'll see if I can come up with a solution that works.
1f96145 to
ec20d27
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.