                  "You're accessing the developement server over HTTPS, "
                  "but it only supports HTTP.",
                  sys.stderr.getvalue()
              )
          finally:
              sys.stderr = _stderr
 
</s> remove                 sys.stderr.getvalue()
 </s> add                 stderr.getvalue() </s> remove         _stderr = sys.stderr
        sys.stderr = StringIO()
        try:
 </s> add         with captured_stderr() as stderr: </s> remove         old_stdout, old_stderr = sys.stdout, sys.stderr
        sys.stdout, sys.stderr = StringIO(), StringIO()
        try:
 </s> add         with captured_stdout(), captured_stderr(): </s> remove         old_stdout, old_stderr = sys.stdout, sys.stderr
        sys.stdout, sys.stderr = StringIO(), StringIO()
        try:
 </s> add         with captured_stdout(), captured_stderr(): </s> remove         finally:
            sys.stdout, sys.stderr = old_stdout, old_stderr
 </s> add 
                  "You're accessing the developement server over HTTPS, "
                  "but it only supports HTTP.",
                  sys.stderr.getvalue()
              )


keep keep keep keep replace replace
 Fixed #23930 -- Added copies of captured_std* managers from CPython's test.support.

StringIO import was adapted for compatibility with Python 2. 
tests/servers/test_basehttp.py