Similarly to the __author__
or __version__
top level module variables, is there any convention for specifying supported Python versions for a Python source file?
My usecase is a project that has some scripts that need to be compatible with Python 2.4. I would like to note that fact in them in some universally recognizable way.
I am not asking how to require a minimal Python version during execution. My problem is that developers may accidentally use feature which is not compatible with python version this particular script needs to support. PyCharm can warn about Python incompatibilities. It would be great if it could pick up this annotation and configure the warning on a per-file basis.