[issue41139] cgi uses the locale encoding for log files

2021-04-28 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2021-04-28 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset e52ab42cedd2a5ef4c3c1a47d0cf96a8f06d051f by Inada Naoki in branch 
'master':
bpo-41139: Deprecate `cgi.log()` (GH-25625)
https://github.com/python/cpython/commit/e52ab42cedd2a5ef4c3c1a47d0cf96a8f06d051f


--

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2021-04-26 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2021-04-03 Thread Inada Naoki


Inada Naoki  added the comment:

+1 for removing.
But let's emit DeprecationWarning for now, and remove it later.

--
components: +Library (Lib)
versions:  -Python 3.8, Python 3.9

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2021-04-03 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +methane

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2020-07-20 Thread Rhodri James


Change by Rhodri James :


--
nosy:  -Rhodri James

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2020-07-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Available options:

1. Do nothing (keep cgi.log() and continue to use the default encoding for 
open()).
2. Remove cgi.log(). I think that the deprecation period is not needed because 
the function is not documented, is not imported by star-import, and is not 
shown in help.
3. Make cgi.log() using UTF-8 for open(). This may break some existing code if 
cgi.log() is ever used.
4. Completely rewrite cgi.log() using the logging module.

In all options except 2 cgi.log() needs to be documented and advertised as a 
new feature. And we should ask ourself: do we need this feature? Does it have 
advantages over the logging package?

It was more visible in 2.0. But since adding __all__ in 2.1 (in 
e99d5ea25ba994491c773d9b5872332334ccd1c5) it is a hidden feature.

--

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2020-07-02 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

My bad. I meant cgi.log(), I pressed submit changes in a hurry.

+1 for utf-8.

--

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2020-07-02 Thread Ethan Furman


Ethan Furman  added the comment:

Which functionality?

- cgi.log()

- opening with current locale

I don't mind keeping the function, but if the file isn't already opened I think 
using UTF-8 is an appropriate choice.

--

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2020-07-02 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

I am for keeping this functionality. Unless others in this nosy list think 
otherwise.

--
nosy: +thatiparthy

___
Python tracker 

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



[issue41139] cgi uses the locale encoding for log files

2020-06-27 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The cgi module provides undocumented feasibility for logging. cgi.log() formats 
log message and appends it to the log file with name specified by cgi.logfile 
if it was not empty before the first use of cgi.log().

One of problems is that it uses the locale encoding for log file. Therefore the 
result depends on the locale at the moment of the first use of cgi.log().

We can fix this by using some fixed encoding (UTF-8). Or maybe just remove this 
undocumented feature.

--
messages: 372462
nosy: Rhodri James, ethan.furman, serhiy.storchaka, vinay.sajip
priority: normal
severity: normal
status: open
title: cgi uses the locale encoding for log files
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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