Skip to content
Myr

Checks __attrs__ on session instance prior to iterating.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrew Jesaitis · committed by Andrew Jesaitis · parent be62645 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:requests/sessions.py+4 added-1 removed
453 unmodified lines
454 """Registers a connection adapter to a prefix."""455 self.adapters[prefix] = adapter456457 def __getstate__(self):458 if hasattr(self, '__attrs__'):458 return dict((attr, getattr(self, attr, None)) for attr in self.__attrs__)459 return dict((attr, getattr(self, attr, None)) for attr in self.__attrs__)460 else:461 return {}462463 def __setstate__(self, state):464 for attr, value in state.items():465 setattr(self, attr, value)
6 unmodified lines