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

Use safe repr if ArraySchema was not properly constructed #1896

Merged

Conversation

nguyenv
Copy link
Collaborator

@nguyenv nguyenv commented Feb 7, 2024

  • We cannot rely solely on checking if the context exists for the ArraySchema. We call the parent lt.ArraySchema constructor at the beginning of __init__ which does set a valid context and creates the Pybind11 object. Then we set the other schema properties onto that object. If any of the other properties the user passed in are invalid (like the cell_order or tile_order), then simply checking the existence of a context does not work. Fortunately with the ArraySchema, there is an lt.ArraySchema._check to ensure if it a properly constructor schema
  • I am not sure what happened, but the safe reprs which were added in Use Safe repr If Parent Pybind11 Constructor Fails #1545 all disappeared. I'm assuming a PR was not merged correctly after Use Safe repr If Parent Pybind11 Constructor Fails #1545, but they have now been restored

Copy link

This pull request has been linked to Shortcut Story #40627: [py] example crashes Python kernel.

@nguyenv nguyenv requested a review from ihnorton February 7, 2024 18:10
@ihnorton ihnorton merged commit a355893 into dev Feb 8, 2024
34 checks passed
@ihnorton ihnorton deleted the viviannguyen/sc-40627/py-example-crashes-python-kernel branch February 8, 2024 19:03
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.

2 participants