pallets-eco / flask-session

Server side session extension for Flask
https://flask-session.readthedocs.io
BSD 3-Clause "New" or "Revised" License
507 stars 238 forks source link

Let Flask-Session be installed with optional dependencies. #228

Closed eiriklid closed 8 months ago

eiriklid commented 8 months ago

The possible optional groups are cachelib, filesystem, mongodb, redis, sqlalchemyand dev. Flask-Session[dev] installs all optional-dependencies.

The versions is taken from tool.rye.dev-dependencies.

Related to #223

eiriklid commented 8 months ago

When I ran flit install --extras dev it listed all the dependencies that was listed under optional-dependencies.

Lxstr commented 8 months ago

Great thanks! I noticed memcache is missing and looks like I was missing that in rye deps too. Which makes me wonder how my tests were running locally. If you like you can add pymemcache or I can force push. It seems this library is probably most flexible (compatible with gevent given its all python) and maintained.

eiriklid commented 8 months ago

I wondered about that, because the test failed locally. Would that be an optional as well? I thought memcached was the default mode, but if you like all of them to be optional that is fine.

I have not added anything to docs or changelog as I wasn't sure if that was a task for me or the regular maintainers.

Lxstr commented 8 months ago

I guess filesystem was considered the default originally as cachlib was originally included. Now I have mentioned in docs redis is the recommended backend but i still think better to have the developer consciously choose their backend rather than include libraries that a dev may not need, perhaps if they have a complex auditing process and don't want to have to audit another library.

Lxstr commented 8 months ago

If you want to add to the docs go for it the more help I can get the better. By the way, currently struggling to get the patch version out maybe due to some github action publishing package conflicts.