inspect.getfile: Don't crash on classes without '__module__' attribute #20372

Some classes defined in C may not have the '__module__' attribute, so
we now handle this case to avoid having unexepected AttributeError.
2 files changed