diff --git a/applications/admin/controllers/appadmin.py b/applications/admin/controllers/appadmin.py
index 6b3a8370..2f780749 100644
--- a/applications/admin/controllers/appadmin.py
+++ b/applications/admin/controllers/appadmin.py
@@ -576,7 +576,7 @@ def bg_graph_model():
meta_graphmodel = dict(group=request.application, color='#ECECEC')
group = meta_graphmodel['group'].replace(' ', '')
- if not subgraphs.has_key(group):
+ if group not in subgraphs:
subgraphs[group] = dict(meta=meta_graphmodel, tables=[])
subgraphs[group]['tables'].append(tablename)
diff --git a/applications/admin/views/default/design.html b/applications/admin/views/default/design.html
index 2d918b83..cd6d60f8 100644
--- a/applications/admin/views/default/design.html
+++ b/applications/admin/views/default/design.html
@@ -207,7 +207,7 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
{{=peekfile('views',c, dict(id=id))}}
diff --git a/applications/admin/views/default/plugin.html b/applications/admin/views/default/plugin.html
index 0fd8ea1a..a0c5a2d4 100644
--- a/applications/admin/views/default/plugin.html
+++ b/applications/admin/views/default/plugin.html
@@ -144,7 +144,7 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
{{=peekfile('views',c)}}
diff --git a/applications/examples/controllers/appadmin.py b/applications/examples/controllers/appadmin.py
index 6b3a8370..2f780749 100644
--- a/applications/examples/controllers/appadmin.py
+++ b/applications/examples/controllers/appadmin.py
@@ -576,7 +576,7 @@ def bg_graph_model():
meta_graphmodel = dict(group=request.application, color='#ECECEC')
group = meta_graphmodel['group'].replace(' ', '')
- if not subgraphs.has_key(group):
+ if group not in subgraphs:
subgraphs[group] = dict(meta=meta_graphmodel, tables=[])
subgraphs[group]['tables'].append(tablename)
diff --git a/applications/welcome/controllers/appadmin.py b/applications/welcome/controllers/appadmin.py
index 6b3a8370..2f780749 100644
--- a/applications/welcome/controllers/appadmin.py
+++ b/applications/welcome/controllers/appadmin.py
@@ -576,7 +576,7 @@ def bg_graph_model():
meta_graphmodel = dict(group=request.application, color='#ECECEC')
group = meta_graphmodel['group'].replace(' ', '')
- if not subgraphs.has_key(group):
+ if group not in subgraphs:
subgraphs[group] = dict(meta=meta_graphmodel, tables=[])
subgraphs[group]['tables'].append(tablename)
diff --git a/gluon/html.py b/gluon/html.py
index 5c44f4fb..8290e820 100644
--- a/gluon/html.py
+++ b/gluon/html.py
@@ -2646,7 +2646,7 @@ def test():
>>> form=FORM(INPUT(value="Hello World", _name="var", requires=IS_MATCH('^\w+$')))
>>> isinstance(form.as_dict(), dict)
True
- >>> form.as_dict(flat=True).has_key("vars")
+ >>> "vars" in form.as_dict(flat=True)
True
>>> isinstance(form.as_json(), basestring) and len(form.as_json(sanitize=False)) > 0
True
diff --git a/gluon/tools.py b/gluon/tools.py
index dde1e1fe..7ef74ca0 100644
--- a/gluon/tools.py
+++ b/gluon/tools.py
@@ -4693,7 +4693,7 @@ class Auth(object):
if resolve:
if slug:
wiki = self._wiki.read(slug, force_render)
- if isinstance(wiki, dict) and wiki.has_key('content'): # FIXME: .has_key() is deprecated
+ if isinstance(wiki, dict) and 'content' in wiki:
# We don't want to return a dict object, just the wiki
wiki = wiki['content']
else:
@@ -5710,7 +5710,7 @@ class Service(object):
def return_error(id, code, message=None, data=None):
error = {'code': code}
- if Service.jsonrpc_errors.has_key(code):
+ if code in Service.jsonrpc_errors:
error['message'] = Service.jsonrpc_errors[code][0]
error['data'] = Service.jsonrpc_errors[code][1]
if message is not None: