mrevutskyi / flask-restless-ng

A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models.
https://flask-restless-ng.readthedocs.io
Other
64 stars 11 forks source link

Dropping support of SQLAchemy 1.4.x? #15

Closed sharky98 closed 3 years ago

sharky98 commented 3 years ago

Hello,

I was using 1.0.1 without any issues with SQLAlchemy 1.4.3. I just updated to includes the two issues I created. But pip complained about SQLAlchemy 1.4.x, that it doesn't meet the requirements of flask-restless-ng. I saw that since commit 1681bce3ab6df8227b12b657b576e2bc09c16648, it is now limited to <1.4.0. The commit claims that 1.4.0 breaks the tests.

Can you provide more information on what in the tests is broken and why/when this would be corrected? Like I said, I am using it with 1.4.6 now and I am not seeing any issues, althought I am not using (yet) all the options (new to python), I might miss something. Also having the information would help me not use the portion of flask-restless-ng that are "broken" by SQLAlchemy.

Regards

mrevutskyi commented 3 years ago

Sorry, I haven't tried 1.4.x until now, so relied on the report of another contributor.

What is being affected - pagination. There are two issues:

  1. .with_only_columns seems to work differently in v1.4.x, and now returns unexpected result
  2. Unfortunately the original code was relying on a private property query._limit, which is no longer available n 1.4.x

I'll take a look how to work around those changes, and if simple .count() would be enough, or it would slow down significally

mrevutskyi commented 3 years ago

Fixed in 1.0.4