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

test_hashlib fails if _md5 is not built #76902

Closed
benjaminp opened this issue Jan 30, 2018 · 3 comments
Closed

test_hashlib fails if _md5 is not built #76902

benjaminp opened this issue Jan 30, 2018 · 3 comments
Labels
3.7 (EOL) end of life build The build process and cross-build

Comments

@benjaminp
Copy link
Contributor

BPO 32721
Nosy @benjaminp
PRs
  • bpo-32721: do not fail test_hashlib if _md5 isn't available #5441
  • [3.6] closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441) #5442
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-01-30.06:14:20.342>
    created_at = <Date 2018-01-30.05:29:15.251>
    labels = ['build', '3.7']
    title = 'test_hashlib fails if _md5 is not built'
    updated_at = <Date 2018-01-30.07:01:34.600>
    user = 'https://github.com/benjaminp'

    bugs.python.org fields:

    activity = <Date 2018-01-30.07:01:34.600>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-01-30.06:14:20.342>
    closer = 'benjamin.peterson'
    components = ['Build']
    creation = <Date 2018-01-30.05:29:15.251>
    creator = 'benjamin.peterson'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32721
    keywords = ['patch']
    message_count = 3.0
    messages = ['311233', '311241', '311245']
    nosy_count = 1.0
    nosy_names = ['benjamin.peterson']
    pr_nums = ['5441', '5442']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue32721'
    versions = ['Python 3.6', 'Python 3.7']

    @benjaminp
    Copy link
    Contributor Author

    $ make
    $ rm build/lib.linux-x86_64-3.7/_md5.cpython-37m-x86_64-linux-gnu.so 
    $ ./python -m test test_hashlib
    Run tests sequentially
    0:00:00 load avg: 1.11 [1/1] test_hashlib
    ERROR:root:code for hash md5 was not found.
    Traceback (most recent call last):
      File "/home/benjamin/dev/python/cpython/Lib/hashlib.py", line 243, in <module>
        globals()[__func_name] = __get_hash(__func_name)
      File "/home/benjamin/dev/python/cpython/Lib/hashlib.py", line 113, in __get_builtin_constructor
        raise ValueError('unsupported hash type ' + name)
    ValueError: unsupported hash type md5
    /home/benjamin/dev/python/cpython/Lib/test/test_hashlib.py:90: UserWarning: Did a C extension fail to compile? No module named '_md5'
      warnings.warn('Did a C extension fail to compile? %s' % error)
    Warning -- logging._handlerList was modified by test_hashlib
      Before: (139817255081928, [<weakref at 0x7f29bdc02868; to '_StderrHandler' at 0x7f29bdbfeb70>, <weakref at 0x7f29ba4f71d8; to 'StreamHandler' at 0x7f29ba4ee8d0>], [<weakref at 0x7f29bdc02868; to '_StderrHandler' at 0x7f29bdbfeb70>])
      After:  (139817255081928, [<weakref at 0x7f29bdc02868; to '_StderrHandler' at 0x7f29bdbfeb70>, <weakref at 0x7f29ba4f71d8; to 'StreamHandler' at 0x7f29ba4ee8d0>], [<weakref at 0x7f29bdc02868; to '_StderrHandler' at 0x7f29bdbfeb70>, <weakref at 0x7f29ba4f71d8; to 'StreamHandler' at 0x7f29ba4ee8d0>]) 
    test test_hashlib failed -- Traceback (most recent call last):
      File "/home/benjamin/dev/python/cpython/Lib/test/test_hashlib.py", line 209, in test_get_builtin_constructor
        constructor = get_builtin_constructor('md5')
      File "/home/benjamin/dev/python/cpython/Lib/hashlib.py", line 113, in __get_builtin_constructor
        raise ValueError('unsupported hash type ' + name)
    ValueError: unsupported hash type md5

    test_hashlib failed

    1 test failed:
    test_hashlib

    Total duration: 397 ms
    Tests result: FAILURE

    @benjaminp benjaminp added 3.7 (EOL) end of life build The build process and cross-build labels Jan 30, 2018
    @benjaminp
    Copy link
    Contributor Author

    New changeset 9544180 by Benjamin Peterson in branch 'master':
    closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441)
    9544180

    @benjaminp
    Copy link
    Contributor Author

    New changeset 6b2bbcc by Benjamin Peterson (Miss Islington (bot)) in branch '3.6':
    closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441) (GH-5442)
    6b2bbcc

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant