New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 914950 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Python 3 syntax errors in inspector protocol

Reported by ccla...@me.com, Dec 13

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce the problem:
1. git clone https://chromium.googlesource.com/deps/inspector_protocol
2. flake8 . --select=E901,E999,F821,F822,F823 --show-source
3. 

What is the expected behavior?
Inspector protocol would be compatible with the current release of Python.

What went wrong?
Flake8 testing of inspector protocol
* print() is a function in Python 3
* xrange() was removed in Python 3 in favor of a reworked version of range()

./check_protocol_compatibility.py:478:46: E999 SyntaxError: invalid syntax
            print "  Public changes since %s:" % version
                                             ^
./code_generator.py:43:18: F821 undefined name 'xrange'
        for i in xrange(len(keys)):
                 ^
./pdl.py:162:51: E999 SyntaxError: invalid syntax
        print 'Error in %s:%s, illegal token: \t%s' % (file_name, i, line)
                                                  ^
2     E999 SyntaxError: invalid syntax
1     F821 undefined name 'xrange'
3

Did this work before? No 

Chrome version: <Copy from: 'about:version'>  Channel: n/a
OS Version: OS X 10.14
Flash Version: Shockwave Flash 32.0 r0
 
Components: Platform>DevTools
Components: -Platform>DevTools Infra>Client>Chrome
Components: -Infra>Client>Chrome
Owner: johannes@chromium.org
-> johannes appears to be the primary contributor to this repository over the last month.

Comment 5 Deleted

Cc: johannes@chromium.org
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
I'm assigning this to you. Please figure out what changes need to be made to the repro to fix this.

Comment 8 by ccla...@me.com, Jan 19 (4 days ago)

Any update on this issue.  I see two open PRs that seem simple and acceptable for closing these syntax errors.

Sign in to add a comment