kvesteri / sqlalchemy-continuum

Versioning extension for SQLAlchemy.
BSD 3-Clause "New" or "Revised" License
580 stars 126 forks source link

Fix for column.copy deprecation #277

Closed edhaz closed 2 years ago

edhaz commented 2 years ago

Run the test setting DB=sqlite. SQLAlchemy 1.4.39

Before: 659 passed, 99 skipped, 4745 warnings in 49.06s

After: 659 passed, 99 skipped, 797 warnings in 46.61s

marksteward commented 2 years ago

Hi, thanks for this! copy_ is liable to be deprecated too in the future, but this should work for now.

edhaz commented 2 years ago

Hi, thanks for this! copy_ is liable to be deprecated too in the future, but this should work for now.

Hey, no problem! Also looking at a permanent fix too!

marksteward commented 2 years ago

Oh, it's failing on <1.4 because:

E           AttributeError: 'Comparator' object has no attribute '_copy'

I think you'll need to check for its existence.

edhaz commented 2 years ago

Ah yeah good shout, forgot to test it on pre 1.4! will make sure I test both in the future. Now updated.

AbdealiLoKo commented 2 years ago

Hi, I get this warning with sqla-1.4 too Is there any additional work here I can help with to get this merged ?

edhaz commented 2 years ago

Hi, I get this warning with sqla-1.4 too Is there any additional work here I can help with to get this merged ?

@AbdealiJK This should be good to go to get rid of the warnings. Just needs a CI run CC @marksteward

Edit: ah sorry didn’t see it had been run! (Was using my phone and assuming!)

marksteward commented 2 years ago

Also rebased and merged. Thanks!