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

Add .expired() message to CachedObject. #1881

Merged
merged 1 commit into from Jul 26, 2017
Merged

Add .expired() message to CachedObject. #1881

merged 1 commit into from Jul 26, 2017

Conversation

@ssanderson
Copy link
Contributor

@ssanderson ssanderson commented Jul 10, 2017

No description provided.

@ssanderson ssanderson changed the title TMP Add .expired() message to CachedObject. Jul 10, 2017


class Expired(Exception):
"""Marks that a :class:`CachedObject` has expired.
"""


@object.__new__
class _LessThanEverything(object):

This comment has been minimized.

@llllllllll

llllllllll Jul 15, 2017
Contributor

style nit: this isn't a class so I wouldn't use ClassCase here

@@ -20,6 +20,13 @@ def test_cached_object(self):
obj.unwrap(after)
self.assertEqual(e.exception.args, (expiry,))

def test_empty(self):
always_expired = CachedObject.empty()

This comment has been minimized.

@llllllllll

llllllllll Jul 15, 2017
Contributor

.expired()

Scott Sanderson
We often want the initial state of a CachedObject to be lazily computed,
which means we want a "pre-expired" CachedObject.
@ssanderson ssanderson force-pushed the expired-cache branch from 8104a88 to 74d00bd Jul 26, 2017
@coveralls
Copy link

@coveralls coveralls commented Jul 26, 2017

Coverage Status

Coverage increased (+0.005%) to 87.511% when pulling 74d00bd on expired-cache into 83c3ff4 on master.

1 similar comment
@coveralls
Copy link

@coveralls coveralls commented Jul 26, 2017

Coverage Status

Coverage increased (+0.005%) to 87.511% when pulling 74d00bd on expired-cache into 83c3ff4 on master.

@ssanderson ssanderson merged commit c40d9da into master Jul 26, 2017
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ssanderson ssanderson deleted the expired-cache branch Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.