On Sat, Jan 30, 2021 at 4:05 AM Inada Naoki <songofaca...@gmail.com> wrote:

> Sorry for the delay. I want to do it in Python 3.10, but I am not sure
> the PEP is accepted.
> I updated the PEP today and working on reference implementation now.
>

great, thanks! let us know if there's anything else we can do to help that
along.


> The thread for the PEP is
>
> https://discuss.python.org/t/pep-597-raise-a-warning-when-encoding-is-omitted/3880


Thanks -- I guess I need to get on discuss finally :-)


> If PEP 597 is accepted, you can find all code omitting
> `encoding="utf-8"`. Your library users can run it without UTF-8 mode.
>

yes -- a good reason to get that done :-)

> Where would Python look for a "configuration file like `pyvenv.cfg`" ?
>
> I am not a Windows expert so I am not sure. But I think it should be
> the same directory where `python.exe` is in.
>

I'm not a Windows expert either, but I do think that it's pretty common for
Windows to use the location of the exe as part of start-up, location of
config files, etc.


> > Back to my idea above -- any way to have that be a pip (and conda)
> installable package? So it could be in a requirements file?
>


> I have no idea.
>

This, I think is worth exploring -- a way for an application or library to
specofy that it is expecting utf8 mode.

Conda can put a file anywhere (within the conda environment), so a config
file would be very doable.

But I'm not sure if pip can put anything outside of site packages -- and
I'm not sure if Python knows where site-packages is early enough in the
startup process.

So if anyone knows if there would be a way to pip-install UTF8-mode -- I
think that would be a nice feature.

BTW -- is it guaranteed that all other supported systems other than Windows
use utf-8? or should UTF8-mode be available everywhere, even though in most
cases it won't make a difference.

-CHB

-- 
Christopher Barker, PhD (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/AJPYCCKNWN7OWIOBT2JEGOCKW5VQCGRM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to