New submission from Oren Milman:
The following code causes an assertion failure in get_encoded_name(), which is
called by _PyImport_LoadDynamicModuleWithSpec() (in Python/importdl.c):
import imp
class BadSpec:
name = 42
origin = 'foo'
imp.create_dynamic(BadSpec())
this is because _PyImport_LoadDynamicModuleWithSpec() assumes that spec.name is
a string.
should we fix this (even though imp is deprecated)?
----------
components: Extension Modules
messages: 301050
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: assertion failure in imp.create_dynamic(), when spec.name is not a string
type: crash
versions: Python 3.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue31315>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com