summaryrefslogtreecommitdiff
path: root/examples/dogpile_caching/relation_caching.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dogpile_caching/relation_caching.py')
-rw-r--r--examples/dogpile_caching/relation_caching.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/dogpile_caching/relation_caching.py b/examples/dogpile_caching/relation_caching.py
index 7a5779620..d40752e48 100644
--- a/examples/dogpile_caching/relation_caching.py
+++ b/examples/dogpile_caching/relation_caching.py
@@ -5,16 +5,16 @@ related PostalCode, City, Country objects should be pulled from long
term cache.
"""
-from environment import Session, root
-from model import Person, cache_address_bits
+from .environment import Session, root
+from .model import Person, cache_address_bits
from sqlalchemy.orm import joinedload
import os
for p in Session.query(Person).options(joinedload(Person.addresses), cache_address_bits):
- print p.format_full()
+ print(p.format_full())
-print "\n\nIf this was the first run of relationship_caching.py, SQL was likely emitted to "\
+print("\n\nIf this was the first run of relationship_caching.py, SQL was likely emitted to "\
"load postal codes, cities, countries.\n"\
"If run a second time, assuming the cache is still valid, "\
"only a single SQL statement will run - all "\
@@ -22,4 +22,4 @@ print "\n\nIf this was the first run of relationship_caching.py, SQL was likely
"To clear the cache, delete the file %r. \n"\
"This will cause a re-load of cities, postal codes and countries on "\
"the next run.\n"\
- % os.path.join(root, 'cache.dbm')
+ % os.path.join(root, 'cache.dbm'))