The Wayback Machine - https://web.archive.org/web/20221223170357/https://github.com/python/cpython/pull/21998
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

bpo-41662: Fix bugs in binding parameters in sqlite3 #21998

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Aug 29, 2020

  • When the parameters argument is a list, correctly handle the case
    of changing it during iteration.
  • When the parameters argument is a custom sequence, no longer
    override an exception raised in __len__().

https://bugs.python.org/issue41662

* When the parameters argument is a list, correctly handle the case
  of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
  override an exception raised in ``__len__()``.
Copy link
Member

@berkerpeksag berkerpeksag left a comment

Not sure how common is the second case, but I think it wouldn't hurt to have a test for the first case. Other than that, it looks good to me!

@@ -0,0 +1 @@
Fixed two rare bugs in binding parameters in the :mod:`sqlite3` module.
Copy link
Member

@berkerpeksag berkerpeksag Aug 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this doesn't give readers any meaningful information so if you think it's not easy to explain what we are fixing here, I'd say it's OK to not add a NEWS entry.

Copy link
Member Author

@serhiy-storchaka serhiy-storchaka Sep 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it look better now? I added two separate entries for two bugs.

@serhiy-storchaka serhiy-storchaka merged commit 0b419b7 into python:master Sep 17, 2020
3 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Sep 17, 2020

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒🤖

@serhiy-storchaka serhiy-storchaka deleted the sqlite-bind-parameters branch Sep 17, 2020
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 17, 2020
* When the parameters argument is a list, correctly handle the case
  of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
  override an exception raised in ``__len__()``.
(cherry picked from commit 0b419b7)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot
Copy link

bedevere-bot commented Sep 17, 2020

GH-22289 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 17, 2020
* When the parameters argument is a list, correctly handle the case
  of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
  override an exception raised in ``__len__()``.
(cherry picked from commit 0b419b7)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-bot
Copy link

bedevere-bot commented Sep 17, 2020

GH-22290 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Sep 17, 2020
* When the parameters argument is a list, correctly handle the case
  of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
  override an exception raised in ``__len__()``.
(cherry picked from commit 0b419b7)

Co-authored-by: Serhiy Storchaka <[email protected]>
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
* When the parameters argument is a list, correctly handle the case
  of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
  override an exception raised in ``__len__()``.
methane pushed a commit that referenced this pull request Oct 26, 2020
* When the parameters argument is a list, correctly handle the case
  of changing it during iteration.
* When the parameters argument is a custom sequence, no longer
  override an exception raised in ``__len__()``.
(cherry picked from commit 0b419b7)

Co-authored-by: Serhiy Storchaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants