Skip to content
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

findLocalScopes(node, null) provides all local variables in the scope ignoring node's position #1

Open
numberpi opened this issue Apr 20, 2018 · 1 comment

Comments

@numberpi
Copy link
Contributor

def myfunc(arg):
    y = 1
    x = 2

findLocalScopes(node, null) returns always [arg, y, x] for a node inside myfunc(arg)

See SLLanguage.findLocalScopes() how it should be done collecting only the local variables already defined.

@eregon
Copy link
Member

eregon commented Apr 20, 2018

Related: oracle/truffleruby#1335

@timfel timfel added this to the rc2 milestone May 17, 2018
@timfel timfel modified the milestones: rc2, rv11, rc11 Nov 23, 2018
@timfel timfel modified the milestones: rc11, rc12 Jan 23, 2019
@msimacek msimacek removed this from the rc12 milestone Oct 26, 2020
graalvmbot pushed a commit that referenced this issue May 18, 2022
Merge in ~PETR.PISL_ORACLE.COM/pythonjavapegparser from tim/cpython-tokenizer-port to master

* commit 'bb1ca47d8e6bdc3c9d01da77568c0df0df9ef2f5':
  add doc
  get tests to pass again
  fix a few warnings and let tests run again
  fix syntax error range for old style octal numbers
  faithfully reproduce cpython's tokenizer.c in our Tokenizer.java
  make our tokenizer relate much more closely to CPython's for easier maintenance
  begin tokenizer.c porting
  implement identifier verification and async/await hacks from cpython
  suppress warnings in generated code
The-Alchemist added a commit to The-Alchemist/graalpython that referenced this issue Mar 15, 2023
`utils.py` has changed slightly:

https://github.com/Ousret/charset_normalizer/blob/3.1.0/charset_normalizer/utils.py

```
Collecting charset-normalizer<4.0,>=2.0
  Downloading charset_normalizer-3.1.0-py3-none-any.whl (46 kB)
     |████████████████████████████████| 46 kB 631 kB/s
Looking for GraalPy patches for charset_normalizer
Patching package charset_normalizer using /Library/Java/JavaVirtualMachines/graalvm-ce-java19-22.3.1/Contents/Home/languages/python/lib-graalpython/patches/charset_normalizer/whl/charset_normalizer.patch
patching file charset_normalizer/utils.py
Hunk oracle#1 FAILED at 11.
Hunk oracle#2 succeeded at 258 with fuzz 2 (offset 11 lines).
1 out of 2 hunks FAILED -- saving rejects to file charset_normalizer/utils.py.rej
```
graalvmbot pushed a commit that referenced this issue Apr 24, 2024
PullRequest: graalpython/3287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants