classification
Title: add deprecation warnings for asynchat, asyncore and smtpd
Type: Stage: resolved
Components: Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barry, christian.heimes, iritkatriel, miss-islington, pablogsal, petr.viktorin, vstinner
Priority: normal Keywords: patch

Created on 2021-06-23 09:59 by iritkatriel, last changed 2021-06-28 16:41 by iritkatriel. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 26875 closed iritkatriel, 2021-06-23 12:08
PR 26882 merged barry, 2021-06-23 17:59
PR 26904 merged miss-islington, 2021-06-24 19:37
PR 26905 merged iritkatriel, 2021-06-24 20:57
PR 26907 merged miss-islington, 2021-06-24 23:20
Messages (12)
msg396399 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-23 09:59
smtpd uses asynchat which has been deprecated since 3.6.

See discussion at
https://mail.python.org/archives/list/python-committers@python.org/thread/KNF6YQE2O4OLJDNKSGAT4NLZUNCQ5QSH/#KNF6YQE2O4OLJDNKSGAT4NLZUNCQ5QSH
msg396403 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-23 10:18
There are some tests that use asynchat, asyncore and smtpd so we first move them to test.support and document their removal from the stdlib.
msg396415 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2021-06-23 12:55
+1 for removal
msg396418 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2021-06-23 13:24
Please follow the backwards compatibility policy (PEP 387):
- Have a discussion
- Raise deprecation warnings
- Wait at least two minor Python versions where warnings are raised
- Consider any feedback
- Then remove stuff
(Or ask the SC for an exception, but these "are only granted for extreme situations such as dangerously broken or insecure features or features no one could reasonably be depending on".)

There were no deprecation warnings raised so far, so removing these in 3.11 is very premature.
msg396419 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-06-23 13:29
I'm with Petr, please follow PEP 4 and PEP 387. At a bare minimum you should have one minor Python version with deprecation warnings. You could ask Pablo if he allows to add deprecation warnings to Python 3.10 beta.
msg396439 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-06-23 18:33
I'm fine with a 3.10 backport as long as this is mentioned in python-dev to give time for folks to raise concerns. Additionally, please make sure that:

*The test site runs with -Werror as these warnings may make it fail so tests may need to be adapted.
* This deprecation is covered in the 3.10 what's new document.
* There is enough time for people to raise objections to the inclusion in 3.10 (so don't merge immediately after mentioning in python-dwv ;) )
msg396442 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-23 19:02
Pablo, to be clear - my understanding is that the question to python-dev is not whether to deprecate or not (they have been deprecated for a long time), but only whether to issue the warning in 3.10 or 3.11. Is that correct?
msg396446 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-06-23 20:18
> but only whether to issue the warning in 3.10 or 3.11. Is that correct?

Correct. It can also be mentioned in a more general message as long as people know that this is the plan and they have a chance to voice any concern to start on 3.10
msg396507 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2021-06-24 19:37
New changeset 8488b85c6397fe58f17fc00e047044c959ac0b04 by Barry Warsaw in branch 'main':
bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import (#26882)
https://github.com/python/cpython/commit/8488b85c6397fe58f17fc00e047044c959ac0b04
msg396508 - (view) Author: miss-islington (miss-islington) Date: 2021-06-24 19:58
New changeset a80a38ee9a7b2e26dba848793cc298d8435fddd5 by Miss Islington (bot) in branch '3.10':
[3.10] bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import (GH-26882) (GH-26904)
https://github.com/python/cpython/commit/a80a38ee9a7b2e26dba848793cc298d8435fddd5
msg396512 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-24 23:20
New changeset 22e7effad571f8e524d2f71ff55bbf2a25306753 by Irit Katriel in branch 'main':
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905)
https://github.com/python/cpython/commit/22e7effad571f8e524d2f71ff55bbf2a25306753
msg396515 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-24 23:38
New changeset 8bec9fb92f09d02c24611ebd0a90103a1a414a40 by Miss Islington (bot) in branch '3.10':
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905) (GH-26907)
https://github.com/python/cpython/commit/8bec9fb92f09d02c24611ebd0a90103a1a414a40
History
Date User Action Args
2021-06-28 16:41:04iritkatrielsetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.10
2021-06-24 23:38:18iritkatrielsetmessages: + msg396515
2021-06-24 23:20:50miss-islingtonsetpull_requests: + pull_request25483
2021-06-24 23:20:48iritkatrielsetmessages: + msg396512
2021-06-24 20:57:58iritkatrielsetpull_requests: + pull_request25481
2021-06-24 19:58:03miss-islingtonsetmessages: + msg396508
2021-06-24 19:37:49barrysetmessages: + msg396507
2021-06-24 19:37:38miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request25480
2021-06-23 20:18:46pablogsalsetmessages: + msg396446
2021-06-23 19:02:05iritkatrielsetmessages: + msg396442
2021-06-23 18:33:29pablogsalsetnosy: + pablogsal
messages: + msg396439
2021-06-23 18:19:04iritkatrielsetassignee: iritkatriel ->
2021-06-23 18:05:20iritkatrielsettitle: move deprecated asynchat, asyncore and smtpd from the stdlib to test.support -> add deprecation warnings for asynchat, asyncore and smtpd
2021-06-23 17:59:44barrysetpull_requests: + pull_request25459
2021-06-23 13:29:51christian.heimessetnosy: + christian.heimes
messages: + msg396419
2021-06-23 13:24:21petr.viktorinsetnosy: + petr.viktorin
messages: + msg396418
2021-06-23 12:55:48barrysetnosy: + barry
messages: + msg396415
2021-06-23 12:08:25iritkatrielsetkeywords: + patch
stage: patch review
pull_requests: + pull_request25451
2021-06-23 10:18:10iritkatrielsetmessages: + msg396403
title: remove deprecated smtpd from the stdlib -> move deprecated asynchat, asyncore and smtpd from the stdlib to test.support
2021-06-23 10:00:15iritkatrielsetassignee: iritkatriel
2021-06-23 09:59:41iritkatrielcreate