[issue40417] PyImport_ReloadModule emits deprecation warning
New submission from Robert Rouhani : It appears as though PyImport_ReloadModule is importing the deprecated "imp" module. I integrated a newer version of Python into Unreal Engine 4, which internally calls this function for some of it's own modules. Normally a stray warning wouldn't be of much concern to me, but the process of "cooking" (converting raw assets to optimized/final assets) will fail if anything is written to stderr. This makes it impossible to package a copy of the game for testing or release without a workaround. I'm going to add a test to _testembed.c to verify my fix. Is this something that I should include in the Github PR? -- components: Interpreter Core messages: 367501 nosy: Robert Rouhani priority: normal severity: normal status: open title: PyImport_ReloadModule emits deprecation warning type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue40417> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40417] PyImport_ReloadModule emits deprecation warning
Robert Rouhani added the comment: We have a fairly straightforward workaround of using the "warnings" module to redirect to stdout, so we personally don't have a need. Unreal, however, follows the VFX Reference Platform ( https://vfxplatform.com/) which is migrating from 2.7 to 3.7.x this year. They will likely run into this during their migration, so backporting to 3.7 would be useful. On Fri, May 1, 2020 at 8:22 AM Eric Snow wrote: > > Eric Snow added the comment: > > Did you have a need for this to be fixed in 3.8 or earlier? This seems > reasonably and simple enough to backport. I suppose someone could be > relying on an implicit import of the "imp" module, but that seems highly > unlikely and suspect anyway. :) > > -- > nosy: +brett.cannon, ncoghlan > > ___ > Python tracker > <https://bugs.python.org/issue40417> > ___ > -- ___ Python tracker <https://bugs.python.org/issue40417> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40417] PyImport_ReloadModule emits deprecation warning
Change by Robert Rouhani : -- pull_requests: +19249 pull_request: https://github.com/python/cpython/pull/19934 ___ Python tracker <https://bugs.python.org/issue40417> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40417] PyImport_ReloadModule emits deprecation warning
Change by Robert Rouhani : -- pull_requests: +19250 pull_request: https://github.com/python/cpython/pull/19935 ___ Python tracker <https://bugs.python.org/issue40417> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40417] PyImport_ReloadModule emits deprecation warning
Robert Rouhani added the comment: No problem! Happy to contribute where I can :) -- ___ Python tracker <https://bugs.python.org/issue40417> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com