[Python-3000] setup.py fails in the py3k-struni branch

Alexandre Vassalotti alexandre at peadrop.com
Thu Jun 7 20:37:45 CEST 2007


On 6/7/07, Guido van Rossum <guido at python.org> wrote:
> It's time to look at the original traceback (attached as "tb", after
> fixing the formatting problems). it looks like any call to
> encodings.normalize_encoding() causes this problem.

Don't know if it will help to know that, but it seems adding a
debugging print() in the normalize_encoding method, makes Python act
weird:

  >>> print("hello")  # no output
  [38357 refs]
  >>> hello?          # note the exception is not shown
  [30684 refs]
  >>> exit()          # does quit

> I don't know why linking an extension avoids this, and why it's only
> a problem for you and not for me, but that's probably a locale
> setting (if you mail me the values of all your locale-specific
> environment variables I can try to reproduce it).

I don't think it is related to locales settings. Since even with a
minimum number of environment variables, I still can reproduce the
problem.

  % sh
  $ for v in `set | egrep -v 'OPTIND|PS|PATH' | cut -d "=" -f1`
  > do unset $v; done
  $ make
  make: *** [sharedmods] Error 1

> The trail leads back to the optparse module using the gettext module
> to translate its error messages. That seems overengineered to me,
> but I won't argue too strongly.
>
> In any case, the root cause is that normalize_encoding() is badly
> broken. I've attached a hack that might fix it. Can you try if that
> helps?

Yep, that worked. What this new str8 type is for, btw? It is the second
time I encounter it, today.

-- Alexandre


More information about the Python-3000 mailing list