Tue, 09 Apr 2019 19:14:11 +0200
Removed the still existing six dependency of the asttokens package.
ThirdParty/asttokens/asttokens/util.py | file | annotate | diff | comparison | revisions |
--- a/ThirdParty/asttokens/asttokens/util.py Tue Apr 09 19:13:26 2019 +0200 +++ b/ThirdParty/asttokens/asttokens/util.py Tue Apr 09 19:14:11 2019 +0200 @@ -12,10 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. +import sys +# define some compatibility methods like it is done in six. +if sys.version_info[0] == 2: + # Python 2 + def iteritems(d): + return d.iteritems() +else: + # Python 3 + def iteritems(d): + return iter(d.items()) + import ast import collections import token -from six import iteritems def token_repr(tok_type, string):