From d2060dfd8af4edb5824153ff24e207b39ecd67a2 Mon Sep 17 00:00:00 2001
From: Thomas Nagy <tnagy@waf.io>
Date: Wed, 14 Aug 2019 22:05:45 +0200
Subject: [PATCH] Conceal imp warnings in Python3

---
 waflib/Context.py      | 9 ++++++++-
 waflib/Tools/python.py | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/waflib/Context.py b/waflib/Context.py
index e3305fa33..4760bc820 100644
--- a/waflib/Context.py
+++ b/waflib/Context.py
@@ -6,10 +6,17 @@
 Classes and functions enabling the command system
 """
 
-import os, re, imp, sys
+import os, re, sys
 from waflib import Utils, Errors, Logs
 import waflib.Node
 
+if sys.hexversion > 0x3040000:
+	import types
+	class imp(object):
+		new_module = lambda x: types.ModuleType(x)
+else:
+	import imp
+
 # the following 3 constants are updated on each new release (do not touch)
 HEXVERSION=0x2001200
 """Constant updated on new releases""" 
-- 
GitLab

