[Python-Dev] Fix Unicode-disabled build of Python 2.7 (original) (raw)

Victor Stinner victor.stinner at gmail.com
Tue Jun 24 13:50:25 CEST 2014


2014-06-24 13:04 GMT+02:00 Skip Montanaro <skip at pobox.com>:

I can't see any reason to make a backwards-incompatible change to Python 2 to only support Unicode. You're bound to break somebody's setup. Wouldn't it be better to fix bugs as Serhiy has done?

According to the long list of issues, I don't think that it's possible to compile and use Python stdlib when Python is compiled without Unicode support. So I'm not sure that we can say that it's an backward-incompatible change.

Who is somebody? Who compiles Python without Unicode support? Which version of Python?

With Python 2.6, ./configure --disable-unicode fails with: "checking what type to use for unicode... configure: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)."

So I'm not sure that anyone used this option recently.

The configure script was fixed 2 years ago in Python 2.7 (2 years after the release of Python 2.7.0): http://hg.python.org/cpython/rev/d7aff4423172 http://bugs.python.org/issue21833

"./configure --disable-unicode" works on Python 2.5.6: unicode type doesn't exist, and u'abc' is a bytes string.

It works with Python 2.7.7+ too.

Victor



More information about the Python-Dev mailing list