-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Not just another 'maximum recursion depth exceeded while calling a Python object' #3245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I looked into this and I could reproduce what @stanislavlevin experienced. As the log shows it's an Running the reproducer with
I tried several commits from @PCManticore should this be also reported in astroid's issue tracker? |
Yeah, feel free to open it up in |
Under the certain circumstances invocation of `safe_infer` helper without a proper context leads to an infinite recursion. Related: pylint-dev/pylint#3245 Signed-off-by: Stanislav Levin <[email protected]>
Under the certain circumstances invocation of `safe_infer` helper without a proper context leads to an infinite recursion. Related: pylint-dev/pylint#3245 Signed-off-by: Stanislav Levin <[email protected]>
As of now, the transformation of builtin containers which members, in turn, are containers relies on `safe_infer` helper. `safe_infer` tries to infer the node to get its values. Doing this without a cache containing a previously inferred nodes lead to infinite recursion, for example, on resolving a class attribute. Note: this doesn't help to infer a class attribute by itself is such a case, but prevents crash. Closes: pylint-dev/pylint#3245 Signed-off-by: Stanislav Levin <[email protected]>
As of now, the transformation of builtin containers which members, in turn, are containers relies on `safe_infer` helper. `safe_infer` tries to infer the node to get its values. Doing this without a cache containing a previously inferred nodes lead to infinite recursion, for example, on resolving a class attribute. Note: this doesn't help to infer a class attribute by itself is such a case, but prevents crash. Closes: pylint-dev/pylint#3245 Signed-off-by: Stanislav Levin <[email protected]>
This is the first time running Pylint-2.4 over the whole IPA codebase. ``` Pylint on /usr/bin/python is running, please wait ... internal error with sending report for module ['ipaserver/plugins/serverroles.py'] maximum recursion depth exceeded while calling a Python object ************* Module ipatests.test_integration.base ipatests/test_integration/base.py:84: [W0125(using-constant-test), IntegrationTest.install] Using a conditional statement with a constant value) ************* Module ipaserver.install.ipa_cacert_manage ipaserver/install/ipa_cacert_manage.py:522: [R1724(no-else-continue), CACertManage.delete] Unnecessary "elif" after "continue") ``` The latest Pylint (via the Tox task) checks only: ``` {envsitepackagesdir}/ipaclient \ {envsitepackagesdir}/ipalib \ {envsitepackagesdir}/ipapython ``` , while the distro-Pylint runs over all project but it is not fresh. That's why these warnings/errors weren't exposed before now. Concerning `internal error`: a fix was accepted by upstream: pylint-dev/pylint#3245, but wasn't released yet. Until that is done, Pylint just warns. Related: https://pagure.io/freeipa/issue/8116 Signed-off-by: Stanislav Levin <[email protected]>
This is the first time running Pylint-2.4 over the whole IPA codebase. ``` Pylint on /usr/bin/python is running, please wait ... internal error with sending report for module ['ipaserver/plugins/serverroles.py'] maximum recursion depth exceeded while calling a Python object ************* Module ipatests.test_integration.base ipatests/test_integration/base.py:84: [W0125(using-constant-test), IntegrationTest.install] Using a conditional statement with a constant value) ************* Module ipaserver.install.ipa_cacert_manage ipaserver/install/ipa_cacert_manage.py:522: [R1724(no-else-continue), CACertManage.delete] Unnecessary "elif" after "continue") ``` The latest Pylint (via the Tox task) checks only: ``` {envsitepackagesdir}/ipaclient \ {envsitepackagesdir}/ipalib \ {envsitepackagesdir}/ipapython ``` , while the distro-Pylint runs over all project but it is not fresh. That's why these warnings/errors weren't exposed before now. Concerning `internal error`: a fix was accepted by upstream: pylint-dev/pylint#3245, but wasn't released yet. Until that is done, Pylint just warns. Related: https://pagure.io/freeipa/issue/8116 Signed-off-by: Stanislav Levin <[email protected]>
This is the first time running Pylint-2.4 over the whole IPA codebase. ``` Pylint on /usr/bin/python is running, please wait ... internal error with sending report for module ['ipaserver/plugins/serverroles.py'] maximum recursion depth exceeded while calling a Python object ************* Module ipatests.test_integration.base ipatests/test_integration/base.py:84: [W0125(using-constant-test), IntegrationTest.install] Using a conditional statement with a constant value) ************* Module ipaserver.install.ipa_cacert_manage ipaserver/install/ipa_cacert_manage.py:522: [R1724(no-else-continue), CACertManage.delete] Unnecessary "elif" after "continue") ``` The latest Pylint (via the Tox task) checks only: ``` {envsitepackagesdir}/ipaclient \ {envsitepackagesdir}/ipalib \ {envsitepackagesdir}/ipapython ``` , while the distro-Pylint runs over all project but it is not fresh. That's why these warnings/errors weren't exposed before now. Concerning `internal error`: a fix was accepted by upstream: pylint-dev/pylint#3245, but wasn't released yet. Until that is done, Pylint just warns. Related: https://pagure.io/freeipa/issue/8116 Signed-off-by: Stanislav Levin <[email protected]>
This is the first time running Pylint-2.4 over the whole IPA codebase. ``` Pylint on /usr/bin/python is running, please wait ... internal error with sending report for module ['ipaserver/plugins/serverroles.py'] maximum recursion depth exceeded while calling a Python object ************* Module ipatests.test_integration.base ipatests/test_integration/base.py:84: [W0125(using-constant-test), IntegrationTest.install] Using a conditional statement with a constant value) ************* Module ipaserver.install.ipa_cacert_manage ipaserver/install/ipa_cacert_manage.py:522: [R1724(no-else-continue), CACertManage.delete] Unnecessary "elif" after "continue") ``` The latest Pylint (via the Tox task) checks only: ``` {envsitepackagesdir}/ipaclient \ {envsitepackagesdir}/ipalib \ {envsitepackagesdir}/ipapython ``` , while the distro-Pylint runs over all project but it is not fresh. That's why these warnings/errors weren't exposed before now. Concerning `internal error`: a fix was accepted by upstream: pylint-dev/pylint#3245, but wasn't released yet. Until that is done, Pylint just warns. Related: https://pagure.io/freeipa/issue/8116 Signed-off-by: Stanislav Levin <[email protected]>
This is the first time running Pylint-2.4 over the whole IPA codebase. ``` Pylint on /usr/bin/python is running, please wait ... internal error with sending report for module ['ipaserver/plugins/serverroles.py'] maximum recursion depth exceeded while calling a Python object ************* Module ipatests.test_integration.base ipatests/test_integration/base.py:84: [W0125(using-constant-test), IntegrationTest.install] Using a conditional statement with a constant value) ************* Module ipaserver.install.ipa_cacert_manage ipaserver/install/ipa_cacert_manage.py:522: [R1724(no-else-continue), CACertManage.delete] Unnecessary "elif" after "continue") ``` The latest Pylint (via the Tox task) checks only: ``` {envsitepackagesdir}/ipaclient \ {envsitepackagesdir}/ipalib \ {envsitepackagesdir}/ipapython ``` , while the distro-Pylint runs over all project but it is not fresh. That's why these warnings/errors weren't exposed before now. Concerning `internal error`: a fix was accepted by upstream: pylint-dev/pylint#3245, but wasn't released yet. Until that is done, Pylint just warns. Related: https://pagure.io/freeipa/issue/8116 Signed-off-by: Stanislav Levin <[email protected]> Reviewed-By: Christian Heimes <[email protected]>
This is the first time running Pylint-2.4 over the whole IPA codebase. ``` Pylint on /usr/bin/python is running, please wait ... internal error with sending report for module ['ipaserver/plugins/serverroles.py'] maximum recursion depth exceeded while calling a Python object ************* Module ipatests.test_integration.base ipatests/test_integration/base.py:84: [W0125(using-constant-test), IntegrationTest.install] Using a conditional statement with a constant value) ************* Module ipaserver.install.ipa_cacert_manage ipaserver/install/ipa_cacert_manage.py:522: [R1724(no-else-continue), CACertManage.delete] Unnecessary "elif" after "continue") ``` The latest Pylint (via the Tox task) checks only: ``` {envsitepackagesdir}/ipaclient \ {envsitepackagesdir}/ipalib \ {envsitepackagesdir}/ipapython ``` , while the distro-Pylint runs over all project but it is not fresh. That's why these warnings/errors weren't exposed before now. Concerning `internal error`: a fix was accepted by upstream: pylint-dev/pylint#3245, but wasn't released yet. Until that is done, Pylint just warns. Related: https://pagure.io/freeipa/issue/8116 Signed-off-by: Stanislav Levin <[email protected]> Reviewed-By: Christian Heimes <[email protected]>
This is the first time running Pylint-2.4 over the whole IPA codebase. ``` Pylint on /usr/bin/python is running, please wait ... internal error with sending report for module ['ipaserver/plugins/serverroles.py'] maximum recursion depth exceeded while calling a Python object ************* Module ipatests.test_integration.base ipatests/test_integration/base.py:84: [W0125(using-constant-test), IntegrationTest.install] Using a conditional statement with a constant value) ************* Module ipaserver.install.ipa_cacert_manage ipaserver/install/ipa_cacert_manage.py:522: [R1724(no-else-continue), CACertManage.delete] Unnecessary "elif" after "continue") ``` The latest Pylint (via the Tox task) checks only: ``` {envsitepackagesdir}/ipaclient \ {envsitepackagesdir}/ipalib \ {envsitepackagesdir}/ipapython ``` , while the distro-Pylint runs over all project but it is not fresh. That's why these warnings/errors weren't exposed before now. Concerning `internal error`: a fix was accepted by upstream: pylint-dev/pylint#3245, but wasn't released yet. Until that is done, Pylint just warns. Related: https://pagure.io/freeipa/issue/8116 Signed-off-by: Stanislav Levin <[email protected]> Reviewed-By: Christian Heimes <[email protected]>
This is the first time running Pylint-2.4 over the whole IPA codebase. ``` Pylint on /usr/bin/python is running, please wait ... internal error with sending report for module ['ipaserver/plugins/serverroles.py'] maximum recursion depth exceeded while calling a Python object ************* Module ipatests.test_integration.base ipatests/test_integration/base.py:84: [W0125(using-constant-test), IntegrationTest.install] Using a conditional statement with a constant value) ************* Module ipaserver.install.ipa_cacert_manage ipaserver/install/ipa_cacert_manage.py:522: [R1724(no-else-continue), CACertManage.delete] Unnecessary "elif" after "continue") ``` The latest Pylint (via the Tox task) checks only: ``` {envsitepackagesdir}/ipaclient \ {envsitepackagesdir}/ipalib \ {envsitepackagesdir}/ipapython ``` , while the distro-Pylint runs over all project but it is not fresh. That's why these warnings/errors weren't exposed before now. Concerning `internal error`: a fix was accepted by upstream: pylint-dev/pylint#3245, but wasn't released yet. Until that is done, Pylint just warns. Related: https://pagure.io/freeipa/issue/8116 Signed-off-by: Stanislav Levin <[email protected]> Reviewed-By: Christian Heimes <[email protected]>
There is a weird behavior of Pylint regarding the following example:
pylint_repr.py.txt
Note: to run -
pytest -p pytester test_pylint.py -v
The result would be:
Note:
So, there are at least two problems:
1 - exits with result code 1
2 - exit with result code 0, but an error is shown in stderr
3 - 'all is fine'
I'm in a hopeless situation.
Multiprocess Pylint is compromised, while the single-mode is broken for me.
Pylint infos I've checked:
The text was updated successfully, but these errors were encountered: