This is a request for a slight change of behavior for stubgen. Right now, if I use stubgen --recursive urllib.parse, stubs will be generated for the entirety of urllib.
$ stubgen --recursive urllib.parse
Created out/urllib/__init__.pyi
Created out/urllib/error.pyi
Created out/urllib/parse.pyi
Created out/urllib/request.pyi
Created out/urllib/response.pyi
Created out/urllib/robotparser.pyi
This seems to be somewhat odd behavior -- I would have expected stubgen to only generate out/urllib/parse.pyi. To generate all the stubs, I would expect stubgen --recursive urllib (currently there is no difference between passing urllib.parse and urllib as the module to be stubbed).
The behavior is because of the use of __import__ rather than importlib.import_module in walk_packages.
I'm not completely sure if this is an intended feature or a bug, but I figured that I'd report it and find out.