|
Use unicode everywhere in the application.
My apologies for this branch, the diff is long
and the contents themself are boring: I am very
sorry. Anyway, I think this pushes quickstart
in a better place re: unicode/bytes handling.
Everything here is almost mechanical, including
the annoying problem of having to store encoded
strings in the exceptions: please let me know
if you have any suggestions, or if I am missing
something.
The serializers module is new stuff: it allows
for loading YAML strings as unicode and for
dumping dictionaries in the extended format
(used e.g. by juju-core in the envs.yaml file).
To QA this, just use quickstart as usual, deploying
a bundle or spinning up an environment.
Then try to break it passing exotic strings as
options, e.g.:
.venv/bin/python juju-quickstart --gui-charm-url ☢
(FWIW the above character is \xe2\x98\xa2).
This obviously fail, but the error should not
be unicode related.
Thank you and sorry again.
https://code.launchpad.net/~frankban/juju-quickstart/unicode-all-the-things/+merge/198112
(do not edit description out of merge proposal)
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+372 lines, -148 lines) |
Patch |
 |
A |
[revision details]
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
juju-quickstart
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
quickstart/__init__.py
|
View
|
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
quickstart/app.py
|
View
|
|
4 chunks |
+13 lines, -5 lines |
0 comments
|
Download
|
 |
M |
quickstart/juju.py
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
quickstart/manage.py
|
View
|
|
7 chunks |
+27 lines, -7 lines |
0 comments
|
Download
|
 |
M |
quickstart/models/charms.py
|
View
|
|
3 chunks |
+27 lines, -16 lines |
0 comments
|
Download
|
 |
M |
quickstart/models/envs.py
|
View
|
|
2 chunks |
+15 lines, -12 lines |
0 comments
|
Download
|
 |
A |
quickstart/serializers.py
|
View
|
|
1 chunk |
+47 lines, -0 lines |
0 comments
|
Download
|
 |
M |
quickstart/settings.py
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
quickstart/tests/helpers.py
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
quickstart/tests/models/__init__.py
|
View
|
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
quickstart/tests/models/test_charms.py
|
View
|
|
4 chunks |
+14 lines, -12 lines |
0 comments
|
Download
|
 |
M |
quickstart/tests/models/test_envs.py
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
quickstart/tests/test_app.py
|
View
|
|
3 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
quickstart/tests/test_juju.py
|
View
|
|
4 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
quickstart/tests/test_manage.py
|
View
|
|
6 chunks |
+32 lines, -5 lines |
0 comments
|
Download
|
 |
A |
quickstart/tests/test_serializers.py
|
View
|
|
1 chunk |
+58 lines, -0 lines |
0 comments
|
Download
|
 |
M |
quickstart/tests/test_utils.py
|
View
|
|
13 chunks |
+46 lines, -38 lines |
0 comments
|
Download
|
 |
M |
quickstart/utils.py
|
View
|
|
10 chunks |
+46 lines, -38 lines |
0 comments
|
Download
|
Total messages: 5
|