Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Activity (RSS)

Monday, March 10 2014
192 enhancement: connection.closed attribute to actually become a property that d... was updated
  • Daniele Varrazzo
    • State changed from resolved to open
    • Milestone set to psycopg2 2.5.3
    by Daniele Varrazzo at 5:28 PM

    This bug was closed by mistake: the one to be closed should have been the #196. To be reviewed for 2.5.3

  • Daniele Varrazzo
    Daniele Varrazzo commented at 4:40 PM

    For what I can see it's a pip bug which doesn't take in consideration the setup.cfg. I've reported the issue at https://github.com/pypa/pip/issues/1630

    Zaar, if...

  • Daniele Varrazzo
    Daniele Varrazzo commented at 3:01 PM

    The difference is that the failing version is building without:

    -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1
    

    and we haven't really tested...

  • Daniele Varrazzo
    Daniele Varrazzo commented at 2:44 PM

    Uhm... I was going to reply you that you can pip-install a project from a branch: you could have tested my branch with:

    pip install -e git+https://github.com/d...
  • Zaar Hai
    Zaar Hai commented at 2:36 PM

    I knew that :)

    Don't know what is the problem. Just run

    pip install -e git+https://github.com/dvarrazzo/psycopg.git#egg=psycopg2
    

    Simple pip install psycopg2 w...

2 earlier changes…
  • Daniele Varrazzo
    Daniele Varrazzo commented at 11:20 AM

    It does for me. psyco_conn_get_exception is declared in the same file at line 835 in current master.

  • Zaar Hai
    Zaar Hai commented at 7:03 AM

    Master does not compile:

    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIM...
188 assertion failed in pqpath.c was updated
197 Python 3, cursor.query returns bytes instead of str was updated
196 connection.closed attribute is not set properly on localconnections was updated
psycopg2 2.5.3 was created by Daniele Varrazzo at 5:23 PM
 
0 of 6 tickets remain in this milestone
198 still "double free or corruption" crashes was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 3:05 PM

    Can you provide a stack trace of some sort?

    Are you sure 2.5.2 is the version you are using?

    If crashes are repeated it smells more you are somehow end up using...

  • Psycopg website
    Psycopg website created the ticket at 2:44 PM

    Submitted by: ilengyel@yahoo.com

    The package compiles without error; however, python codes using psycopg2 crashes randomly and frequently with "double free or c...

