Compile the floor check from bytes so the interpreter picks the encoding, and keep the changelog line to the consumer's fact

This commit is contained in:
2026-09-26 15:36:27 +02:00
parent f2437dfe10
commit 4474d42d38
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -13,6 +13,6 @@ class PythonFloor(unittest.TestCase):
self.assertIsNotNone(named, "README.md's Install names `Python 3.N or newer`")
tracked = subprocess.run(["git", "ls-files", "-z", "bin"], capture_output=True, check=True, cwd=ROOT, text=True).stdout.split("\0")
self.assertTrue(tracked[0])
check = "import sys\nfor path in sys.argv[1:]:\n\tcompile(open(path).read(), path, 'exec')"
check = "import sys\nfor path in sys.argv[1:]:\n\tcompile(open(path, 'rb').read(), path, 'exec')"
compiled = subprocess.run(["uv", "run", "--no-project", "--python", named.group(1), "python", "-c", check, *filter(None, tracked)], capture_output=True, cwd=ROOT, text=True)
self.assertEqual(compiled.returncode, 0, compiled.stderr)