Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web]: Improves the API for session management and adds expire support. #212

Merged
merged 9 commits into from Jun 1, 2017

Conversation

prologic
Copy link
Member

Unfortunately this breaks the existing (very lacking) API for managing sessions
and introduces the concept of a "Store" -- An abstract class with one
implementation MemoryStore. The idea here is that all session stores
implement this interface.

Closes #133

@codecov-io
Copy link

codecov-io commented Jan 23, 2017

Codecov Report

Merging #212 into master will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #212      +/-   ##
=========================================
+ Coverage   77.13%   77.2%   +0.06%     
=========================================
  Files          80      80              
  Lines        6683    6716      +33     
=========================================
+ Hits         5155    5185      +30     
- Misses       1528    1531       +3
Impacted Files Coverage Δ
circuits/core/workers.py 87.09% <0%> (-6.46%) ⬇️
circuits/net/sockets.py 81.67% <0%> (-0.18%) ⬇️
examples/web/sessions.py 97.01% <0%> (+2.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3aecf1d...39cd669. Read the comment docs.

Copy link
Contributor

@spaceone spaceone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails for python3! use class Store(circuits.six.with_metaclass(ABCMeta))

@prologic
Copy link
Member Author

Review?

@spaceone
Copy link
Contributor

@prologic Will do soon!

Copy link
Contributor

@apollo13 apollo13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see anything wrong with the change. For fun you could add a Session implementation which does put the data into a signed cookie so you do not need server-side storage.

@@ -10,6 +10,8 @@

from circuits import Component, handler

from six import with_metaclass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from circuits.six.

@prologic prologic merged commit fd519fa into master Jun 1, 2017
@spaceone spaceone deleted the Issue#133 branch November 29, 2018 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants