Skip to content

Executing GraalPython unconditionally creates __pycache__ if file name "sitecustomize.py" exists #207

@oroppas

Description

@oroppas
$ touch sitecustomize.py
$ graalpython
Python 3.8.5 (Fri Apr 30 13:16:00 JST 2021)
[Graal, GraalVM CE, Java 11.0.10] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

Tracing by graalpython -v,

...
# code object from /home/ryuta/tmp/sitecustomize.py
# created '/home/ryuta/tmp/__pycache__/sitecustomize.graalpython-38.pyc'
import 'sitecustomize' # <importlib._bootstrap_external.SourceFileLoader object at 0xda59018>
import 'site' # <importlib._bootstrap_external.SourceFileLoader object at 0x607cc131>
Python 3.8.5 (Fri Apr 30 13:16:00 JST 2021)
[Graal, GraalVM CE, Java 11.0.10] on linux
Type "help", "copyright", "credits" or "license" for more information.
# /home/ryuta/packages/graalvm/graal/graal/sdk/mxbuild/linux-amd64/GRAALVM_845C45B806_JAVA11/graalvm-845c45b806-java11-21.2.0-dev/languages/python/lib-python/3/__pycache__/rlcompleter.graalpython-38.pyc matches /home/ryuta/packages/graalvm/graal/graal/sdk/mxbuild/linux-amd64/GRAALVM_845C45B806_JAVA11/graalvm-845c45b806-java11-21.2.0-dev/languages/python/lib-python/3/rlcompleter.py
# code object from '/home/ryuta/packages/graalvm/graal/graal/sdk/mxbuild/linux-amd64/GRAALVM_845C45B806_JAVA11/graalvm-845c45b806-java11-21.2.0-dev/languages/python/lib-python/3/__pycache__/rlcompleter.graalpython-38.pyc'
import 'rlcompleter' # <importlib._bootstrap_external.SourceFileLoader object at 0x145a36cc>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions