diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-01-22 21:59:43 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2020-01-22 21:59:43 (GMT) |
commit | 1f0f102dec506fd06f912b74dd2be64a7fba0d3f (patch) | |
tree | dfdfd1335254a0f0172995d452f1b55f726ac065 /Lib/nntplib.py | |
parent | b477d19a6b7751b0c933b239dae4fc96dbcde9c4 (diff) | |
download | cpython-1f0f102dec506fd06f912b74dd2be64a7fba0d3f.zip cpython-1f0f102dec506fd06f912b74dd2be64a7fba0d3f.tar.gz cpython-1f0f102dec506fd06f912b74dd2be64a7fba0d3f.tar.bz2 |
bpo-39366: Remove xpath() and xgtitle() methods of NNTP (GH-18035)
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r-- | Lib/nntplib.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py index 8951203..aa9b46a 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -67,7 +67,6 @@ import re import socket import collections import datetime -import warnings import sys try: @@ -834,44 +833,6 @@ class _NNTPBase: fmt = self._getoverviewfmt() return resp, _parse_overview(lines, fmt) - def xgtitle(self, group, *, file=None): - """Process an XGTITLE command (optional server extension) Arguments: - - group: group name wildcard (i.e. news.*) - Returns: - - resp: server response if successful - - list: list of (name,title) strings""" - warnings.warn("The XGTITLE extension is not actively used, " - "use descriptions() instead", - DeprecationWarning, 2) - line_pat = re.compile('^([^ \t]+)[ \t]+(.*)$') - resp, raw_lines = self._longcmdstring('XGTITLE ' + group, file) - lines = [] - for raw_line in raw_lines: - match = line_pat.search(raw_line.strip()) - if match: - lines.append(match.group(1, 2)) - return resp, lines - - def xpath(self, id): - """Process an XPATH command (optional server extension) Arguments: - - id: Message id of article - Returns: - resp: server response if successful - path: directory path to article - """ - warnings.warn("The XPATH extension is not actively used", - DeprecationWarning, 2) - - resp = self._shortcmd('XPATH {0}'.format(id)) - if not resp.startswith('223'): - raise NNTPReplyError(resp) - try: - [resp_num, path] = resp.split() - except ValueError: - raise NNTPReplyError(resp) from None - else: - return resp, path - def date(self): """Process the DATE command. Returns: |