Author meador.inge
Recipients larry, meador.inge
Date 2014-01-15.02:19:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389752406.65.0.862603230886.issue20178@psf.upfronthosting.co.za>
In-reply-to
Content
Attached is a first cut for sqlite3.  It is generally OK, but I have the following
nits:

    * As is probably expected, __init__ and __call__ procs can't be converted.

    * sqlite3.Connection.{execute, executemany, executescript} don't use
      PyArg_Parse*.

    * The clinic version of 'sqlite3.adapt' has an argument string of "O|OO".
      The first optional parameter defaults to 'pysqlite_PrepareProtocolType'
      in C and 'sqlite3.ProtocolType' in Python.  However, I don't know how to
      represent the Python value because Python default values are 'eval'd by
      clinic *and* the 'sqlite3' module is not imported for the eval.

    * The clinic version of 'sqlite3.Cursor.fetchmany' has an arguments string
      of "|i".  The first parameter defaults to
      '((pysqlite_Cursor *)self)->arraysize' in C and 'self.arraysize' in
      Python.  I don't know how to express the Python initialization.

    * 'sqlite3.complete' uses 'as module_complete' because 'sqlite3_complete'
      is a public SQLite API function: http://www.sqlite.org/c3ref/complete.html.
      I used 'as' on all the other functions in 'module.c' as well.  Mainly
      for local consistency.

    * '_pysqlite_query_execute' required a little refactoring due to the fact
      that it is a utility function used to implement 'sqlite3.Cursor.execute'
      and 'sqlite3.Cursor.executemany'.  'PyArg_ParseTuple' was being called in
      different way depending on a control parameter.

    * I didn't convert 'sqlite3.Cursor.setinputsizes' and
      'sqlite3.Cursor.setoutputsize' because they share a docstring and
      simple no-op method def.

    * I didn't convert 'sqlite.connect' because it would have required packaing
      the arguments back up to pass to 'PyObject_Call'.
History
Date User Action Args
2014-01-15 02:20:06meador.ingesetrecipients: + meador.inge, larry
2014-01-15 02:20:06meador.ingesetmessageid: <1389752406.65.0.862603230886.issue20178@psf.upfronthosting.co.za>
2014-01-15 02:20:06meador.ingelinkissue20178 messages
2014-01-15 02:20:06meador.ingecreate