Dealing with a change in Python 3.3 memoryview

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: psycopg(at)postgresql(dot)org
Subject: Dealing with a change in Python 3.3 memoryview
Date: 2012-09-21 00:08:25
Message-ID: CA+mi_8ZDuUspAbgdmD8B6ktmDKv5tdC8TMUrp=7S9OA1Z7AcmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Hello,

after a change in Python 3.3 memoryview, accessing memoryview items
(i.e. what returned by default reading bytea fields in Python 3)
returns ints instead of bytes. In order to make Py 3.3 consistent with
the other Python 3 releases, there is some more magic to do (as if the
above wasn't black enough). My solution is in this commit:

https://github.com/dvarrazzo/psycopg/commit/469b6f8aff4cafe203d851b19bedfab0128e795a

I'd like a comment by somebody hardcore enough to grok this area, if
the solution is appropriate or if a different spell is required.

Thank you very much

-- Daniele

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2012-09-21 00:38:30 Re: flexi adaption/casting scheme
Previous Message Tobias Oberstein 2012-09-20 21:50:46 flexi adaption/casting scheme