#132 Newlines escaped in PickleCol

closed-works-for-me
Oleg Broytman
General (125)
5
2006-01-03
2005-11-28
Anonymous
No

Looks like the PickleCol is having its newlines escaped, which seems to
ruin the pickle. Using version 0.7b1dev. Here's some example code:

"""
class Session(SQLObject):

data = PickleCol()

try:
s = Session(data={'one': 1, 'two': range(10)})
except Exception, msg:
print msg
print msg.state
print msg.value
"""

Discussion

  • Oleg Broytman
    Oleg Broytman
    2006-01-03

    • milestone: 293287 --> SQLObject_from_repository
    • assigned_to: nobody --> phd
    • status: open --> closed-works-for-me
     
  • Oleg Broytman
    Oleg Broytman
    2006-01-03

    Logged In: YES
    user_id=4799

    Works for me in Postgres and SQLite. I haven't got any
    exception. The output is:

    1/QueryOne: SELECT COUNT(relname) FROM pg_class WHERE
    relname = 'session'
    1/QueryR : SELECT COUNT(relname) FROM pg_class WHERE
    relname = 'session'
    1/COMMIT : auto
    1/Query : CREATE TABLE session (
    id SERIAL PRIMARY KEY,
    data BYTEA
    )
    1/QueryR : CREATE TABLE session (
    id SERIAL PRIMARY KEY,
    data BYTEA
    )
    1/COMMIT : auto
    1/QueryIns: INSERT INTO session (id, data) VALUES (1,
    '(dp1\\012S\'two\'\\012p2\\012(lp3\\012I0\\012aI1\\012aI2\\012aI3\\012aI4\\012aI5\\012aI6\\012aI7\\012aI8\\012aI9\\012asS\'one\'\\012p4\\012I1\\012s.')
    1/COMMIT : auto
    1/QueryOne: SELECT data FROM session WHERE id = 1
    1/QueryR : SELECT data FROM session WHERE id = 1
    1/COMMIT : auto