-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Make BitArray.{slice_bits,slice_shots,__getitem__}
raise IndexError
when indices are not valid (backport #12755)
#12844
Conversation
Cherry-pick of bfd2eea has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 10147304891Details
💛 - Coveralls |
…ndexErro…" (#12929) This reverts commit 4f09f57. This commit reverts #12844, the original PR was making an API change as a bugfix (to make the api consistent with other similar APIs). However it is still a change in the defined stable interface of the class as documented and we shouldn't be changing that per the stability guidelines of the project. Especially in a patch version bugfix release. We can debate whether the change is acceptable for 1.2.0 independently but for a patch version it is definitely out of scope.
Summary
This PR updates
BitArray.{slice_bits,slice_shots,__getitem__}
to raiseIndexError
if indices are not valid.Especially,
__getitem__
raise IndexError with appropriate message as follows (ba[0, 0, 0]
case).main branch
this PR
Details and comments
This is an automatic backport of pull request #12755 done by [Mergify](https://mergify.com).