On Mon, Dec 12, 2016 at 1:39 AM, Nick Coghlan <ncogh...@gmail.com> wrote:

> I don't anticipate any major concerns with downstream redistributors
> adding this behaviour, as the main thing that makes us nervous about
> globally changing the default upstream is the sheer variety of Linux
> distros out there, and the fact that folks are inclined to take their
> Linux integration bugs straight to bugs.python.org rather than first
> trying the issue tracker for their particular distro.
>
My one concern is precisely this variety.  For instance, if I get a
report that my application is raising a UnicodeError on RHEL7 when run
under cron (which uses the C locale) I might then try to replicate the
error on Fedora using the same LC_ALL=C locale.  With this change I
would fail to reproduce the error.

This is a variation on arguments about why individual sites should not
change the default encoding via sitecustomize.py.  The changes tend to
make python applications non-portable.  I don't think it is as severe
because we're still able to broadly classify things as "Fedora Python"
vs "Upstream Python" (instead of "Python running at My Business" vs
"Python running on the rest of the world" but it still is problematic.

OTOH, if this is a stepping stone and proving ground for getting it
into upstream Python then we just get this change a little early...
that's IMHO, a good thing.

Perhaps what's needed is a locale on Fedora that allows people to
select an ascii encoding for python which does not coincide with the C
locale.  This should satisfy the case you mention that *most* of the
time the C locale is not a conscious desire to select the ascii
encoding but also, as I'm pointing out, the need to select an
ascii-only encoding for debugging cross-platform scripts and
applications.

[..]
> As far as where we might add that check, I'd suggest the entry point
> for the `python3` binary itself, rather than in the shared library:
> https://hg.python.org/cpython/file/3.6/Programs/python.c#l46
>
I think the library is the appropriate place.  Otherwise you end up
with a python application failing when run under mod_wsgi[*]_ which
you can't debug using the command line interpreter.

.. [*]: or in libreoffice or any other application that links to
libpython for scripting

-Toshio
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org

Reply via email to