From a7bc4319d92e4d643b5654c4c745b1876cfcd9bc Mon Sep 17 00:00:00 2001 From: Patrick Hoefler <61934744+phofl@users.noreply.github.com> Date: Wed, 26 Apr 2023 16:30:37 +0200 Subject: [PATCH] CI: Change development python version to 3.10 (#51133) * CI: Change development python version to 3.10 * Update checks * Remove strict * Remove strict * Fixes * Add dt * Switch python to 3.9 * Remove * Fix * Try attribute * Adjust * Fix mypy * Try fixing doc build * Fix mypy * Fix stubtest * Remove workflow file * Rename back * Update * Rename * Rename * Change python version * Remove * Fix doc errors * Remove pypy * Update ci/deps/actions-pypy-39.yaml Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com> * Revert pypy removal * Remove again * Fix * Change to 3.9 * Address --------- Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com> --- .circleci/config.yml | 2 +- .github/workflows/code-checks.yml | 2 +- .github/workflows/package-checks.yml | 2 +- .github/workflows/sdist.yml | 4 +- .github/workflows/unit-tests.yml | 16 ++--- .github/workflows/wheels.yml | 4 +- ci/deps/actions-38.yaml | 60 ------------------- ...yaml => actions-39-downstream_compat.yaml} | 2 +- ....yaml => actions-39-minimum_versions.yaml} | 2 +- ...ions-pypy-38.yaml => actions-pypy-39.yaml} | 2 +- ...cle-38-arm64.yaml => circle-39-arm64.yaml} | 2 +- doc/source/conf.py | 1 + .../development/contributing_gitpod.rst | 2 +- doc/source/getting_started/install.rst | 2 +- doc/source/whatsnew/v2.1.0.rst | 5 ++ environment.yml | 4 +- pandas/_libs/tslibs/timestamps.pyi | 4 +- pandas/conftest.py | 6 +- pandas/core/generic.py | 3 +- pandas/plotting/_core.py | 4 +- pandas/tests/arrays/test_datetimes.py | 9 ++- .../indexes/datetimes/test_constructors.py | 2 + .../tests/indexes/datetimes/test_timezones.py | 3 +- .../scalar/timestamp/test_constructors.py | 5 +- .../tests/scalar/timestamp/test_timezones.py | 3 +- pyproject.toml | 13 ++-- requirements-dev.txt | 2 +- scripts/run_stubtest.py | 4 +- scripts/validate_min_versions_in_sync.py | 5 ++ 29 files changed, 71 insertions(+), 104 deletions(-) delete mode 100644 ci/deps/actions-38.yaml rename ci/deps/{actions-38-downstream_compat.yaml => actions-39-downstream_compat.yaml} (98%) rename ci/deps/{actions-38-minimum_versions.yaml => actions-39-minimum_versions.yaml} (98%) rename ci/deps/{actions-pypy-38.yaml => actions-pypy-39.yaml} (86%) rename ci/deps/{circle-38-arm64.yaml => circle-39-arm64.yaml} (98%) diff --git a/.circleci/config.yml b/.circleci/config.yml index e704c37df3e453..e7322e748662f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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" diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index d6d43a8bfc13b8..ab8f873e9b70bd 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -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' diff --git a/.github/workflows/package-checks.yml b/.github/workflows/package-checks.yml index fa1b5e5d4fba38..7130bed21d5ffc 100644 --- a/.github/workflows/package-checks.yml +++ b/.github/workflows/package-checks.yml @@ -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: | diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml index 460369f45e900f..957e7103f4ff64 100644 --- a/.github/workflows/sdist.yml +++ b/.github/workflows/sdist.yml @@ -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 @@ -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) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 31e20956243475..69baa3ccd6f34f 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -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. @@ -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. @@ -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" @@ -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) }} @@ -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 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a42957c1cc942d..79dd9222fb90db 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -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"]]# "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' }} @@ -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 diff --git a/ci/deps/actions-38.yaml b/ci/deps/actions-38.yaml deleted file mode 100644 index df7d0277f3ba9e..00000000000000 --- a/ci/deps/actions-38.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: pandas-dev -channels: - - conda-forge -dependencies: - - python=3.8 - - # build dependencies - - versioneer[toml] - - cython>=0.29.33 - - # test dependencies - - pytest>=7.0.0 - - pytest-cov - - pytest-xdist>=2.2.0 - - pytest-asyncio>=0.17.0 - - boto3 - - # required dependencies - - python-dateutil - - numpy - - pytz - - # optional dependencies - - beautifulsoup4>=4.11.1 - - blosc>=1.21.0 - - bottleneck>=1.3.4 - - brotlipy>=0.7.0 - - fastparquet>=0.8.1 - - fsspec>=2022.05.0 - - html5lib>=1.1 - - hypothesis>=6.46.1 - - gcsfs>=2022.05.0 - - jinja2>=3.1.2 - - lxml>=4.8.0 - - matplotlib>=3.6.1 - - numba>=0.55.2 - - numexpr>=2.8.0 - - odfpy>=1.4.1 - - qtpy>=2.2.0 - - openpyxl<3.1.1, >=3.0.10 - - pandas-gbq>=0.17.5 - - psycopg2>=2.9.3 - - pyarrow>=7.0.0 - - pymysql>=1.0.2 - - pyreadstat>=1.1.5 - - pytables>=3.7.0 - - python-snappy>=0.6.1 - - pyxlsb>=1.0.9 - - s3fs>=2022.05.0 - - scipy>=1.8.1 - - sqlalchemy>=1.4.36 - - tabulate>=0.8.10 - - xarray>=2022.03.0 - - xlrd>=2.0.1 - - xlsxwriter>=3.0.3 - - zstandard>=0.17.0 - - - pip: - - pyqt5>=5.15.6 - - tzdata>=2022.1 diff --git a/ci/deps/actions-38-downstream_compat.yaml b/ci/deps/actions-39-downstream_compat.yaml similarity index 98% rename from ci/deps/actions-38-downstream_compat.yaml rename to ci/deps/actions-39-downstream_compat.yaml index 670d7c37dc4d2e..241adef3367a0f 100644 --- a/ci/deps/actions-38-downstream_compat.yaml +++ b/ci/deps/actions-39-downstream_compat.yaml @@ -3,7 +3,7 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.8 + - python=3.9 # build dependencies - versioneer[toml] diff --git a/ci/deps/actions-38-minimum_versions.yaml b/ci/deps/actions-39-minimum_versions.yaml similarity index 98% rename from ci/deps/actions-38-minimum_versions.yaml rename to ci/deps/actions-39-minimum_versions.yaml index 96c6a0fd6eb2e4..61752cbfa54b2c 100644 --- a/ci/deps/actions-38-minimum_versions.yaml +++ b/ci/deps/actions-39-minimum_versions.yaml @@ -4,7 +4,7 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.8.0 + - python=3.9 # build dependencies - versioneer[toml] diff --git a/ci/deps/actions-pypy-38.yaml b/ci/deps/actions-pypy-39.yaml similarity index 86% rename from ci/deps/actions-pypy-38.yaml rename to ci/deps/actions-pypy-39.yaml index 981399dcd4b7cb..64774e776056fc 100644 --- a/ci/deps/actions-pypy-38.yaml +++ b/ci/deps/actions-pypy-39.yaml @@ -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] diff --git a/ci/deps/circle-38-arm64.yaml b/ci/deps/circle-39-arm64.yaml similarity index 98% rename from ci/deps/circle-38-arm64.yaml rename to ci/deps/circle-39-arm64.yaml index 5102b2ca55404d..42f9994b641579 100644 --- a/ci/deps/circle-38-arm64.yaml +++ b/ci/deps/circle-39-arm64.yaml @@ -2,7 +2,7 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.8 + - python=3.9 # build dependencies - versioneer[toml] diff --git a/doc/source/conf.py b/doc/source/conf.py index c73a91aa903657..d808d60b1ac954 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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", ] try: import nbconvert diff --git a/doc/source/development/contributing_gitpod.rst b/doc/source/development/contributing_gitpod.rst index c591be5425db92..042a2f316cd42e 100644 --- a/doc/source/development/contributing_gitpod.rst +++ b/doc/source/development/contributing_gitpod.rst @@ -29,7 +29,7 @@ you do not have an account yet, you will need to create one first. To get started just login at `Gitpod`_, and grant the appropriate permissions to GitHub. -We have built a python 3.8 environment and all development dependencies will +We have built a python 3.10 environment and all development dependencies will install when the environment starts. diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index 49ec242f6bb96b..1770d759dde4d6 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -20,7 +20,7 @@ Instructions for installing from source, Python version support ---------------------- -Officially Python 3.8, 3.9, 3.10 and 3.11. +Officially Python 3.9, 3.10 and 3.11. Installing pandas ----------------- diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index cfce12c2930d7b..b10dd876050aea 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -124,6 +124,11 @@ Backwards incompatible API changes .. _whatsnew_210.api_breaking.deps: +Increased minimum version for Python +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +pandas 2.1.0 supports Python 3.9 and higher. + Increased minimum versions for dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some minimum supported versions of dependencies were updated. diff --git a/environment.yml b/environment.yml index bde8c46bffd979..1e30c51537fa0c 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.8 + - python=3.10 - pip # build dependencies @@ -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 diff --git a/pandas/_libs/tslibs/timestamps.pyi b/pandas/_libs/tslibs/timestamps.pyi index 547422f5ec55c3..9ba75c8485ac7b 100644 --- a/pandas/_libs/tslibs/timestamps.pyi +++ b/pandas/_libs/tslibs/timestamps.pyi @@ -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 diff --git a/pandas/conftest.py b/pandas/conftest.py index 77d2f4802c08fb..9ede9e65a68397 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -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. @@ -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) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 9e9f28b1dfddb6..b6ade0728e075f 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -11756,8 +11756,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: diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 6ef33c3d583061..8dd3e4385a383c 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -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: diff --git a/pandas/tests/arrays/test_datetimes.py b/pandas/tests/arrays/test_datetimes.py index 4bd6fd745d56da..b8cd8a5546f05f 100644 --- a/pandas/tests/arrays/test_datetimes.py +++ b/pandas/tests/arrays/test_datetimes.py @@ -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 @@ -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): diff --git a/pandas/tests/indexes/datetimes/test_constructors.py b/pandas/tests/indexes/datetimes/test_constructors.py index f657cc71e63466..6d18a292061b9d 100644 --- a/pandas/tests/indexes/datetimes/test_constructors.py +++ b/pandas/tests/indexes/datetimes/test_constructors.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import ( datetime, timedelta, diff --git a/pandas/tests/indexes/datetimes/test_timezones.py b/pandas/tests/indexes/datetimes/test_timezones.py index 05700841de7e15..6f3c83b999e943 100644 --- a/pandas/tests/indexes/datetimes/test_timezones.py +++ b/pandas/tests/indexes/datetimes/test_timezones.py @@ -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, diff --git a/pandas/tests/scalar/timestamp/test_constructors.py b/pandas/tests/scalar/timestamp/test_constructors.py index b855232179b513..4851612392e684 100644 --- a/pandas/tests/scalar/timestamp/test_constructors.py +++ b/pandas/tests/scalar/timestamp/test_constructors.py @@ -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 diff --git a/pandas/tests/scalar/timestamp/test_timezones.py b/pandas/tests/scalar/timestamp/test_timezones.py index 820b2e17a9d3f6..3a6953af4337e7 100644 --- a/pandas/tests/scalar/timestamp/test_timezones.py +++ b/pandas/tests/scalar/timestamp/test_timezones.py @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 8b5603ecb7c7bf..aacf8649add357 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ authors = [ { name = 'The Pandas Development Team', email='pandas-dev@python.org' }, ] license = {file = 'LICENSE'} -requires-python = '>=3.8' +requires-python = '>=3.9' dependencies = [ "numpy>=1.21.6; python_version<'3.11'", "numpy>=1.23.2; python_version>='3.11'", @@ -39,7 +39,6 @@ classifiers = [ 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', @@ -171,7 +170,7 @@ select = "*-win32" environment = { IS_32_BIT="true" } [tool.black] -target-version = ['py38', 'py39'] +target-version = ['py39', 'py310'] required-version = '23.1.0' exclude = ''' ( @@ -194,7 +193,7 @@ exclude = ''' [tool.ruff] line-length = 88 update-check = false -target-version = "py38" +target-version = "py310" fix = true unfixable = ["E711"] @@ -257,6 +256,8 @@ ignore = [ "B023", # Functions defined inside a loop must not use variables redefined in the loop # "B301", # not yet implemented + # Only works with python >=3.10 + "B905", # Too many arguments to function call "PLR0913", # Too many returns @@ -471,7 +472,7 @@ follow_imports_for_stubs = false no_site_packages = false no_silence_site_packages = false # Platform configuration -python_version = "3.8" +python_version = "3.10" platform = "linux-64" # Disallow dynamic typing disallow_any_unimported = false # TODO @@ -549,7 +550,7 @@ skip_glob = "env" skip = "pandas/__init__.py" [tool.pyright] -pythonVersion = "3.8" +pythonVersion = "3.10" typeCheckingMode = "basic" include = ["pandas", "typings"] exclude = ["pandas/tests", "pandas/io/clipboard", "pandas/util/version"] diff --git a/requirements-dev.txt b/requirements-dev.txt index 30189c35fcbb59..d2f024886a129b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -27,7 +27,7 @@ lxml>=4.8.0 matplotlib>=3.6.1 numba>=0.55.2 numexpr>=2.8.0 -openpyxl<3.1.1, >=3.0.7 +openpyxl>=3.0.10 odfpy>=1.4.1 py psycopg2-binary>=2.9.3 diff --git a/scripts/run_stubtest.py b/scripts/run_stubtest.py index db7a327f231b53..dedcdb55325938 100644 --- a/scripts/run_stubtest.py +++ b/scripts/run_stubtest.py @@ -49,8 +49,8 @@ "pandas._libs.lib._NoDefault.no_default", # internal type alias (should probably be private) "pandas._libs.lib.ndarray_obj_2d", - # workaround for mypy (cache_readonly = property) - "pandas._libs.properties.cache_readonly.__get__", + # runtime argument "owner" has a default value but stub argument does not + "pandas._libs.properties.AxisProperty.__get__", "pandas._libs.properties.cache_readonly.deleter", "pandas._libs.properties.cache_readonly.getter", "pandas._libs.properties.cache_readonly.setter", diff --git a/scripts/validate_min_versions_in_sync.py b/scripts/validate_min_versions_in_sync.py index e0182ebaaee60d..9a6d97a222000f 100755 --- a/scripts/validate_min_versions_in_sync.py +++ b/scripts/validate_min_versions_in_sync.py @@ -124,6 +124,11 @@ def get_yaml_map_from( yaml_package, yaml_version2 = yaml_dependency.split(operator) yaml_version2 = operator + yaml_version2 yaml_map[yaml_package] = [yaml_version1, yaml_version2] + elif "[build=*_pypy]" in dependency: + search_text = search_text.replace("[build=*_pypy]", "") + yaml_package, yaml_version = search_text.split(operator) + yaml_version = operator + yaml_version + yaml_map[yaml_package] = [yaml_version] elif operator is not None: yaml_package, yaml_version = search_text.split(operator) yaml_version = operator + yaml_version