[Python-Dev] Re: PEP 679 – Allow parentheses in assert statements

2022-01-10 Thread Victor Stinner
On Mon, Jan 10, 2022 at 4:04 PM Guido van Rossum wrote: > Note that Pablo explicitly requested all feedback to Discourse. Oooops sorry, I missed that part of his email! Victor ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an

[Python-Dev] Re: PEP 679 – Allow parentheses in assert statements

2022-01-10 Thread Guido van Rossum
Note that Pablo explicitly requested all feedback to Discourse. On Mon, Jan 10, 2022 at 06:15 Batuhan Taskaya wrote: > > While it can indeed, make otherwise stable projects with "nop"s assert > sudden failing, that should be a trivial fix for any non-unmaintained > project. > > Agreed. This woul

[Python-Dev] Re: PEP 679 – Allow parentheses in assert statements

2022-01-10 Thread Batuhan Taskaya
> While it can indeed, make otherwise stable projects with "nop"s assert sudden failing, that should be a trivial fix for any non-unmaintained project. Agreed. This would be like a bug fix. I don't think anyone is depending on the current behavior (beside explicit tests in linters, which is only a

[Python-Dev] Re: PEP 679 – Allow parentheses in assert statements

2022-01-10 Thread Joao S. O. Bueno
On Mon, 10 Jan 2022 at 08:39, Victor Stinner wrote: > Does someone know if linters like pylint or pylakes current warn on > "assert(test, msg)" statements? > > If a project use such assertions which are always true, they can start > failing wit the PEP 679, right? OTOH, any assertion which star

[Python-Dev] Re: PEP 679 – Allow parentheses in assert statements

2022-01-10 Thread Paul Moore
On Mon, 10 Jan 2022 at 11:43, Batuhan Taskaya wrote: > > > Does someone know if linters like pylint or pylakes current warn on > > "assert(test, msg)" statements? > > I believe so, both the python itself (through SyntaxWarnings) and > other linters warn about this. ❯ py Python 3.10.1 (tags/v3.10

[Python-Dev] Re: PEP 679 – Allow parentheses in assert statements

2022-01-10 Thread Batuhan Taskaya
> Does someone know if linters like pylint or pylakes current warn on > "assert(test, msg)" statements? I believe so, both the python itself (through SyntaxWarnings) and other linters warn about this. > Is it possible to run a code search on PyPI top 5000 projects to see > if such always-true as

[Python-Dev] Re: PEP 679 – Allow parentheses in assert statements

2022-01-10 Thread Victor Stinner
Does someone know if linters like pylint or pylakes current warn on "assert(test, msg)" statements? If a project use such assertions which are always true, they can start failing wit the PEP 679, right? Hopefully, the fix is easy: removing the parenthesis give the same behavior on old and new Pyth