diff --git a/Doc/library/test.rst b/Doc/library/test.rst
index 843201885ad245c2f521b7d6c38c4a6af575e2d4..b39b601fb64f6981faeac93965c80ba4107452e2 100644
--- a/Doc/library/test.rst
+++ b/Doc/library/test.rst
@@ -922,15 +922,6 @@ The :mod:`test.support` module defines the following functions:
 
 The :mod:`test.support` module defines the following classes:
 
-.. class:: TransientResource(exc, **kwargs)
-
-   Instances are a context manager that raises :exc:`ResourceDenied` if the
-   specified exception type is raised.  Any keyword arguments are treated as
-   attribute/value pairs to be compared against any exception raised within the
-   :keyword:`with` statement.  Only if all pairs match properly against
-   attributes on the exception is :exc:`ResourceDenied` raised.
-
-
 .. class:: SuppressCrashReport()
 
    A context manager used to try to prevent crash dialog popups on tests that
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index fa54ebe5620f44511f41e06f30f43328fbe9c0b8..f078ad780a0d463b3623a89b7eb056f27b5cd55e 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -4,7 +4,6 @@
     raise ImportError('support must be imported from the test package')
 
 import contextlib
-import errno
 import functools
 import os
 import re
@@ -49,7 +48,6 @@
     "is_resource_enabled", "requires", "requires_freebsd_version",
     "requires_linux_version", "requires_mac_ver",
     "check_syntax_error",
-    "TransientResource", "time_out", "socket_peer_reset", "ioerror_peer_reset",
     "BasicTestRunner", "run_unittest", "run_doctest",
     "requires_gzip", "requires_bz2", "requires_lzma",
     "bigmemtest", "bigaddrspacetest", "cpython_only", "get_attribute",
@@ -551,39 +549,6 @@ def check_valid_file(fn):
     raise TestFailed('invalid resource %r' % fn)
 
 
-class TransientResource(object):
-
-    """Raise ResourceDenied if an exception is raised while the context manager
-    is in effect that matches the specified exception and attributes."""
-
-    def __init__(self, exc, **kwargs):
-        self.exc = exc
-        self.attrs = kwargs
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, type_=None, value=None, traceback=None):
-        """If type_ is a subclass of self.exc and value has attributes matching
-        self.attrs, raise ResourceDenied.  Otherwise let the exception
-        propagate (if any)."""
-        if type_ is not None and issubclass(self.exc, type_):
-            for attr, attr_value in self.attrs.items():
-                if not hasattr(value, attr):
-                    break
-                if getattr(value, attr) != attr_value:
-                    break
-            else:
-                raise ResourceDenied("an optional resource is not available")
-
-# Context managers that raise ResourceDenied when various issues
-# with the Internet connection manifest themselves as exceptions.
-# XXX deprecate these and use transient_internet() instead
-time_out = TransientResource(OSError, errno=errno.ETIMEDOUT)
-socket_peer_reset = TransientResource(OSError, errno=errno.ECONNRESET)
-ioerror_peer_reset = TransientResource(OSError, errno=errno.ECONNRESET)
-
-
 @contextlib.contextmanager
 def captured_output(stream_name):
     """Return a context manager used by captured_stdout/stdin/stderr
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index b5a16f9cb602727192ae9676c8daf44e7f6b6936..a7d5b1bfe4eafe3327aa09cf1edabc353e6920d5 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -660,7 +660,6 @@ def test_print_warning(self):
     # findfile
     # check_warnings
     # EnvironmentVarGuard
-    # TransientResource
     # transient_internet
     # run_with_locale
     # set_memlimit
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index ba4c500e8ec3ef6cc2274d3fd9b78ff3d30a0ed7..cb74685715d35b987073a6d5425317171ce41963 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -1,3 +1,4 @@
+import errno
 import unittest
 from test import support
 from test.support import socket_helper
@@ -39,6 +40,39 @@ def wrapped(*args, **kwargs):
                                               urllib.error.URLError)
 
 
+class TransientResource(object):
+
+    """Raise ResourceDenied if an exception is raised while the context manager
+    is in effect that matches the specified exception and attributes."""
+
+    def __init__(self, exc, **kwargs):
+        self.exc = exc
+        self.attrs = kwargs
+
+    def __enter__(self):
+        return self
+
+    def __exit__(self, type_=None, value=None, traceback=None):
+        """If type_ is a subclass of self.exc and value has attributes matching
+        self.attrs, raise ResourceDenied.  Otherwise let the exception
+        propagate (if any)."""
+        if type_ is not None and issubclass(self.exc, type_):
+            for attr, attr_value in self.attrs.items():
+                if not hasattr(value, attr):
+                    break
+                if getattr(value, attr) != attr_value:
+                    break
+            else:
+                raise ResourceDenied("an optional resource is not available")
+
+# Context managers that raise ResourceDenied when various issues
+# with the Internet connection manifest themselves as exceptions.
+# XXX deprecate these and use transient_internet() instead
+time_out = TransientResource(OSError, errno=errno.ETIMEDOUT)
+socket_peer_reset = TransientResource(OSError, errno=errno.ECONNRESET)
+ioerror_peer_reset = TransientResource(OSError, errno=errno.ECONNRESET)
+
+
 class AuthTests(unittest.TestCase):
     """Tests urllib2 authentication features."""
 
@@ -237,9 +271,9 @@ def _test_urls(self, urls, handlers, retry=True):
                             raise
                     else:
                         try:
-                            with support.time_out, \
-                                 support.socket_peer_reset, \
-                                 support.ioerror_peer_reset:
+                            with time_out, \
+                                 socket_peer_reset, \
+                                 ioerror_peer_reset:
                                 buf = f.read()
                                 debug("read %d bytes" % len(buf))
                         except socket.timeout: