Skip to content

Commit

Permalink
Drop expire-related garbage
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Sep 7, 2015
1 parent 0c3089f commit 30c5fc0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 1 addition & 5 deletions aiohttp_session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Session(MutableMapping):

"""Session dict-like object."""

def __init__(self, identity, *, data=None, new=False, max_age):
def __init__(self, identity, *, data=None, new=False):
self._changed = False
self._mapping = {}
self._identity = identity
Expand All @@ -29,10 +29,6 @@ def __init__(self, identity, *, data=None, new=False, max_age):
else:
self._created = created

self._expire_at = data.get('expire_at')
if self._expire_at is None:
self._expire_at = time.time() + max_age

if session_data is not None:
self._mapping.update(session_data)

Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ sphinx
alabaster>=0.6.2
pep257
-e .

aioredis
cryptography
2 changes: 1 addition & 1 deletion tests/test_session_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class SessionTests(unittest.TestCase):

def test_create(self):
s = Session('test_identity', new=True, default_age=123)
s = Session('test_identity', new=True)
self.assertEqual(s, {})
self.assertTrue(s.new)
self.assertEqual('test_identity', s.identity)
Expand Down

0 comments on commit 30c5fc0

Please sign in to comment.