well the bug is probably on line l22, where its not correctly detecting
psycopg2:
if self.module.__name__.endswith('psycopg2'):
self.version = 2
else:
self.version = 1
the TimestampFromMx() line is inside of "PG1DateTime" which shouldnt even
be used, it should be using "PG2DateTime", based on the version number.
Since the whole psycopg1 thing isnt working anyway, I would just hardcode
the above conditional to just say "self.version = 2" for now (so yah you
can go and do that).
Or if you can figure out how to discern between pyscopg1 and 2 from the
module (if its got a version id or something), that would be better.
Robert Leftwich wrote:
> Due to some setup issues I haven't been running with the most recent svn
> version
> for a while, but as of last night I'm at 803. Running my nightly
> processing
> showed up a small problem or two. The first that there is an issue in
> postgres.py with the convert_bind_param() function referencing
> psycopg.TimestampFromMx() which doesn't exist in pyscopg2. This looks to
> be a
> remnant of changeset 773 'trying to get pg1 date type to work,
> unsuccessful'.
>
> def convert_bind_param(self, value, engine):
> # TODO: perform appropriate postgres1 conversion between Python
> DateTime/MXDateTime
> # this one doesnt seem to work with the "emulation" mode
> return psycopg.TimestampFromMx(value)
>
> Can i/we revert that line back to 'return value' or do have you something
> else
> in mind?
>
> The second issue was one of my own, I had some code that retrieved a few
> objects
> from the db up front which were then used as reference objects to setup a
> lot of
> relationships defined by external csv data. The recent changes that added
> safety
> checking to the identity map worked really well in pointing out that I had
> an
> objectstore.clear() between loading the reference objects and re-using
> them in
> relationships - good stuff!
>
> Robert
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Sqlalchemy-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users