New GitHub issue #119302 from moi90:<br>

<hr>

<pre>
# Bug report

### Bug description:

There seems to be a bug with `str|None` vs `Union[str,None]` / `Optional[str]`:

```python
from typing import Union, get_origin

assert get_origin(str|None) == get_origin(Union[str,None])

get_origin(str|None)
# <class 'types.UnionType'>

get_origin(Union[str,None])
Union
```

This is unexpected to me and I think this is an error.

I verified this behavior on 3.10, 3.11 and 3.12.

### CPython versions tested on:

3.10, 3.11, 3.12

### Operating systems tested on:

Linux
</pre>

<hr>

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