Merge lp:~urbanape/ubuntu-sso-client/initial-darwin-port into lp:ubuntu-sso-client
| Status: | Rejected |
|---|---|
| Rejected by: | Manuel de la Peña on 2012-04-30 |
| Proposed branch: | lp:~urbanape/ubuntu-sso-client/initial-darwin-port |
| Merge into: | lp:ubuntu-sso-client |
| Prerequisite: | lp:~mandel/ubuntu-sso-client/fix-webclient-tests |
| Diff against target: |
1544 lines (+766/-429) 23 files modified
data/qt/darwin.qss (+5/-0) data/qt/resources.qrc (+1/-0) run-tests (+1/-1) ubuntu_sso/keyring/__init__.py (+2/-6) ubuntu_sso/keyring/linux.py (+0/-6) ubuntu_sso/keyring/pykeyring.py (+2/-3) ubuntu_sso/keyring/tests/test_pykeyring.py (+8/-9) ubuntu_sso/main/__init__.py (+27/-1) ubuntu_sso/main/darwin.py (+110/-0) ubuntu_sso/main/perspective_broker.py (+352/-0) ubuntu_sso/main/tests/test_darwin.py (+43/-0) ubuntu_sso/main/tests/test_windows.py (+3/-1) ubuntu_sso/main/windows.py (+23/-335) ubuntu_sso/networkstate/__init__.py (+11/-11) ubuntu_sso/networkstate/darwin.py (+95/-0) ubuntu_sso/networkstate/linux.py (+7/-39) ubuntu_sso/networkstate/networkstates.py (+51/-0) ubuntu_sso/networkstate/tests/test_linux.py (+9/-10) ubuntu_sso/qt/__init__.py (+7/-0) ubuntu_sso/qt/main/__init__.py (+1/-1) ubuntu_sso/utils/__init__.py (+6/-2) ubuntu_sso/utils/qtwisted.py (+1/-3) ubuntu_sso/utils/tests/test_qtwisted.py (+1/-1) |
| To merge this branch: | bzr merge lp:~urbanape/ubuntu-sso-client/initial-darwin-port |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Manuel de la Peña (community) | 2012-04-06 | Disapprove on 2012-04-30 | |
| Diego Sarmentero (community) | Needs Fixing on 2012-04-24 | ||
|
Review via email:
|
|||
Description of the Change
Embarrassingly small branch to try and get an initial port of the Ubuntu SSO client to Mac OS X.
Right now, we just assume that networking is there.
We also have a hacky way of getting to the candidate callback executables that SSO client will redirect to. On OS X, this might be better served with LaunchServices and custom URI schemes instead of guessing and computing paths (which might not even work in a py2app environment).
There are a few places where a refactoring has taken place to account for darwin and win32 using the same underlying mechanisms (ubuntu_
However, in a buildout environment, we are able to at least get a window up and presented (though it just spins and doesn't give focus):
http://
From within the 'parts/
zbir@Howler ~/dev/ubuntuone
$ PYTHONPATH=
| Zachery Bir (urbanape) wrote : | # |
| Zachery Bir (urbanape) wrote : | # |
> Should mention, that 'parts/
> making a buildout environment:
>
https:/
- 942. By dobey on 2012-04-09
-
Add the needed OpenSSL license exception
- 943. By Natalia Bidart on 2012-04-11
-
- When validating the registration screen (in the GTK+ UI), do not force
accepting the T&C if the tc_url is not defined (LP: #960657).
- Added more logging entries to the registration screen (GTK+ UI) validation
process. - 944. By Manuel de la Peña on 2012-04-17
-
- Removed duplicated code from the different webclient implementations (LP: #904842).
| Manuel de la Peña (mandel) wrote : | # |
Great start for a succeful port, here there are a few comments:
1. There are several new headers added, we had to add an exception due to openssl to the license, can you update them (you can find the new header in trunk).
2. Lets remove alejandro from the headers :)
3. I think we need to refactor the following import so that it does not import from windows:
09 +if sys.platform in ('win32', 'darwin'):
10 from ubuntu_
11 else:
12 from ubuntu_
I good idea would be to rename the windows.py to something more generic, maybe pykeyring?
4. Same as the above with:
1150 +if sys.platform in ('win32', 'darwin'):
1151 from ubuntu_sso.qt.main import windows
1152 source = windows
5. There is some code duplication here:
1022 +# Internal NetworkManager State constants
1023 +NM_STATE_UNKNOWN = 0
1024 +NM_STATE_
1025 +NM_STATE_
1026 +NM_STATE_ASLEEP = 10
1027 +NM_STATE_
1028 + NM_STATE_ASLEEP]
1029 +NM_STATE_
1030 +NM_STATE_
1031 +NM_STATE_
1032 + NM_STATE_
1033 +NM_STATE_
1034 +NM_STATE_
1035 +NM_STATE_
1036 +NM_STATE_
1037 +# Specifically don't include local and site, as they won't let us get to server
1038 +NM_STATE_
1039 + NM_STATE_
1040 +NM_STATE_
1041 +NM_STATE_
1042 +# For us, local and site connections are the same as diconnected
1043 +NM_STATE_
1044 + NM_STATE_
1045 + NM_STATE_
1046 + NM_STATE_
I think we can add that in a single module to be shared. I'll be adding some bugs following this brach so that we can track our progress.
- 945. By Manuel de la Peña on 2012-04-18
-
- Fixed all those broken tests on windows related to the dirty reactor left by twisted.pb (LP: #960436).
- 946. By Manuel de la Peña on 2012-04-18
-
- Added the use of the new added webserver that cleans resources correctly (LP: #960436).
- 947. By Manuel de la Peña on 2012-04-18
-
- Fixed tcp activation tests to clean resources correctly (LP: #960436).
- 948. By Zachery Bir on 2012-04-19
-
Merged mandel's branch
- 949. By Zachery Bir on 2012-04-19
-
Shared constants for network states
- 950. By Zachery Bir on 2012-04-19
-
Renamed as a shared resource
- 951. By Zachery Bir on 2012-04-19
-
Use the shared resource, rather than just windows.py
- 952. By Zachery Bir on 2012-04-19
-
Use the shared constants module, and remove some dbus-isms from darwin.py
- 953. By Zachery Bir on 2012-04-19
-
renamed tests to reflect shared resources
- 954. By Zachery Bir on 2012-04-19
-
Trimmed headers
- 955. By Zachery Bir on 2012-04-19
-
Use the new shared networkstates constants, and trim headers.
| Manuel de la Peña (mandel) wrote : | # |
When running the tests on linux I get the following lint issues which will stop tarmac from landing the branch:
ubuntu_
79: [C0301] Line too long (82/79)
82: [C0301] Line too long (94/79)
83: [C0301] Line too long (80/79)
58: [C0111, get_sso_pb_port] Missing docstring
36: [W0611] Unused import timeout_func
36: [W0611] Unused import shutdown_func
36: [W0611] Unused import start_setup
36: [W0611] Unused import finish_setup
36: [W0611] Unused import main
ubuntu_
63: [C0103, SSOLoginProxy.
67: [C0103, SSOLoginProxy.
76: [C0103, SSOLoginProxy.
80: [C0103, SSOLoginProxy.
91: [C0103, SSOLoginProxy.
95: [C0103, SSOLoginProxy.
99: [C0103, SSOLoginProxy.
110: [C0103, SSOLoginProxy.
114: [C0103, SSOLoginProxy.
127: [C0103, SSOLoginProxy.
131: [C0103, SSOLoginProxy.
140: [C0103, SSOLoginProxy.
144: [C0103, SSOLoginProxy.
193: [C0103, CredentialsMana
197: [C0103, CredentialsMana
201: [C0103, CredentialsMana
205: [C0103, CredentialsMana
209: [C0103, CredentialsMana
213: [C0103, CredentialsMana
- 956. By Zachery Bir on 2012-04-20
-
Clean up long lines and unused imports
- 957. By Zachery Bir on 2012-04-20
-
Move the pylint exclusion
- 958. By Zachery Bir on 2012-04-20
-
Clean up unused imports, move a pylint exclusion to the shared code,
and provide docstrings (and abstract out the get_user_id function) - 959. By Zachery Bir on 2012-04-20
-
Flow long lines and import SSO_SERVICE_NAME from the right module
| Manuel de la Peña (mandel) wrote : | # |
I get a segfault when running the tests on linux:
ubuntuone.
DBusTestCase
runTest ... [OK]
ubuntu_
ItemTestCase
test_delete ... [OK]
test_
test_
test_
test_get_value ... [OK]
test_
SecretService
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
test_
ubuntu_
QtDeferToThre
test_
Segmentation fault (core dumped)
- 960. By Zachery Bir on 2012-04-20
-
Import these names at the appropriate place
- 961. By Zachery Bir on 2012-04-20
-
Provide the name here for Windows tests to pass.
| Zachery Bir (urbanape) wrote : | # |
That test_qtwisted test used to be test_windows, so can probably be skipped on Linux.
- 962. By Zachery Bir on 2012-04-20
-
Skip the shared code tests between darwin and windows
| Diego Sarmentero (diegosarmentero) wrote : | # |
Why are you doing this??
if sys.platform == 'darwin':
PREFERED_
| Diego Sarmentero (diegosarmentero) wrote : | # |
You should merge your branch with this one:
lp:~diegosarmentero/ubuntu-sso-client/fixing-lint-pep8
That fix all the pep8 and lint issues in this branch.
- 963. By Zachery Bir on 2012-04-23
-
Merged diegosarmentero's branch, and changed the flippant comment in qt/__init__.py
| Manuel de la Peña (mandel) wrote : | # |
We have to do something with the following:
PLATFORM_QSS = ":/qtwisted.qss"
This line is going to make us not load the style on windows since there is no data/qt/
We can:
1. revert it to be called windows.qss
2. add a darwin and a windows module with the correct qss
3. rename data/qt/windows/qss to qtwisted.qss
Do as you please.
- 964. By Zachery Bir on 2012-04-23
-
Add a specific darwin.qss, and mediate the proper resource in utils/__init__.py
| Diego Sarmentero (diegosarmentero) wrote : | # |
Hi, i found that now there are new lint errors:
ubuntu_
52: [C0103] Invalid name "qss_map" (should match (([A-Z_
The name of this should be: QSS_MAP.
Also, i would change this:
if sys.platform in ('win32', 'darwin'):
from ubuntu_sso.utils import qtwisted as source
qss_map = {'win32': ':/windows.qss',
}
source.
else:
from ubuntu_sso.utils import linux as source
PLATFORM_QSS = source.PLATFORM_QSS
For:
QSS_MAP = dict(win32=
# Setting linux (fox example) as default if we don't find the
# platform as a key in the dictionary
PLATFORM_QSS = QSS_MAP.
| Manuel de la Peña (mandel) wrote : | # |
I'll reject the branch because diego has fixed the issues in a diff one and proposed it for merging.

Should mention, that 'parts/ ubuntu- sso-client' directory is the result of making a buildout environment:
https:/ /docs.google. com/a/canonical .com/document/ d/1f7xaDT- hblCKIXrKXZjpKt FRsBRnionDix5No jwdgmE