Merge lp:~brian.curtin/ubuntu-sso-client/py3-urllib into lp:ubuntu-sso-client
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | dobey on 2012-07-06 | ||||
| Approved revision: | 982 | ||||
| Merged at revision: | 982 | ||||
| Proposed branch: | lp:~brian.curtin/ubuntu-sso-client/py3-urllib | ||||
| Merge into: | lp:ubuntu-sso-client | ||||
| Diff against target: |
339 lines (+82/-34) 9 files modified
ubuntu_sso/keyring/__init__.py (+9/-3) ubuntu_sso/keyring/linux.py (+10/-5) ubuntu_sso/tests/test_account.py (+2/-2) ubuntu_sso/utils/__init__.py (+11/-4) ubuntu_sso/utils/webclient/common.py (+7/-1) ubuntu_sso/utils/webclient/restful.py (+8/-2) ubuntu_sso/utils/webclient/tests/test_restful.py (+11/-5) ubuntu_sso/utils/webclient/tests/test_webclient.py (+14/-8) ubuntu_sso/utils/webclient/txweb.py (+10/-4) |
||||
| To merge this branch: | bzr merge lp:~brian.curtin/ubuntu-sso-client/py3-urllib | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| dobey (community) | Approve on 2012-07-06 | ||
| Alejandro J. Cura (community) | 2012-06-27 | Approve on 2012-07-03 | |
|
Review via email:
|
|||
Commit Message
Try Python 3 urllib names and fall back to Python 2 as needed.
Description of the Change
Python 3 reorganizes the urllib and urllib2 packages into a new structure, so we need to change our imports to work for both. Using the try/except dance, prefer the Python 3 way and fall back to the Python 2 way on ImportError.
In order to ease compatibility, some of the imports are changed to import names rather than the entire module, as there is no good way to write multi-version compatible code that imports the higher level names urllib or urllib2.
- 977. By Brian Curtin on 2012-06-27
-
Tag 1018587
- 978. By Brian Curtin on 2012-06-27
-
Add test_webclient changes
- 979. By Brian Curtin on 2012-06-29
-
Add more pylint disable/enable pairs to please Linux
| Brian Curtin (brian.curtin) wrote : | # |
This should be fixed.
| Alejandro J. Cura (alecu) wrote : | # |
== Python Lint Notices ==
ubuntu_
450: [W0511] FIXME - New GTK+ 3.5 breaks this check - see bug #1014772
ubuntu_
60: [W0511] TODO
ubuntu_
50: [W0511] TODO
ubuntu_
35: [W0611] Unused import urllib2
ubuntu_
286: [W0511] TODO
ubuntu_
130: [E1103, RestfulClientTe
ubuntu_
104: [E1103, WebClient.
105: [E1103, WebClient.
- 980. By Brian Curtin on 2012-07-03
-
Remove unused urllib2 import
- 981. By Brian Curtin on 2012-07-03
-
disable E1103 for an invalid complaint about a missing member
- 982. By Brian Curtin on 2012-07-03
-
Add disabling of E1103 as both Python 2 and Python 3 way of doing urlparse do have scheme and netloc attributes

== Python Lint Notices ==
ubuntu_ sso/gtk/ tests/test_ gui.py:
450: [W0511] FIXME - New GTK+ 3.5 breaks this check - see bug #1014772
ubuntu_ sso/main/ darwin. py:
60: [W0511] TODO
ubuntu_ sso/qt/ __init_ _.py:
50: [W0511] TODO
ubuntu_ sso/tests/ test_account. py:
35: [W0611] Unused import urllib2
ubuntu_ sso/utils/ __init_ _.py:
39: [F0401] Unable to import 'urllib.parse'
39: [E0611] No name 'parse' in module 'urllib'
40: [F0401] Unable to import 'urllib.request'
40: [E0611] No name 'request' in module 'urllib'
ubuntu_ sso/utils/ webclient/ common. py:
284: [W0511] TODO
40: [F0401] Unable to import 'urllib.parse'
40: [E0611] No name 'parse' in module 'urllib'
ubuntu_ sso/utils/ webclient/ restful. py:
34: [F0401] Unable to import 'urllib.parse'
34: [E0611] No name 'parse' in module 'urllib'
ubuntu_ sso/utils/ webclient/ tests/test_ restful. py: stCase. test_restful_ namespace_ added_to_ url] Instance of 'ParseResult' has no 'path' member (but some types could not be inferred)
34: [F0401] Unable to import 'urllib.parse'
34: [E0611] No name 'parse' in module 'urllib'
128: [E1103, RestfulClientTe
ubuntu_ sso/utils/ webclient/ tests/test_ webclient. py:
37: [F0401] Unable to import 'urllib.parse'
37: [E0611] No name 'parse' in module 'urllib'
ubuntu_ sso/utils/ webclient/ txweb.py: raw_request] Instance of 'ParseResult' has no 'scheme' member (but some types could not be inferred) raw_request] Instance of 'ParseResult' has no 'netloc' member (but some types could not be inferred)
34: [F0401] Unable to import 'urllib.parse'
34: [E0611] No name 'parse' in module 'urllib'
102: [E1103, WebClient.
103: [E1103, WebClient.