classification
Title: test_crypt fails on OpenBSD
Type: Stage:
Components: Versions: Python 3.6, Python 3.5, Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ced, haypo, python-dev, rpointel
Priority: normal Keywords: patch

Created on 2015-10-01 06:49 by haypo, last changed 2016-01-16 20:09 by ced.

Files
File name Uploaded Description Edit
crypt_openbsd.patch haypo, 2015-10-01 06:49 review
Messages (3)
msg251998 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2015-10-01 06:49
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()

----------------------------------------------------------------------
msg252158 - (view) Author: Roundup Robot (python-dev) Date: 2015-10-02 21:02
New changeset 4da7edbf78d4 by Victor Stinner in branch 'default':
Issue #25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's not
https://hg.python.org/cpython/rev/4da7edbf78d4
msg252592 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2015-10-09 07:23
Hum, the test now fails differently :-(

======================================================================
FAIL: test_methods (test.test_crypt.CryptTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/python-builds/3.x.borja-openbsd-x86/build/Lib/test/test_crypt.py", line 29, in test_methods
    self.assertTrue(len(crypt.methods) >= 1)
AssertionError: False is not true
History
Date User Action Args
2016-01-16 20:09:32cedsetnosy: + ced
2015-10-09 07:23:27hayposetmessages: + msg252592
2015-10-02 21:02:42python-devsetnosy: + python-dev
messages: + msg252158
2015-10-01 06:50:11hayposetnosy: + rpointel
2015-10-01 06:49:50haypocreate