Skip to content

Commit

Permalink
Exception string referencing wrong function name.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Dec 5, 2024
1 parent 563525d commit 0da4ba5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Version 1.17.1

* Due to GitHub actions changes, binary wheels were missing for macOS Intel.

* Not implemented error for `__reduce__()` on `ObjectProxy` was incorrectly
displaying the error as being on `__reduce_ex__()`.

Version 1.17.0
--------------

Expand Down
2 changes: 1 addition & 1 deletion src/wrapt/_wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ static PyObject *WraptObjectProxy_reduce(
WraptObjectProxyObject *self, PyObject *args, PyObject *kwds)
{
PyErr_SetString(PyExc_NotImplementedError,
"object proxy must define __reduce_ex__()");
"object proxy must define __reduce__()");

return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/wrapt/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def __deepcopy__(self, memo):

def __reduce__(self):
raise NotImplementedError(
'object proxy must define __reduce_ex__()')
'object proxy must define __reduce__()')

def __reduce_ex__(self, protocol):
raise NotImplementedError(
Expand Down

0 comments on commit 0da4ba5

Please sign in to comment.