-
Notifications
You must be signed in to change notification settings - Fork 893
Opt out of PyCell borrow tracking #1979
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7f31000
Implement by default immutable pyclasses
mejrs 4adb257
Fix method names
mejrs 1d5df1b
Revert "Fix method names"
mejrs a28be4d
Revert "Implement by default immutable pyclasses"
mejrs 0fa03a6
Implement opt-in immutable pyclasses
mejrs a35dc97
Update guide macro output
mejrs 3bf9ef0
Merge branch 'main' into immutable
mejrs a44e2f8
Fix formatting.
mejrs 5648815
part1
mejrs 63eda2f
part 2
mejrs 64d85e5
part 3
mejrs 7520b49
Implement opt-in immutable pyclasses
mejrs 6f39dea
finish off implementation
davidhewitt 9ab1e69
Merge branch 'immutable' of https://github.com/mejrs/pyo3 into immutable
mejrs 086424b
Merge branch 'main' of https://github.com/mejrs/pyo3 into immutable
mejrs b7745df
Fix everything
mejrs bc6bd60
Merge branch 'main' into immutable
mejrs 53a642e
Fix ui test
mejrs 7118e94
Merge branch 'main' into immutable
davidhewitt e9bd41e
better mutability inheritance rules
davidhewitt b196aa1
remove some redundant traits
davidhewitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure whether this is sufficient.
I didn't see another obvious way around
unsendableother than to re-enable borrow tracking.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this is unfortunate and would be nice to resolve rather than forcing mutability silently. I think if we start with
#[pyclass(immutable)]for now then we can simply start by raising a compile error thatextends/unsendableandimmutableare incompatible. We could then create issues to track and fix this properly later with some follow-up refactoring before we complete the change to#[pyclass(mutable)].