Fix arithmetic errors with timedelta64 dtypes
State: closed

Kind of surprising, but I don't see any Issues for these bugs.  Might be because many of them were found after parametrizing arithmetic tests, so instead of Issues we had xfails.

xref #20088 
xref #22163


- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Timedelta
description: Timedelta data type

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22390?src=pr&el=h1) Report
> Merging [#22390](https://codecov.io/gh/pandas-dev/pandas/pull/22390?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/25e6a21ac5f3a266de97a6dc00170e106215efa1?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/22390/graphs/tree.svg?src=pr&width=650&token=eZ4WkYLtcO&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/22390?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #22390      +/-   ##
==========================================
- Coverage   92.04%   92.04%   -0.01%     
==========================================
  Files         169      169              
  Lines       50740    50759      +19     
==========================================
+ Hits        46705    46722      +17     
- Misses       4035     4037       +2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.45% <100%> (-0.01%)` | :arrow_down: |
| #single | `42.24% <36.84%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22390?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/22390/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.45% <100%> (+0.01%)` | :arrow_up: |
| [pandas/core/indexes/range.py](https://codecov.io/gh/pandas-dev/pandas/pull/22390/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9yYW5nZS5weQ==) | `95.73% <100%> (+0.02%)` | :arrow_up: |
| [pandas/core/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/22390/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvb3BzLnB5) | `96.76% <100%> (+0.04%)` | :arrow_up: |
| [pandas/core/arrays/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/22390/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3RpbWVkZWx0YXMucHk=) | `91.54% <0%> (-1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22390?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22390?src=pr&el=footer). Last update [25e6a21...cdfb3bf](https://codecov.io/gh/pandas-dev/pandas/pull/22390?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

This will probably need rebasing after #22350 goes through 
Implemented `maybe_upcast_for_op`.  There may be other places where this can be used; I'll take a look in a follow-up.
ping
thanks! nice cleaning