Conversation
davidhewitt
left a comment
There was a problem hiding this comment.
A migration guide is a really good idea. This is really well written and has lots of good examples!
I made some suggestions to small bits of the wording.
|
@davidhewitt |
guide/src/migration.md
Outdated
| a [`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) like object wrapper | ||
| for dynamically ensuring | ||
| [Rust's rule of Reference](https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#the-rules-of-references). | ||
| [Rust's rules of references](https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#the-rules-of-references). |
There was a problem hiding this comment.
I would be more explicit and say "rules regarding aliasing of references".
There was a problem hiding this comment.
Yeah, but I want to use the same expression as the rustbook here
There was a problem hiding this comment.
Sure, I just don't think "the rules of references" is a standing term in the community. I wouldn't immediately know what it refers to until clicking the link.
There was a problem hiding this comment.
Why not have both and write something like
RefCell-like object wrapper for ensuring Rust's rules regarding aliasing of references are upheld.
For more detail, see the
[Rust Book's section on Rust's rules of references](https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#the-rules-of-references)
Co-Authored-By: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
Co-Authored-By: Georg Brandl <georg@python.org>
|
Pushed some changes for rust-numpy. |
guide/src/migration.md
Outdated
|
|
||
| ### PyCell | ||
| PyO3 0.9 introduces [`PyCell`](https://pyo3.rs/master/doc/pyo3/pycell/struct.PyCell.html), which is | ||
| a [`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) like object wrapper |
There was a problem hiding this comment.
| a [`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html) like object wrapper | |
| a [`RefCell`](https://doc.rust-lang.org/std/cell/struct.RefCell.html)-like object wrapper |
| fn as_ref(&self, _py: Python) -> &PyCell<T> { | ||
| impl<T> AsPyRef for Py<T> | ||
| where | ||
| T: PyTypeInfo, |
Cargo.toml
Outdated
| num-bigint = { version = ">= 0.2", optional = true } | ||
| num-complex = { version = ">= 0.2", optional = true } | ||
| num-traits = "0.2.8" | ||
| indoc = "^0.3.4" |
There was a problem hiding this comment.
^ is the default operator, this doesn't change anything.
There was a problem hiding this comment.
Thanks, I misunderstood that it is equal to "=="
|
I decided to merge this PR now and will open a separate PR for the release for other PRs to sync with the master easier. |
Resolves #785
I wrote a migration guide in Appendix B of the guide.
Now only pushed the migration guide, but I'm going to use this branch for the release.