Giter Site home page Giter Site logo

gsqlite3's People

Contributors

craig8 avatar gilesbrown avatar gilessbrown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

craig8 naharp

gsqlite3's Issues

row_factory not working

When trying to set Connection.row_factory (i.e. to return result rows as a dictionary rather than tuple) it has no effect. Appears setting these class attributes is not setting the superclass attributes

sharing connection between threads

As i understand, we create connection in one thread and then execute query (reusing same connection) in another thread. From what i've read this is not safe when using sqlite3 library.

https://docs.python.org/3/library/sqlite3.html#sqlite3.connect

When using multiple threads with the same connection writing operations should be serialized by the user to avoid data corruption.

https://stackoverflow.com/a/22739924

It's not safe to share a connection between threads; at the very least you need to use a lock to serialize access

Python3 compatible version

Please, release Python3 compatible version. I tried id today with Python 3.6 and after installing git version, demo.py works:

python demo.py 
Populating 'demo.sqlite' ...
raw times: 0.988 0.902 0.954
gsqlite3: 10 loops,
best of 3: 90.2 msec per loop
raw times: 2.11 2.12 2.13
sqlite3: 10 loops,
best of 3: 211 msec per loop

But hte latest PyPi version (0.1.3) fails with #2

SystemError: (libev) error creating signal/async pipe: No error

Running demo.py on python 2.7.9/gevent 1.0.1

SystemError: (libev) error creating signal/async pipe: No error
Traceback (most recent call last):
  File "core.pyx", line 2044, in gevent.core._syserr_cb (gevent/gevent.core.c:34188)
  File "core.pyx", line 340, in gevent.core.loop._handle_syserr (gevent/gevent.core.c:6248)
  File "core.pyx", line 350, in gevent.core.loop.handle_error (gevent/gevent.core.c:6395)
  File "core.pyx", line 355, in gevent.core.loop._default_handle_error (gevent/gevent.core.c:6605)
  File "C:\Python27\lib\traceback.py", line 128, in print_exception
    _print(file, line, '')
  File "C:\Python27\lib\traceback.py", line 13, in _print
    file.write(str+terminator)
KeyboardInterrupt
(libev) error creating signal/async pipe: No error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.