Source: python-trio
Version: 0.13.0-2
Severity: serious
Justification: FTBFS on amd64
Tags: bullseye sid ftbfs
Usertags: ftbfs-20200321 ftbfs-bullseye

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

Relevant part (hopefully):
>  debian/rules build
> dh build --with python3 --buildsystem=pybuild
>    dh_update_autotools_config -O--buildsystem=pybuild
>    dh_auto_configure -O--buildsystem=pybuild
> I: pybuild base:217: python3.8 setup.py config 
> running config
>    dh_auto_build -O--buildsystem=pybuild
> I: pybuild base:217: /usr/bin/python3 setup.py build 
> running build
> running build_py
> creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_subprocess.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_threads.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_windows_pipes.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_signals.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_deprecate.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_highlevel_open_tcp_stream.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_highlevel_open_tcp_listeners.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/hazmat.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_timeouts.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_deprecated_ssl_reexports.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_channel.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/to_thread.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_path.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_sync.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_ssl.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_unix_pipes.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_version.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_deprecated_subprocess_reexports.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/from_thread.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_socket.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_highlevel_generic.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_highlevel_socket.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_highlevel_open_unix_stream.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_abc.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_file_io.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/abc.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_wait_for_object.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/socket.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_util.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_highlevel_ssl_helpers.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> copying trio/_highlevel_serve_listeners.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_subprocess_platform
> copying trio/_subprocess_platform/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_subprocess_platform
> copying trio/_subprocess_platform/windows.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_subprocess_platform
> copying trio/_subprocess_platform/kqueue.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_subprocess_platform
> copying trio/_subprocess_platform/waitid.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_subprocess_platform
> creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_ssl.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_util.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_scheduler_determinism.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_windows_pipes.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_signals.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_highlevel_ssl_helpers.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_timeouts.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_unix_pipes.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_testing.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_path.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_deprecate.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_subprocess.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_highlevel_open_tcp_listeners.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_highlevel_open_tcp_stream.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_exports.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_file_io.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_highlevel_open_unix_stream.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_channel.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_threads.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/conftest.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_highlevel_socket.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/module_with_deprecations.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_abc.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_wait_for_object.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_highlevel_generic.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_sync.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_socket.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> copying trio/tests/test_highlevel_serve_listeners.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests
> creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_multierror.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_entry_queue.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_generated_io_kqueue.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_generated_io_epoll.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_generated_io_windows.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_windows_cffi.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_generated_run.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_io_windows.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_io_kqueue.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_traps.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_local.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_wakeup_socketpair.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_run.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_exceptions.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_parking_lot.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_ki.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_unbounded_queue.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> copying trio/_core/_io_epoll.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core
> creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_tools
> copying trio/_tools/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_tools
> copying trio/_tools/gen_exports.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_tools
> creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/testing
> copying trio/testing/_checkpoints.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/testing
> copying trio/testing/_mock_clock.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/testing
> copying trio/testing/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/testing
> copying trio/testing/_trio_test.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/testing
> copying trio/testing/_sequencer.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/testing
> copying trio/testing/_memory_streams.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/testing
> copying trio/testing/_check_streams.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/testing
> copying trio/testing/_network.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/testing
> creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests/tools
> copying trio/tests/tools/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests/tools
> copying trio/tests/tools/test_gen_exports.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/tests/tools
> creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_io.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_ki.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_util.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_local.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_windows.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_unbounded_queue.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/conftest.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/tutil.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_run.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_tutil.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_multierror.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> copying trio/_core/tests/test_parking_lot.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests
> creating 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests/test_multierror_scripts
> copying trio/_core/tests/test_multierror_scripts/simple_excepthook_IPython.py 
> -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests/test_multierror_scripts
> copying trio/_core/tests/test_multierror_scripts/__init__.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests/test_multierror_scripts
> copying trio/_core/tests/test_multierror_scripts/_common.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests/test_multierror_scripts
> copying trio/_core/tests/test_multierror_scripts/custom_excepthook.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests/test_multierror_scripts
> copying trio/_core/tests/test_multierror_scripts/simple_excepthook.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests/test_multierror_scripts
> copying trio/_core/tests/test_multierror_scripts/ipython_custom_exc.py -> 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/trio/_core/tests/test_multierror_scripts
> running egg_info
> writing trio.egg-info/PKG-INFO
> writing dependency_links to trio.egg-info/dependency_links.txt
> writing requirements to trio.egg-info/requires.txt
> writing top-level names to trio.egg-info/top_level.txt
> reading manifest file 'trio.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no files found matching '*.pem' under directory 
> 'trio/tests/test_ssl_certs'
> no previously-included directories found matching 'docs/build'
> writing manifest file 'trio.egg-info/SOURCES.txt'
>    dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:217: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build; 
> python3.8 -m pytest -m not\ redistributors_should_skip
> ============================= test session starts 
> ==============================
> platform linux -- Python 3.8.2, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
> rootdir: /<<PKGBUILDDIR>>, inifile: setup.cfg
> collected 588 items / 14 deselected / 574 selected
> 
> trio/_core/tests/test_io.py ...........................                  [  
> 4%]
> trio/_core/tests/test_ki.py ...........                                  [  
> 6%]
> trio/_core/tests/test_local.py ....                                      [  
> 7%]
> trio/_core/tests/test_multierror.py .............sss                     [ 
> 10%]
> trio/_core/tests/test_parking_lot.py ....                                [ 
> 10%]
> trio/_core/tests/test_run.py ........................................... [ 
> 18%]
> ........................................................                 [ 
> 28%]
> trio/_core/tests/test_tutil.py .                                         [ 
> 28%]
> trio/_core/tests/test_unbounded_queue.py .....                           [ 
> 29%]
> trio/_core/tests/test_windows.py ssss                                    [ 
> 29%]
> trio/tests/test_abc.py ..                                                [ 
> 30%]
> trio/tests/test_channel.py ............                                  [ 
> 32%]
> trio/tests/test_deprecate.py ...........                                 [ 
> 34%]
> trio/tests/test_exports.py .                                             [ 
> 34%]
> trio/tests/test_file_io.py ................                              [ 
> 37%]
> trio/tests/test_highlevel_generic.py ..                                  [ 
> 37%]
> trio/tests/test_highlevel_open_tcp_listeners.py ..................       [ 
> 40%]
> trio/tests/test_highlevel_open_tcp_stream.py .....................       [ 
> 44%]
> trio/tests/test_highlevel_open_unix_stream.py ...                        [ 
> 44%]
> trio/tests/test_highlevel_serve_listeners.py ....                        [ 
> 45%]
> trio/tests/test_highlevel_socket.py .......                              [ 
> 46%]
> trio/tests/test_highlevel_ssl_helpers.py ...                             [ 
> 47%]
> trio/tests/test_path.py .....................................            [ 
> 53%]
> trio/tests/test_scheduler_determinism.py ..                              [ 
> 54%]
> trio/tests/test_signals.py .......                                       [ 
> 55%]
> trio/tests/test_socket.py .......s.......................                [ 
> 60%]
> trio/tests/test_ssl.py ...........F.....F.FF.....................F.....F [ 
> 69%]
> .FF.............                                                         [ 
> 71%]
> trio/tests/test_subprocess.py ..............                             [ 
> 74%]
> trio/tests/test_sync.py ...................................              [ 
> 80%]
> trio/tests/test_testing.py ........................                      [ 
> 84%]
> trio/tests/test_threads.py ................................              [ 
> 90%]
> trio/tests/test_timeouts.py ...                                          [ 
> 90%]
> trio/tests/test_unix_pipes.py ...........                                [ 
> 92%]
> trio/tests/test_util.py .............................                    [ 
> 97%]
> trio/tests/test_wait_for_object.py ssss                                  [ 
> 98%]
> trio/tests/test_windows_pipes.py ssssss                                  [ 
> 99%]
> trio/tests/tools/test_gen_exports.py ...                                 
> [100%]
> 
> =================================== FAILURES 
> ===================================
> ______________________ test_SSLStream_generic[tls13-True] 
> ______________________
> 
> self = <trio.SSLStream object at 0x7f927c4942e0>
> fn = <bound method SSLObject.read of <ssl.SSLObject object at 0x7f927c3dc7c0>>
> ignore_want_read = False, is_handshake = False, args = (1,), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
> >               ret = fn(*args)
> 
> trio/_ssl.py:466: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <ssl.SSLObject object at 0x7f927c3dc7c0>, len = 1, buffer = None
> 
>     def read(self, len=1024, buffer=None):
>         """Read up to 'len' bytes from the SSL object and return them.
>     
>         If 'buffer' is provided, read into this buffer and return the number 
> of
>         bytes read.
>         """
>         if buffer is not None:
>             v = self._sslobj.read(len, buffer)
>         else:
> >           v = self._sslobj.read(len)
> E           ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading 
> (_ssl.c:2607)
> 
> /usr/lib/python3.8/ssl.py:888: SSLError
> 
> The above exception was the direct cause of the following exception:
> 
> client_ctx = <ssl.SSLContext object at 0x7f927c45e2c0>, https_compatible = 
> True
> 
>     @pytest.mark.parametrize("https_compatible", [False, True])
>     async def test_SSLStream_generic(client_ctx, https_compatible):
>         async def stream_maker():
>             return ssl_memory_stream_pair(
>                 client_ctx,
>                 client_kwargs={"https_compatible": https_compatible},
>                 server_kwargs={"https_compatible": https_compatible},
>             )
>     
>         async def clogged_stream_maker():
>             client, server = ssl_lockstep_stream_pair(client_ctx)
>             # If we don't do handshakes up front, then we run into a problem 
> in
>             # the following situation:
>             # - server does wait_send_all_might_not_block
>             # - client does receive_some to unclog it
>             # Then the client's receive_some will actually send some data to 
> start
>             # the handshake, and itself get stuck.
>             async with _core.open_nursery() as nursery:
>                 nursery.start_soon(client.do_handshake)
>                 nursery.start_soon(server.do_handshake)
>             return client, server
>     
> >       await check_two_way_stream(stream_maker, clogged_stream_maker)
> 
> trio/tests/test_ssl.py:818: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> trio/testing/_check_streams.py:398: in check_two_way_stream
>     await check_one_way_stream(stream_maker, clogged_stream_maker)
> trio/testing/_check_streams.py:205: in check_one_way_stream
>     nursery.start_soon(receive_send_then_close)
> trio/_core/_run.py:730: in __aexit__
>     raise combined_error_from_nursery
> trio/testing/_check_streams.py:200: in receive_send_then_close
>     await checked_receive_1(b"")
> trio/testing/_check_streams.py:75: in checked_receive_1
>     assert await do_receive_some(1) == expected
> trio/testing/_check_streams.py:72: in do_receive_some
>     return await r.receive_some(*args)
> trio/_ssl.py:689: in receive_some
>     return await self._retry(self._ssl_object.read, max_bytes)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <trio.SSLStream object at 0x7f927c4942e0>
> fn = <bound method SSLObject.read of <ssl.SSLObject object at 0x7f927c3dc7c0>>
> ignore_want_read = False, is_handshake = False, args = (1,), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
>                 ret = fn(*args)
>             except _stdlib_ssl.SSLWantReadError:
>                 want_read = True
>             except (_stdlib_ssl.SSLError, _stdlib_ssl.CertificateError) as 
> exc:
>                 self._state = _State.BROKEN
> >               raise trio.BrokenResourceError from exc
> E               trio.BrokenResourceError
> 
> trio/_ssl.py:471: BrokenResourceError
> ___________________ test_ssl_bad_shutdown_but_its_ok[tls13] 
> ____________________
> 
> self = <trio.SSLStream object at 0x7f927c428820>
> fn = <bound method SSLObject.read of <ssl.SSLObject object at 0x7f927c496c10>>
> ignore_want_read = False, is_handshake = False, args = (10,), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
> >               ret = fn(*args)
> 
> trio/_ssl.py:466: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <ssl.SSLObject object at 0x7f927c496c10>, len = 10, buffer = None
> 
>     def read(self, len=1024, buffer=None):
>         """Read up to 'len' bytes from the SSL object and return them.
>     
>         If 'buffer' is provided, read into this buffer and return the number 
> of
>         bytes read.
>         """
>         if buffer is not None:
>             v = self._sslobj.read(len, buffer)
>         else:
> >           v = self._sslobj.read(len)
> E           ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading 
> (_ssl.c:2607)
> 
> /usr/lib/python3.8/ssl.py:888: SSLError
> 
> The above exception was the direct cause of the following exception:
> 
> client_ctx = <ssl.SSLContext object at 0x7f927c45e2c0>
> 
>     async def test_ssl_bad_shutdown_but_its_ok(client_ctx):
>         client, server = ssl_memory_stream_pair(
>             client_ctx,
>             server_kwargs={"https_compatible": True},
>             client_kwargs={"https_compatible": True}
>         )
>     
>         async with _core.open_nursery() as nursery:
>             nursery.start_soon(client.do_handshake)
>             nursery.start_soon(server.do_handshake)
>     
>         await trio.aclose_forcefully(client)
>         # the server sees that as a clean shutdown
> >       assert await server.receive_some(10) == b""
> 
> trio/tests/test_ssl.py:1024: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> trio/_ssl.py:689: in receive_some
>     return await self._retry(self._ssl_object.read, max_bytes)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <trio.SSLStream object at 0x7f927c428820>
> fn = <bound method SSLObject.read of <ssl.SSLObject object at 0x7f927c496c10>>
> ignore_want_read = False, is_handshake = False, args = (10,), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
>                 ret = fn(*args)
>             except _stdlib_ssl.SSLWantReadError:
>                 want_read = True
>             except (_stdlib_ssl.SSLError, _stdlib_ssl.CertificateError) as 
> exc:
>                 self._state = _State.BROKEN
> >               raise trio.BrokenResourceError from exc
> E               trio.BrokenResourceError
> 
> trio/_ssl.py:471: BrokenResourceError
> _______________ test_ssl_https_compatibility_disagreement[tls13] 
> _______________
> 
> client_ctx = <ssl.SSLContext object at 0x7f927c45e2c0>
> 
>     async def test_ssl_https_compatibility_disagreement(client_ctx):
>         client, server = ssl_memory_stream_pair(
>             client_ctx,
>             server_kwargs={"https_compatible": False},
>             client_kwargs={"https_compatible": True}
>         )
>     
>         async with _core.open_nursery() as nursery:
>             nursery.start_soon(client.do_handshake)
>             nursery.start_soon(server.do_handshake)
>     
>         # client is in HTTPS-mode, server is not
>         # so client doing graceful_shutdown causes an error on server
>         async def receive_and_expect_error():
>             with pytest.raises(BrokenResourceError) as excinfo:
>                 await server.receive_some(10)
>             assert isinstance(excinfo.value.__cause__, ssl.SSLEOFError)
>     
>         async with _core.open_nursery() as nursery:
>             nursery.start_soon(client.aclose)
> >           nursery.start_soon(receive_and_expect_error)
> 
> trio/tests/test_ssl.py:1097: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> trio/_core/_run.py:730: in __aexit__
>     raise combined_error_from_nursery
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
>     async def receive_and_expect_error():
>         with pytest.raises(BrokenResourceError) as excinfo:
>             await server.receive_some(10)
> >       assert isinstance(excinfo.value.__cause__, ssl.SSLEOFError)
> E       AssertionError: assert False
> E        +  where False = isinstance(SSLError(1, '[SSL: KRB5_S_TKT_NYV] 
> unexpected eof while reading (_ssl.c:2607)'), <class 'ssl.SSLEOFError'>)
> E        +    where SSLError(1, '[SSL: KRB5_S_TKT_NYV] unexpected eof while 
> reading (_ssl.c:2607)') = BrokenResourceError().__cause__
> E        +      where BrokenResourceError() = <ExceptionInfo 
> BrokenResourceError tblen=3>.value
> E        +    and   <class 'ssl.SSLEOFError'> = ssl.SSLEOFError
> 
> trio/tests/test_ssl.py:1093: AssertionError
> _________________ test_https_mode_eof_before_handshake[tls13] 
> __________________
> 
> self = <trio.SSLStream object at 0x7f927c2c56d0>
> fn = <bound method SSLObject.do_handshake of <ssl.SSLObject object at 
> 0x7f927c382a90>>
> ignore_want_read = False, is_handshake = True, args = (), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
> >               ret = fn(*args)
> 
> trio/_ssl.py:466: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <ssl.SSLObject object at 0x7f927c382a90>
> 
>     def do_handshake(self):
>         """Start the SSL/TLS handshake."""
> >       self._sslobj.do_handshake()
> E       ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading 
> (_ssl.c:1108)
> 
> /usr/lib/python3.8/ssl.py:944: SSLError
> 
> The above exception was the direct cause of the following exception:
> 
> client_ctx = <ssl.SSLContext object at 0x7f927c45e2c0>
> 
>     async def test_https_mode_eof_before_handshake(client_ctx):
>         client, server = ssl_memory_stream_pair(
>             client_ctx,
>             server_kwargs={"https_compatible": True},
>             client_kwargs={"https_compatible": True}
>         )
>     
>         async def server_expect_clean_eof():
>             assert await server.receive_some(10) == b""
>     
>         async with _core.open_nursery() as nursery:
>             nursery.start_soon(client.aclose)
> >           nursery.start_soon(server_expect_clean_eof)
> 
> trio/tests/test_ssl.py:1112: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> trio/_core/_run.py:730: in __aexit__
>     raise combined_error_from_nursery
> trio/tests/test_ssl.py:1108: in server_expect_clean_eof
>     assert await server.receive_some(10) == b""
> trio/_ssl.py:662: in receive_some
>     await self._handshook.ensure(checkpoint=False)
> trio/_ssl.py:212: in ensure
>     await self._afn(*self._args)
> trio/_ssl.py:606: in _do_handshake
>     await self._retry(self._ssl_object.do_handshake, is_handshake=True)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <trio.SSLStream object at 0x7f927c2c56d0>
> fn = <bound method SSLObject.do_handshake of <ssl.SSLObject object at 
> 0x7f927c382a90>>
> ignore_want_read = False, is_handshake = True, args = (), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
>                 ret = fn(*args)
>             except _stdlib_ssl.SSLWantReadError:
>                 want_read = True
>             except (_stdlib_ssl.SSLError, _stdlib_ssl.CertificateError) as 
> exc:
>                 self._state = _State.BROKEN
> >               raise trio.BrokenResourceError from exc
> E               trio.BrokenResourceError
> 
> trio/_ssl.py:471: BrokenResourceError
> ______________________ test_SSLStream_generic[tls12-True] 
> ______________________
> 
> self = <trio.SSLStream object at 0x7f927d7a7130>
> fn = <bound method SSLObject.read of <ssl.SSLObject object at 0x7f927c36efa0>>
> ignore_want_read = False, is_handshake = False, args = (1,), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
> >               ret = fn(*args)
> 
> trio/_ssl.py:466: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <ssl.SSLObject object at 0x7f927c36efa0>, len = 1, buffer = None
> 
>     def read(self, len=1024, buffer=None):
>         """Read up to 'len' bytes from the SSL object and return them.
>     
>         If 'buffer' is provided, read into this buffer and return the number 
> of
>         bytes read.
>         """
>         if buffer is not None:
>             v = self._sslobj.read(len, buffer)
>         else:
> >           v = self._sslobj.read(len)
> E           ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading 
> (_ssl.c:2607)
> 
> /usr/lib/python3.8/ssl.py:888: SSLError
> 
> The above exception was the direct cause of the following exception:
> 
> client_ctx = <ssl.SSLContext object at 0x7f927c64fc40>, https_compatible = 
> True
> 
>     @pytest.mark.parametrize("https_compatible", [False, True])
>     async def test_SSLStream_generic(client_ctx, https_compatible):
>         async def stream_maker():
>             return ssl_memory_stream_pair(
>                 client_ctx,
>                 client_kwargs={"https_compatible": https_compatible},
>                 server_kwargs={"https_compatible": https_compatible},
>             )
>     
>         async def clogged_stream_maker():
>             client, server = ssl_lockstep_stream_pair(client_ctx)
>             # If we don't do handshakes up front, then we run into a problem 
> in
>             # the following situation:
>             # - server does wait_send_all_might_not_block
>             # - client does receive_some to unclog it
>             # Then the client's receive_some will actually send some data to 
> start
>             # the handshake, and itself get stuck.
>             async with _core.open_nursery() as nursery:
>                 nursery.start_soon(client.do_handshake)
>                 nursery.start_soon(server.do_handshake)
>             return client, server
>     
> >       await check_two_way_stream(stream_maker, clogged_stream_maker)
> 
> trio/tests/test_ssl.py:818: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> trio/testing/_check_streams.py:398: in check_two_way_stream
>     await check_one_way_stream(stream_maker, clogged_stream_maker)
> trio/testing/_check_streams.py:205: in check_one_way_stream
>     nursery.start_soon(receive_send_then_close)
> trio/_core/_run.py:730: in __aexit__
>     raise combined_error_from_nursery
> trio/testing/_check_streams.py:200: in receive_send_then_close
>     await checked_receive_1(b"")
> trio/testing/_check_streams.py:75: in checked_receive_1
>     assert await do_receive_some(1) == expected
> trio/testing/_check_streams.py:72: in do_receive_some
>     return await r.receive_some(*args)
> trio/_ssl.py:689: in receive_some
>     return await self._retry(self._ssl_object.read, max_bytes)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <trio.SSLStream object at 0x7f927d7a7130>
> fn = <bound method SSLObject.read of <ssl.SSLObject object at 0x7f927c36efa0>>
> ignore_want_read = False, is_handshake = False, args = (1,), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
>                 ret = fn(*args)
>             except _stdlib_ssl.SSLWantReadError:
>                 want_read = True
>             except (_stdlib_ssl.SSLError, _stdlib_ssl.CertificateError) as 
> exc:
>                 self._state = _State.BROKEN
> >               raise trio.BrokenResourceError from exc
> E               trio.BrokenResourceError
> 
> trio/_ssl.py:471: BrokenResourceError
> ___________________ test_ssl_bad_shutdown_but_its_ok[tls12] 
> ____________________
> 
> self = <trio.SSLStream object at 0x7f927c117520>
> fn = <bound method SSLObject.read of <ssl.SSLObject object at 0x7f927c117dc0>>
> ignore_want_read = False, is_handshake = False, args = (10,), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
> >               ret = fn(*args)
> 
> trio/_ssl.py:466: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <ssl.SSLObject object at 0x7f927c117dc0>, len = 10, buffer = None
> 
>     def read(self, len=1024, buffer=None):
>         """Read up to 'len' bytes from the SSL object and return them.
>     
>         If 'buffer' is provided, read into this buffer and return the number 
> of
>         bytes read.
>         """
>         if buffer is not None:
>             v = self._sslobj.read(len, buffer)
>         else:
> >           v = self._sslobj.read(len)
> E           ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading 
> (_ssl.c:2607)
> 
> /usr/lib/python3.8/ssl.py:888: SSLError
> 
> The above exception was the direct cause of the following exception:
> 
> client_ctx = <ssl.SSLContext object at 0x7f927c64fc40>
> 
>     async def test_ssl_bad_shutdown_but_its_ok(client_ctx):
>         client, server = ssl_memory_stream_pair(
>             client_ctx,
>             server_kwargs={"https_compatible": True},
>             client_kwargs={"https_compatible": True}
>         )
>     
>         async with _core.open_nursery() as nursery:
>             nursery.start_soon(client.do_handshake)
>             nursery.start_soon(server.do_handshake)
>     
>         await trio.aclose_forcefully(client)
>         # the server sees that as a clean shutdown
> >       assert await server.receive_some(10) == b""
> 
> trio/tests/test_ssl.py:1024: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> trio/_ssl.py:689: in receive_some
>     return await self._retry(self._ssl_object.read, max_bytes)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <trio.SSLStream object at 0x7f927c117520>
> fn = <bound method SSLObject.read of <ssl.SSLObject object at 0x7f927c117dc0>>
> ignore_want_read = False, is_handshake = False, args = (10,), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
>                 ret = fn(*args)
>             except _stdlib_ssl.SSLWantReadError:
>                 want_read = True
>             except (_stdlib_ssl.SSLError, _stdlib_ssl.CertificateError) as 
> exc:
>                 self._state = _State.BROKEN
> >               raise trio.BrokenResourceError from exc
> E               trio.BrokenResourceError
> 
> trio/_ssl.py:471: BrokenResourceError
> _______________ test_ssl_https_compatibility_disagreement[tls12] 
> _______________
> 
> client_ctx = <ssl.SSLContext object at 0x7f927c64fc40>
> 
>     async def test_ssl_https_compatibility_disagreement(client_ctx):
>         client, server = ssl_memory_stream_pair(
>             client_ctx,
>             server_kwargs={"https_compatible": False},
>             client_kwargs={"https_compatible": True}
>         )
>     
>         async with _core.open_nursery() as nursery:
>             nursery.start_soon(client.do_handshake)
>             nursery.start_soon(server.do_handshake)
>     
>         # client is in HTTPS-mode, server is not
>         # so client doing graceful_shutdown causes an error on server
>         async def receive_and_expect_error():
>             with pytest.raises(BrokenResourceError) as excinfo:
>                 await server.receive_some(10)
>             assert isinstance(excinfo.value.__cause__, ssl.SSLEOFError)
>     
>         async with _core.open_nursery() as nursery:
>             nursery.start_soon(client.aclose)
> >           nursery.start_soon(receive_and_expect_error)
> 
> trio/tests/test_ssl.py:1097: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> trio/_core/_run.py:730: in __aexit__
>     raise combined_error_from_nursery
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
>     async def receive_and_expect_error():
>         with pytest.raises(BrokenResourceError) as excinfo:
>             await server.receive_some(10)
> >       assert isinstance(excinfo.value.__cause__, ssl.SSLEOFError)
> E       AssertionError: assert False
> E        +  where False = isinstance(SSLError(1, '[SSL: KRB5_S_TKT_NYV] 
> unexpected eof while reading (_ssl.c:2607)'), <class 'ssl.SSLEOFError'>)
> E        +    where SSLError(1, '[SSL: KRB5_S_TKT_NYV] unexpected eof while 
> reading (_ssl.c:2607)') = BrokenResourceError().__cause__
> E        +      where BrokenResourceError() = <ExceptionInfo 
> BrokenResourceError tblen=3>.value
> E        +    and   <class 'ssl.SSLEOFError'> = ssl.SSLEOFError
> 
> trio/tests/test_ssl.py:1093: AssertionError
> _________________ test_https_mode_eof_before_handshake[tls12] 
> __________________
> 
> self = <trio.SSLStream object at 0x7f927d806550>
> fn = <bound method SSLObject.do_handshake of <ssl.SSLObject object at 
> 0x7f927e6766a0>>
> ignore_want_read = False, is_handshake = True, args = (), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
> >               ret = fn(*args)
> 
> trio/_ssl.py:466: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <ssl.SSLObject object at 0x7f927e6766a0>
> 
>     def do_handshake(self):
>         """Start the SSL/TLS handshake."""
> >       self._sslobj.do_handshake()
> E       ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading 
> (_ssl.c:1108)
> 
> /usr/lib/python3.8/ssl.py:944: SSLError
> 
> The above exception was the direct cause of the following exception:
> 
> client_ctx = <ssl.SSLContext object at 0x7f927c64fc40>
> 
>     async def test_https_mode_eof_before_handshake(client_ctx):
>         client, server = ssl_memory_stream_pair(
>             client_ctx,
>             server_kwargs={"https_compatible": True},
>             client_kwargs={"https_compatible": True}
>         )
>     
>         async def server_expect_clean_eof():
>             assert await server.receive_some(10) == b""
>     
>         async with _core.open_nursery() as nursery:
>             nursery.start_soon(client.aclose)
> >           nursery.start_soon(server_expect_clean_eof)
> 
> trio/tests/test_ssl.py:1112: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> trio/_core/_run.py:730: in __aexit__
>     raise combined_error_from_nursery
> trio/tests/test_ssl.py:1108: in server_expect_clean_eof
>     assert await server.receive_some(10) == b""
> trio/_ssl.py:662: in receive_some
>     await self._handshook.ensure(checkpoint=False)
> trio/_ssl.py:212: in ensure
>     await self._afn(*self._args)
> trio/_ssl.py:606: in _do_handshake
>     await self._retry(self._ssl_object.do_handshake, is_handshake=True)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = <trio.SSLStream object at 0x7f927d806550>
> fn = <bound method SSLObject.do_handshake of <ssl.SSLObject object at 
> 0x7f927e6766a0>>
> ignore_want_read = False, is_handshake = True, args = (), yielded = True
> 
>     async def _retry(
>         self, fn, *args, ignore_want_read=False, is_handshake=False
>     ):
>         await trio.hazmat.checkpoint_if_cancelled()
>         yielded = False
>         finished = False
>         while not finished:
>             # WARNING: this code needs to be very careful with when it
>             # calls 'await'! There might be multiple tasks calling this
>             # function at the same time trying to do different operations,
>             # so we need to be careful to:
>             #
>             # 1) interact with the SSLObject, then
>             # 2) await on exactly one thing that lets us make forward
>             # progress, then
>             # 3) loop or exit
>             #
>             # In particular we don't want to yield while interacting with
>             # the SSLObject (because it's shared state, so someone else
>             # might come in and mess with it while we're suspended), and
>             # we don't want to yield *before* starting the operation that
>             # will help us make progress, because then someone else might
>             # come in and leapfrog us.
>     
>             # Call the SSLObject method, and get its result.
>             #
>             # NB: despite what the docs say, SSLWantWriteError can't
>             # happen – "Writes to memory BIOs will always succeed if
>             # memory is available: that is their size can grow
>             # indefinitely."
>             # https://wiki.openssl.org/index.php/Manual:BIO_s_mem(3)
>             want_read = False
>             ret = None
>             try:
>                 ret = fn(*args)
>             except _stdlib_ssl.SSLWantReadError:
>                 want_read = True
>             except (_stdlib_ssl.SSLError, _stdlib_ssl.CertificateError) as 
> exc:
>                 self._state = _State.BROKEN
> >               raise trio.BrokenResourceError from exc
> E               trio.BrokenResourceError
> 
> trio/_ssl.py:471: BrokenResourceError
> ======= 8 failed, 548 passed, 18 skipped, 14 deselected in 16.33 seconds 
> =======
> E: pybuild pybuild:352: test: plugin distutils failed with: exit code=1: cd 
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build; python3.8 -m pytest -m not\ 
> redistributors_should_skip
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.8 
> returned exit code 13

The full build log is available from:
   http://qa-logs.debian.net/2020/03/21/python-trio_0.13.0-2_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.

Reply via email to