Skip to content

Commit ba637d5

Browse files
docs: Clarify Connection always copies, dj.conn() overrides
- Connection.__init__ always creates self.config = copy(dj.config) - dj.conn() overrides after creation: conn.config = dj.config Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b929627 commit ba637d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/design/thread-safe-mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ Mouse().insert(...) # Uses schema.connection.config for settings
153153
- `Schema.__init__`: Raise `ThreadSafetyError` when `connection=None` and `thread_safe=True`
154154

155155
### 3. Add conn.config to all connections
156-
- `dj.conn()`: Set `conn.config = dj.config` (same object for backward compatibility)
157-
- `dj.Connection(...)`: Set `self.config = copy(dj.config)` (independent copy)
156+
- `Connection.__init__`: Always creates `self.config = copy(dj.config)` (independent copy)
157+
- `dj.conn()`: After connection creation, overrides `conn.config = dj.config` (same object for backward compatibility)
158158

159159
### 4. Refactor internal code to use conn.config
160160

0 commit comments

Comments
 (0)