We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f46314f commit fffaa8aCopy full SHA for fffaa8a
1 file changed
src/OpenSSL/SSL.py
@@ -840,13 +840,9 @@ def _require_not_used(f: F) -> F:
840
@wraps(f)
841
def inner(self: Context, *args: Any, **kwargs: Any) -> Any:
842
if self._used:
843
- warnings.warn(
844
- (
845
- "Attempting to mutate a Context after a Connection was "
846
- "created. In the future, this will raise an exception"
847
- ),
848
- DeprecationWarning,
849
- stacklevel=2,
+ raise ValueError(
+ "Context has already been used to create a Connection, it "
+ "cannot be mutated again"
850
)
851
return f(self, *args, **kwargs)
852
0 commit comments