[PATCH] setup: write version constant as bytes literal

Yuya Nishihara yuya at tcha.org
Fri Jun 1 15:04:34 UTC 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1527861756 -32400
#      Fri Jun 01 23:02:36 2018 +0900
# Node ID 3cc63fbb28e2139cf9a0f7b153bd3f98125f4df9
# Parent  273ce823ba5c657623441bcde526e54811c90fb1
setup: write version constant as bytes literal

Spotted while bulk-rewriting string literals to b''s.

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -360,7 +360,7 @@ if version:
 
     write_if_changed('mercurial/__version__.py', b''.join([
         b'# this file is autogenerated by setup.py\n'
-        b'version = "%s"\n' % versionb,
+        b'version = b"%s"\n' % versionb,
     ]))
 
 try:


More information about the Mercurial-devel mailing list