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

[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

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

2022-10-23 Thread Mike Bayer
On Sun, Oct 23, 2022, at 5:04 AM, Lele Gaifax wrote: > Lele Gaifax writes: > > > I will propose a PR soon. > > An ethical concern: given that the proposed methods are so simple, is it > legal/acceptable to verbatim copy them, and their tests, from the > psycopg (LGPL) and asyncpg (Apache licen

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

2022-10-23 Thread Mike Bayer
On Sun, Oct 23, 2022, at 4:13 AM, Lele Gaifax wrote: > "Mike Bayer" writes: > > > Range is a really simple dataclass so adding a few simple value > > methods contains_value(), issubset(), issuperset() is a PR (with > > tests) away. there's no need to "proxy" things, these are pretty > > obvious

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

2022-10-23 Thread Lele Gaifax
Lele Gaifax writes: > I will propose a PR soon. An ethical concern: given that the proposed methods are so simple, is it legal/acceptable to verbatim copy them, and their tests, from the psycopg (LGPL) and asyncpg (Apache license)? ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello

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

2022-10-23 Thread Lele Gaifax
"Mike Bayer" writes: > Range is a really simple dataclass so adding a few simple value > methods contains_value(), issubset(), issuperset() is a PR (with > tests) away. there's no need to "proxy" things, these are pretty > obvious methods to just implement directly. I would just disagree with > p