Re: [sqlalchemy] Non backwards-compatible changes in 1.0? Lots of suddenly failing tests here.

2015-04-21 Thread Oliver Palmer
We're using a Flask extension to work with sqlalchemy called flask-sqlalchemy. The engine is usually not directly exposed but echo can be enabled using a configuration var which should have the same impa

Re: [sqlalchemy] pandas.DataFrame.to_sql method: how to speed up exporting to Microsoft SQL Server (6 minutes for 11 MB!)

2015-04-21 Thread Mike Bayer
On 4/21/15 1:47 PM, John Doe wrote: I am using pandas 0.16 and sqlalchemy 0.99. Yes, I know I should probably upgrade, but I don't have admin rights on my PC. I understand the pandas.DataFrame.to_sql() method relies on sqlalchemy. I have a pandas dataframe with ca 155,000 rows and 12 columns.

[sqlalchemy] pandas.DataFrame.to_sql method: how to speed up exporting to Microsoft SQL Server (6 minutes for 11 MB!)

2015-04-21 Thread John Doe
I am using pandas 0.16 and sqlalchemy 0.99. Yes, I know I should probably upgrade, but I don't have admin rights on my PC. I understand the pandas.DataFrame.to_sql() method relies on sqlalchemy. I have a pandas dataframe with ca 155,000 rows and 12 columns. If I export it to csv with dataframe.t

Re: [sqlalchemy] Can I restrict the set of mappers that configure_mappers() works on?

2015-04-21 Thread Mike Bayer
On 4/21/15 12:25 PM, Steven Winfield wrote: OK, thanks for the quick answer - I guess I shouldn't be using sqlalchemy for the importer then, since this necessarily has to perform queries in order for scripts to be imported. what's that about ? some kind of dynamic scripting environment? If

Re: [sqlalchemy] Can I restrict the set of mappers that configure_mappers() works on?

2015-04-21 Thread Steven Winfield
OK, thanks for the quick answer - I guess I shouldn't be using sqlalchemy for the importer then, since this necessarily has to perform queries in order for scripts to be imported. I might attempt restricting mapper configuration to a group of tables - I think the performance penalty would be qu

Re: [sqlalchemy] Non backwards-compatible changes in 1.0? Lots of suddenly failing tests here.

2015-04-21 Thread Mike Bayer
On 4/21/15 11:19 AM, Guido Winkelmann wrote: On Tuesday 21 April 2015 09:43:51 Mike Bayer wrote: On 4/21/15 6:45 AM, Guido Winkelmann wrote: On Monday 20 April 2015 21:57:40 Oliver Palmer wrote: [...] So I got to thinking about what we're doing differently with sqlite and this bit of code

Re: [sqlalchemy] Can I restrict the set of mappers that configure_mappers() works on?

2015-04-21 Thread Mike Bayer
On 4/21/15 9:31 AM, Steven Winfield wrote: Hi, It seems like configuration is attempted for all new mappers, globally, whenever a query is done. So if library A and B both use sqlalchemy, and A imports B before A's mappers can be properly initialised (e.g. there is a relationship("Classname

Re: [sqlalchemy] Non backwards-compatible changes in 1.0? Lots of suddenly failing tests here.

2015-04-21 Thread Guido Winkelmann
On Tuesday 21 April 2015 09:43:51 Mike Bayer wrote: >On 4/21/15 6:45 AM, Guido Winkelmann wrote: >> On Monday 20 April 2015 21:57:40 Oliver Palmer wrote: >> [...] >> >>> So I got to thinking about what we're doing differently with sqlite and >>> >>> this bit of code comes to mind: >>> # sqlit

Re: [sqlalchemy] Non backwards-compatible changes in 1.0? Lots of suddenly failing tests here.

2015-04-21 Thread Mike Bayer
On 4/21/15 6:45 AM, Guido Winkelmann wrote: On Monday 20 April 2015 21:57:40 Oliver Palmer wrote: [...] So I got to thinking about what we're doing differently with sqlite and this bit of code comes to mind: # sqlite specific configuration for development if db.engine.name == "sqlite

[sqlalchemy] Can I restrict the set of mappers that configure_mappers() works on?

2015-04-21 Thread Steven Winfield
Hi, It seems like configuration is attempted for all new mappers, globally, whenever a query is done. So if library A and B both use sqlalchemy, and A imports B before A's mappers can be properly initialised (e.g. there is a relationship("ClassnameAsString") call somewhere that can't be resolve

Re: [sqlalchemy] Non backwards-compatible changes in 1.0? Lots of suddenly failing tests here.

2015-04-21 Thread Guido Winkelmann
On Monday 20 April 2015 21:57:40 Oliver Palmer wrote: [...] >So I got to thinking about what we're doing differently with sqlite and >this bit of code comes to mind: > > ># sqlite specific configuration for development >if db.engine.name == "sqlite": >@event.listens_for(Engine, "con

Re: [sqlalchemy] Non backwards-compatible changes in 1.0? Lots of suddenly failing tests here.

2015-04-21 Thread Guido Winkelmann
On Monday 20 April 2015 19:22:36 Mike Bayer wrote: >On 4/20/15 12:56 PM, Guido Winkelmann wrote: >> I just tested, the problem is still present in the current master >> (bd61e7a3287079cf742f4df698bfe3628c090522 from github). Guido W. > >can you please try current master at least as of >a3af638e1a95

Re: [sqlalchemy] Non backwards-compatible changes in 1.0? Lots of suddenly failing tests here.

2015-04-21 Thread Guido Winkelmann
On Monday 20 April 2015 13:24:49 Michael Bayer wrote: >> On Apr 20, 2015, at 12:56 PM, Guido Winkelmann wrote: >>> On Monday 20 April 2015 11:23:06 Mike Bayer wrote: >> >>> On 4/20/15 8:09 AM, Guido Winkelmann wrote: On MySQL/PostgreSQL, this line fails: Apparently, sqlalchemy wil