On Thursday, January 19, 2017 at 11:34:54 AM UTC-8, Andrea Fae' wrote:
>
> Can anyone explain exatly this?
> db = DAL(myconf.get('db.uri'),
> pool_size=myconf.get('db.pool_size'),
> migrate_enabled=myconf.get('db.migrate'),
> check_reserved=['all'])
>
Um,
myconf is an instance of AppConfig from gluon.contrib.appconfig, which
reads configuration data from a configuration file. See the highlighted
areas at
http://web2py.com/books/default/chapter/29/01/introduction?search=appconfig.
Anthony
On Thursday, January 19, 2017 at 2:34:54 PM UTC-5,
Thanks.
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
There's a problem in line 7182 of the new dal.py:
Table.__getitem__() is testing if an object is instance of the Key class
(which only exists in the namespace if the appengine modules are present)
On Monday, May 7, 2012 5:49:09 AM UTC-3, Johann Spies wrote:
After updating my web2py from the
Fixed in trunk.
On Monday, 7 May 2012 07:46:29 UTC-5, Alan Etkin wrote:
There's a problem in line 7182 of the new dal.py:
Table.__getitem__() is testing if an object is instance of the Key class
(which only exists in the namespace if the appengine modules are present)
On Monday, May 7,
apologies, I may have posted this in the wrong thread. Reposting, just
in case:
when I made the switch, this (just below) was working great. With the
latest code it doesn't. I was able to switch my import statements
from blablabla.sql import DAL to from blablabla.dal import DAL.
Has the syntax
Thanks Massimo, executesql() seems to be working well now for SQLite
MS SQL
There seems to be a problem with options widget and new dal:
http://code.google.com/p/web2py/issues/detail?id=136
Widget seems to be generating string fields (i.e. 'tipo_cbte.desc,
tipo_cbte.cod'), and dal is specting Expressions.
Best regards,
Mariano Reingart
http://www.sistemasagiles.com.ar
This is very interesting. I believe this would change the GPL license
reach for MySQL. The regular Python driver is a wrapper around the C
MySQL client library so as a user of that driver you have embedded a
part of MySQL into your application. Using the pure Python driver
means you are now using
I pulled latest version from trunk and tested my app using MySQL and
got a ticket. Easy fix
In sql.py change line 1403 pymysqldb should be pymysql to match the
name from the import
self.pool_connection(lambda db=db,
user=credential_decoder(user),
fixed Thanks.
On Dec 8, 9:02 am, ron_m ron.mco...@gmail.com wrote:
I pulled latest version from trunk and tested my app using MySQL and
got a ticket. Easy fix
In sql.py change line 1403 pymysqldb should be pymysql to match the
name from the import
self.pool_connection(lambda
Massimo, executesql() isn't working correctly with the new DAL in
trunk. The fix looks to be easy, simply replace self._cursor with
self._adaptor.cursor this fixes things for SQLite and I would assume
the other DBs as well - I can try testing MS SQL tomorrow.
Fixed code is below, should be right
Your fix is in trunk. Please check it.
On Dec 8, 11:26 pm, Brian M bmere...@gmail.com wrote:
Massimo, executesql() isn't working correctly with the new DAL in
trunk. The fix looks to be easy, simply replace self._cursor with
self._adaptor.cursor this fixes things for SQLite and I would assume
New problem with latest hg pull, update. After filling login form and
submit get a ticket during the insert into auth_event different cause
than before.
The def insert at line 3610 is building a new_fields list but the
db._adapter.insert() called on the return statement at 3621 is
expecting a
(changeset: 1322:a4378725f3cb):
db.tester.insert(name='name')
sql.pyc in insert(self, **fields)
3619 elif field.required:
3620 raise SyntaxError,'Table: missing required
field: %s'%field
- 3621 return self._db._adapter.insert(self, new_fields)
3622
fixed. sorry.
On Dec 7, 2:23 am, ron_m ron.mco...@gmail.com wrote:
New problem with latest hg pull, update. After filling login form and
submit get a ticket during the insert into auth_event different cause
than before.
The def insert at line 3610 is building a new_fields list but the
Perfect now except this ticket as far as my app is concerned testing
against new dal
Traceback (most recent call last):
File /home/camcentral/Dev/web2py_hg/gluon/restricted.py, line 188,
in restricted
exec ccode in environment
File
fixed in trunk
On Dec 7, 11:06 am, ron_m ron.mco...@gmail.com wrote:
Perfect now except this ticket as far as my app is concerned testing
against new dal
Traceback (most recent call last):
File /home/camcentral/Dev/web2py_hg/gluon/restricted.py, line 188,
in restricted
exec ccode in
I run some benchmarks. The time to do insert and select is the same.
The difference it no measurable because dominated by db IO. Anyway the
code is below and the output is:
old dal:
7.98740386963e-05 (sec)
0.00134269499779
new dal:
8.04572105408e-05
0.00139242005348
Notice all the time is in
MongoHQ can be useful for testing, they offer a free limited instance
https://mongohq.com/pricing
2010/12/7 mdipierro mdipie...@cs.depaul.edu
I run some benchmarks. The time to do insert and select is the same.
The difference it no measurable because dominated by db IO. Anyway the
code is
Is VoltDB supported?
Sent from some mobile device
On Dec 7, 2010, at 2:09 PM, Bruno Rocha rochacbr...@gmail.com wrote:
MongoHQ can be useful for testing, they offer a free limited instance
https://mongohq.com/pricing
2010/12/7 mdipierro mdipie...@cs.depaul.edu
I run some benchmarks.
No. Do not much about it.
On Dec 7, 3:45 pm, G. Clifford Williams g...@notadiscussion.com
wrote:
Is VoltDB supported?
Sent from some mobile device
On Dec 7, 2010, at 2:09 PM, Bruno Rocha rochacbr...@gmail.com wrote:
MongoHQ can be useful for testing, they offer a free limited instance
oops. fixed in trunk.
On Dec 7, 4:21 pm, Fran francisb...@gmail.com wrote:
Traceback (most recent call last):
File C:\Bin\web2py\gluon\restricted.py, line 188, in restricted
exec ccode in environment
File C:/Bin/web2py/applications/eden/models/02_pr.py, line 316, in
module
I contacted the developer. They added a license which was missing.
The replacement is now done in trunk.
Vasile, can you please test it?
Massimo
On Dec 6, 6:36 pm, Vasile Ermicioi elff...@gmail.com wrote:
I am testing new dal (alone, without web2py) and also tested one old idea -
I use
please try replace
@staticmethod
def close_all_instances(action):
to close cleanly databases in a multithreaded environment
if not hasattr(thread,'instances'):
return
while thread.instances:
instance = thread.instances.pop()
On Dec 6, 2010, at 9:13 AM, ron_m wrote:
I did an update of trunk using hg and copied dal.py over sql.py in
gluon and start the web2py.py server and still get
Traceback (most recent call last):
File /home/camcentral/Dev/web2py_hg/gluon/main.py, line 446, in
wsgibase
Important news!
1) The new DAL (dal.py) passes all the tests I have.
2) The new DAL has integrated GAE support (datastore) without need for
contrib/gql.py
3) The new DAL is better because more customizable, smaller (10%), and
more readable
4) The new DAL is one single file and it does not depend
On Dec 6, 2010, at 12:55 PM, mdipierro wrote:
1) The new DAL (dal.py) passes all the tests I have.
2) The new DAL has integrated GAE support (datastore) without need for
contrib/gql.py
3) The new DAL is better because more customizable, smaller (10%), and
more readable
4) The new DAL is
I am not sure. There are pros and cons in both cases.
What do you think.
For me it is easier to manage to this way. I tried to break it but it
would require even more re-factoring and I was not sure it was worth
it.
Massimo
On Dec 6, 3:10 pm, Jonathan Lundell jlund...@pobox.com wrote:
On
(sent from wrong address)
Begin forwarded message:
From: Jonathan Lundell jlund...@me.com
Date: December 6, 2010 2:03:54 PM PST
To: web2py@googlegroups.com web2py@googlegroups.com
Subject: Re: [web2py] Re: new dal
On Dec 6, 2010, at 1:15 PM, mdipierro mdipie...@cs.depaul.edu wrote:
I
Ok I found the cannot connect to PostgreSQL database problem. I have a
password on the user id to access the db in my application so in
class PostgreSQLAdapter(BaseAdapter): function __init__(...)
The re.compile line element for the database password is 'passwd'
which does not match the
Put dal.py over sql.py in trunk
Start server python web2py.py
Get welcome app in browser
Hit login link get ticket.
I also get this in my own application trying to login.
Field does not have attribute _tablename
Ron
Traceback (most recent call last):
File
With the new DAL it should take very little to create a DAL interface
to mongodb, couchdb, etc.
I can work on this if
- you help me prioritize
- you can give me access to a machine that already has your favorite
nosql db installed ready for testing
Massimo
On Dec 6, 3:10 pm, Jonathan Lundell
For now, for testing purposes I am going to copy dal.py over sql.py
and post a nightly build using the new dal.
Long term, is this ia good solution. I would like to keep both sql.py
and dal.py and import DAL, Field from the latter but this would break
existing from gluon.sql import *. In order
both trunk and the nightly built in the web2py download page use the
new dal as opposed to the old one.
Please give it a try. Specifically if you are using something other
than sqlite.
please report any test you make. It is critical to know if this works
fine because I am planning to remove
Providing that it's backwards compatible, you don't need to ask.
IMO test, upgrade, then never look back!
-D
On Dec 7, 12:08 am, mdipierro mdipie...@cs.depaul.edu wrote:
For now, for testing purposes I am going to copy dal.py over sql.py
and post a nightly build using the new dal.
Long term,
Here is some more info about the new DAL
http://web2py.com/examples/static/new_dal_help.pdf
hope it helps read the source code.
Massimo
On Dec 6, 6:08 pm, mdipierro mdipie...@cs.depaul.edu wrote:
For now, for testing purposes I am going to copy dal.py over sql.py
and post a nightly build
I am testing new dal (alone, without web2py) and also tested one old idea -
I use pymysql instead of MySQLdb, and it works fine with python (2.7) and
jython (2.5rc2)
why not integrating it on web2py, I think that makes web2py what it claims
to be requires no installation
also it seems to have a
That is the point. I think it is fully backward compatible but the
source is so different that it is possible something breaks. Nothing
that cannot be fixed but I'd rather fix it sooner than later.
On Dec 6, 6:24 pm, villas villa...@gmail.com wrote:
Providing that it's backwards compatible, you
No objection. We will default to the new one if it is installed of the
latter otherwise
On Dec 6, 6:36 pm, Vasile Ermicioi elff...@gmail.com wrote:
I am testing new dal (alone, without web2py) and also tested one old idea -
I use pymysql instead of MySQLdb, and it works fine with python (2.7)
I propose to include a copy in site-packages and distribute it with web2py,
so no installation will be required, it is quite small 100kb
I like that it is pure python. It would go in contrib not in site-
packages.
Anybody opposes?
Can you help us keep it in sync with the official repo?
On Dec 6, 6:45 pm, Vasile Ermicioi elff...@gmail.com wrote:
I propose to include a copy in site-packages and distribute it with web2py,
so no
Another patch
Hit login form getting a ticket.
sqlhtml.py
line 62 and line 216
field._tablename should be field.tablename
Ron
fixed in trunk. Thanks.
On Dec 6, 7:31 pm, ron_m ron.mco...@gmail.com wrote:
Another patch
Hit login form getting a ticket.
sqlhtml.py
line 62 and line 216
field._tablename should be field.tablename
Ron
That above patch prevents the old sql.py DAL from working with
sqlhtml.py because old dal does have a field attribute
field._tablename which sqlhtml.py was looking for before the patch.
I get the login form posted, fill it in but submit on the form to
complete the login gets a ticket. I tried to
I pulled in the latest trunk version of sqlhtml.py and there was an
additional change at line 973 over and above the 2 lines I mentioned
before at 62 and 216
self.table._tablename became self.table.tablename which now causes a
new ticket rendering the login form.
I guess that line needs to be
I think I fixed the problem with sequence name. Please check.
On Dec 6, 8:45 pm, ron_m ron.mco...@gmail.com wrote:
That above patch prevents the old sql.py DAL from working with
sqlhtml.py because old dal does have a field attribute
field._tablename which sqlhtml.py was looking for before
Massimo, you nailed it for the sequence name problems. I tested almost
all of my app and got one more ticket.
Traceback (most recent call last):
File /home/camcentral/Dev/web2py_hg/gluon/restricted.py, line 188,
in restricted
exec ccode in environment
File
On Dec 6, 6:35 pm, mdipierro mdipie...@cs.depaul.edu wrote:
Here is some more info about the new DAL
http://web2py.com/examples/static/new_dal_help.pdf
Should class Query have been called class Filter?
just curious.
I still have MySQL installed so copied the app, changed database URL,
deleted all files under the applications databases directory, created
empty db, let app create empty tables by running it once to login
screen. I then did the all data from tables at once export from
PostgreSQL
I can donate a couple of FreeBSD jails with various databases setup if you let
me know what you want.
--G. Clifford Williams
Sent from some mobile device
On Dec 6, 2010, at 4:38 PM, mdipierro mdipie...@cs.depaul.edu wrote:
With the new DAL it should take very little to create a DAL interface
I got CouchDB working. Denes is working on MongoDB. I think we are
setup for December. In January, you could provide a Cassandra
server. ;-)
massimo
On Dec 7, 12:19 am, G. Clifford Williams g...@notadiscussion.com
wrote:
I can donate a couple of FreeBSD jails with various databases setup if you
You got it.
BTW, anyone else interested in ZODB support? It's not the new fangled toy that
these NoSQL databases are but it's still awesome.
--G. Clifford Williams
Sent from some mobile device
On Dec 7, 2010, at 12:23 AM, mdipierro mdipie...@cs.depaul.edu wrote:
I got CouchDB working. Denes
Okay, web2pyslices.com source runs against it with a sqlite database.
I will test with mysql.
On Dec 4, 11:02 pm, mdipierro mdipie...@cs.depaul.edu wrote:
One more test please. I do not have mysql installed here so I did not
test pooling. This helps a lot. thanks.
On Dec 4, 10:33 pm,
Working with mysql also. I tested with migrate=False. Nice work!
On Dec 5, 10:12 am, mr.freeze nat...@freezable.com wrote:
Okay, web2pyslices.com source runs against it with a sqlite database.
I will test with mysql.
On Dec 4, 11:02 pm, mdipierro mdipie...@cs.depaul.edu wrote:
One more
can you try migrate=True (add a dummy field and the remove it) with
mysql?
On Dec 5, 10:20 am, mr.freeze nat...@freezable.com wrote:
Working with mysql also. I tested with migrate=False. Nice work!
On Dec 5, 10:12 am, mr.freeze nat...@freezable.com wrote:
Okay, web2pyslices.com source runs
Let me backup the web2pyslice.com database and I will try.
On Dec 5, 10:36 am, mdipierro mdipie...@cs.depaul.edu wrote:
can you try migrate=True (add a dummy field and the remove it) with
mysql?
On Dec 5, 10:20 am, mr.freeze nat...@freezable.com wrote:
Working with mysql also. I tested
I have a global variable migrate_db which is passed to all
define_table functions. I switched it to false and get this:
Traceback (most recent call last):
File C:\web2py\gluon\restricted.py, line 188, in restricted
exec ccode in environment
File C:/web2py/applications/main/models/db.py,
I seem to remember this failing before though. Something about
my .TABLE files being out of sync. What is the procedure to re-sync
them?
On Dec 5, 10:45 am, mr.freeze nat...@freezable.com wrote:
I have a global variable migrate_db which is passed to all
define_table functions. I switched it to
for the troublesome table (auth_user) set migrate=False,
fake_migrate=True reload, then migrate=True and remove fake_migrate.
It should fix your broken .table.
Should work with old and with new dal.
On Dec 5, 11:47 am, mr.freeze nat...@freezable.com wrote:
I seem to remember this failing
I reverted to the old DAL and did the steps you outlined. Same result.
Should I delete the .table files first?
On Dec 5, 12:41 pm, mdipierro mdipie...@cs.depaul.edu wrote:
for the troublesome table (auth_user) set migrate=False,
fake_migrate=True reload, then migrate=True and remove
I tried and the file modification times of the .table files do not
change. I deleted them (safely backed up) and they are not re-created.
On Dec 5, 12:56 pm, mdipierro mdipie...@cs.depaul.edu wrote:
It is the same. try without delete them.
On Dec 5, 12:53 pm, mr.freeze nat...@freezable.com
can you try migrate=True, fake_migrate=True?
On Dec 5, 1:05 pm, mr.freeze nat...@freezable.com wrote:
I tried and the file modification times of the .table files do not
change. I deleted them (safely backed up) and they are not re-created.
On Dec 5, 12:56 pm, mdipierro mdipie...@cs.depaul.edu
Auth.define_tables doesn't have a fake_migrate attribute so I added
one (want a patch?). Once I did, my .table files were re-created when
migrate=True and fake_migrate=True. It still works once I set
fake_migrate to False. I will test it against the new DAL now.
On Dec 5, 1:24 pm, mdipierro
Okay, migrate=True works with the new DAL too. On a whim, I deleted
my .table files and tried migrate=True and fake_migrate=True with the
new DAL. Everything worked. The .table files were re-created.
On Dec 5, 1:38 pm, mr.freeze nat...@freezable.com wrote:
Auth.define_tables doesn't have a
started work integrating with gluon/contrib/gql.py do
please keep testing dal.py
now it no longer requires web2py and you can do
% python
from dal import DAL, Field
db=DAL('sqlite://file.sqlite')
db.define_table('person',Field('name'))
etc etc.
you ONLY need dal.py
On Dec 5, 1:56 pm,
Describe what I did
Copied the trunk hg area to a work area
Renamed sql.py to sql-save.py
Copied dal.py to sql.py in order to replace sql.py with dal.py
Copied application I am working on to applications directory
Backed up the database
Ran the server as python web2py.py
Got this stack trace
Sorry should have mentioned that was in the welcome app fetching the
index page as the default browser load occured fomr the TK server
interface. In my own application I get
Traceback (most recent call last):
File /home/camcentral/Dev/web2py_hg/gluon/restricted.py, line 188,
in restricted
can you please try again?
Massimo
On Dec 4, 12:31 pm, ron_m ron.mco...@gmail.com wrote:
Describe what I did
Copied the trunk hg area to a work area
Renamed sql.py to sql-save.py
Copied dal.py to sql.py in order to replace sql.py with dal.py
Copied application I am working on to
I was getting that error. After updating it goes away but now I get
the below. I am running it against web2pyslices.com source on a sqlite
db with Python 2.5:
Traceback (most recent call last):
File C:\Users\nathan\workspace\web2py\gluon\restricted.py, line
188, in restricted
exec ccode in
Can you try delete everything in app/cache/
The error seems in opening the cache file.
On Dec 4, 8:30 pm, mr.freeze nat...@freezable.com wrote:
I was getting that error. After updating it goes away but now I get
the below. I am running it against web2pyslices.com source on a sqlite
db with
I get this now:
Traceback (most recent call last):
File C:\web2py\gluon\restricted.py, line 188, in restricted
exec ccode in environment
File C:/web2py/applications/main/models/db.py, line 22, in
module
db = SQLDB(dal_connection,pool_size=10)
File C:\web2py\gluon\sql.py, line 2405,
Looking closer, there is a syntax error on line 189: COnnectionPool
After I fixed that, I get:
Traceback (most recent call last):
File C:\web2py\gluon\main.py, line 488, in wsgibase
BaseAdapter.close_all_instances(BaseAdapter.rollback)
File C:\web2py\gluon\sql.py, line 163, in
One more test please. I do not have mysql installed here so I did not
test pooling. This helps a lot. thanks.
On Dec 4, 10:33 pm, mr.freeze nat...@freezable.com wrote:
Looking closer, there is a syntax error on line 189: COnnectionPool
After I fixed that, I get:
Traceback (most recent call
seems to be working fine on 1.75.4.
so are we getting support of nosql database soon =)
On Feb 6, 12:14 am, mdipierro mdipie...@cs.depaul.edu wrote:
I encourage eveybody running from source to try the newdal:
cd gluon
cp sql.py sql.py.bak
cpdal.py sal.py
and restart web2py.
Let me know
oops.yes.
On Feb 5, 1:28 pm, Wes James compte...@gmail.com wrote:
On Fri, Feb 5, 2010 at 9:14 AM, mdipierro mdipie...@cs.depaul.edu wrote:
I encourage eveybody running from source to try the new dal:
cd gluon
cp sql.py sql.py.bak
cp dal.py sal.py
do you mean cp dal.py sql.py ?
LOL. Right now new dal does not support more features than previous
dal. It is just more modular.
On Feb 5, 10:37 pm, Alexey Nezhdanov snak...@gmail.com wrote:
I_can_test_with_Oracle_if_new_DAL_supports_@(connector)_and_.(schema)_in_tablenames,
I_had_to_modify_old_DAL_for_this.
77 matches
Mail list logo