This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2020年06月27日 11:30 by serhiy.storchaka, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 25625 | merged | methane, 2021年04月26日 08:51 | |
| Messages (7) | |||
|---|---|---|---|
| msg372462 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2020年06月27日 11:30 | |
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. |
|||
| msg372866 - (view) | Author: Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) (thatiparthy) * | Date: 2020年07月02日 17:40 | |
I am for keeping this functionality. Unless others in this nosy list think otherwise. |
|||
| msg372867 - (view) | Author: Ethan Furman (ethan.furman) * (Python committer) | Date: 2020年07月02日 17:46 | |
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. |
|||
| msg372870 - (view) | Author: Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) (thatiparthy) * | Date: 2020年07月02日 18:11 | |
My bad. I meant cgi.log(), I pressed submit changes in a hurry. +1 for utf-8. |
|||
| msg372872 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2020年07月02日 18:49 | |
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. |
|||
| msg390154 - (view) | Author: Inada Naoki (methane) * (Python committer) | Date: 2021年04月03日 23:44 | |
+1 for removing. But let's emit DeprecationWarning for now, and remove it later. |
|||
| msg392276 - (view) | Author: Inada Naoki (methane) * (Python committer) | Date: 2021年04月29日 02:36 | |
New changeset e52ab42cedd2a5ef4c3c1a47d0cf96a8f06d051f by Inada Naoki in branch 'master': bpo-41139: Deprecate `cgi.log()` (GH-25625) https://github.com/python/cpython/commit/e52ab42cedd2a5ef4c3c1a47d0cf96a8f06d051f |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:33 | admin | set | github: 85311 |
| 2021年04月29日 02:36:58 | methane | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2021年04月29日 02:36:12 | methane | set | messages: + msg392276 |
| 2021年04月26日 08:51:03 | methane | set | keywords:
+ patch stage: patch review pull_requests: + pull_request24324 |
| 2021年04月03日 23:44:32 | methane | set | messages:
+ msg390154 components: + Library (Lib) versions: - Python 3.8, Python 3.9 |
| 2021年04月03日 23:34:31 | methane | set | nosy:
+ methane |
| 2021年04月03日 14:45:27 | serhiy.storchaka | link | issue43711 superseder |
| 2020年07月20日 20:50:15 | Rhodri James | set | nosy:
- Rhodri James |
| 2020年07月02日 18:49:44 | serhiy.storchaka | set | messages: + msg372872 |
| 2020年07月02日 18:11:27 | thatiparthy | set | messages: + msg372870 |
| 2020年07月02日 17:46:13 | ethan.furman | set | messages: + msg372867 |
| 2020年07月02日 17:40:49 | thatiparthy | set | nosy:
+ thatiparthy messages: + msg372866 |
| 2020年06月27日 11:32:06 | serhiy.storchaka | link | issue41063 dependencies |
| 2020年06月27日 11:30:05 | serhiy.storchaka | create | |