Jason Erickson | 1 Oct 2009 02:20

Re: problems compiling pyscopg2 on Windows with Python 2.6

On Wed, 30 Sep 2009, Chris Withers wrote:

> Jason Erickson wrote:
>> And if you are looking for pre-built binaries for windows, you can check 
>> here :)
>>     http://www.stickpeople.com/projects/python/psycopg/
>
> Do these require PostGreSQL DLLs to be on my machine? That's the experience I 
> had... I got DLL errors using the stickpeople binaries until I installed 
> PostGreSQL locally...

The build is statically linked against the libpq libraries, so no 
libpq.dll is required.  Interesting that it started working for you after 
installing PostgreSQL locally.  Did you try installing the VC2005 ATL 
Security Update, too?  I wonder if the PostgreSQL install installs what is 
missing...  What install package did you use to install Postgres?

> What would be ideal for me would be a statically linked .egg on PyPI. Any 
> chance of that happening? Would this need to be built for specific postgres 
> versions?

There's a chance of it happing, just need to understand .egg & PyPI :). 
The big thing I see there is does one tag along with the official package 
listed there, or create a package listing specific to win32.  Being 
combined with the official package would be ideal.  Also, someone 
recommended to me to format the web page so that easysetup could point to 
the page and download the package from that page.  This might be a good 
initial first step.

At one time, I was thinking about building different version for different 
(Continue reading)

Jason Erickson | 1 Oct 2009 02:25

How to signify a rebuild in the version string for psycopg2?


Since I am looking at doing a rebuild of psycopg2 2.0.12 for windows, I am 
curious what the community think on how I should modify the version 
string, so one can tell what build (or I guess rebuild) it is.

I do not want to add another '.'+number, as I believe that should be 
reserved for code changes.

I was thinking adding an '_'+number, ie 2.0.12_1, but I do not know if 
that would cause problems with code for anyone parsing the version string 
(ie, splitting on the '.', and then doing an int() on the splitted 
values).

Any suggestions, ideas, input, etc, regarding this?

-jason
Dustin Spicuzza | 1 Oct 2009 02:32
Favicon

Async support in psycopg2

Hey,

I'm using psycopg2 on Ubuntu 9.04, and it looks like the documentation
and implementation for the asynchronous interface is lacking quite a bit:

 - the cursor does not have an "isbusy()", it is actually called "isready()"
 - the cursor does not have a cancel() either -- and a grep of the
sources in git shows that the word cancel appears nowhere in the
sources.... so how exactly does one cancel a query?

Thanks!

Dustin

--

-- 
Innovation is just a problem away

_______________________________________________
Psycopg mailing list
Psycopg@...
http://lists.initd.org/mailman/listinfo/psycopg
Harald Armin Massa[legacy] | 1 Oct 2009 07:37
Picon

Re: How to signify a rebuild in the version string for psycopg2?

I recommend to shortcut with Frederico, bump the version to 2.0.14, make the version work, take down the 2.0.12 from the site and put up a sign "do not try the 2.0.12 on windows. it does not work."

Harald

On Thu, Oct 1, 2009 at 2:25 AM, Jason Erickson <jerickso-ywvXF8rVGoOnzT0iUeSTvQ@public.gmane.org> wrote:

Since I am looking at doing a rebuild of psycopg2 2.0.12 for windows, I am curious what the community think on how I should modify the version string, so one can tell what build (or I guess rebuild) it is.

I do not want to add another '.'+number, as I believe that should be reserved for code changes.

I was thinking adding an '_'+number, ie 2.0.12_1, but I do not know if that would cause problems with code for anyone parsing the version string (ie, splitting on the '.', and then doing an int() on the splitted values).


Any suggestions, ideas, input, etc, regarding this?

-jason
_______________________________________________
Psycopg mailing list
Psycopg <at> lists.initd.org
http://lists.initd.org/mailman/listinfo/psycopg




--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
%s is too gigantic of an industry to bend to the whims of reality
_______________________________________________
Psycopg mailing list
Psycopg@...
http://lists.initd.org/mailman/listinfo/psycopg
Federico Di Gregorio | 1 Oct 2009 12:13
Favicon
Gravatar

Re: Async support in psycopg2

Il giorno mer, 30/09/2009 alle 20.32 -0400, Dustin Spicuzza ha scritto:
> Hey,
> 
> I'm using psycopg2 on Ubuntu 9.04, and it looks like the documentation
> and implementation for the asynchronous interface is lacking quite a bit:
> 
>  - the cursor does not have an "isbusy()", it is actually called "isready()"
>  - the cursor does not have a cancel() either -- and a grep of the
> sources in git shows that the word cancel appears nowhere in the
> sources.... so how exactly does one cancel a query?

Asynchronous support is only half-backed. Nobody really helped testing
it and I don't use psycopg in a way that requires async queries anymore
(mostly I use psycopg in short python scripts for administrative tasks.)

So, don't expect it to work.

federico

--

-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog@...
INIT.D Developer                                           fog@...
 Io non sono romantica. La candelina sul tavolo mi vede e si spegne.
                                                      -- sisterconfusion
_______________________________________________
Psycopg mailing list
Psycopg@...
http://lists.initd.org/mailman/listinfo/psycopg
Federico Di Gregorio | 1 Oct 2009 12:15
Favicon
Gravatar

Re: How to signify a rebuild in the version string for psycopg2?

Il giorno mer, 30/09/2009 alle 18.25 -0600, Jason Erickson ha scritto:
> Since I am looking at doing a rebuild of psycopg2 2.0.12 for windows, I am 
> curious what the community think on how I should modify the version 
> string, so one can tell what build (or I guess rebuild) it is.

