Currently, when we want to deprecate a feature, we add LOG(WARNING) or warning at python side. However, they do slowly creep back into the master's CI.
For example, I once removed all deprecation warning at build_module.py:186, but it got reintroduced to the CI.

I proposed that we add a deprecate(msg, version, ci_count) to battle this.
msg is the warning messaged print.
version is the version number that this feature will go completely unsupported. If the current version is greater or equal then version, it will be an error rather than a warning.
ci_count is the number of time this function could be called. after it got exceed it will fail the ci. this will stop pr that add more deprecated used to pass the ci.
Currently, when we want to deprecate a feature, we add LOG(WARNING) or warning at python side. However, they do slowly creep back into the master's CI.

For example, I once removed all deprecation warning at build_module.py:186, but it got reintroduced to the CI.
I proposed that we add a deprecate(msg, version, ci_count) to battle this.
msgis the warning messaged print.versionis the version number that this feature will go completely unsupported. If the current version is greater or equal thenversion, it will be an error rather than a warning.ci_countis the number of time this function could be called. after it got exceed it will fail the ci. this will stop pr that add more deprecated used to pass the ci.