Message397054
Robert: I haven't worked with importlib or pyclbr before, so these may be naive questions, but:
- can your usecase be resolved with a workaround, e.g. setting ModuleSpec manually in / on __main__ module, something like `from importlib._bootstrap import ModuleSpec; __spec__ = ModuleSpec('main',None)
- You mention that this issue may apply to other modules, but the Python docs say __main__ is the only case that may have __spec__=None in some cases (in my testing it indeed have it set to None). Do you have any examples where other modules have __spec__=None?
What's your usecase for examining __main__ with pyclbr? Not trying to sound doubtful, just really curious.
- Re your PR I have a bit of a concern that catching a ValueError silently might mask other types of ValueError, but I haven't looked more closely into that, just want to note it here for the future.
Btw thanks for the reply on PR to my question, it makes sense. |
|
Date |
User |
Action |
Args |
2021-07-06 20:08:44 | andrei.avk | set | recipients:
+ andrei.avk, kxrob |
2021-07-06 20:08:44 | andrei.avk | set | messageid: <1625602124.16.0.257391877427.issue43299@roundup.psfhosted.org> |
2021-07-06 20:08:44 | andrei.avk | link | issue43299 messages |
2021-07-06 20:08:43 | andrei.avk | create | |
|