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

Fix iterrowslice to conform with Python 3.7 PEP 479 which transforms … #613

Merged

Conversation

arturponinski
Copy link
Collaborator

@arturponinski arturponinski commented Feb 8, 2022

…StopIteration in generators to RuntimeError exceptions

This PR has the objective of aligning iterrowslice with Python 3.7 PEP 479 behavior, which transforms StopIteration in generators to RuntimeError exceptions.

Changes

  1. Added exception handler for the first yield

Checklist

Use this checklist for assuring the quality of pull requests that include new code and or make changes to existing code.

  • Source Code rules apply:
    • Includes unit tests
    • New functions have docstrings with examples that can be run with doctest
    • New functions are included in API docs
    • Docstrings include notes for any changes to API or behaviour
    • All changes are documented in docs/changes.rst
  • Versioning and history tracking rules apply:
    • Using atomic commits when possible
    • Commits are reversible when possible
    • There is no incomplete changes in the pull request
    • There is no accidental garbage added in source code
  • Testing rules apply:
    • Tested locally using tox / pytest
    • Automated testing passes (see CI)
    • Unit test coverage has not decreased (see Coveralls)
  • State of these changes is:
    • Just a proof of concept
    • Work in progress / Further changes needed
    • Ready to review
    • Ready to merge

@arturponinski arturponinski linked an issue Feb 8, 2022 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Feb 8, 2022

Pull Request Test Coverage Report for Build 1814984436

  • 15 of 15 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.008%) to 91.983%

Totals Coverage Status
Change from base Build 1814968930: 0.008%
Covered Lines: 12495
Relevant Lines: 13584

💛 - Coveralls

@juarezr juarezr added the Usability Improvement that benefit petl usage for end users label Feb 8, 2022
…StopIteration in generators to RuntimeError exceptions
@arturponinski arturponinski merged commit 96cdc78 into petl-developers:master Feb 8, 2022
augustomen added a commit to cleanlist/petl that referenced this pull request Jul 10, 2023
Applies the same fix that was done for iterrowslice to other functions that may receive an empty (as in headerless) table as input.
petl-developers#613
augustomen added a commit to cleanlist/petl that referenced this pull request Jul 11, 2023
Applies the same fix that was done for iterrowslice to other functions that may receive an empty (as in headerless) table as input.
petl-developers#613
augustomen added a commit to cleanlist/petl that referenced this pull request Jul 11, 2023
Applies the same fix that was done for iterrowslice to other functions that may receive an empty (as in headerless) table as input.
petl-developers#613
augustomen added a commit to cleanlist/petl that referenced this pull request Jul 11, 2023
Applies the same fix that was done for iterrowslice to other functions that may receive an empty (as in headerless) table as input.
petl-developers#613
juarezr pushed a commit to juarezr/petl that referenced this pull request Aug 22, 2023
Applies the same fix that was done for iterrowslice to other functions that may receive an empty (as in headerless) table as input.
petl-developers#613
juarezr pushed a commit that referenced this pull request Aug 22, 2023
Applies the same fix that was done for iterrowslice to other functions that may receive an empty (as in headerless) table as input.
#613
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Usability Improvement that benefit petl usage for end users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iterrowslice raises RuntimeError isntead of StopIteration
3 participants