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

Philippe/fix/176 plus #204

Merged
merged 62 commits into from
Jan 24, 2024
Merged

Philippe/fix/176 plus #204

merged 62 commits into from
Jan 24, 2024

Conversation

philippedistributive
Copy link
Collaborator

@philippedistributive philippedistributive commented Dec 22, 2023

Enhances the Proxy that enables Python List to JS Array conversion behavior, when lists are used in an array context

closes #176
closes #201

Copy link
Collaborator

@caleb-distributive caleb-distributive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few missing tests to write, .sort() behaviour is a bit off, and I think using array_copy_func in PyProxyHandler.cc can lead to incorrect behaviour on a number of methods, particularly in the case where the method takes a callback and the callback mutates the array. See my comments for more details.

tests/python/test_arrays.py Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
src/PyProxyHandler.cc Outdated Show resolved Hide resolved
src/PyProxyHandler.cc Outdated Show resolved Hide resolved
src/PyProxyHandler.cc Outdated Show resolved Hide resolved
src/PyProxyHandler.cc Outdated Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
philippedistributive and others added 13 commits January 3, 2024 16:15
Co-authored-by: Caleb Aikens <caleb@distributive.network>
Co-authored-by: Caleb Aikens <caleb@distributive.network>
Co-authored-by: Caleb Aikens <caleb@distributive.network>
Co-authored-by: Caleb Aikens <caleb@distributive.network>
Co-authored-by: Caleb Aikens <caleb@distributive.network>
Co-authored-by: Caleb Aikens <caleb@distributive.network>
Co-authored-by: Caleb Aikens <caleb@distributive.network>
setup.sh Outdated Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
assert str(type(e)) == "<class 'pythonmonkey.SpiderMonkeyError'>"
assert str(e).__contains__("TypeError: forEach: At least 1 argument required, but only 0 passed")

#map
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Responded above

tests/python/test_arrays.py Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
tests/python/test_arrays.py Show resolved Hide resolved
tests/python/test_arrays.py Outdated Show resolved Hide resolved
src/PyProxyHandler.cc Show resolved Hide resolved
Copy link
Collaborator

@caleb-distributive caleb-distributive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@philippedistributive philippedistributive merged commit 71a0483 into main Jan 24, 2024
24 checks passed
@philippedistributive philippedistributive deleted the philippe/fix/176-plus branch January 24, 2024 18:35
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

Successfully merging this pull request may close these issues.

Implement support for JS methods on Python objects Lists are converted to objects instead of arrays
2 participants