projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'jaimemf/format_spec_groups' (closes #6124)
[youtube-dl]
/
youtube_dl
/
compat.py
diff --git
a/youtube_dl/compat.py
b/youtube_dl/compat.py
index e4b9286c06e12d967f60b5fbcf2c691802684163..ace5bd716aac0161b356625260f1138687568314 100644
(file)
--- a/
youtube_dl/compat.py
+++ b/
youtube_dl/compat.py
@@
-436,6
+436,11
@@
except TypeError: # Python 2.6
yield n
n += step
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',
__all__ = [
'compat_HTTPError',
'compat_basestring',
@@
-457,6
+462,7
@@
__all__ = [
'compat_socket_create_connection',
'compat_str',
'compat_subprocess_get_DEVNULL',
'compat_socket_create_connection',
'compat_str',
'compat_subprocess_get_DEVNULL',
+ 'compat_tokenize_tokenize',
'compat_urllib_error',
'compat_urllib_parse',
'compat_urllib_parse_unquote',
'compat_urllib_error',
'compat_urllib_parse',
'compat_urllib_parse_unquote',