Issue35616
Created on 2018-12-30 04:52 by terry.reedy, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 11363 | closed | eamanu, 2018-12-30 05:50 | |
| PR 11363 | closed | eamanu, 2018-12-30 05:50 | |
| PR 11363 | closed | eamanu, 2018-12-30 05:50 | |
| Messages (8) | |||
|---|---|---|---|
| msg332745 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2018-12-30 04:52 | |
https://docs.python.org/3/c-api/unicode.html#deprecated-py-unicode-apis says "Deprecated since version 3.3, will be removed in version 4.0." (I am aware that the quote above was written before we decided that '3.9' should be followed by '3.10' rather than '4.0' to avoid giving mis-impressions.) There is currently no plan for a '4.0' and part of the reason is that it stirs up unnecessary negative feeling in people. For example: https://stackoverflow.com/questions/53899931/why-does-an-empty-string-in-python-sometimes-take-up-49-bytes-and-sometimes-51 The second most upvoted comment (9) is "seeing a reference to a "[Python] 4.0" is giving me anxiety..." – Mike Caron (11000+ reputation). We, as well as they, don't need this. When '4.0' was used in an asyncio deprecation, it was changed. Let us do the same elsewhere. |
|||
| msg332746 - (view) | Author: Emmanuel Arias (eamanu) * | Date: 2018-12-30 06:19 | |
Same similar occur with other docs $ git grep 'deprecated-removed::.*4\.0' Doc/c-api/arg.rst: .. deprecated-removed:: 3.3 4.0 Doc/c-api/arg.rst: .. deprecated-removed:: 3.3 4.0 Doc/c-api/arg.rst: .. deprecated-removed:: 3.3 4.0 Doc/c-api/arg.rst: .. deprecated-removed:: 3.3 4.0 Doc/c-api/long.rst: .. deprecated-removed:: 3.3 4.0 Doc/library/array.rst: .. deprecated-removed:: 3.3 4.0 Doc/library/functions.rst: .. deprecated-removed:: 3.4 4.0 |
|||
| msg333001 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2019-01-04 21:13 | |
Removing the C API function is a major breaking change. AFAIK there was no precedence since 3.0. It may be that we will name the new version 4.0 after doing this. In any case, first than remove this API, we need to pass the following steps: * Implement Py_DEPRECATED on Windows and use it for *all* deprecated functions. * Get rid of using deprecated API in the core and stdlib. I'm working on this. * I think it is good idea to implement a custom build without wchar_t cache and deprecated API for testing with third-party code. I'm working on this. One or two versions after using Py_DEPRECATED for all deprecated functions (but not earlier than EOL of 2.7) we can make them issuing run-time warnings. One or two versions after this we can replace them with stub functions that always fail. I think they can be removed after around 5 years from now. Currently we do not have exact terms. I do not see a problem with using 4.0 as a hypothetical removal term. |
|||
| msg333006 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2019-01-04 22:04 | |
After reading Serhiy's explanation, I agree that '4.0' is better than a specific '3.nn'. I did not realize how much was still left to be done. We can revisit this when there is a definite removal date. A literal 'sometime' might be better, but not worth arguing for. Most of the other occurrences of '4.0' are related to the old unicode API. |
|||
| msg333017 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-01-04 22:58 | |
I disagree. It's acceptable to break the C API in a minor release if the change has been properly promoted, documented, announced, etc. IMHO breaking the C API in 4.0 is going to send a bad signal to users. Multiple core developers asked multiple times to wait until Python 2 is really dead before removing some features which are used on Python 2 and Python 3. So at least, we must wait until January 1st, 2020, before removing Py_UNICODE APIs. I also would like to see the deprecation warning supported on Windows. I didn't see any announcement of future removal of C API on the capi-sig mailing list. |
|||
| msg333018 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-01-04 23:00 | |
> One or two versions after using Py_DEPRECATED for all deprecated functions (but not earlier than EOL of 2.7) we can make them issuing run-time warnings. Maybe we can experiment adding warnings only in development mode, when python3 -X dev is used? > I'm working on this. Thanks :-) |
|||
| msg333074 - (view) | Author: Marc-Andre Lemburg (lemburg) * ![]() |
Date: 2019-01-05 21:30 | |
Why not change the wording to read "... will be considered for removal in the next major Python release". Note that removal of Py_UNICODE APIs will not only break compatibility with Python 2, but also with the early Python 3 releases. And please also consider that we may see another change in the Unicode implementation... I've heard discussions about using UTF-8 as internal representation to address the issues with the current unified approach. |
|||
| msg333076 - (view) | Author: Emmanuel Arias (eamanu) * | Date: 2019-01-05 21:40 | |
Hello! IMHO I don't think is good say that they will remove on a version that is not planned yet. I agree with Marc-Andre is better say " they will be remove in the next major release" |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:09 | admin | set | github: 79797 |
| 2019-01-05 21:40:01 | eamanu | set | messages: + msg333076 |
| 2019-01-05 21:30:51 | lemburg | set | keywords:
patch, patch, patch nosy: + lemburg messages: + msg333074 |
| 2019-01-04 23:00:49 | vstinner | set | keywords:
patch, patch, patch messages: + msg333018 |
| 2019-01-04 22:58:06 | vstinner | set | keywords:
patch, patch, patch messages: + msg333017 |
| 2019-01-04 22:04:48 | terry.reedy | set | status: open -> closed messages: + msg333006 keywords:
patch, patch, patch |
| 2019-01-04 21:13:13 | serhiy.storchaka | set | keywords:
patch, patch, patch nosy: + serhiy.storchaka messages: + msg333001 |
| 2018-12-30 06:19:40 | eamanu | set | nosy:
+ eamanu messages: + msg332746 |
| 2018-12-30 05:50:39 | eamanu | set | keywords:
+ patch stage: needs patch -> patch review pull_requests: + pull_request10690 |
| 2018-12-30 05:50:33 | eamanu | set | keywords:
+ patch stage: needs patch -> needs patch pull_requests: + pull_request10689 |
| 2018-12-30 05:50:27 | eamanu | set | keywords:
+ patch stage: needs patch -> needs patch pull_requests: + pull_request10688 |
| 2018-12-30 04:52:22 | terry.reedy | create | |
