You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session is not set in object if connection fails, which raises 'AttributeError' on __del__ #746
If connecting fails (e.g. due to invalid host or credentials) then no session attribute will be set, but __del__ will still be called when the not-fully-initialized Connection instance is destroyed. This causes warnings to be printed to stderr.
A simple fix would be to check if session is set in open or doing the same thing in __del__ only, to keep the semantics of open intact.
Activity
peco-engineer-bot commentedon Jul 23, 2026
🤖 engineer-bot opened a fix PR: #877
Review before merge.
tomasfarias commentedon Jul 28, 2026
Any possibility of merging my PR or the robot's PR? I just want this fixed if possible, I don't really care much about attribution.