remove enum import for PY2 compat, xref #22802
State: closed

xref #22802 

Labels:

Comments:
@TomAugspurger 
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24170?src=pr&el=h1) Report
> Merging [#24170](https://codecov.io/gh/pandas-dev/pandas/pull/24170?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0ac1197c0597d2d55b1ebf0a245c31bc1fa38e19?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #24170   +/-   ##
=======================================
  Coverage   92.21%   92.21%           
=======================================
  Files         162      162           
  Lines       51721    51721           
=======================================
  Hits        47692    47692           
  Misses       4029     4029
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.61% <ø> (ø)` | :arrow_up: |
| #single | `43.03% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24170?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/24170?src=pr&el=footer). Last update [0ac1197...7397955](https://codecov.io/gh/pandas-dev/pandas/pull/24170?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/24170?src=pr&el=h1) Report
> Merging [#24170](https://codecov.io/gh/pandas-dev/pandas/pull/24170?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/7f753892eb6b29aaa62176cb9f00ad84c092c09a?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #24170      +/-   ##
==========================================
- Coverage   92.21%   92.21%   -0.01%     
==========================================
  Files         162      162              
  Lines       51763    51763              
==========================================
- Hits        47734    47733       -1     
- Misses       4029     4030       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.61% <ø> (ø)` | :arrow_up: |
| #single | `43% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24170?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/json/json.py](https://codecov.io/gh/pandas-dev/pandas/pull/24170/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2pzb24vanNvbi5weQ==) | `92.61% <0%> (-0.48%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24170/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `87.51% <0%> (+0.09%)` | :arrow_up: |

------

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

this is quite tricky to test as would have to uninstall enum34 first.
I wonder if we could do something like

1. Build the wheel as part of the normal install
2. run the tests
3. create a new environment with just `pytz` and `python-dateutil`
4. Install the previously built wheel into that environment with `--no-deps`
5. Ensure that a basic "import pandas" works.

We could also do this in the `pandas-ci` repo.
Just a few questions, none of them probably matter.

The testing can be done separately I think (would be good to verify before we tag 0.24).
I'll be able to confirm that this works in the absence of enum34, once this hits the nightly builds.
@TomAugspurger updated
Just a note that our tests based on the nightly builds are now passing. Thanks!
great! @effigies