-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Use QgsNetworkAccessManager instead of urllib for network requests #2299
Conversation
ltbam
commented
Sep 9, 2015
- Use of QNetworkManager instead of urllib for network access (proxy support).
- Fixed some UTF encoding issues
- Added some WMS types for link recognition.
Assigned @tomkralidis |
l = [] | ||
data = data.items() | ||
for k, v in data: | ||
k = str(k) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
str
should not be used for strings.
- Remove it if you are sure that there is a string returned always anyway
- Change it to
unicode()
if you need to convert it to a string
I think owslib is an external dependency. Patching it makes it harder to maintain it (i.e. if it's updated to a newer version the patch will need to be re-applied). I would like to get @tomkralidis feedback on this. Alternatively, would it be possible to set environment variables for proxies to get urllib working properly? This approach would fix all occurrences of urllib and leave the dependency code untouched. |
OWSLib is an external dependency that we will not patch here. If there are OWSLib specific changes required, this is better realized by making them in OWSLib proper. Note that the goal is for OWSLib to be completely upstream (and outside) of QGIS proper. I would recommend this PR be closed and a new PR issued with only MetaSearch specific changes. |
@tomkralidis what do you think about the environment variables for urllib approach? |
@m-kuhn +1 for use of environment variables ( |
@ltbam could you implement these changes? |
@ltbam any feedback on this? |
Closed due to lack of feedback. Will be great if somebody will be able to implement this. |