New GitHub issue #119011 from nikola-benes:<br>

<hr>

<pre>
# Bug report

### Bug description:

```python
from functools import update_wrapper

def my_type(*args): pass

t = update_wrapper(my_type, type)
```

This works on Python ≤ 3.11, and I think this is expected because the docs for `update_wrapper` claim that it may be used with callables other than functions.

However, with 3.12, I get

```
TypeError: __type_params__ must be set to a tuple
```

(Similarly for `functools.wraps`.)

The problem is that update_wrapper includes `__type_params__` by default (which is undocumented, see [related issue](https://github.com/python/cpython/issues/119010)) and `type.__type_params__` is a descriptor.

### CPython versions tested on:

3.12

### Operating systems tested on:

Linux
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/119011">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>