BaseCache now has a no-op close method as per ticket #18582 #218

Merged
merged 1 commit into from Nov 11, 2012

Conversation

Projects
None yet
3 participants
@mgrouchy
Contributor

mgrouchy commented Jul 18, 2012

Also removed the hasattr check when firing request_finished signal for
caches with a 'close' method. Should be safe to call cache.close
everywhere now

references ticket: https://code.djangoproject.com/ticket/18482

+ def test_close(self):
+ self.assertEqual(hasattr(self.cache, 'close'), True)
+ self.cache.close()
+
def test_data_types(self):
# Many different data types can be cached
stuff = {

This comment has been minimized.

Show comment Hide comment
@claudep

claudep Jul 18, 2012

Member

assertEqual(..., True) -> assertTrue(...)

@claudep

claudep Jul 18, 2012

Member

assertEqual(..., True) -> assertTrue(...)

This comment has been minimized.

Show comment Hide comment
@mgrouchy

mgrouchy Jul 18, 2012

Contributor

Awesome. I will fix this.

On 2012-07-18, at 11:30 AM, Claude Parozreply@reply.github.com wrote:

@@ -266,6 +266,10 @@ def test_decr(self):
self.assertEqual(self.cache.get('answer'), 32)
self.assertRaises(ValueError, self.cache.decr, 'does_not_exist')

  • def test_close(self):
  •    self.assertEqual(hasattr(self.cache, 'close'), True)
    
  •    self.cache.close()
    
    def test_data_types(self):
    # Many different data types can be cached
    stuff = {

assertEqual(..., True) -> assertTrue(...)


Reply to this email directly or view it on GitHub:
https://github.com/django/django/pull/218/files#r1188827

@mgrouchy

mgrouchy Jul 18, 2012

Contributor

Awesome. I will fix this.

On 2012-07-18, at 11:30 AM, Claude Parozreply@reply.github.com wrote:

@@ -266,6 +266,10 @@ def test_decr(self):
self.assertEqual(self.cache.get('answer'), 32)
self.assertRaises(ValueError, self.cache.decr, 'does_not_exist')

  • def test_close(self):
  •    self.assertEqual(hasattr(self.cache, 'close'), True)
    
  •    self.cache.close()
    
    def test_data_types(self):
    # Many different data types can be cached
    stuff = {

assertEqual(..., True) -> assertTrue(...)


Reply to this email directly or view it on GitHub:
https://github.com/django/django/pull/218/files#r1188827

BaseCache now has a no-op close method as per ticket #18582
Also removed the hasattr check when firing request_finished signal for
caches with a 'close' method. Should be safe to call `cache.close`
everywhere now
@mgrouchy

This comment has been minimized.

Show comment Hide comment
@mgrouchy

mgrouchy Jul 18, 2012

Contributor

updated as per feedback from @claudep.

Contributor

mgrouchy commented Jul 18, 2012

updated as per feedback from @claudep.

@mgrouchy

This comment has been minimized.

Show comment Hide comment
@mgrouchy

mgrouchy Jul 26, 2012

Contributor

Is there anything I can do to get this merged? Ticket says this is ready for checkin?

Contributor

mgrouchy commented Jul 26, 2012

Is there anything I can do to get this merged? Ticket says this is ready for checkin?

@mgrouchy

This comment has been minimized.

Show comment Hide comment
@mgrouchy

mgrouchy Sep 30, 2012

Contributor

Anything I can do to help this along to get it merged in before the code freeze for 1.5. No big deal, just trying to get this closed out.

Contributor

mgrouchy commented Sep 30, 2012

Anything I can do to help this along to get it merged in before the code freeze for 1.5. No big deal, just trying to get this closed out.

aaugustin added a commit that referenced this pull request Nov 11, 2012

Merge pull request #218 from mgrouchy/ticket_18582
Fixed #18582 -- Added a no-op close to BaseCache

@aaugustin aaugustin merged commit 4c5cea7 into django:master Nov 11, 2012

nanuxbe pushed a commit to nanuxbe/django that referenced this pull request Jul 2, 2016

Merge pull request #218 from django/full_mobile
Fully responsive layout on desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment