From: Daniele Varrazzo Date: Fri, 13 Oct 2023 14:04:12 +0000 (+0200) Subject: feat(tools): warn about the Python version used in async-to-sync X-Git-Tag: pool-3.2.0~12^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92cf7f26969e9af520e1218202bc2cd3bbcb0e54;p=thirdparty%2Fpsycopg.git feat(tools): warn about the Python version used in async-to-sync Notify the user that they may get spurious results. --- diff --git a/tools/async_to_sync.py b/tools/async_to_sync.py index c3ccb2746..71d37a150 100755 --- a/tools/async_to_sync.py +++ b/tools/async_to_sync.py @@ -72,6 +72,17 @@ def main() -> int: if opt.docker: return run_in_docker() + current_ver = ".".join(map(str, sys.version_info[:2])) + if current_ver != PYVER: + logger.warning( + "Expecting output generated by Python %s; you are running %s instead.", + PYVER, + current_ver, + ) + logger.warning( + " You might get spurious changes that will be rejected by the CI linter." + ) + outputs = [] for fpin in opt.inputs: fpout = fpin.parent / fpin.name.replace("_async", "")