Issue39366
Created on 2020-01-17 09:11 by corona10, last changed 2020-01-22 22:01 by berker.peksag. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 18035 | merged | corona10, 2020-01-17 09:17 | |
| Messages (8) | |||
|---|---|---|---|
| msg360163 - (view) | Author: Dong-hee Na (corona10) * | Date: 2020-01-17 09:11 | |
Remove deprecated methods since Python 3.3. Moreover nntplib.NNTP.xgtitle has not been exposed through docs.python.org https://docs.python.org/3/library/nntplib.html |
|||
| msg360169 - (view) | Author: STINNER Victor (vstinner) * | Date: 2020-01-17 11:04 | |
I'm not used to the NNTP protocol. Does the news.gmane.io support these 2 extensions? |
|||
| msg360188 - (view) | Author: Dong-hee Na (corona10) * | Date: 2020-01-17 13:48 | |
Looks like xgtitle is supported but xpath is not.
>>> a.xgtitle('gmane.comp.python.committers')
('282 Descriptions in form "group description"', [('gmane.comp.python.committers', 'CPython Committers (non-public) (Moderated)')])
>>> a.xpath(message_id)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/nntplib.py", line 865, in xpath
resp = self._shortcmd('XPATH {0}'.format(id))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/nntplib.py", line 513, in _shortcmd
return self._getresp()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/nntplib.py", line 458, in _getresp
raise NNTPPermanentError(resp)
nntplib.NNTPPermanentError: 500 What?
|
|||
| msg360190 - (view) | Author: STINNER Victor (vstinner) * | Date: 2020-01-17 13:53 | |
>>> a.xgtitle('gmane.comp.python.committers')
('282 Descriptions in form "group description"', [('gmane.comp.python.committers', 'CPython Committers (non-public) (Moderated)')])
Does https://docs.python.org/dev/library/nntplib.html#nntplib.NNTP.description give the same result?
|
|||
| msg360192 - (view) | Author: Dong-hee Na (corona10) * | Date: 2020-01-17 14:11 | |
> Does https://docs.python.org/dev/library/nntplib.html#nntplib.NNTP.description give the same result? Not exactly same but descriptions give a similar result. >>> import nntplib >>> a = nntplib.NNTP('news.gmane.io') >>> a.description('gmane.comp.python.committers') 'CPython Committers (non-public) (Moderated)' >>> a.descriptions('gmane.comp.python.committers') ('215 Newsgroup descriptions in form "group description"', {'gmane.comp.python.committers': 'CPython Committers (non-public) (Moderated)'}) >>> a.xgtitle('gmane.comp.python.committers') <stdin>:1: DeprecationWarning: The XGTITLE extension is not actively used, use descriptions() instead ('282 Descriptions in form "group description"', [('gmane.comp.python.committers', 'CPython Committers (non-public) (Moderated)')]) |
|||
| msg360197 - (view) | Author: STINNER Victor (vstinner) * | Date: 2020-01-17 16:08 | |
>>> a.description('gmane.comp.python.committers')
'CPython Committers (non-public) (Moderated)'
>>> a.descriptions('gmane.comp.python.committers')
('215 Newsgroup descriptions in form "group description"', {'gmane.comp.python.committers': 'CPython Committers (non-public) (Moderated)'})
Well, both results contain the same important string: 'CPython Committers (non-public) (Moderated)'. So I think that it's ok to drop xgtitle() as well.
|
|||
| msg360512 - (view) | Author: Berker Peksag (berker.peksag) * | Date: 2020-01-22 21:59 | |
New changeset 1f0f102dec506fd06f912b74dd2be64a7fba0d3f by Berker Peksag (Dong-hee Na) in branch 'master': bpo-39366: Remove xpath() and xgtitle() methods of NNTP (GH-18035) https://github.com/python/cpython/commit/1f0f102dec506fd06f912b74dd2be64a7fba0d3f |
|||
| msg360514 - (view) | Author: Berker Peksag (berker.peksag) * | Date: 2020-01-22 22:01 | |
Thanks for the PR! I'm glad these previously deprecated functions are now gone. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-01-22 22:01:26 | berker.peksag | set | status: open -> closed type: enhancement messages: + msg360514 components:
+ Library (Lib) |
| 2020-01-22 21:59:47 | berker.peksag | set | nosy:
+ berker.peksag messages: + msg360512 |
| 2020-01-17 16:08:54 | vstinner | set | messages: + msg360197 |
| 2020-01-17 14:11:24 | corona10 | set | messages: + msg360192 |
| 2020-01-17 13:53:18 | vstinner | set | messages: + msg360190 |
| 2020-01-17 13:48:18 | corona10 | set | messages: + msg360188 |
| 2020-01-17 11:04:52 | vstinner | set | messages: + msg360169 |
| 2020-01-17 09:17:07 | corona10 | set | keywords:
+ patch stage: patch review pull_requests: + pull_request17432 |
| 2020-01-17 09:11:15 | corona10 | create | |