DEPR: correct locations to access public json/parser objects in depr message
State: closed


Another one remaining is `pd.parser.na_values`

```
In [2]: pd.parser.na_values
/home/joris/miniconda3/envs/dev/bin/ipython:1: FutureWarning: pandas.parser.na_values is deprecated. 
Please use pandas.io.libparsers.na_values instead.
  #!/home/joris/miniconda3/envs/dev/bin/python
Out[2]: 
{numpy.bool_: 255,
 dtype('bool'): 255,
 numpy.uint64: 18446744073709551615,
 numpy.int64: -9223372036854775808,
 dtype('int16'): -32768,
 dtype('uint64'): 18446744073709551615,
 numpy.int8: -128,
 dtype('int32'): -2147483648,
 numpy.uint8: 255,
 dtype('int8'): -128,
 numpy.object_: nan,
 numpy.float64: nan,
 numpy.uint32: 4294967295,
 dtype('O'): nan,
 numpy.int32: -2147483648,
 dtype('uint32'): 4294967295,
 dtype('uint16'): 65535,
 dtype('uint8'): 255,
 dtype('int64'): -9223372036854775808,
 dtype('float64'): nan,
 numpy.uint16: 65535,
 numpy.int16: -32768}
```

I don't think we should refer to `libparsers`, but for now it is not imported in `pandas.io.parsers` as alternative. I could add it there, but the question is maybe whether this is actually useful for users? Maybe we should say that it will be removed without giving alternative?

Labels:
name: Deprecate
description: Functionality to remove in pandas

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

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

```diff
@@            Coverage Diff             @@
##           master   #15909      +/-   ##
==========================================
+ Coverage   90.95%   90.96%   +<.01%     
==========================================
  Files         145      145              
  Lines       49535    49535              
==========================================
+ Hits        45057    45058       +1     
+ Misses       4478     4477       -1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.72% <100%> (ø)` | :arrow_up: |
| #single | `40.62% <100%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15909?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/15909?src=pr&el=tree#diff-cGFuZGFzL19faW5pdF9fLnB5) | `92.68% <100%> (ø)` | :arrow_up: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/15909?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.03% <0%> (+0.34%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15909?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/15909?src=pr&el=footer). Last update [e4e87ec...49d032b](https://codecov.io/gh/pandas-dev/pandas/pull/15909?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/15909?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@88bed54`). [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/15909/graphs/tree.svg?src=pr&token=eZ4WkYLtcO&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/15909?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##             master   #15909   +/-   ##
=========================================
  Coverage          ?   90.96%           
=========================================
  Files             ?      145           
  Lines             ?    49475           
  Branches          ?        0           
=========================================
  Hits              ?    45007           
  Misses            ?     4468           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.72% <100%> (?)` | |
| #single | `40.68% <100%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15909?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/depr\_module.py](https://codecov.io/gh/pandas-dev/pandas/pull/15909?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvZGVwcl9tb2R1bGUucHk=) | `80.48% <ø> (ø)` | |
| [pandas/tslib.py](https://codecov.io/gh/pandas-dev/pandas/pull/15909?src=pr&el=tree#diff-cGFuZGFzL3RzbGliLnB5) | `100% <ø> (ø)` | |
| [pandas/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/15909?src=pr&el=tree#diff-cGFuZGFzL19faW5pdF9fLnB5) | `92.68% <100%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15909?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/15909?src=pr&el=footer). Last update [88bed54...01f8c38](https://codecov.io/gh/pandas-dev/pandas/pull/15909?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
hmm, I don't remember why I added compat for this. let me have a look.
yeah I think we should just remove ``na_values`` entirely.  any objections? (as I said I don't remember why I had added this).
I don't know why you would need `na_values`, so OK for me (@gfyoung ?)
Added removal of `na_values` and correct redirect for `CParserError`
@jorisvandenbossche :
> I don't know why you would need na_values, so OK for me

Makes sense to me.  Hopefully it doesn't break any tests.
@gfyoung to be clear, it is not removed internally, only the public exposure is deprecated. So it is about whether external users would want to use it
@jorisvandenbossche :

> to be clear, it is not removed internally

Yes, absolutely!  I meant that hopefully no tests were accessing this variable externally.
ok, used the script to rebase you locally and push up. seemed to work.
thanks!
> ok, used the script to rebase you locally and push up. seemed to work.

Great!