BUG: Fix Python2 long unsupport in _can_hold_element
State: closed

- [x] closes #18316
- [ ] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:

Comments:
Where should I add `_can_hold_element` tests?
i think #18385 also looking at this issue
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18399?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@8512cc5`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff            @@
##             master   #18399   +/-   ##
=========================================
  Coverage          ?   91.34%           
=========================================
  Files             ?      164           
  Lines             ?    49730           
  Branches          ?        0           
=========================================
  Hits              ?    45426           
  Misses            ?     4304           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.14% <100%> (?)` | |
| #single | `39.62% <66.66%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18399?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/18399?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `94.47% <100%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18399?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/18399?src=pr&el=footer). Last update [8512cc5...703e77e](https://codecov.io/gh/pandas-dev/pandas/pull/18399?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18399?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@8512cc5`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff            @@
##             master   #18399   +/-   ##
=========================================
  Coverage          ?   91.34%           
=========================================
  Files             ?      164           
  Lines             ?    49730           
  Branches          ?        0           
=========================================
  Hits              ?    45426           
  Misses            ?     4304           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.14% <100%> (?)` | |
| #single | `39.62% <66.66%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18399?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/18399?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `94.47% <100%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18399?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/18399?src=pr&el=footer). Last update [8512cc5...703e77e](https://codecov.io/gh/pandas-dev/pandas/pull/18399?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@jreback Oops! I'll close this issue!