-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dict comprehension: invalid syntax in Python2.6 #31600
Comments
Oops. --- old/youtube-dl/youtube_dl/jsinterp.py
+++ new/youtube-dl/youtube_dl/jsinterp.py
@@ -262,7 +262,7 @@
if not expr:
return
# collections.Counter() is ~10% slower in both 2.7 and 3.9
- counters = {k: 0 for k in _MATCHING_PARENS.values()}
+ counters = dict((k, 0) for k in _MATCHING_PARENS.values())
start, splits, pos, delim_len = 0, 0, 0, len(delim) - 1
in_quote, escaping, skipping = None, False, 0
after_op, in_regex_char_group, skip_re = True, False, 0 On the other hand we've found a Python 2.6 user at last. Any more takers? |
Not fixed, please check again, tell me if was update, I will update again |
Unfortunately this doesn't finger whatever the actual problem is. It looks like there is a regular expression syntax issue for some Py <2.7.18 (possibly also in #31597). Are you able to debug the problem? If you have git it's probably easiest to check out the code in a user directory as described in the development section of the Manual. Otherwise you could work on the installed code as superuser.
--- old/youtube-dl/youtube_dl/__init__.py
+++ new/youtube-dl/youtube_dl/__init__.py
@@ -458,6 +458,7 @@
'You must provide at least one URL.\n'
'Type youtube-dl --help to see a list of all options.')
+ import pdb; pdb.set_trace()
try:
if opts.load_info_filename is not None:
retcode = ydl.download_with_info_file(expand_path(opts.load_info_filename))
Meanwhile I have a Python 2.7.1 that I can test on later. |
And yes, it is the problem that I mentioned: #31597 (comment). I'll close this in favour of #31597 since the original error reported was cleared. |
Finally I try iget update python from epel release and found python3.4 success installed. yum --disablerepo="" --enablerepo="epel" list python3 curl -O https://bootstrap.pypa.io/pip/3.4/get-pip.py pip install git+https://github.com/ytdl-org/youtube-dl.git@master#egg=youtube_dl which python update-alternatives --install /usr/bin/python python /usr/bin/python3.4 1 update-alternatives --display python |
The current git master including commit 6067451 fixes #31597 and should work on your original Python 2.6.2 installation. I'd be interested if you were able to test it; on the other hand if you're going to stay on 3.4 we can wipe off the only known 2.6 user. Actually, we don't have any easy way of testing 2.6, so it's supported in a slightly half-hearted way, by doing what should be the right thing in the code with compatibility shims and work-around expressions like the above fix. In case 3.4 isn't good enough for you: |
Originally posted by @s1sw4nto in #31530 (comment)
The text was updated successfully, but these errors were encountered: