CI: Test Python 3.10 on MacOS and Windows too
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry

Blocker for MacOS/Windows Python 3.10 wheels. We probably want to migrate these onto Azure as soon as Python 3.10 is available there for load balancing reasons.


Labels:
name: CI
description: Continuous Integration
name: Windows
description: Windows OS
name: OS X
description: Related to Mac OS & hardware issues (M1)

Comments:
New Windows failures :(
```
pandas/tests/frame/test_reductions.py::TestDataFrameReductions::test_min_max_dt64_with_NaT_skipna_false[tzlocal()]
  C:\hostedtoolcache\windows\Python\3.10.0-rc.2\x64\lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: 'pandas._libs.tslibs.conversion._localize_tso'
  
  Traceback (most recent call last):
    File "pandas\_libs\tslibs\tzconversion.pyx", line 383, in pandas._libs.tslibs.tzconversion.tz_convert_utc_to_tzlocal
      return _tz_convert_tzlocal_utc(utc_val, tz, to_utc=False, fold=fold)
    File "pandas\_libs\tslibs\tzconversion.pyx", line 594, in pandas._libs.tslibs.tzconversion._tz_convert_tzlocal_utc
      delta = _tzlocal_get_offset_components(val, tz, to_utc, fold)
    File "pandas\_libs\tslibs\tzconversion.pyx", line 554, in pandas._libs.tslibs.tzconversion._tzlocal_get_offset_components
      dt = dt.astimezone(tz)
    File "C:\hostedtoolcache\windows\Python\3.10.0-rc.2\x64\lib\site-packages\dateutil\tz\_common.py", line 144, in fromutc
      return f(self, dt)
    File "C:\hostedtoolcache\windows\Python\3.10.0-rc.2\x64\lib\site-packages\dateutil\tz\_common.py", line 261, in fromutc
      _fold = self._fold_status(dt, dt_wall)
    File "C:\hostedtoolcache\windows\Python\3.10.0-rc.2\x64\lib\site-packages\dateutil\tz\_common.py", line 196, in _fold_status
      if self.is_ambiguous(dt_wall):
    File "C:\hostedtoolcache\windows\Python\3.10.0-rc.2\x64\lib\site-packages\dateutil\tz\tz.py", line 254, in is_ambiguous
      naive_dst = self._naive_is_dst(dt)
    File "C:\hostedtoolcache\windows\Python\3.10.0-rc.2\x64\lib\site-packages\dateutil\tz\tz.py", line 260, in _naive_is_dst
      return time.localtime(timestamp + time.timezone).tm_isdst
  OSError: [Errno 22] Invalid argument
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
```
No details because it raised in Cython code. I'll try to fix it. 

EDIT: Apparantly this test is xfailed on Windows, but for some reason the xfail doesn't trigger on Python 3.10 b/c the exception isn't getting raised properly. I guess I'll just skip the test.
@github-actions pre-commit
> EDIT: Apparantly this test is xfailed on Windows, but for some reason the xfail doesn't trigger on Python 3.10 b/c the exception isn't getting raised properly. I guess I'll just skip the test.

more complex, but could maybe retain the xfail for Python 3.8 and 3.9 and skip for py3.10 with a comment back to this issue.
This is okay to backport?
yeah i think ok to backport
thanks @lithomas1 
@meeseeksdev backport 1.3.x
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
$ git checkout 1.3.x
$ git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
$ git cherry-pick -m1 679e0587bdcf435d1ba66801847a580d0afaecc8
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
$ git commit -am 'Backport PR #43772: CI: Test Python 3.10 on MacOS and Windows too'
```

4. Push to a named branch :

```
git push YOURFORK 1.3.x:auto-backport-of-pr-43772-on-1.3.x
```

5. Create a PR against branch 1.3.x, I would have named this PR:

> "Backport PR #43772 on branch 1.3.x (CI: Test Python 3.10 on MacOS and Windows too)"

And apply the correct labels and milestones.

Congratulation you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove `Still Needs Manual Backport` label once the PR gets merged.

If these instruction are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
                
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
$ git checkout 1.3.x
$ git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
$ git cherry-pick -m1 679e0587bdcf435d1ba66801847a580d0afaecc8
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
$ git commit -am 'Backport PR #43772: CI: Test Python 3.10 on MacOS and Windows too'
```

4. Push to a named branch :

```
git push YOURFORK 1.3.x:auto-backport-of-pr-43772-on-1.3.x
```

5. Create a PR against branch 1.3.x, I would have named this PR:

> "Backport PR #43772 on branch 1.3.x (CI: Test Python 3.10 on MacOS and Windows too)"

And apply the correct labels and milestones.

Congratulation you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove `Still Needs Manual Backport` label once the PR gets merged.

If these instruction are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
                
cc @lithomas1 if you'd do the manual backport when you have a chance