[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset fff8fab1ce4af208cd9c6cd84a8be626a1b744d8 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. 
(GH-8113). (GH-10946) (GH-10955)
https://github.com/python/cpython/commit/fff8fab1ce4af208cd9c6cd84a8be626a1b744d8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset fdf505000f135df3bdae08697b2a324d8f046768 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. 
(GH-8113). (GH-10946) (GH-10952)
https://github.com/python/cpython/commit/fdf505000f135df3bdae08697b2a324d8f046768


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10204

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10202

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1de91a0032fed500ddd3d8c4fb7a38c0b8719f67 by Serhiy Storchaka in 
branch '3.7':
bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. 
(GH-8113). (GH-10946)
https://github.com/python/cpython/commit/1de91a0032fed500ddd3d8c4fb7a38c0b8719f67


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10196

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 5b25f1d03100e2283c1b129d461ba68ac0169a14 by Serhiy Storchaka 
(Sergey Fedoseev) in branch 'master':
bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. 
(GH-8113)
https://github.com/python/cpython/commit/5b25f1d03100e2283c1b129d461ba68ac0169a14


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-07-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +ghaering, serhiy.storchaka
versions: +Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-07-05 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


--
keywords: +patch
pull_requests: +7702
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-07-05 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

In [1]: import sqlite3

In [2]: con = sqlite3.connect(':memory:')

In [3]: con.execute('SELECT f()')
---
OperationalError  Traceback (most recent call last)
 in ()
> 1 con.execute('SELECT f()')

OperationalError: no such function: f

In [4]: con.create_function('f', 0, [])
---
TypeError Traceback (most recent call last)
 in ()
> 1 con.create_function('f', 0, [])

TypeError: unhashable type: 'list'

In [5]: con.execute('SELECT f()')
---
OperationalError  Traceback (most recent call last)
 in ()
> 1 con.execute('SELECT f()')

OperationalError: user-defined function raised exception


It seems that something like this cause segmentation fault, but I can't 
reproduce it.
Some other similar sqlite functions also affected. They can be easily modified 
to accept unhashable objects, but probably it should be done in another issue.

--
components: Extension Modules
messages: 321094
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: sqlite's create_function() raises exception on unhashable callback, but 
creates function
type: behavior
versions: Python 2.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com