Skip to content

python 3.11 test failure in test_family_to_string #784

@nirik

Description

@nirik

Fedora rawhide has switched to python 3.11 and sshuttle fails to build due to a test:

platform linux -- Python 3.11.0b5, pytest-7.1.2, pluggy-1.0.0
rootdir: /builddir/build/BUILD/sshuttle-1.1.0, configfile: setup.cfg
plugins: cov-3.0.0, mock-3.8.2
collected 69 items
tests/client/test_firewall.py ...                                        [  4%]
tests/client/test_helpers.py ...........F                                [ 21%]
tests/client/test_methods_nat.py .........                               [ 34%]
tests/client/test_methods_pf.py .............                            [ 53%]
tests/client/test_methods_tproxy.py .........                            [ 66%]
tests/client/test_options.py .........                                   [ 79%]
tests/client/test_sdnotify.py ......                                     [ 88%]
tests/server/test_server.py .....                                        [ 95%]
tests/ssh/test_parse_hostport.py ...                                     [100%]
=================================== FAILURES ===================================
____________________________ test_family_to_string _____________________________
    def test_family_to_string():
        assert sshuttle.helpers.family_to_string(AF_INET) == "AF_INET"
        assert sshuttle.helpers.family_to_string(AF_INET6) == "AF_INET6"
        expected = 'AddressFamily.AF_UNIX'
>       assert sshuttle.helpers.family_to_string(socket.AF_UNIX) == expected
E       AssertionError: assert '1' == 'AddressFamily.AF_UNIX'
E         - AddressFamily.AF_UNIX
E         + 1
tests/client/test_helpers.py:196: AssertionError

Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=2099176

Also, they almost landed this change in python 3.10:
https://bugzilla.stage.redhat.com/show_bug.cgi?id=1949447

Python enum changes:
https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-0-alpha-7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions