stormpath / stormpath-flask

Build simple, secure web applications with Stormpath and Flask!
http://flask-stormpath.readthedocs.org/en/latest/
Other
155 stars 31 forks source link

Update requirements to latest versions #73

Open bertildaniel opened 8 years ago

bertildaniel commented 8 years ago

Update requirements to latest versions and update all flask.ext.x imports to flask_x format (only affecting tests and docs).

There was an issue with the deleted user signal which was triggering a refetching of the Account from Stormpath (failing with an exception) when the User object was dispatched by blinker. I've made a slightly hacky workaround to prevent that re-fetch as I could find no way in the stormpath library to prevent the re-fetch and/or internally track that the resource was just deleted. It seems this is something that needs be fixed in the stormpath library.

With the upgrade to flask-login 0.3.2 there is a breaking change in the interface, where User.is_authenticated etc become properties.

I've tested this on Python 3.5.2 (which I'm using) and also tests pass on Python 2.7.12.

jcass77 commented 8 years ago

Should you not perhaps create this PR against the 'develop' branch to be merged? Some of the dependencies have already been upgraded there (thought not quite as high as you have here).

It look like steps have already been taken to change the user deletion behaviour as well (see https://github.com/stormpath/stormpath-flask/blob/016a4b722df51c72d10fcffe9e4615de23088b32/flask_stormpath/models.py#L64-L71) - not sure if that fixes the problem you described though.

bertildaniel commented 8 years ago

@jcass77 I did briefly look at the develop branch and it didn't seem like it was being kept up to date with master? The only thing on develop that is not covered by this PR is the changes to supported languages in travis.yml and setup.py which could be added here.

The delete changes on that branch would break the current signal behaviour (as it stands in release 0.4.5) of sending the actual User object with the signal. Of course could change to use a dict instead - I don't have any particular opinion on that as I'm not using the functionality, but that would affect anyone who has already built things on top of current behaviour.

jcass77 commented 8 years ago

A lot of this has since landed in 'develop' (except for the user delete signaling).

If you could rebase this PR on 'develop' the maintainers might be able to take another look at it.

rdegges commented 8 years ago

Yes, if you could rebase that'd be awesome. If not I'll take a look at this next week and go through and just pick out the relevant bits.