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

Re-assess bug-related TODOs in scripts #240

Open
philippedistributive opened this issue Feb 9, 2024 · 3 comments
Open

Re-assess bug-related TODOs in scripts #240

philippedistributive opened this issue Feb 9, 2024 · 3 comments
Assignees
Milestone

Comments

@philippedistributive
Copy link
Collaborator

philippedistributive commented Feb 9, 2024

Issue type

Other

How did you install PythonMonkey?

None

OS platform and distribution

No response

Python version (python --version)

No response

PythonMonkey version (pip show pythonmonkey)

No response

Bug Description

These TODO comments were left around. Are we now able to act on them?

  • require.py:
    A better implementation in Python that doesn't leak global symbols should be possible once some PythonMonkey bugs are fixed.

  • global-init.js:
    due to current bugs in PythonMonkey, we can't access the cache property of require because it is a JS function wrapped in a Python function wrapper exposed to script as a native function.

  • pmjs.py:
    The global require is to the JS function using a trick instead of a JS-wrapped-Python-wrapped function

Standalone code to reproduce the issue

No response

Relevant log output or backtrace

No response

Additional info if applicable

No response

What branch of PythonMonkey were you developing on? (If applicable)

No response

@wesgarland
Copy link
Collaborator

I fixed the require.py ones in my branch yesterday, wes/DCP-4054/make-dcp-client-grok-pythonmonkey

I also noticed that we are leaking a util symbol as a side effect of console import, I think, as well as some XMLHttpRequest* symbols that I don't think should be global. Always a good idea to have a look at Object.keys(globalThis) after writing new code.

@wesgarland
Copy link
Collaborator

The XMLHttpRequest* symbols are okay - they are present in the browser

@wesgarland wesgarland moved this from Backlog to Ready To Do in PythonMonkey Kanban Board Mar 14, 2024
@karenbatch1997 karenbatch1997 moved this from Ready To Do to In progress in PythonMonkey Kanban Board Mar 20, 2024
@karenbatch1997 karenbatch1997 added this to the v1.0.0 milestone Mar 20, 2024
@zollqir zollqir moved this from In progress to Ready To Do in PythonMonkey Kanban Board May 23, 2024
@github-project-automation github-project-automation bot moved this from Ready To Do to Done in PythonMonkey Kanban Board Jul 16, 2024
@philippedistributive
Copy link
Collaborator Author

only the one in global-init.js remains

@github-project-automation github-project-automation bot moved this from Done to Backlog in PythonMonkey Kanban Board Jul 16, 2024
@philippedistributive philippedistributive moved this from Backlog to Ready To Do in PythonMonkey Kanban Board Jul 16, 2024
@philippedistributive philippedistributive modified the milestones: v1.0.0, v1.0.1 Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready To Do
Development

No branches or pull requests

4 participants