flexmeasures icon indicating copy to clipboard operation
flexmeasures copied to clipboard

upgrade dependencies for v0.12

Open nhoening opened this issue 1 year ago • 1 comments

I ran make upgrade-deps. Notes:

  • docs dependencies could not be updated, as there is a conflict between dependencies. This can wait, maybe it resolves itself.

  • From skimming the diff, only a few changes are sticking out to me:

    • Flask upgrades to version 2.2 (from 2.0). Release notes: 2.2, 2.1 One thing I saw: we can remove @with_appcontext from custom CLI commands :)
    • Flask-Security-Too is moving version 5 (from 4.1.2), which was released just days ago. I started reading the release notes, and did not find something worrying yet. But good to keep this in mind, they document very well what we'd need to look for and adapt.
  • The selenium dependency is still in there, as timely-beliefs requires it. We'll change that requirement, so when a new timely-beliefs version lands soon, we could run make upgrade-deps once more, to also catch that and remove a large dependency.

  • I still have to run make test and discover potential problems there...

nhoening avatar Aug 31 '22 09:08 nhoening

Sigh: https://stackoverflow.com/questions/73105877/importerror-cannot-import-name-parse-rule-from-werkzeug-routing

The temporary solution is to downgrade Flask, as Werkzeug marked some method as internal, which (at least) Flask-Classful is still using.

The best other option is to wait for Flask-Classful to get this PR merged and then make a new release. It's unclear how fast these two steps will be performed.

We can also do the temporary solution, and document the real one.

The final option is to continue with pure Flask. This bump in the road is why that is a choice made by many. Libraries for API support are great, but this is reducing the convenience they bring. Some of them do not have the necessary release frequency.

nhoening avatar Aug 31 '22 10:08 nhoening

Pull Request Test Coverage Report for Build 2985112656

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.008%) to 65.126%

Files with Coverage Reduction New Missed Lines %
flexmeasures/templates/security/email/reset_instructions.txt 1 66.67%
<!-- Total: 1
Totals Coverage Status
Change from base Build 2962742821: 0.008%
Covered Lines: 6474
Relevant Lines: 9336

💛 - Coveralls

coveralls avatar Sep 02 '22 21:09 coveralls

Flask-Security 5 gives some problems, so we'll wait a bit (small chance this'll resolve).

The Flask-Classful problem is now contained with this PR in that we limit the Flask/Werkzeug combo. That is not a nice solution, but it codifies the state of things.

nhoening avatar Sep 02 '22 21:09 nhoening