-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Remove deprecated items from asynchat #51165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The patches in bpo-1736190 deprecated fifo and simple_producers. These I attached a patch purging fifo and simple_producers from py3k code and |
I seem to remember that those classes were initially removed and then re-added by Josiah for backward compatibility (see discussions in bpo-1641 and bpo-1736190). Despite practically useless after the changes applied to asynchat in Python 2.6, both classes are there since the very first checkin of asynchat.py, 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(). |
What's the status of this? |
Is it worth the effort of committing changes like this when according to https://docs.python.org/3/library/asynchat.html#module-asynchat "This module exists for backwards compatibility only. For new code we recommend using asyncio."? See also bpo-6911. |
New changeset 42a645d74e9d by Giampaolo Rodola' in branch 'default': |
I simply removed asynchat.fifo documentation. Closing this out. |
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. 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. |
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. |
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. |
New changeset 233168a2a656 by Giampaolo Rodola' in branch 'default': |
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. |
The tests are failing: ====================================================================== Traceback (most recent call last):
File "/Users/raymond/cpython/Lib/test/test_asynchat.py", line 266, in test_basic
assert issubclass(w[0].category, DeprecationWarning)
IndexError: list index out of range ====================================================================== Traceback (most recent call last):
File "/Users/raymond/cpython/Lib/test/test_asynchat.py", line 283, in test_given_list
assert issubclass(w[0].category, DeprecationWarning)
IndexError: list index out of range |
New changeset aeeb385e61e4 by Giampaolo Rodola' in branch 'default': |
Would using assertWarns be more suitable here? Attached a patch. |
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. |
New changeset 486c1a81ee32 by Berker Peksag in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: