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.

classification
Title: BaseServer missing from socketserver.__all__
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, martin.panter, python-dev
Priority: normal Keywords: patch

Created on 2015-01-31 11:42 by martin.panter, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
socketserver-all.patch martin.panter, 2015-01-31 11:42 review
issue23358.diff berker.peksag, 2015-01-31 23:48
Messages (5)
msg235102 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-01-31 11:42
This patch adds BaseServer to __all__. It also adds a test case that should automatically fail if someone defines a new function or class in the “socketserver” module and does not update __all__.
msg235135 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-01-31 23:48
Thanks for the patch, Martin. I got the following failure on the 3.4 branch:

======================================================================
FAIL: test_all (test.test_socketserver.SimpleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/berker/projects/cpython/default/Lib/test/test_socketserver.py", line 324, in test_all
    self.assertCountEqual(socketserver.__all__, expected)
AssertionError: Element counts were not equal:
First has 0, Second has 1:  '_eintr_retry'

Here is an updated patch.
msg235136 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-01-31 23:55
New test case looks good. Checking for the underscore prefix is how I would have done it too, if I had realized it was needed :)

I’m not qualified to comment on removing the run_unittest() call.
msg235329 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-02-03 09:55
New changeset e614ff664877 by Berker Peksag in branch '3.4':
Issue #23358: Add missing BaseServer entry to socketserver.__all__.
https://hg.python.org/cpython/rev/e614ff664877

New changeset 80d282505d21 by Berker Peksag in branch 'default':
Issue #23358: Add missing BaseServer entry to socketserver.__all__.
https://hg.python.org/cpython/rev/80d282505d21
msg235330 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-02-03 09:56
Thanks for the patch, Martin.
History
Date User Action Args
2022-04-11 14:58:12adminsetgithub: 67547
2015-02-03 09:56:33berker.peksagsetstatus: open -> closed
resolution: fixed
messages: + msg235330

stage: patch review -> resolved
2015-02-03 09:55:29python-devsetnosy: + python-dev
messages: + msg235329
2015-01-31 23:55:31martin.pantersetmessages: + msg235136
2015-01-31 23:48:10berker.peksagsetfiles: + issue23358.diff
versions: + Python 3.4
nosy: + berker.peksag

messages: + msg235135

stage: patch review
2015-01-31 11:42:02martin.pantercreate