[issue43540] importlib: Document how to replace load_module() in What's New in Python 3.10

2022-01-31 Thread STINNER Victor
STINNER Victor added the comment: Python 3.10 is released. It's too late, I close the issue. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue43540] importlib: Document how to replace load_module() in What's New in Python 3.10

2021-04-08 Thread Brett Cannon
Brett Cannon added the comment: Much like the question about load_module(), replacing find_module() with find_spec() can be helped with things like importlib.util.spec_from_file_location() and .spec_from_loader()

[issue43540] importlib: Document how to replace load_module() in What's New in Python 3.10

2021-04-08 Thread Sviatoslav Sydorenko
Sviatoslav Sydorenko added the comment: @vstinner: I think I figure out the solution — https://github.com/pypa/setuptools/pull/2633 -- nosy: +webknjaz ___ Python tracker ___

[issue43540] importlib: Document how to replace load_module() in What's New in Python 3.10

2021-04-08 Thread Florian Bruhin
Change by Florian Bruhin : -- nosy: +The Compiler ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43540] importlib: Document how to replace load_module() in What's New in Python 3.10

2021-04-08 Thread STINNER Victor
STINNER Victor added the comment: Concrete issue: setuptools defines a VendorImporter class with find_module() method, but no find_spec() method. How can it be ported to Python 3.10? https://github.com/pypa/setuptools/issues/2632 -- nosy: +hroncok

[issue43540] importlib: Document how to replace load_module() in What's New in Python 3.10

2021-04-08 Thread STINNER Victor
STINNER Victor added the comment: find_module() and find_loader() are now also deprecated (bpo-42134). Currently, What's New in Python 3.10 says: "(superseded by exec_module())". It would be great to have a documentation like the good subprocess "replacement" documentation:

[issue43540] importlib: Document how to replace load_module() in What's New in Python 3.10

2021-03-18 Thread Brett Cannon
Brett Cannon added the comment: The documentation states in the deprecation notice for https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module that create_module() and exec_module() are what are necessary. But the it isn't a direct 1:1 replacement and people are

[issue43540] importlib: Document how to replace load_module() in What's New in Python 3.10

2021-03-18 Thread STINNER Victor
New submission from STINNER Victor : The load_module() method of importlib loaders is deprecated which cause test failures in multiple projects. It is not easy to guess how to replace it. Examples: * pkg_resources fix adding create_module() and exec_module() methods: