This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Anthony Sottile, ezio.melotti, josh.r, ncoghlan, rhettinger, scoder, serhiy.storchaka
Date 2019-07-21.12:19:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1563711569.04.0.708868927848.issue37636@roundup.psfhosted.org>
In-reply-to
Content
I think it is better to left this on third-party linters.

* It is easy to catch patterns like `sys.version_info[0] == 3` or `sys.version[:3]` in the linter than in the Python compiler or interpreter. Linters are designed for this.

* Not always slicing sys.version is an error. For example, `sys.version[:sys.version.index(' ')]` is a valid code. Linters have options which allow to ignore some kind of warnings or warnings at the particular line.

* Users that ignore linters usually do not check the version. They wrote their scripts for the default system Python and update them when they become broken after system upgrade.
History
Date User Action Args
2019-07-21 12:19:29serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, ncoghlan, scoder, ezio.melotti, josh.r, Anthony Sottile
2019-07-21 12:19:29serhiy.storchakasetmessageid: <1563711569.04.0.708868927848.issue37636@roundup.psfhosted.org>
2019-07-21 12:19:29serhiy.storchakalinkissue37636 messages
2019-07-21 12:19:28serhiy.storchakacreate