Re: [sqlalchemy] Override incorrectly defined classes

2022-10-24 Thread Nishant Varma
Thanks for the reply, Mike. In that case, I'll just keep a copy of our definitions in the test case folder and correct them whenever required. Hopefully, these will get merged to the real code sooner or later (which is why I wanted to name it backlogs). The goal is to stage tables(which are requir

Re: [sqlalchemy] Re: On new native PG Range in SA 2.0

2022-10-24 Thread Mike Bayer
On Mon, Oct 24, 2022, at 2:37 PM, Lele Gaifax wrote: > "Mike Bayer" writes: > > > these look super great! > > Thanks! I will then open an issue and a related PR shortly. > > > We can make the text("") statements into something nicer in a second > > pass, is that the part you didn't like ? >

[sqlalchemy] Re: On new native PG Range in SA 2.0

2022-10-24 Thread Lele Gaifax
"Mike Bayer" writes: > these look super great! Thanks! I will then open an issue and a related PR shortly. > We can make the text("") statements into something nicer in a second > pass, is that the part you didn't like ? Not exactly: I spent some time trying to avoid the "redundancy" in the te

Re: [sqlalchemy] Re: On new native PG Range in SA 2.0

2022-10-24 Thread Mike Bayer
these look super great! We can make the text("") statements into something nicer in a second pass, is that the part you didn't like ? On Mon, Oct 24, 2022, at 12:41 PM, Lele Gaifax wrote: > Hi, > > this is my first cut at the proposed methods: > > > https://github.com/lelit/sqlalchemy/commi

Re: [sqlalchemy] Override incorrectly defined classes

2022-10-24 Thread Mike Bayer
I dont think there's an obvious way to override declarative classes like that, but I also dont understand the problem such that something like that would be necessary (that is, I dont understand why you need "create tables on the fly", is this in a local testing database where you *do* create ta

[sqlalchemy] Re: On new native PG Range in SA 2.0

2022-10-24 Thread Lele Gaifax
Hi, this is my first cut at the proposed methods: https://github.com/lelit/sqlalchemy/commit/b9a2a7761ec292536a7be37703d20800edfab3f0 I'm not quite happy with how I wrote the tests, because I didn't find a reasonable way to get the PG representation of a given Range instance, and thus I manua

[sqlalchemy] Override incorrectly defined classes

2022-10-24 Thread Nishant Varma
We use SQLAlchemy to read/write data, but not create tables (as it done by DBAs). Due to this, some of the definitions which are incorrect, have not yet been caught (though it works for reads/writes etc.). Is there a DRY way to to override them for testing purposes (create tables on the fly etc