[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Steve Dower


Steve Dower  added the comment:

Maybe as a global setting, the better thing to copy is the button at the end of 
installation that offers to change the long path policy?

That would give a bit more room that a checkbox to explain what is being set 
and what the implications are, which will help users who select it when they 
shouldn't.

IIRC, all of that code exists in the boostrapper app (one of the .cpp files). 
The UI is probably in the bundle wxl/thm files.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Inada Naoki


Inada Naoki  added the comment:

User may install Python from python.org installer, scoop, conda, and Windows 
Store.
So envvar is not a right tool to configure only one installation.

Anyway, adding more complex way to configure Python can be discussed later.

Paul Moore againsted adding more way to configure Python [1].
So let's focus on promoting existing way in Python 3.10.

[1] 
https://mail.python.org/archives/list/python-id...@python.org/message/BDOV2F3LDSC2YDUR4LCPNHZFJWEZNX5U/

> Yes, if the installer directly sets an environment variable, then the setting 
> should be specific to the installed version, such as PYTHONUTF8_310-32.

Then, suspend GH-24742 (adding checkbox to installer).

In GH-24743, I added the shortcut from the installer. But I am not sure it is 
the best way, because only Python installed from the installer have it.

I will check how conda installs Python on Windows. If it contains Tools, we may 
add `enable-utf8mode.bat` and `disable-utf8mode.bat` to the Tools.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Eryk Sun


Eryk Sun  added the comment:

> I'm always very hesitant to modify system-wide (or user-wide) settings 
> like this though. I'd be more comfortable if we made it a PYTHONUTF8_310
> variable that _only_ applies to that specific version. Otherwise someone
> might install an update and break existing apps.

Yes, if the installer directly sets an environment variable, then the setting 
should be specific to the installed version, such as PYTHONUTF8_310-32.

Maybe this could be implemented more generally by supporting a 
"PYTHONX_{py_version_short_plat}" environment variable that contains a list of 
-X implementation-specific boolean options to enable by default, e.g. set 
"PYTHONX_3.10-32=utf8;dev". In POSIX, name it "PYTHONX_{py_version_short}". In 
Windows, "{py_version_short_plat}" would be sys.winver.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23513
pull_request: https://github.com/python/cpython/pull/24743

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Inada Naoki


Change by Inada Naoki :


--
keywords: +patch
pull_requests: +23512
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24742

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-02 Thread Inada Naoki


Inada Naoki  added the comment:

> You can run "[WindowsFolder]System32\setx.exe" directly. It's not a shell 
> command.

Thank you. I will do.

> For modifying an environment variable, please clone the entire path MSI and 
> use an Environment element to update it. Should be a little simpler than that 
> one, because it's a constant.

How about having both? Shortcut menu is more accessible when user want to 
enable UTF-8 mode after they install Python. (e.g. they got troubled by 
UnicodeDecodeError and are adviced to enable UTF-8 mode).

> Alternatively, for this kind of policy option, it might be nice to set up 
> some common registry keys to define it. That is a function I've been thinking 
> about for enabling some security features (such as malware scanning), and it 
> mimics how Windows distributes its own configuration already. That'll take a 
> whole PEP, though, and I doubt I'll get it ready in time for 3.10 given the 
> other stuff I've got going on right now.

Registry is also discussed in the thread, but there are no consensus about 
adding new way to enable UTF-8 mode.
I conclude that we should promote existing way (i.e. envvar) and get feedback 
from users.

> So provided we adequately document that the setting may impact other versions 
> of Python besides the one being installed, and it's not enabled by default, 
> I'm okay with an MSI-based addable/removable setting for PYTHONUTF8.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-02 Thread Steve Dower


Steve Dower  added the comment:

For modifying an environment variable, please clone the entire path MSI and use 
an Environment element to update it. Should be a little simpler than that one, 
because it's a constant.

I'm always very hesitant to modify system-wide (or user-wide) settings like 
this though. I'd be more comfortable if we made it a PYTHONUTF8_310 variable 
that _only_ applies to that specific version. Otherwise someone might install 
an update and break existing apps.

Alternatively, for this kind of policy option, it might be nice to set up some 
common registry keys to define it. That is a function I've been thinking about 
for enabling some security features (such as malware scanning), and it mimics 
how Windows distributes its own configuration already. That'll take a whole 
PEP, though, and I doubt I'll get it ready in time for 3.10 given the other 
stuff I've got going on right now.

So provided we adequately document that the setting may impact other versions 
of Python besides the one being installed, and it's not enabled by default, I'm 
okay with an MSI-based addable/removable setting for PYTHONUTF8.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-02 Thread Eryk Sun


Eryk Sun  added the comment:

> `cmd.exe /c "SETX PYTHONUTF8 1

You can run "[WindowsFolder]System32\setx.exe" directly. It's not a shell 
command.

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com