-
Notifications
You must be signed in to change notification settings - Fork 760
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
pyclass: add sequence
option to implement sq_length
#2567
Merged
Merged
Conversation
This file contains 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
davidhewitt
force-pushed
the
pyclass-sequence
branch
from
August 19, 2022 13:12
04513ef
to
fd5d682
Compare
davidhewitt
force-pushed
the
pyclass-sequence
branch
from
August 20, 2022 06:14
fd5d682
to
fd8026c
Compare
messense
approved these changes
Aug 20, 2022
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.
👍
tuxu
added a commit
to tuxu/rustworkx
that referenced
this pull request
Nov 7, 2022
Add the `sequence` option to PyO3's `pyclass`, so that the `sq_length` slot is implemented [1]. Implementing this method is required for sequence types, or Python C API functions like `PySequence_Size` will fail with an error. The `reversed` built-in method relies on `PySequence_*` methods. A test reversing `NodeIndices` is added to guard against future violations of the sequence protocol. Fixes Qiskit#696. [1]: PyO3/pyo3#2567
mergify bot
pushed a commit
to Qiskit/rustworkx
that referenced
this pull request
Nov 9, 2022
* Fix support of sequence protocol for returned lists Add the `sequence` option to PyO3's `pyclass`, so that the `sq_length` slot is implemented [1]. Implementing this method is required for sequence types, or Python C API functions like `PySequence_Size` will fail with an error. The `reversed` built-in method relies on `PySequence_*` methods. A test reversing `NodeIndices` is added to guard against future violations of the sequence protocol. Fixes #696. [1]: PyO3/pyo3#2567 * Add release note Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
mergify bot
pushed a commit
to Qiskit/rustworkx
that referenced
this pull request
Nov 9, 2022
* Fix support of sequence protocol for returned lists Add the `sequence` option to PyO3's `pyclass`, so that the `sq_length` slot is implemented [1]. Implementing this method is required for sequence types, or Python C API functions like `PySequence_Size` will fail with an error. The `reversed` built-in method relies on `PySequence_*` methods. A test reversing `NodeIndices` is added to guard against future violations of the sequence protocol. Fixes #696. [1]: PyO3/pyo3#2567 * Add release note Co-authored-by: Matthew Treinish <mtreinish@kortar.org> (cherry picked from commit 4592bc0)
mergify bot
added a commit
to Qiskit/rustworkx
that referenced
this pull request
Nov 9, 2022
…735) * Bump pyo3 from 0.17.2 to 0.17.3 (#723) Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.17.2 to 0.17.3. - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](PyO3/pyo3@v0.17.2...v0.17.3) --- updated-dependencies: - dependency-name: pyo3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit d91f488) # Conflicts: # Cargo.lock # Cargo.toml * Fix support of sequence protocol for returned lists (#730) * Fix support of sequence protocol for returned lists Add the `sequence` option to PyO3's `pyclass`, so that the `sq_length` slot is implemented [1]. Implementing this method is required for sequence types, or Python C API functions like `PySequence_Size` will fail with an error. The `reversed` built-in method relies on `PySequence_*` methods. A test reversing `NodeIndices` is added to guard against future violations of the sequence protocol. Fixes #696. [1]: PyO3/pyo3#2567 * Add release note Co-authored-by: Matthew Treinish <mtreinish@kortar.org> (cherry picked from commit 4592bc0) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tino Wagner <ich@tinowagner.com> Co-authored-by: Ivan Carvalho <ivancarv@student.ubc.ca>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements
#[pyclass(sequence)]
as discussed at #2392 (comment)This is the last thing I think needs to get merged before we are ready to push the releases!