[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-08 Thread Berker Peksag

Berker Peksag added the comment:

> row_factory seems to be another parameter that can be set in the Cursor 
> object.
> https://github.com/python/cpython/blob/master/Modules/_sqlite/cursor.c#L65 
> 
> This can addressed in a different issue/ pr.

Like I already said in msg290943, Cursor.row_factory is kept for backwards 
compatibility reasons and it shouldn't be documented.

--

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-03 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
type: enhancement -> behavior

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-03 Thread Senthil Kumaran

Senthil Kumaran added the comment:


New changeset 0f9ceaf322cc9358373167115fd4c21ab2d9ad50 by Senthil Kumaran in 
branch '3.5':
bpo-29725: DOC: add text for arraysize in sqlite3.Cursor (#947) (#986)
https://github.com/python/cpython/commit/0f9ceaf322cc9358373167115fd4c21ab2d9ad50


--

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-03 Thread Senthil Kumaran

Senthil Kumaran added the comment:


New changeset cb1e002c07622e027e80a3843d27a623d1617430 by Senthil Kumaran in 
branch '3.6':
bpo-29725: DOC: add text for arraysize in sqlite3.Cursor (#947) (#985)
https://github.com/python/cpython/commit/cb1e002c07622e027e80a3843d27a623d1617430


--

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-03 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
pull_requests: +1158

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-03 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
pull_requests: +1157

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-03 Thread Senthil Kumaran

Senthil Kumaran added the comment:


New changeset 02e12138000da834f23719521a011fa93763384d by Senthil Kumaran 
(csabella) in branch 'master':
bpo-29725: DOC: add text for arraysize in sqlite3.Cursor (#947)
https://github.com/python/cpython/commit/02e12138000da834f23719521a011fa93763384d


--

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-03 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Thanks for working on this.

row_factory seems to be another parameter that can be set in the Cursor object. 
https://github.com/python/cpython/blob/master/Modules/_sqlite/cursor.c#L65 

This can addressed in a different issue/ pr.

--
nosy: +orsenthil

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-01 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Thank you so much for being patient with me and explaining that.

--

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-04-01 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1129

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-31 Thread Berker Peksag

Berker Peksag added the comment:

> There is another attribute called row_factory in the cursor structure
> that isn't in the docs.  There is a row_factory defined in the docs,
> but that one is for the connection structure.  Should it be added under
> cursor as well?

Thank you for working on this issue, Cheryl. Cursor.row_factory is there for 
backwards compatibility reasons so we can't remove it until we retire Python 2.

For example, pysqlite has already been removed it in version 2.8.0 [1] but they 
don't have a strict backwards compatibility policy since their user base is 
much smaller than us and it only supports Python 2.

[1] 
https://github.com/ghaering/pysqlite/commit/10dbbe4cca7487a3c65776186b3fb4ceeab5e8fa

--

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-31 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Hi Aviv,

Thank you so much for explaining that!  It's obvious to me now.  It wasn't 
marked as READ ONLY in the program, so of course it would set by the caller.  
I'll be able to document that.

I still have the question about this line in fetchall - " Note that the 
cursor’s arraysize attribute can affect the performance of this operation. "  I 
don't see arraysize referenced in that function.  I must be missing something 
else, but if it's not used, then maybe I should remove that line?

One other question --
There is another attribute called row_factory in the cursor structure that 
isn't in the docs.  There is a row_factory defined in the docs, but that one is 
for the connection structure.  Should it be added under cursor as well?

Thank you!

--

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-31 Thread Aviv Palivoda

Aviv Palivoda added the comment:

Hi Cheryl, the arraysize value can be set by doing:
>>> cursor.array = 5

For example I can do the following
>>> import sqlite3
>>> s = sqlite3.connect(":memory:")
>>> s.execute("create table a(a,b)")
>>> s.execute("insert into a(a,b) values (1,2)")
>>> s.execute("insert into a(a,b) values (3,4)")
>>> c = s.cursor() # Array size is 1
>>> c.execute("select * from a")
>>> c.fetchmany()
[(1, 2)]
>>> c.fetchmany()
[(3, 4)]
>>> c.arraysize = 2 # Change array size
>>> c.fetchmany()
[(1, 2), (3, 4)]

As you can see the arraysize set the number of results the fetchmany will 
return.

--

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-30 Thread Aviv Palivoda

Changes by Aviv Palivoda :


--
nosy: +palaviv

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-30 Thread Cheryl Sabella

Cheryl Sabella added the comment:

I wanted to try to work on the documentation for this, but I had some questions.

I looked at:
https://github.com/python/cpython/blob/master/Modules/_sqlite/cursor.c

And I don't see arraysize being set to anything other than 1.  I also don't see 
fetchall using it like the documentation says.  fetchmany does seem to be using 
the size sent in as an argument or using the arraysize (which is 1) to break 
out of the loop early, so the default behaviour appears to be the similar to 
fetchone.  Please take this all with the caveat that I don't know c, so I may 
be missing something really obvious.  But, I can see all the other cursor 
attributes being changed within this module, so I expected arraysize to work in 
a similar way.

I did find this website which has a definition of arraysize:
http://initd.org/psycopg/docs/cursor.html#cursor.arraysize

Sorry if this is too many questions.  I've just started trying to help with 
documentation issues and I may have gotten in over my head.

--
nosy: +csabella

___
Python tracker 

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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-15 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +easy
nosy: +berker.peksag
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.5, 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



[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-05 Thread Jürgen A . Erhard

New submission from Jürgen A. Erhard:

It's an attribute mentioned in fetchmany and fetchall, but it's not in the list 
with those two, but it should be, since the section says "A Cursor instance has 
the following attributes and methods." and it is an attribute.

--
assignee: docs@python
components: Documentation
messages: 289023
nosy: docs@python, jae
priority: normal
severity: normal
status: open
title: sqlite3.Cursor doesn't properly document "arraysize"

___
Python tracker 

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