Open mattiaverga opened 5 months ago
with Python 3.12:
>>> def worker(obj):
... pass
...
>>> hasattr(property(worker), '__name__')
False
With Python 3.13:
>>> def worker(obj):
... pass
...
>>> hasattr(property(worker), '__name__')
True
>>> property(worker).__name__
'worker'
See https://github.com/python/cpython/issues/101860
Would changing https://github.com/Pylons/pyramid/blob/ef0f6861e5b439afe43983f6c7437c30a413a34d/src/pyramid/util.py#L110-L116
to
if not hasattr(callable, '__name__') or isinstance(callable, property):
a suitable fix?
As I understand it, that would force the caller to manually pass a name for the property, while with Python 3.13+ it is no longer necessary. I would rather adjust the test and allow this.
I am working on a pull request.
Two tests in
test_util
started to fail in Fedora Linux after the move to Python 3.13.0b2:Full logs are available at https://koji.fedoraproject.org/koji/taskinfo?taskID=119046120