You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Variable annotation triggers exception 'Subscript' object has no attribute 'id' #93
changed the title [-]Variable annotation triggers exception 'Suscript' object has no attribute 'id'[/-][+]Variable annotation triggers exception 'Subscript' object has no attribute 'id'[/+]on Jun 7, 2021
Hmm - perhaps this error only happens with lower version of Python - will need to check. As it stands, it looks promising that no changes to the Pynsource parser are needed, only a Python version bump. That is, assuming the above source code reproduces the problem.
Update: Tricky variable annotation, Actually turns out that on my mac, it used to fail ONLY in Python 3.9 but passed in 3.7 and 3.8.
Tested parsing this on Mac using official release which uses Python 3.7 internally - worked ok.
But on Linux the official snap release does exhibit the problem, but running under Python 3.7 from source code does not. Mysterious. Will investigate further.
Activity
[-]Variable annotation triggers exception 'Suscript' object has no attribute 'id'[/-][+]Variable annotation triggers exception 'Subscript' object has no attribute 'id'[/+]abulka commentedon Jun 7, 2021
Thank you for reporting this.
abulka commentedon Jun 29, 2021
Tried to reproduce this running under Python 3.9 parsing the following:
and got no errors.
Hmm - perhaps this error only happens with lower version of Python - will need to check. As it stands, it looks promising that no changes to the Pynsource parser are needed, only a Python version bump. That is, assuming the above source code reproduces the problem.
Update: Tricky variable annotation, Actually turns out that on my mac, it used to fail ONLY in Python 3.9 but passed in 3.7 and 3.8.
test created for issue #93
abulka commentedon Jun 30, 2021
Tested parsing this on Mac using official release which uses Python 3.7 internally - worked ok.
But on Linux the official snap release does exhibit the problem, but running under Python 3.7 from source code does not. Mysterious. Will investigate further.
better tests and parsing for issue #85, #93, #94 - tests pass under p…
abulka commentedon Jul 1, 2021
Changed visit_AnnAssign() in parser to fix this, passes now under all Python versions.
abulka commentedon Jul 8, 2021
Latest master branch and
1.78 betabinary release should have fixed this.Official
1.78release only a few days away.