[3.13] gh-123339: Fix cases of inconsistency of __module__ and __firstlineno__ in classes (GH-123613) (#124735)
* Setting the __module__ attribute for a class now removes the __firstlineno__ item from the type's dict. * The _collections_abc and _pydecimal modules now completely replace the collections.abc and decimal modules after importing them. This allows to get the source of classes and functions defined in these modules. * inspect.findsource() now checks whether the first line number for a class is out of bound. (cherry picked from commit 69a4063ca516360b5eb96f5432ad9f9dfc32a72e)
S
Serhiy Storchaka committed
5bf32d1300f7342ec76e8afee480eef07d00a23b
Parent: ce0eaa6
Committed by GitHub <noreply@github.com>
on 9/30/2024, 4:21:40 AM