As I mentioned on the github issue, aiopg's approach is one that has always alarmed me, which is that they have taken large tracts of SQLAlchemy's internals, copied them into their own source base, and simply altered them to fit their needs. I would never recommend this approach as it has non-maintainability and constant regressions built in by design. The "backwards incompatible" changes you've referred towards in this thread have nothing to do with SQLAlchemy's public API. aiopg makes deep and highly modifying use of SQLAlchemys *private* internals, and that's where they are having problems, as the statement execution and result set internals in SQLAlchemy 1.4 are *completely* different.
The practice of lifting and copying source code with modifications throughout is commonly known as "forking", and while aiopg is not exactly a "fork" as it still maintains SQLAlchemy as a dependency, it's pretty close in spirit to one. There are no open source projects that support partial forks of their source code, as this is inherently unmaintainable. The purpose of internal, private API is that all of it may change at any time due to refactoring. As long as the public API and behaviors are maintained, this does not impact backwards compatibility in any way provided the community does their part by using only public APIs. Now that SQLAlchemy has published a technical approach to adapting to asyncio that does not require rewriting the internals, aiopg should look to maintaining their public facing API, but removing all the copied internal source code stuff and instead use SQLAlchemy's asyncio approach so that they no longer are essentially re-implementing the library from the ground up. A library that is doing this now is Gino https://python-gino.org/, where they are reworking their homegrown approach to asyncio adaptation and migrating to SQLAlchemy 1.4's style in their 2.x branch. On Wed, Jul 14, 2021, at 11:10 AM, Marat Sharafutdinov wrote: > The problem is the part of my code base depends on third party library > (aiopg) which should be compatible with SQLAlchemy 1.4 too but there some > problems with it ( > https://github.com/aio-libs/aiopg/issues/798#issuecomment-879815102 ) which > make migration from 1.3 to 1.4 impossible for now =/ > > On Thursday, June 10, 2021 at 3:57:08 PM UTC+3 Mike Bayer wrote: >> >> >> On Wed, Jun 9, 2021, at 7:21 PM, Marat Sharafutdinov wrote: >>> The problem is that currently only the entire codebase can be migrated from >>> 1.3 to 1.4, even though it can be extremely difficult or too long to do. >>> >>> I suggest the following way of pinning dependencies: >>> sqlalchemy==1.3 >>> sqlalchemy2==1.4 or sqlalchemy2==2.0 >>> >>> Then current codebase will continue to work because "sqlalchemy" package >>> stays at version 1.3 but it will be possible to use SQLAlchemy 1.4 / 2.0 >>> additionally to migrate not whole codebase but part by part by importing >>> "sqlalchemy2" package. >> >> the entire migration process was designed around not having to do it like >> this, and I spent months thinking about it. It would not be feasible for >> two versions of sqlalchemy to exist at the same time because then the entire >> import space would have to become "sqlalchemy2" and this is too drastic of a >> change which would heavily impede migration. >> >> I think your assessment that "only the entire codebase can be migrated from >> 1.3 to 1.4" is not true, most applications that run on 1.3 will run on 1.4 >> with little to no changes and hundreds of users have already done so. The >> 1.3-> 1.4 change is roughly comparable to the change that it has been for >> other releases, like 1.0->1.1, 1.1->1.2 etc. >> >> >>> >>> >>> On Thursday, June 10, 2021 at 2:10:48 AM UTC+3 Mike Bayer wrote: >>>> __ >>>> hi there - >>>> >>>> having a separate project name on pypi doesn't solve any issue that isn't >>>> already solved by using version pinning - the "sqlalchemy" name on pypi is >>>> already at 1.4. the only way to install 1.3 is by requesting "pip install >>>> sqlalchemy < 1.4". >>>> >>>> As you've probably seen, SQLAlchemy 1.4 /2.0 includes a very specific >>>> upgrade path with step-by-step instructions at >>>> https://docs.sqlalchemy.org/en/14/changelog/migration_20.html . >>>> >>>> >>>> >>>> On Wed, Jun 9, 2021, at 4:15 PM, Marat Sharafutdinov wrote: >>>>> Currently I'm on SQLAlchemy 1.3 and there is a lot of work I have to do >>>>> to migrate to 1.4 / 2.0. I think it's good idea to distribute 1.4 / 2.0 >>>>> versions not only as "SQLAlchemy" project but as additional separate >>>>> "SQLAlchemy2" project too with initial 1.4 version and then 2.0. This >>>>> will give opportunity to have 1.3 and earlier version of SQLAlchemy which >>>>> is already in use and latest SQLAlchemy2 version to migrate gradually >>>>> step by step, in case of Flask for example, - one API method by another. >>>>> Just one additional way to migrate painlessly. >>>>> >>>>> >>>>> -- >>>>> SQLAlchemy - >>>>> The Python SQL Toolkit and Object Relational Mapper >>>>> >>>>> http://www.sqlalchemy.org/ >>>>> >>>>> To post example code, please provide an MCVE: Minimal, Complete, and >>>>> Verifiable Example. See http://stackoverflow.com/help/mcve for a full >>>>> description. >>>>> --- >>>>> You received this message because you are subscribed to the Google Groups >>>>> "sqlalchemy" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send an >>>>> email to sqlalchemy+...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/sqlalchemy/730e4079-1751-4a9f-8f4a-f5fd7dde30f7n%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/sqlalchemy/730e4079-1751-4a9f-8f4a-f5fd7dde30f7n%40googlegroups.com?utm_medium=email&utm_source=footer>. >>>> >>> >>> >>> -- >>> SQLAlchemy - >>> The Python SQL Toolkit and Object Relational Mapper >>> >>> http://www.sqlalchemy.org/ >>> >>> To post example code, please provide an MCVE: Minimal, Complete, and >>> Verifiable Example. See http://stackoverflow.com/help/mcve for a full >>> description. >>> --- >>> You received this message because you are subscribed to the Google Groups >>> "sqlalchemy" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to sqlalchemy+...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/sqlalchemy/fa4b7c8f-ab62-466f-94f5-572ff6397328n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/sqlalchemy/fa4b7c8f-ab62-466f-94f5-572ff6397328n%40googlegroups.com?utm_medium=email&utm_source=footer>. >> > > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy/203f42c9-29e2-4aed-bdbd-25abd717b1f3n%40googlegroups.com > > <https://groups.google.com/d/msgid/sqlalchemy/203f42c9-29e2-4aed-bdbd-25abd717b1f3n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/ac1dd83b-9028-47eb-a40f-12b0ce88e2a4%40www.fastmail.com.