Saturday, March 08 2014
197 Python 3, cursor.query returns bytes instead of str was updated
  • Daniele Varrazzo
    • State changed from new to open
    • Tag set to documentation
    by Daniele Varrazzo at 10:56 AM

    Hello, thank you for the report.

    The library is doing what intended: mogrify() and query represent the statement to be sent/just sent to the server, hence it is...

  • bernardy
    bernardy commented at 3:00 AM

    Also just noticed that cursor.mogrify() returns bytes in Python 3. Which is okay because cursor.execute() will happily take either (utf-8 or current client enco...

  • bernardy
    bernardy edited a comment at 3:00 AM

    Also just noticed that cursor.mogrify() returns bytes in Python 3. Which is okay because cursor.execute() will happily take either (utf-8 or current client enco...

  • bernardy
    bernardy commented at 2:00 AM

    Although, thinking about it, fixing this bug could break a lot of extent user code, since the typical way to handle it would be:

    cursor.query.decode('utf-8')
    

    ...

  • bernardy
    bernardy created the ticket at 1:40 AM

    In python 3.3.4, cursor.query returns a bytes sequence, not a string.
    Interestingly, cursor.statusmessage returns a string.

    If this is intentional behavior on P...

Thursday, March 06 2014
192 enhancement: connection.closed attribute to actually become a property that d... was updated
196 connection.closed attribute is not set properly on localconnections was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 5:25 PM

    In debug mode, executing into a broken socket connection:

    In [4]: cur.execute('select 1')
    [19233] psyco_curs_execute: starting execution of new query
    [19233] c...
  • Zaar Hai
    Zaar Hai commented at 5:07 PM

    Yeah, I've spotted it while working on Momoko - dead connection detection stopped functioning when one connects through local socket.

  • Daniele Varrazzo
    Daniele Varrazzo commented at 4:43 PM

    Ugh, thank you for the clarification, I wouldn't have expected such a difference.

  • Zaar Hai
    Zaar Hai commented at 4:35 PM

    BTW, to emphasize, that if one connects through TCP and not local socket, then closed attribute is populated properly.

  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 11:11 AM

    Yup, thank you for the report: i'd noticed something similar in #192. Thank you for the test case, I'll try to fix it.

2 earlier changes…
  • Zaar Hai
    Zaar Hai commented at 9:31 AM

    Formatting did not go well through web form. The reproduction is below.

    $ python
    Python 2.7.5+ (default, Sep 19 2013, 13:48:49) 
    [GCC 4.8.1] on linux2
    Type "he...
  • Psycopg website
    Psycopg website created the ticket at 9:27 AM

    Submitted by: haizaar

    Scenario:
    1. issue psycopg2.connect through local socket
    2. restart database server
    3. create cursor and execute query (and get an error)

    ...

Wednesday, February 26 2014
195 cursor segfault with badly implemented subclasses was updated
Monday, February 24 2014
194 Async connection blocks when server unavailable was updated
  • Adam Petrovic
    Adam Petrovic commented at 3:20 PM

    I don't mind, happy to help :)

  • Daniele Varrazzo
    • State changed from new to resolved
    by Daniele Varrazzo at 3:10 PM

    Thank you for the diagnosis: I will mention your contribution in the news (if you don't mind).

  • Adam Petrovic
    Adam Petrovic commented at 2:44 PM

    Great, script does not block anymore. Now connection.poll() throws

    OperationalError: could not send SSL negotiation packet: Resource temporarily unavailable
    
    f...
  • Daniele Varrazzo
    Daniele Varrazzo commented at 12:17 PM

    Hello, thank you for the report.

    Can you test with the code in the branch "ticket-194" in my repos?

    https://github.com/dvarrazzo/psycopg/tree/ticket-194

    Thank y...

  • Adam Petrovic
    Adam Petrovic created the ticket at 10:01 AM

    Hi,

    not sure if this is psycopg2's fault but my script blocks when connecting to unavailable server (or when i drop outgoing connections to port 5432 for testin...

Saturday, February 22 2014
193 Range objects cannot be sorted was created
191 Add __repr__ to Json object for better logging was updated
  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 8:48 PM

    Pushed a str implementation for Json in my master. repr won't change.

    I'm not planning to release the change in 2.5 as it may change the programs behaviour in a...

Thursday, February 06 2014
192 enhancement: connection.closed attribute to actually become a property that d... was updated
  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 2:05 PM

    I would say no: users of that property don't expect an extra query to be performed to check the connection is still up. For one, it would become a blocking oper...

  • Psycopg website
    Psycopg website created the ticket at 1:06 PM

    Submitted by: matt.bradshaw@gmail.com

    At present, it appears as though .closed can lag behind the truth of things. If one explicitly .close()'d the connection, ...

Monday, February 03 2014
191 Add __repr__ to Json object for better logging was updated
  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 11:26 PM

    As per discussion on github, Json.__str__ should return getquoted() as many adapters already do. Also note:

    1) other adapters should be checked too (range?)
    2) ...

  • Oleg Anashkin
    Oleg Anashkin created the ticket at 4:19 AM

    Currently, attempt to log or print Json object uses default python's implementation which is useless. Using actual serialized content is much better.

    I have sen...

Wednesday, January 22 2014
55 Deadlock in 2.4.0. was updated
  • Garrett Cooper
    Garrett Cooper commented at 2:37 AM

    Yeah... 2.2.2 is definitely bugged in an obvious way (severe database contention, poor performance). Thanks for the bug report PVaret and the fix Daniele!

  • Garrett Cooper
    Garrett Cooper edited a comment at 2:38 AM

    Yeah... 2.2.2 is definitely bugged in an obvious way (severe database contention, poor performance). Thanks for the bug report PVaret and the fix Daniele!

  • Garrett Cooper
    Garrett Cooper commented at 2:36 AM

    I wasn't able to reproduce this issue with python 2.7.3 / psycopg2 on Debian Lenny 2.6 at least. Was this resolved on/after v2.4.5?

    Here's my test program (it's...

Tuesday, January 21 2014
55 Deadlock in 2.4.0. was updated
  • Garrett Cooper
    Garrett Cooper commented at 11:10 PM

    I wasn't able to reproduce this issue with python 2.7.3 / psycopg2 on Debian Lenny 2.6 at least. Was this resolved on/after v2.4.5?

    Here's my test program (it's...

  • Garrett Cooper
    Garrett Cooper edited a comment at 11:14 PM

    I wasn't able to reproduce this issue with python 2.7.3 / psycopg2 on Debian Lenny 2.6 at least. Was this resolved on/after v2.4.5?

    Here's my test program (it's...

  • Garrett Cooper
    Garrett Cooper edited a comment at 11:14 PM

    I wasn't able to reproduce this issue with python 2.7.3 / psycopg2 on Debian Lenny 2.6 at least. Was this resolved on/after v2.4.5?

    Here's my test program (it's...

Tuesday, January 14 2014
190 Invalid json is returned for json column type was updated
  • Oleg Anashkin
    Oleg Anashkin commented at 7:07 PM

    Thank you guys for your quick responses and for helping with this issue.

  • Daniele Varrazzo
    • State changed from new to resolved
    by Daniele Varrazzo at 6:39 PM

    Added a FAQ entry and a note in the JSON docs. Closing the bug.

  • Daniele Varrazzo
    Daniele Varrazzo commented at 6:01 PM

    Well, even less, only register_default_json() exist :) That's because I've expected people wanting to customize the way it is parsed more often than with other ...

  • Federico Di Gregorio
    Federico Di Gregorio commented at 5:55 PM

    @Daniele: it is just that not all SQL types provide a register_default_xxx, only the new type-casters. So, I better like to use the low-level method in example ...