_<number> is fine. Also, while you're at it, you can embed in the
version string some windows-specific parameters if you that would help
the debugging (like we have "ext" or "dt").

federico

--

-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog@...
INIT.D Developer                                           fog@...
 To prepare such test data, I get into the meaniest, nastiest frame of
  mind that I can manage, and I write the cruelest code I can think of;
  then I turn around and I embed that in even nastier constructions
  that are almost obscene.                                  -- D.E.Knuth
_______________________________________________
Psycopg mailing list
Psycopg@...
http://lists.initd.org/mailman/listinfo/psycopg
Federico Di Gregorio | 1 Oct 2009 12:15
Favicon
Gravatar

Re: How to signify a rebuild in the version string for psycopg2?

Il giorno gio, 01/10/2009 alle 07.37 +0200, Harald Armin Massa[legacy]
ha scritto:
> I recommend to shortcut with Frederico, bump the version to 2.0.14,
> make the version work, take down the 2.0.12 from the site and put up a
> sign "do not try the 2.0.12 on windows. it does not work."

Yep. I am integrating patches and testing. Release during the week-end.

federico

--

-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog@...
INIT.D Developer                                           fog@...
                   I came like Water, and like Wind I go. -- Omar Khayam
_______________________________________________
Psycopg mailing list
Psycopg@...
http://lists.initd.org/mailman/listinfo/psycopg
Chris Withers | 1 Oct 2009 17:54
Picon

Re: problems compiling pyscopg2 on Windows with Python 2.6

Jason Erickson wrote:
> The build is statically linked against the libpq libraries, so no 
> libpq.dll is required.  Interesting that it started working for you 
> after installing PostgreSQL locally.  Did you try installing the VC2005 
> ATL Security Update, too?  I wonder if the PostgreSQL install installs 
> what is missing...  What install package did you use to install Postgres?

I didn't do anything other that install PG. However, I just uninstalled 
it, and psycopg2 is still working...

>> What would be ideal for me would be a statically linked .egg on PyPI. 
>> Any chance of that happening? Would this need to be built for specific 
>> postgres versions?
> 
> There's a chance of it happing, just need to understand .egg & PyPI :). 
> The big thing I see there is does one tag along with the official 
> package listed there, or create a package listing specific to win32.  

I would be great if all the distributions were actually on PyPI, under 
the psycopg2 package, rather than having to rely on initd.org and 
stickpeople.com...

> Being combined with the official package would be ideal.  Also, someone 
> recommended to me to format the web page so that easysetup could point 
> to the page and download the package from that page.  This might be a 
> good initial first step.

If you just get access to the PyPI account, and put the releases there, 
it'll all "just work" with nothing needed from your part other than to 
learn how to do:

python setup.py bdist_egg sdist register upload

;-)

Chris

PS:
> At one time, I was thinking about building different version for 
> different Postgres versions, but it dawned on me that it doesn't make 
> any sense to do that.  I my opinion, as long as you are using the latest 
> libpq interface, you are good to go, as it is backwards compatible to 
> versions quite a ways back (I believe the current stuff works at least 
> as far back as the 7.4 line).  Unless others can come up with a good 
> reason to build against an older libpq, I think using the latest libpq 
> interface is best.

Didn't realise that, all good to hear, so no need for multiple versions :-)

--

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk
Harald Armin Massa[legacy] | 1 Oct 2009 18:04
Picon

Re: problems compiling pyscopg2 on Windows with Python 2.6

Chris,

The build is statically linked against the libpq libraries, so no libpq.dll is required.  Interesting that it started working for you after installing PostgreSQL locally.  Did you try installing the VC2005 ATL Security Update, too?  I wonder if the PostgreSQL install installs what is missing...  What install package did you use to install Postgres?


I didn't do anything other that install PG. However, I just uninstalled it, and psycopg2 is still working...

Could it be that the PostgreSQL installer put in a new version of the Visual C Redistributable libraries? At least pg_admin is doing that if they are not correctly present; and as much as I know the OneClickInstaller also has that dependency check. And since those libraries are still used by other apps, MSI uninstall does not remove them...

Harald



--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pigeon
-
%s is too gigantic of an industry to bend to the whims of reality
_______________________________________________
Psycopg mailing list
Psycopg@...
http://lists.initd.org/mailman/listinfo/psycopg
Dustin Spicuzza | 1 Oct 2009 23:26
Favicon

Re: Async support in psycopg2

Federico Di Gregorio wrote:
> Il giorno mer, 30/09/2009 alle 20.32 -0400, Dustin Spicuzza ha scritto:
>> Hey,
>>
>> I'm using psycopg2 on Ubuntu 9.04, and it looks like the documentation
>> and implementation for the asynchronous interface is lacking quite a bit:
>>
>>  - the cursor does not have an "isbusy()", it is actually called "isready()"
>>  - the cursor does not have a cancel() either -- and a grep of the
>> sources in git shows that the word cancel appears nowhere in the
>> sources.... so how exactly does one cancel a query?
> 
> Asynchronous support is only half-backed. Nobody really helped testing
> it and I don't use psycopg in a way that requires async queries anymore
> (mostly I use psycopg in short python scripts for administrative tasks.)
> 
> So, don't expect it to work.
> 

Fair enough. Could you at least update the documentation then to note
that it doesn't work? Will save someone some time in the future.

Dustin

--

-- 
Innovation is just a problem away

_______________________________________________
Psycopg mailing list
Psycopg@...
http://lists.initd.org/mailman/listinfo/psycopg

Gmane