From: Jaime Marquínez Ferrándiz Date: Mon, 3 Aug 2015 13:22:51 +0000 (+0200) Subject: Merge remote-tracking branch 'jaimemf/format_spec_groups' (closes #6124) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=03950c90f778293e65e2b79f2cf8ea3274695460;p=youtube-dl Merge remote-tracking branch 'jaimemf/format_spec_groups' (closes #6124) --- 03950c90f778293e65e2b79f2cf8ea3274695460 diff --cc youtube_dl/compat.py index e4b9286c0,bc218dd71..ace5bd716 --- a/youtube_dl/compat.py +++ b/youtube_dl/compat.py @@@ -426,16 -388,11 +426,21 @@@ else pass return _terminal_size(columns, lines) +try: + itertools.count(start=0, step=1) + compat_itertools_count = itertools.count +except TypeError: # Python 2.6 + def compat_itertools_count(start=0, step=1): + n = start + while True: + yield n + n += step + + if sys.version_info >= (3, 0): + from tokenize import tokenize as compat_tokenize_tokenize + else: + from tokenize import generate_tokens as compat_tokenize_tokenize + __all__ = [ 'compat_HTTPError', 'compat_basestring',