diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-01-08 15:47:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-08 15:47:25 (GMT) |
commit | 00ac28ac4d06a311fc2386ef921b2603735ffae6 (patch) | |
tree | 17e081280570701ee1afa902cc2ea9f8c1cfa7cf | |
parent | 535a3c4e3da2f0076bd62f04fb2cc44999fc2419 (diff) | |
download | cpython-00ac28ac4d06a311fc2386ef921b2603735ffae6.zip cpython-00ac28ac4d06a311fc2386ef921b2603735ffae6.tar.gz cpython-00ac28ac4d06a311fc2386ef921b2603735ffae6.tar.bz2 |
bpo-39242: Updated the Gmane domain into news.gmane.io (GH-17903)
(cherry picked from commit 2e6a8efa837410327b593dc83c57492253b1201e)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
-rw-r--r-- | Doc/library/nntplib.rst | 8 | ||||
-rw-r--r-- | Lib/nntplib.py | 2 | ||||
-rw-r--r-- | Lib/test/test_nntplib.py | 4 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2020-01-08-23-25-27.bpo-39242.bnL65N.rst | 3 |
4 files changed, 10 insertions, 7 deletions
diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst index 56188c7..2050685 100644 --- a/Doc/library/nntplib.rst +++ b/Doc/library/nntplib.rst @@ -20,7 +20,7 @@ as well as the older :rfc:`977` and :rfc:`2980`. Here are two small examples of how it can be used. To list some statistics about a newsgroup and print the subjects of the last 10 articles:: - >>> s = nntplib.NNTP('news.gmane.org') + >>> s = nntplib.NNTP('news.gmane.io') >>> resp, count, first, last, name = s.group('gmane.comp.python.committers') >>> print('Group', name, 'has', count, 'articles, range', first, 'to', last) Group gmane.comp.python.committers has 1096 articles, range 1 to 1096 @@ -44,7 +44,7 @@ about a newsgroup and print the subjects of the last 10 articles:: To post an article from a binary file (this assumes that the article has valid headers, and that you have right to post on the particular newsgroup):: - >>> s = nntplib.NNTP('news.gmane.org') + >>> s = nntplib.NNTP('news.gmane.io') >>> f = open('article.txt', 'rb') >>> s.post(f) '240 Article posted successfully.' @@ -73,7 +73,7 @@ The module itself defines the following classes: connection when done, e.g.: >>> from nntplib import NNTP - >>> with NNTP('news.gmane.org') as n: + >>> with NNTP('news.gmane.io') as n: ... n.group('gmane.comp.python.committers') ... # doctest: +SKIP ('211 1755 1 1755 gmane.comp.python.committers', 1755, 1, 1755, 'gmane.comp.python.committers') @@ -210,7 +210,7 @@ tuples or objects that the method normally returns will be empty. of values. On legacy servers which don't understand the ``CAPABILITIES`` command, an empty dictionary is returned instead. - >>> s = NNTP('news.gmane.org') + >>> s = NNTP('news.gmane.io') >>> 'POST' in s.getcapabilities() True diff --git a/Lib/nntplib.py b/Lib/nntplib.py index 5961a28..9f5610e 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -1103,7 +1103,7 @@ if __name__ == '__main__': nntplib built-in demo - display the latest articles in a newsgroup""") parser.add_argument('-g', '--group', default='gmane.comp.python.general', help='group to fetch messages from (default: %(default)s)') - parser.add_argument('-s', '--server', default='news.gmane.org', + parser.add_argument('-s', '--server', default='news.gmane.io', help='NNTP server hostname (default: %(default)s)') parser.add_argument('-p', '--port', default=-1, type=int, help='NNTP port number (default: %s / %s)' % (NNTP_PORT, NNTP_SSL_PORT)) diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index 618b403..fbd7db0 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -633,7 +633,7 @@ class NNTPv1Handler: "\tSat, 19 Jun 2010 18:04:08 -0400" "\t<4FD05F05-F98B-44DC-8111-C6009C925F0C@gmail.com>" "\t<hvalf7$ort$1@dough.gmane.org>\t7103\t16" - "\tXref: news.gmane.org gmane.comp.python.authors:57" + "\tXref: news.gmane.io gmane.comp.python.authors:57" "\n" "58\tLooking for a few good bloggers" "\tDoug Hellmann <doug.hellmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>" @@ -1119,7 +1119,7 @@ class NNTPv1v2TestsMixin: "references": "<hvalf7$ort$1@dough.gmane.org>", ":bytes": "7103", ":lines": "16", - "xref": "news.gmane.org gmane.comp.python.authors:57" + "xref": "news.gmane.io gmane.comp.python.authors:57" }) art_num, over = overviews[1] self.assertEqual(over["xref"], None) diff --git a/Misc/NEWS.d/next/Library/2020-01-08-23-25-27.bpo-39242.bnL65N.rst b/Misc/NEWS.d/next/Library/2020-01-08-23-25-27.bpo-39242.bnL65N.rst new file mode 100644 index 0000000..a87dddf --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-01-08-23-25-27.bpo-39242.bnL65N.rst @@ -0,0 +1,3 @@ +Updated the Gmane domain from news.gmane.org to news.gmane.io +which is used for examples of :class:`~nntplib.NNTP` news reader server and +nntplib tests. |