Python 3.9 failures: imports abc from collections + _crypt.crypt [Errno 22] Invalid argument
*Created originally on Bitbucket by Anonymous* reported in Fedora BZ [https://bugzilla.redhat.com/show\_bug.cgi?id=1792956](https://bugzilla.redhat.com/show_bug.cgi?id=1792956) * Nose python ./setup.py test in py3.9.0a3 venv fails with File "/home/apevec/src/passlib/.eggs/nose-1.3.7-py3.9.egg/nose/suite.py", line 106, in \_set\_tests ‌ if isinstance\(tests, collections.Callable\) and not is\_suite: AttributeError: module 'collections' has no attribute 'Callable' > Fedora's nose is patched. Upstream nose is broken for ages, dead and you should run away form it fast. > > See also: https://fedoraproject.org/wiki/Changes/DeprecateNose > > As a side note, the collections.abc thing was reverted for 3.9.0a4 \(but will hit again in 3.10 and this time, they made it pretty clear that there will be no more delaying\). * crypt in 3.9 raises errors for invalid salt values instead of silently returning nothing: ```diff $ git log -p v3.8.1..v3.9.0a3 -- Modules/_cryptmodule.c commit 0d3fe8ae4961bf551e7d5e42559e2ede1a08fd7c Author: Antonio Gutierrez <chibby0ne@gmail.com> Date: Tue Oct 8 06:22:17 2019 +0200 closes bpo-38402: Check error of primitive crypt/crypt_r. (GH-16599) Checks also for encryption algorithms methods not supported in different OSs. Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com> diff --git a/Modules/_cryptmodule.c b/Modules/_cryptmodule.c index 5d03f45f64..00c1f4f698 100644 --- a/Modules/_cryptmodule.c +++ b/Modules/_cryptmodule.c @@ -42,6 +42,9 @@ crypt_crypt_impl(PyObject *module, const char *word, const char *salt) #else crypt_result = crypt(word, salt); #endif + if (crypt_result == NULL) { + return PyErr_SetFromErrno(PyExc_OSError); + } return Py_BuildValue("s", crypt_result); } ``` ‌
issue