Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make User-Agent string customizable #37

Closed
wants to merge 3 commits into from

Conversation

Simon-Will
Copy link

This should resolve issue #36.

I tried to use the same underscore names you are using. Not sure if I succeeded, though, since I didn’t fully understand your usage, to be honest.

@Simon-Will
Copy link
Author

I just noticed that I mistakenly included another commit in my master branch. Only the first of the two commits should be merged in this request. (Although the other commit may also be a reasonable change.) So I just reverted the second commit in my master branch.

mocnik-science pushed a commit that referenced this pull request Jul 11, 2021
compare request #37 by Simon Will
@mocnik-science
Copy link
Owner

Dear Simon,

Thank you very much for your appreciated help. I double checked the usage policies of the various services used by OSMPythonTools. It makes sense to add a user specified part to the user agent string.

Still, I did not merge directly but rather rewrote your code due to several reasons:

  • There were unnecessary commits contained in the merge request.
  • The commit message did not align well to the others.
  • There is no reason to not assemble the user agent string in the _userAgent method, as was done before. Shifting this to the __init__ function is not intended.
  • The use of OSMPythonTools can be 'on the edge'. Nominatim, for instance, is very strict with unacceptable use. In order to make finding issues easier for the operators of these services and to prevent situations where the user of OSMPythonTools just overwrites the user agent string with an empty one, I prefer to only add the user-specific part to the default user agent proposed by OSMPythonTools.

I hope you agree to my decisions. It took some time, but some more thinking was necessary to resolve this request in a suitable way.

Best!

@Simon-Will
Copy link
Author

Hi,

I fully agree with your decisions. They are very reasonable.

Kind regards
Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants