Oleg Broytman | 18 May 2013 12:06
X-Face
Favicon
Gravatar

SQLObject 1.4.0

Hello!

I'm pleased to announce version 1.4.0, the first stable release of branch
1.4 of SQLObject.

What's new in SQLObject
=======================

Features & Interface
--------------------

* Support for PostgreSQL 8.1 is dropped. The minimal supported version of
  PostgreSQL is 8.2 now.

* Optimization in PostgresConnection: use INSERT...RETURNING id
  to get the autoincremented id in one query instead of two
  (INSERT + SELECT id).

* Changed the way to get if the table has identity in MS SQL.

* NCHAR/NVARCHAR and N''-quoted strings for MS SQL.

Contributors for this release are Ken Lalonde and Andrew Ziem.

For a more complete list, please see the news:
http://sqlobject.org/News.html

What is SQLObject
=================

(Continue reading)

Oleg Broytman | 4 May 2013 18:01
X-Face
Favicon
Gravatar

SQLObject 1.4.0 beta1

Hello!

I'm pleased to announce version 1.4.0b1, the first beta of the upcoming
release of branch 1.4 of SQLObject.

What's new in SQLObject
=======================

Features & Interface
--------------------

* Support for PostgreSQL 8.1 is dropped. The minimal supported version of
  PostgreSQL is 8.2 now.

* Optimization in PostgresConnection: use INSERT...RETURNING id
  to get the autoincremented id in one query instead of two
  (INSERT + SELECT id).

* Changed the way to get if the table has identity in MS SQL.

* NCHAR/NVARCHAR and N''-quoted strings for MS SQL.

Major contributor for this release is Andrew Ziem,

For a more complete list, please see the news:
http://sqlobject.org/News.html

What is SQLObject
=================

(Continue reading)

Maciej (Matchek) Bliziński | 16 Apr 2013 11:52
Favicon

MySQL: Commands out of sync; you can't run this command now

Hello list,

I'm running into a problem when running a small web app in webpy with
sqlobject. The app is a REST interface which handles URLs such as:

GET /pkgdb/rest/srv4/7793c4a5ecd6494b25d475632618e44c/pkg-stats/ HTTP/1.1

and

PUT /releases/catalogs/unstable/i386/SunOS5.9/7793c4a5ecd6494b25d475632618e44c/
HTTP/1.1

When called with PUT, it does a few checks and inserts a row into a
table. When the application runs, it initially works for a minute or
two, but eventually gets into state in which it always fails with this
exception:

Traceback (most recent call last):
  File "/opt/csw/lib/python/site-packages/web/application.py", line
239, in process
    return self.handle()
  File "/opt/csw/lib/python/site-packages/web/application.py", line
230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/opt/csw/lib/python/site-packages/web/application.py", line
420, in _delegate
    return handle_class(cls)
  File "/opt/csw/lib/python/site-packages/web/application.py", line
396, in handle_class
    return tocall(*args)
(Continue reading)

Andrew Z | 4 Feb 2013 22:20
Picon
Gravatar

specifying schema for mssql

With SQLObject 1.3.2 and mssql backend, how do you specify the schema
equivalent to the command 'use foo'?  I want to use a schema that is
neither 'dbo' not the default for the user.  I don't see how to do it
using the URI after glancing over the documentation and code.

Andrew

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
Andrew Z | 3 Feb 2013 03:44
Picon
Gravatar

running tests

I read http://www.sqlobject.org/DeveloperGuide.html#testing and am
still unclear on exactly how to run a test.  Sorry, this may be a
basic question, but I hope the Developer Guide could be more explicit.

After installing py.test, I basically did this:

$ svn co http://svn.colorstudy.com/SQLObject/trunk SQLObject
$ cd SQLObject
$ python sqlobject/tests/test_unicode.py  -D sqlite:///tmp/foo.db

However:
Traceback (most recent call last):
  File "sqlobject/tests/test_unicode.py", line 1, in <module>
    from sqlobject import *
ImportError: No module named sqlobject

I also tried something like and got basically the same error

$ pytest sqlobject/tests/test_unicode.py  -D sqlite:///tmp/foo.db

Andrew

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
Markos Kapes | 22 Jan 2013 21:21
Picon

INSERT INTO and cursor

Any good reason why this code should fail to insert while the underlying query in mysql shell works?
	cursor=cbx.conn.cursor()
	cursor.execute(u"INSERT INTO notes (message, author) VALUES ('test', 'test');")
Furthermore, this fails silently, so no error to give me a clue.
Selects still work as expected, but somehow, all the old legacy code I've got that uses statements of the
above type have stopped working.
As always, thanks much for the advice,
--Markos Kapes

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
Oleg Broytman | 18 Jan 2013 21:46
X-Face
Favicon
Gravatar

SourceForge's Allura

Hello!

   SourceForge insisted on upgrading registered projects to their new
backend called Allura, so I allowed them to upgrade the project.
See http://sourceforge.net/projects/sqlobject/
   The most notable changes are:
administrative interface: https://sourceforge.net/p/sqlobject/admin/
tickets: http://sourceforge.net/p/sqlobject/_list/tickets
and wiki: http://sourceforge.net/p/sqlobject/wiki/Home/
   Not sure how to use the new wiki to the benefits of the community.

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
Stéphane Brault | 11 Jan 2013 23:42
Picon
Favicon

Re: (no subject)


Shed off some pounds doesnt have to be hard http://2ndshopthai.com/cottageadvertisingdavidroberts/

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
Tomas Vondra | 30 Dec 2012 21:46
Picon
Gravatar

passwords hashed using pgcrypto (in the database)

Hi,

I'm learning SQLObject - checking if we could use it on our projects, 
and I got stuck at hashing passwords inside the database.

Imagine a simple table with info about users:

CREATE TABLE users (
     id       INT PRIMARY KEY,
     login    TEXT NOT NULL UNIQUE,
     pwdhash  TEXT NOT NULL
)

where "pwdhash" is a hashed password. We're using PostgreSQL and we 
usually handle this inside the database using a pgcrypto module, that 
provides various hash/crypto functions. An insert into the table then 
looks like this

     INSERT INTO users VALUES (1, 'login', crypt('mypassword', 
gen_salt('bf')))

which generates a salt, computes the hash and stores that into a single 
text column (salt+hash). The authentication then looks like this:

     SELECT id, login FROM users WHERE login = 'login' AND pwdhash = 
crypt('mypassword', pwdhash)

which reuses the salt stored in the column.

I'm investigating if we could do this with SQLObject, but it seems to 
(Continue reading)

Sophana K | 4 Dec 2012 13:02
Picon

freezes with multi-threading ?

Hi


I'm using sqlobjects with webware for python on my website in production since 2007.
Since about one year ago (maybe more...), from time to time (about every week/month), the python process completely freezes under high load.

I upgraded to sqlobject 1.3.2 with latest mysqlDB, and still have the problem.

All signals are ignored.  it can only be killed with a kill -9. 
strace show the python process is stuck in a futex kernel call.

Recently, I tried to gdb the frozen python process: All threads are waiting for a semaphore, except one, that is waiting probably for a mysql response, in the _mysql.so object of python-mysql.

unfortunately, the gdb pystack macro doesn't work for me. So I can't get the python stack. It seems that gdb cpu gets all cpu dureing a very very long time. I haven't waited enough...

All threads waiting for a semaphore. I don't know if it is the python GIL or another mysql or sqlobject related lock. The GIL would explain that signals are ineffective.


#0  0x00110416 in __kernel_vsyscall ()
#1  0x005a8865 in sem_wait <at> <at> GLIBC_2.1 () from /lib/libpthread.so.0                                                                                                                                                  
#2  0x0067eafb in PyThread_acquire_lock (lock=0x8dc7028, waitflag=1) at Python/thread_pthread.h:349
#3  0x00682eb8 in lock_PyThread_acquire_lock (self=0x854c430, args=0xb7f3102c) at Modules/threadmodule.c:46                                                                                                         
#4  0x0060d7ed in PyCFunction_Call (func=0x8eeb0ec, arg=0xb7f3102c, kw=0x0) at Objects/methodobject.c:108
#5  0x0065ac72 in PyEval_EvalFrameEx (f=0x93d7ff4, throwflag=0) at Python/ceval.c:3564                                                                                                                              
#6  0x00659fcd in PyEval_EvalFrameEx (f=0x8e2e53c, throwflag=0) at Python/ceval.c:3650
#7  0x0065b6bf in PyEval_EvalCodeEx (co=0x8922410, globals=0x891e3e4, locals=0x0, args=0x9cfa2dc, argcount=1, kws=0x9cfa2e0,                                                                                        
    kwcount=0, defs=0x891af18, defcount=1, closure=0x0) at Python/ceval.c:2831
#8  0x00659844 in PyEval_EvalFrameEx (f=0x9cfa12c, throwflag=0) at Python/ceval.c:3660                                                                                                                              
#9  0x00659fcd in PyEval_EvalFrameEx (f=0x8dccfa4, throwflag=0) at Python/ceval.c:3650
#10 0x0065b6bf in PyEval_EvalCodeEx (co=0x87ad848, globals=0x87a924c, locals=0x0, args=0x8d43818, argcount=2, kws=0x0,  
....

except one thread: ( I still have to check all 25 threads...)
#0  0x00110416 in __kernel_vsyscall ()
#1  0x005a952b in read () from /lib/libpthread.so.0                                                                                                                                                                 
#2  0x00295338 in vio_read () from /usr/lib/mysql/libmysqlclient_r.so.15
#3  0x002953ae in vio_read_buff () from /usr/lib/mysql/libmysqlclient_r.so.15                                                                                                                                       
#4  0x002967ab in ?? () from /usr/lib/mysql/libmysqlclient_r.so.15
#5  0x00296b9b in my_net_read () from /usr/lib/mysql/libmysqlclient_r.so.15                                                                                                                                         
#6  0x0028fe39 in cli_safe_read () from /usr/lib/mysql/libmysqlclient_r.so.15
#7  0x00290c35 in ?? () from /usr/lib/mysql/libmysqlclient_r.so.15                                                                                                                                                  
#8  0x0028f1e4 in mysql_real_query () from /usr/lib/mysql/libmysqlclient_r.so.15
#9  0x00243f53 in _mysql_ConnectionObject_query (self=0x941160c, args=0x978138c) at _mysql.c:2008                                                                                                                   
#10 0x0060d7ed in PyCFunction_Call (func=0x9c300cc, arg=0x978138c, kw=0x0) at Objects/methodobject.c:108
#11 0x0065ac72 in PyEval_EvalFrameEx (f=0x940d924, throwflag=0) at Python/ceval.c:3564                                                                                                                              
#12 0x00659fcd in PyEval_EvalFrameEx (f=0x9b12c64, throwflag=0) at Python/ceval.c:3650
#13 0x00659fcd in PyEval_EvalFrameEx (f=0x9b7cdf4, throwflag=0) at Python/ceval.c:3650                                                                                                                              
#14 0x0065b6bf in PyEval_EvalCodeEx (co=0x8d2ead0, globals=0x8d304f4, locals=0x0, args=0x9240fec, argcount=2, kws=0x9240ff4,
    kwcount=0, defs=0x8d37358, defcount=1, closure=0x0) at Python/ceval.c:2831                                               
...

Note: I also get some "ProgrammingError: Commands out of sync; you can't run this command now" errors from time to time.

This is why I'm suspecting a wrong connection management between my threads.

Could it be related to the fact that I'm using the sqlHub.processConnection feature of SqlObject?
Reading the code, I don't understand the call path from dbConnection to the SqlHub. 

How is the connection pool managed?
Is it thread safe?

Thanks in advance for your support

Best regards


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
Oleg Broytman | 20 Oct 2012 11:25
X-Face
Favicon
Gravatar

SQLObject 1.3.2 and 1.2.4

Hello!

I'm pleased to announce versions 1.3 2 and 1.2.4, minor bugfix releases
of SQLObject.

What is SQLObject
=================

SQLObject is an object-relational mapper.  Your database tables are described
as classes, and rows are instances of those classes.  SQLObject is meant to be
easy to use and quick to get started with.

SQLObject supports a number of backends: MySQL, PostgreSQL, SQLite,
Firebird, Sybase, MSSQL and MaxDB (also known as SAPDB).

Where is SQLObject
==================

Site:
http://sqlobject.org

Development:
http://sqlobject.org/devel/

Mailing list:
https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss

Archives:
http://news.gmane.org/gmane.comp.python.sqlobject

Download:
http://pypi.python.org/pypi/SQLObject/1.3.2
http://pypi.python.org/pypi/SQLObject/1.2.4

News and changes:
http://sqlobject.org/News.html

What's New
==========

* Fixed a bug in sqlbuilder.Select.filter - removed comparison with
  SQLTrueClause.

* Neil Muller fixed a number of tests.

For a more complete list, please see the news:
http://sqlobject.org/News.html

Oleg.
--

-- 
     Oleg Broytman            http://phdru.name/            phd <at> phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct

Gmane