1From f864a2aa29377a77c3aef61ce917cc03d099c430 Mon Sep 17 00:00:00 2001 2From: Thomas Nagy <tnagy@waf.io> 3Date: Wed, 14 Aug 2019 22:05:45 +0200 4Subject: [PATCH] Conceal imp warnings in Python3 5 6--- 7Upstream-Status: Backport [from waflib not jack: https://gitlab.com/ita1024/waf/-/commit/d2060dfd8af4edb5824153ff24e207b39ecd67a2.patch] 8 9 waflib/Context.py | 9 ++++++++- 10 1 file changed, 8 insertions(+), 1 deletion(-) 11 12diff --git a/waflib/Context.py b/waflib/Context.py 13index 761b521f..38ab03f1 100644 14--- a/waflib/Context.py 15+++ b/waflib/Context.py 16@@ -6,10 +6,17 @@ 17 Classes and functions enabling the command system 18 """ 19 20-import os, re, imp, sys 21+import os, re, sys 22 from waflib import Utils, Errors, Logs 23 import waflib.Node 24 25+if sys.hexversion > 0x3040000: 26+ import types 27+ class imp(object): 28+ new_module = lambda x: types.ModuleType(x) 29+else: 30+ import imp 31+ 32 # the following 3 constants are updated on each new release (do not touch) 33 HEXVERSION=0x2000c00 34 """Constant updated on new releases""" 35