This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年05月19日 16:21 by redcomet, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue8767.patch | taschini, 2012年04月27日 07:23 | review | ||
| issue8767_interpreter.patch | taschini, 2012年04月30日 08:17 | review | ||
| issue8767_stdlib.patch | taschini, 2012年04月30日 08:18 | review | ||
| Messages (11) | |||
|---|---|---|---|
| msg106076 - (view) | Author: Charles Solar (redcomet) | Date: 2010年05月19日 16:21 | |
I am compiling python on AIX 5.3. The normal configure and make works, except it fails to compile the unicodedata module. The assembler reports a bunch of these errors: Error: value of 000000000001268b too large for field of 2 bytes at 000000000000006d The module is labeled as optional, but if that one fails python will not install. One of the .py files it tries to compile requires unicodedata so the whole thing fails. I tried --enable-unicode=ucs4 and got the same results so then I tried just --disable-unicode all together and configure spits out: checking what type to use for unicode... configure: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase). I had to go into the configure script itself remove a default case statement that produced the error to disable it completely. Building Python2.7b1 on AIX 5.3 |
|||
| msg106077 - (view) | Author: Charles Solar (redcomet) | Date: 2010年05月19日 16:32 | |
Seems as though python 2.7 should not support --disable-unicode so this ticket is invalid. I just googled python disable unicode, but it seems that the decision to never disable unicode is recent. Closing |
|||
| msg159389 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年04月26日 16:03 | |
Reopening per this python-dev thread where MvL said that not being able to build 2.7 without unicode is a bug (but someone would need to care enough to contribute a patch to fix it). |
|||
| msg159442 - (view) | Author: Stefano Taschini (taschini) * | Date: 2012年04月27日 07:23 | |
Here's the patch. It has four goals: 1. Allow ./configure --disable-unicode to work; 2. Have the naked interpreter running with no unicode support; 3. Be able to compile most of the stdlib; 4. Be able to run the test suite. The one-line modification to configure.ac (and consequentley autoreconf'ed configure) achieve goal 1. The changes to the three C files (which are nothing more than a few #ifdef Py_USING_UNICODE) achieve goal 2: you can run "./python -S". The fix for site.py takes care of posixpath, glob, (and a few other modules) and makes it possible to compile most of the C extensions of the stdlib, goal 3 -- The compilation process under posix requires posixpath and glob to work. The most notable extension that won't be built is, unsurprisingly enough, io. Fortunately it does not play in Python 2.7 the central role it plays in Python 3. Still, a few other modules depend on it and won't be usable. The changes in Lib/test/script_helper.py and Lib/test/test_support.py make it possible to run the test suite. Roughly one third of the tests will fail, though, but I think that's acceptable. In relation to my purpose for submitting this patch ( #1065986 ) , I note that test_pydoc runs and succeeds. |
|||
| msg159473 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2012年04月27日 15:44 | |
I find the injection of a fake unicode class too hacky. Instead, I suggest that each module does try: _unicode = unicode except NameError: # no unicode support in this build class _unicode: pass and then have the isinstance checks look for _unicode |
|||
| msg159673 - (view) | Author: Stefano Taschini (taschini) * | Date: 2012年04月30日 07:59 | |
Martin, That was exactly my first approach. What made me change my mind is that i) it is also fairly hacky (one might rightfully object that it is the isinstance(x, unicode) tests that should be changed) ii) it is now a hack spread over a dozen files, instead of the site.py alone. iii) the alterations in those files are executed even in the case of built-in unicode support, thus increasing the risk of introducing a regression in the stdlib. In the end I was a bit loath to alter quite a few of the stdlib modules (including some of the "core" ones) for a rather infrequent case. My solution, on the other hand, is such that in the regular case of built-in unicode support those modules are not touched at all, thus reducing the risk of introducing a regression in the stdlib. Still, if you guys do think that the maintainability risk due to the hackiness of my suggestion exceeds the potential benefits, it might be better to split the issue (and the patch) into two: one for the autoconf and interpreter, and one for the stdlib. In this way, the patch for autconf and interpreter (which should be less controversial) might be accepted sooner, while we bide our time until we come up with a better solution for the stdlib. |
|||
| msg159674 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2012年04月30日 08:02 | |
> it might be better to split the issue (and the patch) into two: one for the autoconf and interpreter, and one for the stdlib. Please do that. Splitting the patch could be enough, no need to split the issue. |
|||
| msg159676 - (view) | Author: Stefano Taschini (taschini) * | Date: 2012年04月30日 08:18 | |
Here we go. |
|||
| msg161190 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年05月20日 08:42 | |
New changeset d7aff4423172 by Martin v. Löwis in branch '2.7': Issue #8767: Restore building with --disable-unicode. http://hg.python.org/cpython/rev/d7aff4423172 |
|||
| msg161191 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2012年05月20日 08:47 | |
Thanks for the patch. I did the library patch without monkey-patching. If there are further issues with this feature, please submit new bug reports. I won't consider the many test failures due to usage of Unicode literals in the test cases as bugs, as working around for the lack of Unicode literals is quite tedious, and would reduce readability. |
|||
| msg161197 - (view) | Author: Stefano Taschini (taschini) * | Date: 2012年05月20日 10:35 | |
Understood and agreed. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:01 | admin | set | github: 53013 |
| 2012年05月20日 10:35:58 | taschini | set | messages: + msg161197 |
| 2012年05月20日 08:47:13 | loewis | set | status: open -> closed resolution: fixed |
| 2012年05月20日 08:47:05 | loewis | set | messages: + msg161191 |
| 2012年05月20日 08:42:30 | python-dev | set | nosy:
+ python-dev messages: + msg161190 |
| 2012年04月30日 08:18:33 | taschini | set | files:
+ issue8767_stdlib.patch messages: + msg159676 |
| 2012年04月30日 08:17:16 | taschini | set | files: + issue8767_interpreter.patch |
| 2012年04月30日 08:02:47 | loewis | set | messages: + msg159674 |
| 2012年04月30日 07:59:21 | taschini | set | messages: + msg159673 |
| 2012年04月29日 13:04:10 | ezio.melotti | set | nosy:
+ ezio.melotti |
| 2012年04月27日 15:44:18 | loewis | set | messages: + msg159473 |
| 2012年04月27日 11:48:30 | pitrou | set | nosy:
+ loewis |
| 2012年04月27日 07:23:17 | taschini | set | files:
+ issue8767.patch keywords: + patch messages: + msg159442 |
| 2012年04月26日 16:03:21 | r.david.murray | set | status: closed -> open priority: normal -> low nosy: + r.david.murray messages: + msg159389 stage: needs patch |
| 2012年04月26日 15:09:25 | taschini | set | nosy:
+ taschini |
| 2010年05月19日 16:32:50 | redcomet | set | files: - config.log |
| 2010年05月19日 16:32:28 | redcomet | set | status: open -> closed messages: + msg106077 |
| 2010年05月19日 16:21:53 | redcomet | create | |