8000 bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once by orenmn · Pull Request #3968 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once #3968

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

Merged
merged 6 commits into from
Nov 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve the test.
  • Loading branch information
orenmn committed Oct 14, 2017
commit 82dfbf86d770ee814924a5f8557cf4921a8eb275
3 changes: 2 additions & 1 deletion Lib/sqlite3/test/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import unittest
import sqlite3 as sqlite
import weakref
from test import support

class RegressionTests(unittest.TestCase):
def setUp(self):
Expand Down Expand Up @@ -389,7 +390,7 @@ def callback(*args):
ref = weakref.ref(cur, callback)
cur.__init__(con)
del cur
del ref # shouldn't crash
support.gc_collect() # shouldn't crash


def suite():
Expand Down
0