Merge lp:~brian.curtin/ubuntuone-dev-tools/py3-getPage-replacement into lp:ubuntuone-dev-tools
Status: | Rejected |
---|---|
Rejected by: | dobey |
Proposed branch: | lp:~brian.curtin/ubuntuone-dev-tools/py3-getPage-replacement |
Merge into: | lp:ubuntuone-dev-tools |
Diff against target: |
307 lines (+84/-110) 2 files modified
ubuntuone/devtools/testing/tests/test_txwebserver.py (+42/-38) ubuntuone/devtools/testing/txwebserver.py (+42/-72) |
To merge this branch: | bzr merge lp:~brian.curtin/ubuntuone-dev-tools/py3-getPage-replacement |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Roberto Alsina (community) | Approve | ||
Alejandro J. Cura (community) | Needs Fixing | ||
Review via email: mp+122768@code.launchpad.net |
Commit message
- Move to a standard library based HTTPWebSever and HTTPSWebServer implementation due to lack of twisted support for those implementations on Python 3.
Description of the change
As twisted.
While moving towards that urllib implementation, it was pointed out that the server would have to be moved away from twisted as well, so HTTPWebServer and HTTPSWebServer were moved from twisted implementations to similar standard library equivalents using socketserver.
With the exception of HTTPSWebSever, everything here works on Python 2 and 3. HTTPS is currently untested within devtools, but *is* tested within all of the projects that use it. In the interest of progressing on SSO porting, I haven't added any HTTPS specific tests but intend to bring some back from SSO and the other projects as I encounter them (and fix them).
Unmerged revisions
- 102. By Brian Curtin
-
Shouldn't inherit from the mixin/TCPServer - instantiate them in the BaseWebSever and then use super all around. Should fix alecu's comment.
- 101. By Brian Curtin
-
Remove commented out lines
- 100. By Brian Curtin
-
Restructure BaseWebSever to ease HTTPSWebServer implementation. Remove all Twisted code and imports
- 99. By Brian Curtin
-
Suppress HTTPServer output by overriding the log_message method. This removes the various output that gets mixed in with the test runner output.
- 98. By Brian Curtin
-
Merge trunk
- 97. By Brian Curtin
-
Various pylint fixes
- 96. By Brian Curtin
-
Initial implementation of stdlib HTTPServer
When running the sso tests with this branch I get a lot of errors similar to this:
test_ssl_ fail_dialog_ user_accepts_ via_proxy ... Traceback (most recent call last): python2. 7/dist- packages/ twisted/ internet/ defer.py" , line 1039, in _inlineCallbacks alecu/canonical /ubuntu- sso-client/ trunk/ubuntu_ sso/utils/ webclient/ tests/test_ webclient. py", line 969, in setUp ver(self. ssl_settings) alecu/canonical /ubuntu- sso-client/ trunk/ubuntu_ sso/utils/ webclient/ tests/test_ webclient. py", line 239, in __init__ HTTPSMockWebSer ver, self)._ _init__ (root, ssl_settings) TypeError: must be type, not classobj
File "/usr/lib/
result = g.send(result)
File "/home/
self.ws = HTTPSMockWebSer
File "/home/
super(
exceptions.