We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d5a759 commit d0628f5Copy full SHA for d0628f5
src/OpenSSL/SSL.py
@@ -835,13 +835,9 @@ def _require_not_used(f: F) -> F:
835
@wraps(f)
836
def inner(self: Context, *args: Any, **kwargs: Any) -> Any:
837
if self._used:
838
- warnings.warn(
839
- (
840
- "Attempting to mutate a Context after a Connection was "
841
- "created. In the future, this will raise an exception"
842
- ),
843
- DeprecationWarning,
844
- stacklevel=2,
+ raise ValueError(
+ "Context has already been used to create a Connection, it "
+ "cannot be mutated again"
845
)
846
return f(self, *args, **kwargs)
847
0 commit comments