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.

Title: Remove deprecated items from asynchat
Type: enhancement Stage: resolved
Components: Documentation, Library (Lib), Tests Versions: Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: giampaolo.rodola Nosy List: BreamoreBoy, berker.peksag, docs@python, ezio.melotti, georg.brandl, giampaolo.rodola, josiahcarlson, lehmannro, python-dev, rhettinger, vstinner
Priority: high Keywords: easy, patch

Created on 2009-09-15 05:55 by lehmannro, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
asynchat.patch lehmannro, 2009-09-15 05:55 patch for and test/
use-assertwarns.diff berker.peksag, 2014-06-22 14:39 review
Messages (16)
msg92645 - (view) Author: Robert Lehmann (lehmannro) * Date: 2009-09-15 05:55
The patches in issue1736190 deprecated fifo and simple_producers. These
are safe for removal in Python 3.0.

I attached a patch purging fifo and simple_producers from py3k code and
tests. The docs are mostly trivial as well but also touched by my other
issue issue6911 so I'd like that to settle first, otherwise this might
result in a merge conflict.
msg104286 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2010-04-26 23:20
I seem to remember that those classes were initially removed and then re-added by Josiah for backward compatibility (see discussions in issue 1641 and issue 1736190).

Despite practically useless after the changes applied to asynchat in Python 2.6, both classes are there since the very first checkin of, and the common policy in this case is to grant compatibility with older code, just in case few person out of many still rely on it.

I'd be more for stopping to mention them in the documentation, also because now that I look at it, the doc is wrong as it claims that "Each channel maintains a fifo" while this is no longer true since fifo() has been replaced by a deque().
msg195470 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-08-17 14:14
What's the status of this?
msg220507 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-13 22:21
Is it worth the effort of committing changes like this when according to "This module exists for backwards compatibility only. For new code we recommend using asyncio."?  See also issue6911.
msg220558 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-14 15:04
New changeset 42a645d74e9d by Giampaolo Rodola' in branch 'default':
fix issue #6916: undocument deprecated asynchat.fifo class.q
msg220559 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2014-06-14 15:05
I simply removed asynchat.fifo documentation. Closing this out.
msg221132 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-06-20 22:57
I don't think removing the documentation for a deprecated item is a good solution.  If people find it somewhere (old code, googling, via dir()) and find no related documentation, they might keep using it.
If it's clearly documented that the item exists but it's deprecated, people will avoid it (or at least be aware of what it does and the reason why it's deprecated).

I think it would be better to add back the documentation with a deprecated-removed directive, and possibly add warnings in the code (if they are not there already).  In future versions we can remove code and docs together.
msg221143 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-06-21 02:01
> I don't think removing the documentation for a deprecated item is a good solution.

Dedocumenting is a reasonable thing to do and I believe we've done it several times before, leaving code only so as to not break anything.  I expect this code to get zero maintenance as it fades into oblivion.
msg221160 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-06-21 08:20
IMHO until the code is there, the documentation also should be there -- even if it just to acknowledge the existence of the code and signal its deprecation.  Whether the code is eventually removed or not it's a separate issue.
msg221173 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-21 11:59
New changeset 233168a2a656 by Giampaolo Rodola' in branch 'default':
#6916: raise a deprecation warning if using asynchat.fifo
msg221174 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2014-06-21 12:01
Signaling the deprecation or just the existence of asynchat.fifo really isn't worth the effort because the code is no longer used since fifo was replaced with a deque in python 2.6.
Basically it's dead code and the only reason it remained there is because there were some complaints about a compatibility breakage when the 2.6 patch was applied, but I remember fifo class had nothing to do with it.
FWIW I added a deprecation warning and scheduled asynchat.fifo for removal in python 3.6 but IMO it is not worth it to mention it in the doc.
msg221188 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-06-21 19:04
The tests are failing:

ERROR: test_basic (test.test_asynchat.TestFifo)
Traceback (most recent call last):
  File "/Users/raymond/cpython/Lib/test/", line 266, in test_basic
    assert issubclass(w[0].category, DeprecationWarning)
IndexError: list index out of range

ERROR: test_given_list (test.test_asynchat.TestFifo)
Traceback (most recent call last):
  File "/Users/raymond/cpython/Lib/test/", line 283, in test_given_list
    assert issubclass(w[0].category, DeprecationWarning)
IndexError: list index out of range
msg221246 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-22 10:44
New changeset aeeb385e61e4 by Giampaolo Rodola' in branch 'default':
#6916: attempt to fix BB failure
msg221255 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2014-06-22 14:39
Would using assertWarns be more suitable here? Attached a patch.
msg222531 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-07-07 22:41
asynchat.fifo is now explicitly marked as deprecated and scheduled for removal in Python 3.6. I consider that the issue is done and so I'm closing it. Reopen a more specific issue if you consider that there is still something to do.

@Berker: You may apply use-assertwarns.diff yourself, I have no opinion, but your patch doesn't apply cleanly anymore.
msg222593 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-07-09 00:12
New changeset 486c1a81ee32 by Berker Peksag in branch 'default':
Issue #6916: Use assertWarns in test_asynchat.
Date User Action Args
2022-04-11 14:56:53adminsetgithub: 51165
2014-07-09 00:12:40python-devsetmessages: + msg222593
2014-07-09 00:03:46berker.peksagsetstage: needs patch -> resolved
2014-07-07 22:41:49vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg222531

resolution: fixed
2014-06-22 14:39:52berker.peksagsetfiles: + use-assertwarns.diff

nosy: + berker.peksag
messages: + msg221255

keywords: + patch
2014-06-22 10:44:17python-devsetmessages: + msg221246
2014-06-21 19:04:16rhettingersetpriority: normal -> high
resolution: fixed -> (no value)
2014-06-21 19:04:02rhettingersetmessages: + msg221188
2014-06-21 12:01:53giampaolo.rodolasetresolution: fixed
messages: + msg221174
2014-06-21 11:59:34python-devsetmessages: + msg221173
2014-06-21 08:20:48ezio.melottisetmessages: + msg221160
2014-06-21 02:01:51rhettingersetnosy: + rhettinger
messages: + msg221143
2014-06-20 22:57:03ezio.melottisetstatus: closed -> open
type: enhancement
messages: + msg221132

keywords: + easy, - patch
resolution: fixed -> (no value)
stage: patch review -> needs patch
2014-06-14 15:05:15giampaolo.rodolasetstatus: open -> closed
resolution: fixed
messages: + msg220559

versions: + Python 3.5, - Python 3.2
2014-06-14 15:04:11python-devsetnosy: + python-dev
messages: + msg220558
2014-06-13 22:21:49BreamoreBoysetnosy: + BreamoreBoy
messages: + msg220507
2013-08-17 14:14:23ezio.melottisetnosy: + ezio.melotti
messages: + msg195470
2010-09-04 00:06:59pitrousetassignee: josiahcarlson -> giampaolo.rodola
stage: patch review
versions: - Python 3.0, Python 3.1
2010-05-16 19:23:07eric.araujosetnosy: + docs@python
2010-04-26 23:20:13giampaolo.rodolasetmessages: + msg104286
2010-04-15 18:41:02giampaolo.rodolasetnosy: + giampaolo.rodola
2009-09-15 07:20:43georg.brandlsetassignee: georg.brandl -> josiahcarlson

nosy: + josiahcarlson
2009-09-15 05:55:55lehmannrocreate