COMPAT: avoid calling getsizeof() on PyPy
State: closed

closes #17228 

WIP Relates to issue #17228, this is a simple possible solution to the issue. Not sure this approach is the best, perhaps ``deep=True`` should raise on PyPy?


Labels:
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
Hello @mattip! Thanks for updating the PR.

















Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on August 14, 2017 at 20:23 Hours UTC
My first instinct would be to `raise` on PyPy with `deep=True` rather than stubbing a value, but don't feel strongly about it.
not a big fan of downstream having to deal with this. I suppose using the default argument is ok.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@330b8c1`). [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/17229/graphs/tree.svg?width=650&height=150&src=pr&token=eZ4WkYLtcO)](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##             master   #17229   +/-   ##
=========================================
  Coverage          ?   91.01%           
=========================================
  Files             ?      162           
  Lines             ?    49535           
  Branches          ?        0           
=========================================
  Hits              ?    45084           
  Misses            ?     4451           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.79% <100%> (?)` | |
| #single | `40.27% <42.85%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `100% <ø> (ø)` | |
| [pandas/core/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYmFzZS5weQ==) | `96.01% <100%> (ø)` | |
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `96.92% <100%> (ø)` | |
| [pandas/compat/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9fX2luaXRfXy5weQ==) | `61.05% <100%> (ø)` | |
| [pandas/core/indexes/range.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9yYW5nZS5weQ==) | `92.81% <100%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17229?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/17229?src=pr&el=footer). Last update [330b8c1...08d2e0c](https://codecov.io/gh/pandas-dev/pandas/pull/17229?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/17229?src=pr&el=h1) Report
> Merging [#17229](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0f25426eac5c0097214df78b45125ac039c85770?src=pr&el=desc) will **decrease** coverage by `0.04%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #17229      +/-   ##
==========================================
- Coverage   91.03%   90.99%   -0.05%     
==========================================
  Files         162      162              
  Lines       49527    49531       +4     
==========================================
- Hits        45086    45069      -17     
- Misses       4441     4462      +21
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.77% <100%> (-0.03%)` | :arrow_down: |
| #single | `40.25% <42.85%> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `100% <ø> (ø)` | :arrow_up: |
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `96.92% <100%> (ø)` | :arrow_up: |
| [pandas/core/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYmFzZS5weQ==) | `96.01% <100%> (ø)` | :arrow_up: |
| [pandas/compat/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9fX2luaXRfXy5weQ==) | `61.05% <100%> (+0.37%)` | :arrow_up: |
| [pandas/core/indexes/range.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9yYW5nZS5weQ==) | `92.81% <100%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/plotting/\_converter.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb252ZXJ0ZXIucHk=) | `63.23% <0%> (-1.82%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17229?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.72% <0%> (-0.1%)` | :arrow_down: |

------

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

pls add a whatsnew note in bug fixes maybe conversion section. ping on green.
@jreback ping. I added ``if PYPY`` conditional testing rather than just skipping entirely on PyPy where appropriate, those tests pass on PyPy too (PyPy latest nightly + Numpy HEAD is down to 44 failures).
@jreback updated pull request according to the review
thanks @mattip 
thanks @jreback, @chris-b1. It is a pleasure to interact with such a responsive community