tlsfuzzer / tlsfuzzer

SSL and TLS protocol test suite and fuzzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tlsfuzzer/utils/ordered_dict.py depends on deprecated _dummy_thread module

ueno opened this issue · comments

Bug Report

System Information

Type Version/Name
Operating System Name Fedora
Operating System Version 33
Python version Python 3.9.0rc2
tlslite-ng version v0.3.9x-1434-g7c6fbf9
tlsfuzzer revision 54a1350

Problem description

In Python 3.9, the _dummy_thread module has been removed:

_dummy_thread and dummy_threading modules have been removed. These modules were deprecated since Python 3.7 which requires threading support. (Contributed by Victor Stinner in bpo-37312.)

This is causing error in Fedora 33 CI with Python 3.9.0rc2, because that module is used in tlsfuzzer/utils/ordered_dict.py.

Describe how to reproduce the problem

Steps to reproduce the behaviour:

  1. podman run -ti registry.gitlab.com/gnutls/build-images:buildenv-fedora33
  2. git clone --depth=1 https://gitlab.com/gnutls/gnutls.git
  3. cd gnutls && ./bootstrap && ./configure && make && make check

Expected behaviour

tlsfuzzer tests should pass.

Include errors or backtraces

test-client-compatibility.py:stderr:Traceback (most recent call last):
test-client-compatibility.py:stderr:  File "/builds/gnutls/gnutls/tests/suite/tls-fuzzer/tlsfuzzer/tlsfuzzer/utils/ordered_dict.py", line 8, in <module>
test-client-compatibility.py:stderr:    from thread import get_ident as _get_ident
test-client-compatibility.py:stderr:ModuleNotFoundError: No module named 'thread'
test-client-compatibility.py:stderr:
test-client-compatibility.py:stderr:During handling of the above exception, another exception occurred:
test-client-compatibility.py:stderr:
test-client-compatibility.py:stderr:Traceback (most recent call last):
test-client-compatibility.py:stderr:  File "/builds/gnutls/gnutls/tests/suite/tls-fuzzer/tlsfuzzer/tlsfuzzer/utils/ordered_dict.py", line 11, in <module>
test-client-compatibility.py:stderr:    from dummy_thread import get_ident as _get_ident
test-client-compatibility.py:stderr:ModuleNotFoundError: No module named 'dummy_thread'
test-client-compatibility.py:stderr:
test-client-compatibility.py:stderr:During handling of the above exception, another exception occurred:
test-client-compatibility.py:stderr:
test-client-compatibility.py:stderr:Traceback (most recent call last):
test-client-compatibility.py:stderr:  File "/builds/gnutls/gnutls/tests/suite/tls-fuzzer/tlsfuzzer/scripts/test-client-compatibility.py", line 26, in <module>
test-client-compatibility.py:stderr:    from tlsfuzzer.utils.ordered_dict import OrderedDict
test-client-compatibility.py:stderr:  File "/builds/gnutls/gnutls/tests/suite/tls-fuzzer/tlsfuzzer/tlsfuzzer/utils/ordered_dict.py", line 13, in <module>
test-client-compatibility.py:stderr:    from _dummy_thread import get_ident as _get_ident
test-client-compatibility.py:stderr:ModuleNotFoundError: No module named '_dummy_thread'
ERROR:__main__:test-client-compatibility.py:failure:0.97s:1

Additional context

None.

We've been using our own implementation for OrderedDict basically only to ensure it's extensively tested. Between OrderedDict being part of collections in Python3 and dict() since 3.7 behaving as OrderedDict by default, we probably should make utils.ordered_dict just return dict on Python 3.7 and later.

Isn't it fixed in #678? Or is this a followup?