Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1900506 - python-anyio fails to build with Python 3.10: ssl.SSLEOFError: EOF occurred in violation of protocol
Summary: python-anyio fails to build with Python 3.10: ssl.SSLEOFError: EOF occurred i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-anyio
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carl George 🤠
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1968892 (view as bug list)
Depends On: 1926501
Blocks: PYTHON3.10 F35FTBFS F35FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2020-11-23 08:53 UTC by Tomáš Hrnčiar
Modified: 2021-06-23 00:39 UTC (History)
5 users (show)

Fixed In Version: python-anyio-3.2.0-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-22 23:07:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2020-11-23 08:53:55 UTC
python-anyio fails to build with Python 3.10.0a2.


=================================== FAILURES ===================================
___________ TestTLSStream.test_ragged_eofs[asyncio-client_standard] ____________
tests/test_networking.py:502: in test_ragged_eofs
    assert await client.receive_exactly(3) == b'OK\n'
../../BUILDROOT/python-anyio-1.3.1-2.fc34.x86_64/usr/lib/python3.10/site-packages/anyio/abc.py:403: in __aexit__
    await self.close()
../../BUILDROOT/python-anyio-1.3.1-2.fc34.x86_64/usr/lib/python3.10/site-packages/anyio/_networking.py:216: in close
    await self._socket.unwrap_tls()
../../BUILDROOT/python-anyio-1.3.1-2.fc34.x86_64/usr/lib/python3.10/site-packages/anyio/_networking.py:185: in unwrap_tls
    self._raw_socket = cast(ssl.SSLSocket, self._raw_socket).unwrap()
/usr/lib64/python3.10/ssl.py:1285: in unwrap
    s = self._sslobj.shutdown()
E   ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2745)
____________ TestTLSStream.test_ragged_eofs[curio-client_standard] _____________
tests/test_networking.py:502: in test_ragged_eofs
    assert await client.receive_exactly(3) == b'OK\n'
../../BUILDROOT/python-anyio-1.3.1-2.fc34.x86_64/usr/lib/python3.10/site-packages/anyio/abc.py:403: in __aexit__
    await self.close()
../../BUILDROOT/python-anyio-1.3.1-2.fc34.x86_64/usr/lib/python3.10/site-packages/anyio/_networking.py:216: in close
    await self._socket.unwrap_tls()
../../BUILDROOT/python-anyio-1.3.1-2.fc34.x86_64/usr/lib/python3.10/site-packages/anyio/_networking.py:185: in unwrap_tls
    self._raw_socket = cast(ssl.SSLSocket, self._raw_socket).unwrap()
/usr/lib64/python3.10/ssl.py:1285: in unwrap
    s = self._sslobj.shutdown()
E   ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2745)
_____________ TestTLSStream.test_ragged_eofs[trio-client_standard] _____________
tests/test_networking.py:502: in test_ragged_eofs
    assert await client.receive_exactly(3) == b'OK\n'
../../BUILDROOT/python-anyio-1.3.1-2.fc34.x86_64/usr/lib/python3.10/site-packages/anyio/abc.py:403: in __aexit__
    await self.close()
../../BUILDROOT/python-anyio-1.3.1-2.fc34.x86_64/usr/lib/python3.10/site-packages/anyio/_networking.py:216: in close
    await self._socket.unwrap_tls()
../../BUILDROOT/python-anyio-1.3.1-2.fc34.x86_64/usr/lib/python3.10/site-packages/anyio/_networking.py:185: in unwrap_tls
    self._raw_socket = cast(ssl.SSLSocket, self._raw_socket).unwrap()
/usr/lib64/python3.10/ssl.py:1285: in unwrap
    s = self._sslobj.shutdown()
E   ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2745)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01777266-python-anyio/

For all our attempts to build python-anyio with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-anyio/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Carl George 🤠 2021-02-09 00:35:50 UTC
I recently cleared a FTBFS issue [0] by merging a pull request [1] to bring the version to 2.0.2.  The latest COPR build of this version [2] no longer has that protocol error, but still failed.


