← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-contrib-glock-bool-constants into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-contrib-glock-bool-constants into launchpad:master.

Commit message:
Remove pre-2.2 compatibility from contrib.glock

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/380594

Assigning to True and False is a SyntaxError in Python 3, even if it's guarded by a conditional that's always false at run-time.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-contrib-glock-bool-constants into launchpad:master.
diff --git a/lib/contrib/glock.py b/lib/contrib/glock.py
index e1a7364..d1ced09 100644
--- a/lib/contrib/glock.py
+++ b/lib/contrib/glock.py
@@ -73,11 +73,6 @@ class LockAlreadyAcquired(GlobalLockError):
     pass
 
 
-# Constants
-# ---------:
-if sys.version[:3] < '2.2':
-    True, False = 1, 0  # built-in in Python 2.2+
-
 #----------------------------------------------------------------------------
 class GlobalLock:
 #----------------------------------------------------------------------------