Move normalization funcs up to conversion
State: closed

We're going to need `date_normalize` upstream of `tslib` before long, so this moves it to conversion.

Simplifies repeated checking in `localize_tso`, closes #17944

Labels:
name: Clean

Comments:
Minor `flake8` error.  Otherwise, seems reasonable to me.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18086?src=pr&el=h1) Report
> Merging [#18086](https://codecov.io/gh/pandas-dev/pandas/pull/18086?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/b4375bde87afdc037056ff90e4f93b606c76e140?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #18086      +/-   ##
==========================================
- Coverage   91.27%   91.26%   -0.02%     
==========================================
  Files         163      163              
  Lines       50120    50120              
==========================================
- Hits        45749    45740       -9     
- Misses       4371     4380       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.07% <ø> (ø)` | :arrow_up: |
| #single | `40.32% <ø> (-0.06%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18086?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18086?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18086?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.75% <0%> (-0.1%)` | :arrow_down: |

------

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

```diff
@@            Coverage Diff            @@
##             master   #18086   +/-   ##
=========================================
  Coverage          ?   91.38%           
=========================================
  Files             ?      163           
  Lines             ?    50065           
  Branches          ?        0           
=========================================
  Hits              ?    45752           
  Misses            ?     4313           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.19% <100%> (?)` | |
| #single | `40.36% <50%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18086?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/18086?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.48% <100%> (ø)` | |
| [pandas/tseries/frequencies.py](https://codecov.io/gh/pandas-dev/pandas/pull/18086?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvZnJlcXVlbmNpZXMucHk=) | `96.01% <100%> (ø)` | |

------

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

BTW, once this and #18059 are closed we can cut/paste all of Timestamp into its own file.
rebase
On rebasing I noticed a bunch of old scripts removed.  Nice!
Just tried rebasing.  It seemed to work locally, but pushing didn't trigger CI.  So did "git pull upstream master" too.  I don't think there's any problems, just a heads up.
> Just tried rebasing. It seemed to work locally, but pushing didn't trigger CI. So did "git pull upstream master" too. I don't think there's any problems, just a heads up.

of course it does. you need to ``git push yourbranch yourupstream -f``

further you really really should squash / fixup these, no need for all of these commits
``git rebase -i yourupstream``
Removed pydt_to_i8 per request.  Holding off on removing pydt_to_i8 pending profiling the effects in offsets.pyx.
> Removed pydt_to_i8 per request. Holding off on removing pydt_to_i8 pending profiling the effects in offsets.pyx.

typo! but ok.
ping on green.
thanks!