Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tests fail on Python 3.9 with TypeError: __init__() got an unexpected keyword argument 'encoding' #14

Closed
cole-h opened this issue Apr 23, 2021 · 0 comments · Fixed by #15

Comments

@cole-h
Copy link

cole-h commented Apr 23, 2021

___________ TestDebian822.test_Debian822_from_file__signed_from_dsc ____________

self = <test_debcon.TestDebian822 testMethod=test_Debian822_from_file__signed_from_dsc>

    def test_Debian822_from_file__signed_from_dsc(self):
        test_file = self.get_test_loc('debcon/deb822/zlib_1.2.11.dfsg-1.dsc')
        expected_loc = 'debcon/deb822/zlib_1.2.11.dfsg-1.dsc-expected-deb822.json'
        results = debcon.Debian822.from_file(test_file).to_dict()
>       self.check_json(results, expected_loc, regen=False)

tests/test_debcon.py:139:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_utils.py:35: in check_json
    expected = json.load(ex, encoding='utf-8')
/nix/store/y1mhcjrx951lbdbf69v2wng33gc7lx1j-python3-3.9.2/lib/python3.9/json/__init__.py:293: in load
    return loads(fp.read(),

[snip]

E       TypeError: __init__() got an unexpected keyword argument 'encoding'

/nix/store/y1mhcjrx951lbdbf69v2wng33gc7lx1j-python3-3.9.2/lib/python3.9/json/__init__.py:359: TypeError

[snip]

FAILED tests/test_contents.py::TestContentsParse::test_parse_contents_debian_no_header_gzipped
FAILED tests/test_contents.py::TestContentsParse::test_parse_contents_ubuntu_with_header_plain
FAILED tests/test_copyright.py::TestDebianCopyright::test_DebianCopyright_from_file__from_copyrights_dep5_1
FAILED tests/test_copyright.py::TestDebianCopyright::test_DebianCopyright_from_file__from_copyrights_dep5_3
FAILED tests/test_copyright.py::TestDebianCopyright::test_DebianCopyright_from_file__from_copyrights_dep5_dropbear
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraph_data_from_file__signed_from_dsc_can_remove_signature
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraph_data_from_file__signed_from_dsc_does_not_crash_if_signature_not_removed
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraph_data_from_file_from_status
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraph_data_from_file_from_status_can_handle_perl_status
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraphs_data_from_file__from_copyrights_dep5_1
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraphs_data_from_file__from_copyrights_dep5_3
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraphs_data_from_file__from_copyrights_dep5_dropbear
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraphs_data_from_file__from_packages
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraphs_data_from_file__from_sources
FAILED tests/test_debcon.py::TestGetParagraphData::test_get_paragraphs_data_from_file__from_status
FAILED tests/test_debcon.py::TestDebian822::test_Debian822_from_file__from_status
FAILED tests/test_debcon.py::TestDebian822::test_Debian822_from_file__signed_from_dsc

All is fine on Python 3.8.

pombredanne pushed a commit that referenced this issue May 12, 2021
Merge changes from develop to main
pombredanne added a commit that referenced this issue May 10, 2022
Add support for gems and improve RPM support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant