Reduce RelationCounterField ID signal conflicts and harden tests.

Review Request #7166 — Created April 4, 2015 and submitted

Information

Djblets
release-0.8.x
c0b5609...

Reviewers

RelationCounterFields were using RelationTracker instance IDs as the
dipsatch_uid when listening to post_save signals, which could
theoretically conflict with another object that happened to use the same
numeric ID for another purpose. We now have additional information in
the dispatch UID to prevent such a conflict.

The unit tests have also been hardened for the case where there's
already legitimate signal connections to the post_save signal.

Unit tests pass.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/db/tests/test_relation_counter_field.py
        djblets/db/fields.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/db/tests/test_relation_counter_field.py
        djblets/db/fields.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.8.x (581de8e)