Merge lp:~gocept/landscape-client/py3-manager-scriptexecution into lp:~landscape/landscape-client/trunk
Status: | Merged |
---|---|
Approved by: | Eric Snow |
Approved revision: | 978 |
Merged at revision: | 983 |
Proposed branch: | lp:~gocept/landscape-client/py3-manager-scriptexecution |
Merge into: | lp:~landscape/landscape-client/trunk |
Prerequisite: | lp:~gocept/landscape-client/py3-broker-exchange |
Diff against target: |
350 lines (+46/-41) 3 files modified
landscape/manager/scriptexecution.py (+23/-8) landscape/manager/tests/test_scriptexecution.py (+22/-32) py3_ready_tests (+1/-1) |
To merge this branch: | bzr merge lp:~gocept/landscape-client/py3-manager-scriptexecution |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chad Smith | Approve | ||
Eric Snow (community) | Approve | ||
🤖 Landscape Builder | test results | Approve | |
Gocept | Pending | ||
Review via email: mp+321147@code.launchpad.net |
Commit message
This is the Py3 port of landscape.
All the changes are to fix bytes/unicode. Notably, the stdlib pwd module uses decodes its data strictly by the default FS encoding (which cannot be changed from within Python). Since the tests are run with LC_ALL=C, some tests failed with unicode errors. The fix in the code protects us from the problem now and in the future.
Description of the change
This MP considers the landscape.
Additionally, a bigger problem occurred, when the system default encoding (e.g. LC_ALL=C) is not able to handle unicode and a unicode containing username is queried by pwd.getpwnam(). The solution to handle this as an UnkownUserError, was chosen (1) because a simple switch of locales via locale.setlocale() did not solve the problem and (2) the edge case of falsely get an entry with unicode content could only happen if the entry was inserted with a less restrictive encoding in contrast to the retrieval encoding, which is not probable.
Command: TRIAL_ARGS=-j4 make check /ci.lscape. net/job/ latch-test- xenial/ 3789/
Result: Success
Revno: 977
Branch: lp:~gocept/landscape-client/py3-manager-scriptexecution
Jenkins: https:/