New submission from STINNER Victor:

It looks like crypt.crypt('', crypt.METHOD_CRYPT) returns None. This method 
must be excluded from crypt.methods. Attached patch should fix the issue, but I 
didn't try it on OpenBSD.

Python 3.4-3.6 is affect, Python 2.7 is not affect (crypt.methods was 
introduced in Python 3).

http://buildbot.python.org/all/builders/x86%20OpenBSD%203.5/builds/186/steps/test/logs/stdio

test_saltedcrypt (test.test_crypt.CryptTestCase) ... ERROR

======================================================================
ERROR: test_saltedcrypt (test.test_crypt.CryptTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/home/python-builds/3.5.borja-openbsd-x86/build/Lib/test/test_crypt.py", line 
23, in test_saltedcrypt
    self.assertEqual(len(pw), method.total_size)
TypeError: object of type 'NoneType' has no len()

----------------------------------------------------------------------

----------
files: crypt_openbsd.patch
keywords: patch
messages: 251998
nosy: haypo
priority: normal
severity: normal
status: open
title: test_crypt fails on OpenBSD
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40639/crypt_openbsd.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25287>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to