but
[https://github.com/django/django/blob/master/django/db/backends/postgresql/base.py#L33
here] django checks only for 2.4.5.
[https://github.com/django/django/commit/3adc5f1ee6618a615db07d4a868b366a15c39f82
this commit here] made 2.4.5 a requirement and documented that in a few
places.
--
Ticket URL: <https://code.djangoproject.com/ticket/27966>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by karyon):
i tested with psycopg2 2.5.0 and after this i directly got the next crash,
with 2.5.5 (the newest 2.5.x) that one was fixed too. so if you decide to
update the requirements, i would suggest to require 2.5.5.
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:1>
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
In all cases I think the code should be refactored to use `self.cursor()`
instead of `self.connection.cursor()` which doesn't suffer from this issue
and is appropriately wrapped.
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:2>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:3>
Comment (by Asif Saifuddin Auvi):
All suggested changes applied. Build are passing. just docs failure. does
this worth a mention in release notes?
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:4>
Comment (by Tim Graham):
I think we must increases the minimum psycopg2 version to 2.5.4, due to
the server-side cursors patch, f3b7c059367a4e82bbfc7e4f0d42b10975e79f0c.
Running Django's test suite gives these errors:
psycopg2 < 2.5, e.g. 2.4.6
{{{
File "/home/tim/code/django/django/db/backends/postgresql/base.py", line
213, in create_cursor
cursor = self.connection.cursor(name, scrollable=False,
withhold=self.connection.autocommit)
TypeError: 'scrollable' is an invalid keyword argument for this function
}}}
2.5 ≤ psycopg2 < 2.5.4
{{{
File "/home/tim/code/django/django/db/models/query.py", line 50, in
__iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File "/home/tim/code/django/django/db/models/sql/compiler.py", line 876,
in execute_sql
cursor.close()
psycopg2.OperationalError: cursor "_django_curs_140304550061888_1" does
not exist
}}}
Is there value in the cursor patch if that's the case?
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:5>
Comment (by Simon Charette):
If server side cursors require psycopg2 >= 2.5.4 we should just document
that it's the minimum required version and avoid making this change.
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:6>
Comment (by Adam (Chainz) Johnson):
Agree, didn't realize that.
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:7>
Comment (by Asif Saifuddin Auvi):
Is it fixed then? or this ticket is invalid?
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:8>
Comment (by Claude Paroz):
Debian stable has 2.5.4, by the way.
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:9>
* owner: nobody => felixxm
* status: new => assigned
Comment:
[https://github.com/django/django/pull/8228 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:10>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:11>
Comment (by Aymeric Augustin):
Debian stable also has Django 1.7 ;-)
https://packages.debian.org/jessie/python-django
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:12>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"43380e911073beab401a2fdeca0f25001e170dac" 43380e91]:
{{{
#!CommitTicketReference repository=""
revision="43380e911073beab401a2fdeca0f25001e170dac"
Fixed #27966 -- Bumped required psycopg2 version to 2.5.4.
Thanks Tim Graham for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:13>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"b06855facdd0fd1eecae7bce75c815c8a6af19b6" b06855fa]:
{{{
#!CommitTicketReference repository=""
revision="b06855facdd0fd1eecae7bce75c815c8a6af19b6"
[1.11.x] Fixed #27966 -- Bumped required psycopg2 version to 2.5.4.
Thanks Tim Graham for the review.
Backport of 43380e911073beab401a2fdeca0f25001e170dac from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27966#comment:14>