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 62a0f50 commit 5400262Copy full SHA for 5400262
src/OpenSSL/SSL.py
@@ -834,13 +834,9 @@ def _require_not_used(f: F) -> F:
834
@wraps(f)
835
def inner(self: Context, *args: Any, **kwargs: Any) -> Any:
836
if self._used:
837
- warnings.warn(
838
- (
839
- "Attempting to mutate a Context after a Connection was "
840
- "created. In the future, this will raise an exception"
841
- ),
842
- DeprecationWarning,
843
- stacklevel=2,
+ raise ValueError(
+ "Context has already been used to create a Connection, it "
+ "cannot be mutated again"
844
)
845
return f(self, *args, **kwargs)
846
0 commit comments