Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3925)

Issue 38500043: Use unicode everywhere in the application.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by frankban
Modified:
10 years, 4 months ago
Reviewers:
rharding, matthew.scott, mp+198112
Visibility:
Public.

Description

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)

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use unicode everywhere in the application. #

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

Messages

Total messages: 5
frankban
Please take a look.
10 years, 4 months ago (2013-12-06 18:30:17 UTC) #1
matthew.scott
LGTM, QA okay. Thanks for the work!
10 years, 4 months ago (2013-12-06 18:56:03 UTC) #2
rharding
My tears run deep. I didn't realize it would be this messy supporting both versions. ...
10 years, 4 months ago (2013-12-06 19:17:34 UTC) #3
frankban
On 2013/12/06 19:17:34, rharding wrote: > My tears run deep. I didn't realize it would ...
10 years, 4 months ago (2013-12-09 10:58:53 UTC) #4
frankban
10 years, 4 months ago (2013-12-09 11:02:04 UTC) #5
*** Submitted:

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.

R=matthew.scott, rharding
CC=
https://codereview.appspot.com/38500043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b