Re: [Django] #12759: raw_query tests fail with psycopg1 backend

2010-03-20 Thread Django
#12759: raw_query tests fail with psycopg1 backend
---+
  Reporter:  kmtracey  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by thejaswi_puthraya):

 Just for the record, the psycopg cursor does not implement any 'dunder'
 (double-underscore) methods...

 {{{
 >>> import psycopg, psycopg2
 >>>
 >>> conn1=psycopg.connect("user=username password=pwd")
 >>> conn2=psycopg2.connect("user=username password=pwd")

 >>> cur1=conn1.cursor()
 >>> iter(cur1)
 Traceback (most recent call last):
 File "", line 1, in 
 TypeError: 'cursor' object is not iterable

 >>> cur2=conn2.cursor()
 >>> iter(cur2)
 

 >>> dir(cur1)
 ['arraysize', 'autocommit', 'callproc', 'close', 'commit', 'copy_from',
 'copy_to', 'description', 'dictfetchall', 'dictfetchmany', 'dictfetchone',
 'execute', 'executemany', 'fetchall', 'fetchmany', 'fetchone', 'fileno',
 'lastoid', 'lastrowid', 'nextset', 'notifies', 'rollback', 'rowcount',
 'scroll', 'setinputsizes', 'setoutputsize', 'statusmessage']

 >>> dir(cur2)
 ['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__',
 '__hash__', '__init__', '__iter__', '__new__', '__reduce__',
 '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
 '__subclasshook__', 'arraysize', 'binary_types', 'callproc', 'close',
 'closed', 'connection', 'copy_expert', 'copy_from', 'copy_to',
 'description', 'execute', 'executemany', 'fetchall', 'fetchmany',
 'fetchone', 'fileno', 'isready', 'lastrowid', 'mogrify', 'name', 'next',
 'nextset', 'query', 'row_factory', 'rowcount', 'rownumber', 'scroll',
 'setinputsizes', 'setoutputsize', 'statusmessage', 'string_types',
 'typecaster', 'tzinfo_factory']
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12759: raw_query tests fail with psycopg1 backend

2010-02-04 Thread Django
#12759: raw_query tests fail with psycopg1 backend
---+
  Reporter:  kmtracey  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #12759: raw_query tests fail with psycopg1 backend

2010-02-03 Thread Django
#12759: raw_query tests fail with psycopg1 backend
--+-
 Reporter:  kmtracey  |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Failure is:

 {{{

 ==
 ERROR: testAnnotations (modeltests.raw_query.tests.RawQueryTests)
 --
 Traceback (most recent call last):
   File "D:\u\kmt\django\trunk\tests\modeltests\raw_query\tests.py", line
 160, in testAnnotations
 self.assertSuccessfulRawQuery(Author, query, authors,
 expected_annotations)
   File "D:\u\kmt\django\trunk\tests\modeltests\raw_query\tests.py", line
 13, in assertSuccessfulRawQuery
 results = list(model.objects.raw(query, params=params,
 translations=translations))
   File "d:\u\kmt\django\trunk\django\db\models\query.py", line 1331, in
 __iter__
 for row in self.query:
   File "d:\u\kmt\django\trunk\django\db\models\sql\query.py", line 58, in
 __iter__
 return iter(self.cursor)
   File "d:\u\kmt\django\trunk\django\db\backends\postgresql\base.py", line
 79, in __iter__
 return iter(self.cursor)
 TypeError: 'cursor' object is not iterable

 --
 Ran 152 tests in 40.608s

 FAILED (errors=1)

 }}}

 (Thhis was with `--failfast` specified so tests stopped after first
 failure.)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.