+ /usr/bin/pytest -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.10.0a5, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: /builddir/build/BUILD/anyio-2.0.2, configfile: pyproject.toml, testpaths: tests
plugins: anyio-2.0.2, hypothesis-5.43.9
collected 894 items / 4 deselected / 890 selected
tests/test_debugging.py .
======================= 1 passed, 4 deselected in 0.54s ========================
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/trio/_core/_multierror.py", line 434, in trio_excepthook
    for chunk in traceback.format_exception(etype, value, tb):
  File "/usr/lib64/python3.10/traceback.py", line 129, in format_exception
    te = TracebackException(type(value), value, tb, limit=limit, compact=True)
TypeError: traceback_exception_init() got an unexpected keyword argument 'compact'
Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 269, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 323, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/usr/lib/python3.10/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 348, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/usr/lib/python3.10/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 109, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 120, in runtestprotocol
    rep = call_and_report(item, "setup", log)
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 217, in call_and_report
    report: TestReport = hook.pytest_runtest_makereport(item=item, call=call)
  File "/usr/lib/python3.10/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/usr/lib/python3.10/site-packages/_pytest/skipping.py", line 272, in pytest_runtest_makereport
    rep = outcome.get_result()
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 337, in pytest_runtest_makereport
    return TestReport.from_item_and_call(item, call)
  File "/usr/lib/python3.10/site-packages/_pytest/reports.py", line 317, in from_item_and_call
    r = excinfo._getreprcrash()
  File "/usr/lib/python3.10/site-packages/_pytest/_code/code.py", line 585, in _getreprcrash
    exconly = self.exconly(tryshort=True)
  File "/usr/lib/python3.10/site-packages/_pytest/_code/code.py", line 567, in exconly
    lines = format_exception_only(self.type, self.value)
  File "/usr/lib64/python3.10/traceback.py", line 149, in format_exception_only
    te = TracebackException(type(value), value, None, compact=True)
TypeError: traceback_exception_init() got an unexpected keyword argument 'compact'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/bin/pytest", line 33, in <module>
    sys.exit(load_entry_point('pytest==6.2.2', 'console_scripts', 'pytest')())
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 185, in console_main
    code = main()
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 162, in main
    ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main(
  File "/usr/lib/python3.10/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/usr/lib/python3.10/site-packages/_pytest/main.py", line 289, in wrap_session
    config.notify_exception(excinfo, config.option)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1034, in notify_exception
    excrepr = excinfo.getrepr(
  File "/usr/lib/python3.10/site-packages/_pytest/_code/code.py", line 632, in getrepr
    traceback.format_exception(
  File "/usr/lib64/python3.10/traceback.py", line 129, in format_exception
    te = TracebackException(type(value), value, tb, limit=limit, compact=True)
TypeError: traceback_exception_init() got an unexpected keyword argument 'compact'


Based on the output this may be blocked on getting trio updated [3].


[0] bug 1923331
[1] https://src.fedoraproject.org/rpms/python-anyio/pull-request/1
[2] https://copr.fedorainfracloud.org/coprs/g/python/python3.10/build/1954309/
[3] bug 1879061

Comment 2 Ben Cotton 2021-02-09 15:27:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 3 Miro Hrončok 2021-06-04 20:15:58 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.


The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 4 Miro Hrončok 2021-06-07 23:00:18 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 5 Miro Hrončok 2021-06-08 11:21:53 UTC
*** Bug 1968892 has been marked as a duplicate of this bug. ***

Comment 6 Miro Hrončok 2021-06-15 20:23:13 UTC
Hello,

This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 7 Fedora Update System 2021-06-22 23:04:56 UTC
FEDORA-2021-236dd4297a has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-236dd4297a

Comment 8 Fedora Update System 2021-06-22 23:07:34 UTC
FEDORA-2021-236dd4297a has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.