From 7fe2cc4d84d37e29f256fd8f614861121a2da254 Mon Sep 17 00:00:00 2001
From: Christoph Zwerschke <cito@online.de>
Date: Fri, 6 Jan 2017 16:36:05 +0000
Subject: [PATCH] Fix an issue with Python 3.6
While running over a dictionary in a for loop, we altered its values.
This used to work perfectly well in Python before 3.6, but now causes
problems, probably due to internal optimizations. We avoid this now.
---
pg.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pg.py b/pg.py
index 117e440..5942d50 100644
--- a/pg.py
+++ b/pg.py
@@ -708,7 +708,7 @@ class Adapter:
# so we first must find the values actually used in the command
used_values = {}
literals = dict.fromkeys(values, '')
- for key in literals:
+ for key in values:
del literals[key]
try:
command % literals
--
2.9.3