Add missing sys import to socket_helper.py by pablogsal · Pull Request #19791 · python/cpython

There was a missing import that could cause:

Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/test/support/socket_helper.py", line 242, in transient_internet
    yield
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/test/test_nntplib.py", line 320, in setUpClass
    cls.server = cls.NNTP_CLASS(cls.NNTP_HOST,
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/nntplib.py", line 1043, in __init__
    super().__init__(host, port, user, password, readermode,
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/nntplib.py", line 1010, in __init__
    super().__init__(file, host, readermode, timeout)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/nntplib.py", line 330, in __init__
    self.welcome = self._getresp()
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/nntplib.py", line 455, in _getresp
    raise NNTPTemporaryError(resp)
nntplib.NNTPTemporaryError: 400 Permission denied:  Too many unknown commands sent to the server


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/test/test_nntplib.py", line 330, in setUpClass
    raise unittest.SkipTest(f"{cls} got EOF error on connecting "
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.9/test/support/socket_helper.py", line 245, in transient_internet
    sys.stderr.write(denied.args[0] + "\n")
NameError: name 'sys' is not defined