New GitHub issue #96352 from philg314:<br>

<hr>

<pre>
# Bug report

`object.__getattribute__` does not set `name` and `obj` of `AttributeError`:

```python
class Test: pass
test = Test()

try:
    print("test.a")
    test.a
except AttributeError as e:
    print(f"{e=}")
    print(f"{e.name=}")
    print(f"{e.obj=}")

print()

try:
    print('object.__getattribute__(test, "a")')
    object.__getattribute__(test, "a")
except AttributeError as e:
    print(f"{e=}")
    print(f"{e.name=}")
    print(f"{e.obj=}")
```

Output:
```
test.a
e=AttributeError("'Test' object has no attribute 'a'")
e.name='a'
e.obj=<__main__.Test object at 0x7f2fc87a8760>

object.__getattribute__(test, "a")
e=AttributeError("'Test' object has no attribute 'a'")
e.name=None
e.obj=None
```

- CPython versions tested on: Python 3.10.5, Python 3.12.0a0
</pre>

<hr>

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