Fix python 3.11 regression with Python console autocomplete (#15885)
Fixes #15872
Summary of the issue:
Since python 3.10, auto completion in the Python Console would fail when trying to complete a string that matches an AutoPropertyObject getter raising NotImplementedError. This is because starting from 3.10, the code responsible for matching no longer catches exceptions for getattr. Instead, it ensures that property descriptors are filtered out. In my opinion, solution from Python is far from ideal, since it doesn't deal with other descriptors, like our baseObject.Getter.
Description of user facing changes
Fixes auto completion
Description of development approach
Copied and adapted code from Python 3.9.