cubicweb #10887949 repository internal cnx fails to close properly with sqlite backend [rejected]

Using a repository internal_cnx from within a threaded task with sqlite backend leads to the following error.

File "/home/dlaxalde/projects/pnia/pyramid-pnia_atelier/pyramid_pnia_atelier/resources.py", line 179, in run_validation
cnx.commit()
File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/home/dlaxalde/projects/pnia/venv/local/lib/python2.7/site-packages/cubicweb/server/repository.py", line 708, in internal_cnx
yield cnx
File "/home/dlaxalde/projects/pnia/venv/local/lib/python2.7/site-packages/cubicweb/server/session.py", line 401, in __exit__
self.cnxset.cnxset_freed()
File "/home/dlaxalde/projects/pnia/venv/local/lib/python2.7/site-packages/cubicweb/server/sqlutils.py", line 285, in cnxset_freed
self.cu.close()
AttributeError: 'NoneType' object has no attribute 'close'

prioritynormal
typebug
done in<not specified>
load0.000
load left0.000
closed by<not specified>
patch[server/sqlutils] Ensure SQlite connection wrapper has a valid cursor [rejected]