Loading
Bug 1839263 - Fix python configure lint on python >= 3.10....
Bug 1839263 - Fix python configure lint on python >= 3.10. r=firefox-build-system-reviewers,ahochheiden,sergesanspaille, a=test-only DONTBUILD Python 3.10 added some more arguments to the CodeTypes constructor. It also changed co_lnotab to co_linetables. We were using co_lnotab to simulate a function with a def at a specific line and a raise at a specific other line. I'm not sure how I ended up with this particular requirement (this may have been related to python 2 still being used back then), but as of now, it doesn't seem we need the def to be at a specific location, so we can avoid needing to generate a co_linetables/co_lnotab, relying instead on the raise expression being on the co_firstlineno+1 in the thrower function. As for the extra arguments, it turns out python 3.8 also introduced a CodeType.replace method that can be used to derive a CodeType object from another, which is certainly simpler than calling its construtor with the right set of arguments. Differential Revision: https://phabricator.services.mozilla.com/D181424