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

Python Feature Request regarding Dict subclasses #257

Open
wesgarland opened this issue Mar 1, 2024 · 4 comments
Open

Python Feature Request regarding Dict subclasses #257

wesgarland opened this issue Mar 1, 2024 · 4 comments
Assignees

Comments

@wesgarland
Copy link
Collaborator

Issue type

Bug

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

This was an explicit design goal and I just found out that it doesn't work anymore.

If we can't create Dicts from JS, we can't use Python libraries that use Dicts.

Ironically, one such library is PythonMonkey, which uses Dicts to pass evaluation options to spidermonkey. And because JSObjectProxy is not a py_dict, PyDict_GetItemString doesn't find the filename, which is why the stack traces for the modules no longer include their filenames.

There must be a solution to this problem.

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

@philippedistributive philippedistributive self-assigned this Mar 1, 2024
@philippedistributive
Copy link
Collaborator

This is incorrect:
"Unfortunately, we can no longer create dicts from JS, so option processing does not work"
We clearly can. We are just missing compatibility with PyDict_GetItemString as described by Caleb
We made some decisions for Full compatibility with Dicts that are not under question now that a given feature does not work for well-known reasons

@Distributive-Network Distributive-Network deleted a comment from hjdhnx Mar 4, 2024
@philippedistributive
Copy link
Collaborator

We will post a feature request to the relevant Python forum for this one

@philippedistributive
Copy link
Collaborator

philippedistributive commented Mar 13, 2024

let's keep it open until post has been done and as a follow-up on the post

@karenbatch1997 karenbatch1997 changed the title Reflect JS Objects into Python as Dicts Python Feature Request regarding Dict subclasses Mar 20, 2024
@philippedistributive philippedistributive added this to the v1.0.0 milestone Apr 9, 2024
@zollqir
Copy link
Collaborator

zollqir commented Apr 10, 2024

@philippedistributive Wes says to, if you like, make a separate ticket for posting a feature request to the python team, but this ticket should not be blocking v1.0.0

@zollqir zollqir closed this as completed Apr 10, 2024
@philippedistributive philippedistributive removed this from the v1.0.0 milestone Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

3 participants