]> arthur.barton.de Git - bup.git/commitdiff
Remove Python 3 guardrail: BUP_ALLOW_UNEXPECTED_PYTHON_VERSION
authorRob Browning <rlb@defaultvalue.org>
Sun, 7 Jun 2020 16:18:11 +0000 (11:18 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 5 Jul 2020 16:16:22 +0000 (11:16 -0500)
Now that the last subcommand (web) has been ported to Python 3, we
at least some randomized binary test coverage, and we think we've
addressed all the Python 3 issues we know of, remove the
BUP_ALLOW_UNEXPECTED_PYTHON_VERSION guardrail.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
.cirrus.yml
Makefile
lib/cmd/bup

index 17421458cd7f9e92144e329582b7ee6256ac8b6f..5c74517b0894f87f9680a469397898892f172a2e 100644 (file)
@@ -77,6 +77,4 @@ task:
     dev/system-info
     adduser --disabled-password --gecos '' bup
     chown -R bup:bup .
-    testcmd='BUP_ALLOW_UNEXPECTED_PYTHON_VERSION=true PYTHON=python3'
-    testcmd="$testcmd eatmydata make -j3 -C '$(pwd)' check"
-    su -l bup -c "$testcmd"
+    su -l bup -c "PYTHON=python3 eatmydata make -j3 -C '$(pwd)' check"
index 7dd7cdfa77d7d362c4c69803fefa844cd9fae553..86c973ce5bf0eb57674ccf3caf77dbe515e1bf41 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -264,10 +264,8 @@ long-check: check
 
 .PHONY: check-both
 check-both:
-       $(MAKE) clean \
-         && PYTHON=python3 BUP_ALLOW_UNEXPECTED_PYTHON_VERSION=true $(MAKE) check
-       $(MAKE) clean \
-         && PYTHON=python2 $(MAKE) check
+       $(MAKE) clean && PYTHON=python3 $(MAKE) check
+       $(MAKE) clean && PYTHON=python2 $(MAKE) check
 
 cmd/bup-%: cmd/%-cmd.py
        rm -f $@
index 3e9b9190fd56188d7dfad2264728e24b3928d11b..5c4504178fcdd86066622c84c29bc4d7afc24a10 100755 (executable)
@@ -35,13 +35,6 @@ from subprocess import PIPE
 
 from bup.compat import environ, fsdecode
 from bup.io import path_msg
-
-if sys.version_info[0] != 2 \
-   and not environ.get(b'BUP_ALLOW_UNEXPECTED_PYTHON_VERSION') == b'true':
-    print('error: bup may crash with python versions other than 2, or eat your data',
-          file=sys.stderr)
-    sys.exit(2)
-
 from bup import compat, path, helpers
 from bup.compat import add_ex_tb, add_ex_ctx, argv_bytes, wrap_main
 from bup.helpers import atoi, columnate, debug1, log, merge_dict, tty_width