This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Unpickleable ModuleImportError in unittest patch not backported to 2.7
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Rachel Tobin, pitrou, zach.ware
Priority: normal Keywords:

Created on 2017-08-28 23:53 by Rachel Tobin, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg300969 - (view) Author: Rachel Tobin (Rachel Tobin) Date: 2017-08-28 23:53
When running the unittest runner in parallel with an module import error present in your code, this exception is raised:

_pickle.PicklingError: Can't pickle <class 'unittest.loader.ModuleImportFailure'>: attribute lookup ModuleImportFailure on unittest.loader failed

unittest should be raising standard exceptions instead.

This was fixed in Python 3.4 with this patch: https://bugs.python.org/issue22903

Given that 2.7 is still supported, this patch should be backported.
msg300998 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-08-29 19:41
I'm guessing the backport may end up non-trivial.  Do you want to try submitting a PR for it?
msg367386 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2020-04-27 04:10
With 2.7 now EOL, I'm closing the issue.
History
Date User Action Args
2022-04-11 14:58:51adminsetgithub: 75478
2020-04-27 04:10:24zach.waresetstatus: open -> closed

nosy: + zach.ware
messages: + msg367386

resolution: out of date
stage: resolved
2018-07-11 06:40:02serhiy.storchakasettype: crash -> behavior
2017-08-29 19:41:05pitrousetmessages: + msg300998
2017-08-29 04:11:22serhiy.storchakasetnosy: + pitrou
2017-08-28 23:53:15Rachel Tobincreate