-
Notifications
You must be signed in to change notification settings - Fork 5
/
2to3-done.txt
225 lines (214 loc) · 8.4 KB
/
2to3-done.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
CAN'T VERIFY
./roundup/backends/back_mysql.py
TODO
./roundup/cgi/exceptions.py
./roundup/cgi/form_parser.py
./roundup/cgi/MultiMapping.py
./roundup/cgi/PageTemplates/__init__.py
./roundup/cgi/PageTemplates/Expressions.py
./roundup/cgi/PageTemplates/GlobalTranslationService.py
./roundup/cgi/PageTemplates/MultiMapping.py
./roundup/cgi/PageTemplates/PageTemplate.py
./roundup/cgi/PageTemplates/PathIterator.py
./roundup/cgi/PageTemplates/PythonExpr.py
./roundup/cgi/PageTemplates/TALES.py
./roundup/cgi/TAL/__init__.py
./roundup/cgi/TAL/DummyEngine.py
./roundup/cgi/TAL/HTMLParser.py
./roundup/cgi/TAL/HTMLTALParser.py
./roundup/cgi/TAL/markupbase.py
./roundup/cgi/TAL/TALDefs.py
./roundup/cgi/TAL/TALGenerator.py
./roundup/cgi/TAL/talgettext.py
./roundup/cgi/TAL/TALInterpreter.py
./roundup/cgi/TAL/TALParser.py
./roundup/cgi/TAL/TranslationContext.py
./roundup/cgi/TAL/XMLParser.py
./roundup/cgi/templating.py
./roundup/cgi/TranslationService.py
./roundup/cgi/wsgi_handler.py
./roundup/cgi/zLOG.py
./roundup/cgi/ZTUtils/__init__.py
./roundup/cgi/ZTUtils/Batch.py
./roundup/cgi/ZTUtils/Iterator.py
./roundup/configuration.py
./roundup/date.py
./roundup/dist/__init__.py
./roundup/dist/command/__init__.py
./roundup/dist/command/bdist_rpm.py
./roundup/dist/command/build.py
./roundup/dist/command/build_doc.py
./roundup/dist/command/build_scripts.py
./roundup/exceptions.py
./roundup/hyperdb.py
./roundup/i18n.py
./roundup/init.py
./roundup/install_util.py
./roundup/instance.py
./roundup/mailer.py
./roundup/mailgw.py
./roundup/msgfmt.py
./roundup/password.py
./roundup/rfc2822.py
./roundup/roundupdb.py
./roundup/scripts/__init__.py
./roundup/scripts/roundup_admin.py
./roundup/scripts/roundup_demo.py
./roundup/scripts/roundup_gettext.py
./roundup/scripts/roundup_mailgw.py
./roundup/scripts/roundup_server.py
./roundup/scripts/roundup_xmlrpc_server.py
./roundup/security.py
./roundup/support.py
./roundup/token.py
./roundup/version_check.py
./roundup/xmlrpc.py
./run_tests.py
./scripts/copy-user.py
./scripts/imapServer.py
./scripts/import_sf.py
./scripts/schema_diagram.py
./setup.py
./share/roundup/templates/classic/detectors/messagesummary.py
./share/roundup/templates/classic/detectors/nosyreaction.py
./share/roundup/templates/classic/detectors/statusauditor.py
./share/roundup/templates/classic/detectors/userauditor.py
./share/roundup/templates/classic/initial_data.py
./share/roundup/templates/classic/schema.py
./share/roundup/templates/minimal/detectors/userauditor.py
./share/roundup/templates/minimal/initial_data.py
./share/roundup/templates/minimal/schema.py
./test/__init__.py
./test/benchmark.py
./test/db_test_base.py
./test/memorydb.py
./test/mocknull.py
./test/session_common.py
./test/test_actions.py
./test/test_anydbm.py
./test/test_cgi.py
./test/test_dates.py
./test/test_hyperdbvals.py
./test/test_indexer.py
./test/test_locking.py
./test/test_mailer.py
./test/test_mailgw.py
./test/test_mailsplit.py
./test/test_memorydb.py
./test/test_multipart.py
./test/test_mysql.py
./test/test_postgresql.py
./test/test_rfc2822.py
./test/test_schema.py
./test/test_security.py
./test/test_sqlite.py
./test/test_templating.py
./test/test_textfmt.py
./test/test_token.py
./test/test_userauditor.py
./test/test_xmlrpc.py
./test.py
./tools/fixroles.py
./tools/load_tracker.py
./tools/migrate-queries.py
./tools/pygettext.py
./frontends/ZRoundup/__init__.py
./frontends/ZRoundup/ZRoundup.py
DONE
./doc/conf.py
./roundup/admin.py
./roundup/backends/__init__.py
./roundup/backends/back_anydbm.py
./roundup/backends/back_postgresql.py
./roundup/backends/back_sqlite.py
./roundup/backends/indexer_common.py
./roundup/backends/indexer_dbm.py
./roundup/backends/indexer_rdbms.py
./roundup/backends/locking.py
./roundup/backends/portalocker.py
./roundup/backends/rdbms_common.py
./roundup/backends/sessions_dbm.py
./roundup/backends/sessions_rdbms.py
./roundup/cgi/accept_language.py
./roundup/cgi/actions.py
./roundup/cgi/cgitb.py
NOTHING DONE
./roundup/__init__.py
./roundup/actions.py
./roundup/anypy/__init__.py
./roundup/backends/blobfiles.py
./roundup/backends/indexer_xapian.py
./roundup/cgi/__init__.py
./roundup/cgi/apache.py
./roundup/cgi/client.py
Joseph S. Myers notes:
>The key difficulty is undoubtedly dealing with the changes to string types
>- combined with how the extensibility of Roundup means people will have
>Python code in their instances (detectors, etc.), both directly and
>embedded in HTML - which passes strings to Roundup interfaces and gets
>strings from Roundup interfaces.
>
>Roundup makes heavy use of string objects that really are text strings -
>logically, sequences of Unicode code points. Right now, those strings,
>with Python 2, are str objects, encoded in UTF-8. This means that
>people's Python code in their instances, running under Python 2, will
>expect str objects encoded in UTF-8 (and if their code is e.g. generating
>HTML text encoded in UTF-8 to be sent to the user, it never actually has
>to deal with the encoding explicitly, just passes the text through).
>(The experimental Jinja2 templating engine then explicitly converts those
>UTF-8 encoded str objects to unicode objects because that's what Jinja2
>expects to deal with.)
>
>It's quite plausible people's code in their instances will work fine with
>Python 3 if it gets str objects for both Python 2 and Python 3 (UTF-8
>encoded str for Python 2, ordinary Unicode string objects for Python 3).
>It's more likely to break if it gets Python 2 unicode objects, although
>using such objects in Python 2 seems to be how a lot of people do their
>porting to Python 3. And certainly if when an instance is running with
>Python 3, it gets an object that's not a native sequence of Unicode code
>points, but has each UTF-8 byte as a separate element of the str object,
>things will break.
>
>(I have an instance that uses Unicode collation via PyICU on data from
>Roundup, for example. That works fine with UTF-8 str objects in Python 2,
>would work fine with Python 2 unicode objects though I don't use those,
>works fine with Python 3 str objects when used in their native way - the
>same code has a large part also used outside of Roundup that works with
>both Python 2 and Python 3. Actually, I'd like to have a way to make
>Roundup's built-in sorting of database objects use Unicode collation, or
>otherwise have a way of computing a sort key that isn't simply naming a
>particular property as the sort key, but that's another matter.)
>
>But Roundup *also* has strings that are sequences of bytes - String()
>database fields, which can be both. Many are data displayed directly on
>web pages and edited there by the user - those are ordinary strings (UTF-8
>at present). But FileClass objects have a String() content property which
>is arbitrary binary data such as an attached file - which logically should
>appear to the user as a bytes object in Python 3. Except that some
>FileClass objects use that data to store text (e.g. the msg class in the
>classic scheme). So you definitely need a Bytes() alternative to String()
>fields, for binary data, and may or may not also need separate text and
>binary variants of FileClass.
>
>I've found that for text-heavy code, always using str objects for text and
>having them be normal Unicode strings in Python 3 but UTF-8-encoded in
>Python 2 works well with the vast bulk of code being encoding-agnostic and
>just passing the strings around. Obviously things are different for the
>sort of code that mixes text and binary data - that is, the sort of thing
>you describe as systems programs in your porting HOWTO. I don't think
>Roundup really is such a systems program, except in limited areas such as
>dealing with attached files.
>For network data, Roundup is already careful about character sets -
>converting to UTF-8 on input (see e.g. "if client charset is different
>from the storage charset, recode form fields" in cgi/client.py, or the
>code in mailgw.py that checks the encoding of each MIME part and converts
>to UTF-8). Presumably in such cases the decoding would remain unchanged
>for Python 3, but the encoding should be a function that's a no-op for
>Python 3 to get native str objects there (and likewise for the places
>where data is turned into Python 2 unicode objects, processed and
>converted back to UTF-8 - both steps should be no-ops for Python 3).
>
>For reading templates, database string data, etc., Roundup knows the
>storage format is UTF-8 so has no explicit conversions - those are places
>that will need to be found and made to decode as UTF-8 for Python 3 (or do
>a no-op for Python 2).