New submission from Serhiy Storchaka: Pickling and copying ImportError doesn't preserve name and path attributes.
>>> import copy, pickle >>> e = ImportError('test', name='n', path='p') >>> e.name 'n' >>> e.path 'p' >>> e2 = pickle.loads(pickle.dumps(e, 4)) >>> e2.name >>> e2.path >>> e2 = copy.copy(e) >>> e2.name >>> e2.path Proposed patch fixes this. ---------- components: Interpreter Core messages: 291194 nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Pickling and copying ImportError doesn't preserve name and path type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29998> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com