Skip to content

CI: Change development python version to 3.10 #51133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
638b578
CI: Change development python version to 3.10
phofl Feb 2, 2023
9c9b3ad
Update checks
phofl Feb 2, 2023
7fb6db9
Remove strict
phofl Feb 2, 2023
e67c34c
Remove strict
phofl Feb 2, 2023
2075191
Fixes
phofl Feb 3, 2023
1ad202f
Add dt
phofl Feb 3, 2023
2301bd5
Switch python to 3.9
phofl Feb 4, 2023
bec8bbb
Remove
phofl Feb 4, 2023
3779b01
Fix
phofl Feb 4, 2023
c0bf945
Try attribute
phofl Feb 6, 2023
598726e
Merge remote-tracking branch 'upstream/main' into 310
phofl Apr 7, 2023
19e22f6
Adjust
phofl Apr 7, 2023
0b0901d
Merge branch 'main' into 310
phofl Apr 7, 2023
93d475e
Fix mypy
phofl Apr 9, 2023
f92fd7b
Merge branch 'main' into 310
phofl Apr 9, 2023
60a6ad5
Try fixing doc build
phofl Apr 9, 2023
f0d47ac
Fix mypy
phofl Apr 9, 2023
fc95a39
Merge remote-tracking branch 'upstream/main' into 310
phofl Apr 12, 2023
4e819a7
Fix stubtest
phofl Apr 12, 2023
3813ee1
Remove workflow file
phofl Apr 12, 2023
932c3d7
Rename back
phofl Apr 13, 2023
824ccbf
Update
phofl Apr 13, 2023
72daabe
Rename
phofl Apr 13, 2023
bafa312
Merge remote-tracking branch 'upstream/main' into 310
phofl Apr 13, 2023
7d67a3f
Rename
phofl Apr 13, 2023
6939d2a
Change python version
phofl Apr 14, 2023
af5ce5c
Remove
phofl Apr 21, 2023
be2e12e
Merge remote-tracking branch 'upstream/main' into 310
phofl Apr 21, 2023
bc6665d
Merge branch 'main' into 310
phofl Apr 22, 2023
e4911ee
Fix doc errors
phofl Apr 22, 2023
a2d4a59
Remove pypy
phofl Apr 22, 2023
ecead17
Update ci/deps/actions-pypy-39.yaml
phofl Apr 22, 2023
e83832a
Revert pypy removal
phofl Apr 22, 2023
e6c60d8
Merge remote-tracking branch 'upstream/main' into 310
phofl Apr 23, 2023
9ad3cf4
Remove again
phofl Apr 23, 2023
7169faf
Merge branch 'main' into 310
phofl Apr 23, 2023
11a8c48
Merge remote-tracking branch 'upstream/main' into 310
phofl Apr 23, 2023
9b2c7f7
Fix
phofl Apr 23, 2023
bb1b5b7
Change to 3.9
phofl Apr 23, 2023
df5f011
Address
phofl Apr 25, 2023
d3089cc
Merge remote-tracking branch 'upstream/main' into 310
phofl Apr 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
image: ubuntu-2004:2022.04.1
resource_class: arm.large
environment:
ENV_FILE: ci/deps/circle-38-arm64.yaml
ENV_FILE: ci/deps/circle-39-arm64.yaml
PYTEST_WORKERS: auto
PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db"
PYTEST_TARGET: "pandas"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ jobs:
id: setup_python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
id: setup_python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'

- name: Install required dependencies
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
concurrency:
# https://github.community/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{matrix.python-version}}-sdist
Expand Down Expand Up @@ -80,8 +80,6 @@ jobs:
- name: Force oldest supported NumPy
run: |
case "${{matrix.python-version}}" in
3.8)
pip install numpy==1.21.6 ;;
3.9)
pip install numpy==1.21.6 ;;
3.10)
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ jobs:
timeout-minutes: 180
strategy:
matrix:
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml, actions-311.yaml]
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml]
# Prevent the include jobs from overriding other jobs
pattern: [""]
include:
- name: "Downstream Compat"
env_file: actions-38-downstream_compat.yaml
env_file: actions-39-downstream_compat.yaml
pattern: "not slow and not network and not single_cpu"
pytest_target: "pandas/tests/test_downstream.py"
- name: "Minimum Versions"
env_file: actions-38-minimum_versions.yaml
env_file: actions-39-minimum_versions.yaml
pattern: "not slow and not network and not single_cpu"
- name: "Locale: it_IT"
env_file: actions-38.yaml
env_file: actions-310.yaml
pattern: "not slow and not network and not single_cpu"
extra_apt: "language-pack-it"
# Use the utf8 version as the default, it has no bad side-effect.
Expand All @@ -48,7 +48,7 @@ jobs:
# It will be temporarily activated during tests with locale.setlocale
extra_loc: "it_IT"
- name: "Locale: zh_CN"
env_file: actions-38.yaml
env_file: actions-310.yaml
pattern: "not slow and not network and not single_cpu"
extra_apt: "language-pack-zh-hans"
# Use the utf8 version as the default, it has no bad side-effect.
Expand All @@ -62,7 +62,7 @@ jobs:
pattern: "not slow and not network and not single_cpu"
pandas_copy_on_write: "1"
- name: "Pypy"
env_file: actions-pypy-38.yaml
env_file: actions-pypy-39.yaml
pattern: "not slow and not network and not single_cpu"
test_args: "--max-worker-restart 0"
- name: "Numpy Dev"
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest]
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml, actions-311.yaml]
env_file: [actions-39.yaml, actions-310.yaml, actions-311.yaml]
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ format('{0} {1}', matrix.os, matrix.env_file) }}
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
fi
- name: Build environment and Run Tests
run: |
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev
/opt/python/cp39-cp39/bin/python -m venv ~/virtualenvs/pandas-dev
. ~/virtualenvs/pandas-dev/bin/activate
python -m pip install --no-cache-dir --no-deps -U pip wheel setuptools
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.0.0 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.46.1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- [windows-2019, win_amd64]
- [windows-2019, win32]
# TODO: support PyPy?
python: [["cp38", "3.8"], ["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"]]# "pp38", "pp39"]
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"]]# "pp38", "pp39"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"]]# "pp38", "pp39"]
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"]]# "pp39"]

env:
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
auto-update-conda: true
# Really doesn't matter what version we upload with
# just the version we test with
python-version: '3.8'
python-version: '3.10'
channels: conda-forge
channel-priority: true
# mamba fails to solve, also we really don't need this since we're just installing python
Expand Down
60 changes: 0 additions & 60 deletions ci/deps/actions-38.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: pandas-dev
channels:
- conda-forge
dependencies:
- python=3.8
- python=3.9

# build dependencies
- versioneer[toml]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: pandas-dev
channels:
- conda-forge
dependencies:
- python=3.8.0
- python=3.9

# build dependencies
- versioneer[toml]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies:
# TODO: Add the rest of the dependencies in here
# once the other plentiful failures/segfaults
# with base pandas has been dealt with
- python=3.8[build=*_pypy] # TODO: use this once pypy3.8 is available
- python=3.9[build=*_pypy]

# build dependencies
- versioneer[toml]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: pandas-dev
channels:
- conda-forge
dependencies:
- python=3.8
- python=3.9

# build dependencies
- versioneer[toml]
Expand Down
1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
# to ensure that include files (partial pages) aren't built, exclude them
# https://github.com/sphinx-doc/sphinx/issues/1965#issuecomment-124732907
"**/includes/**",
"**/api/pandas.Series.dt.rst",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder to open an issue about this once we merge this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it's on my todo list

]
try:
import nbconvert
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: pandas-dev
channels:
- conda-forge
dependencies:
- python=3.8
- python=3.10
- pip

# build dependencies
Expand Down Expand Up @@ -38,7 +38,7 @@ dependencies:
- matplotlib>=3.6.1
- numba>=0.55.2
- numexpr>=2.8.0 # pin for "Run checks on imported code" job
- openpyxl<3.1.1, >=3.0.7
- openpyxl>=3.0.10
- odfpy>=1.4.1
- py
- psycopg2>=2.9.3
Expand Down
4 changes: 3 additions & 1 deletion pandas/_libs/tslibs/timestamps.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ class Timestamp(datetime):
def __hash__(self) -> int: ...
def weekday(self) -> int: ...
def isoweekday(self) -> int: ...
def isocalendar(self) -> tuple[int, int, int]: ...
# Return type "Tuple[int, int, int]" of "isocalendar" incompatible with return
# type "_IsoCalendarDate" in supertype "date"
def isocalendar(self) -> tuple[int, int, int]: ... # type: ignore[override]
@property
def is_leap_year(self) -> bool: ...
@property
Expand Down
6 changes: 4 additions & 2 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
zoneinfo = None
if compat.PY39:
# Import "zoneinfo" could not be resolved (reportMissingImports)
import zoneinfo # type: ignore[no-redef]
import zoneinfo # type: ignore[assignment]

# Although zoneinfo can be imported in Py39, it is effectively
# "not available" without tzdata/IANA tz data.
Expand Down Expand Up @@ -1964,7 +1964,9 @@ def using_copy_on_write() -> bool:

warsaws = ["Europe/Warsaw", "dateutil/Europe/Warsaw"]
if zoneinfo is not None:
warsaws.append(zoneinfo.ZoneInfo("Europe/Warsaw"))
warsaws.append(
zoneinfo.ZoneInfo("Europe/Warsaw") # pyright: ignore[reportGeneralTypeIssues]
)


@pytest.fixture(params=warsaws)
Expand Down
3 changes: 1 addition & 2 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -11755,8 +11755,7 @@ def __iand__(self, other) -> Self:

@final
def __ior__(self, other) -> Self:
# error: Unsupported left operand type for | ("Type[NDFrame]")
return self._inplace_method(other, type(self).__or__) # type: ignore[operator]
return self._inplace_method(other, type(self).__or__)

@final
def __ixor__(self, other) -> Self:
Expand Down
4 changes: 3 additions & 1 deletion pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,9 @@ def _load_backend(backend: str) -> types.ModuleType:
if hasattr(eps, "select"):
entry = eps.select(group=key) # pyright: ignore[reportGeneralTypeIssues]
else:
entry = eps.get(key, ())
# Argument 2 to "get" of "dict" has incompatible type "Tuple[]";
# expected "EntryPoints" [arg-type]
entry = eps.get(key, ()) # type: ignore[arg-type]
for entry_point in entry:
found_backend = entry_point.name == backend
if found_backend:
Expand Down
9 changes: 7 additions & 2 deletions pandas/tests/arrays/test_datetimes.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
"""
Tests for DatetimeArray
"""
from __future__ import annotations

from datetime import timedelta
import operator

try:
from zoneinfo import ZoneInfo
except ImportError:
ZoneInfo = None
# Cannot assign to a type
ZoneInfo = None # type: ignore[misc, assignment]

import numpy as np
import pytest
Expand Down Expand Up @@ -712,7 +715,9 @@ def test_tz_localize_t2d(self):
# no tzdata
pass
else:
easts.append(tz)
# Argument 1 to "append" of "list" has incompatible type "ZoneInfo";
# expected "str"
easts.append(tz) # type: ignore[arg-type]

@pytest.mark.parametrize("tz", easts)
def test_iter_zoneinfo_fold(self, tz):
Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/indexes/datetimes/test_constructors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from datetime import (
datetime,
timedelta,
Expand Down
3 changes: 2 additions & 1 deletion pandas/tests/indexes/datetimes/test_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
try:
from zoneinfo import ZoneInfo
except ImportError:
ZoneInfo = None
# Cannot assign to a type [misc]
ZoneInfo = None # type: ignore[misc, assignment]

from pandas._libs.tslibs import (
conversion,
Expand Down
5 changes: 4 additions & 1 deletion pandas/tests/scalar/timestamp/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,10 @@ def test_timestamp_constructor_retain_fold(tz, fold):
_tzs = ["dateutil/Europe/London"]
if PY39:
try:
_tzs = ["dateutil/Europe/London", zoneinfo.ZoneInfo("Europe/London")]
_tzs = [
"dateutil/Europe/London",
zoneinfo.ZoneInfo("Europe/London"), # type: ignore[list-item]
]
except zoneinfo.ZoneInfoNotFoundError:
pass

Expand Down
3 changes: 2 additions & 1 deletion pandas/tests/scalar/timestamp/test_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
try:
from zoneinfo import ZoneInfo
except ImportError:
ZoneInfo = None
# Cannot assign to a type
ZoneInfo = None # type: ignore[misc, assignment]


class TestTimestampTZOperations:
Expand Down
Loading