Skip to content

Commit 3cafdf1

Browse files
authored
Merge branch 'main' into patch-2
2 parents 6c0b138 + ec32a00 commit 3cafdf1

File tree

7 files changed

+17
-21
lines changed

7 files changed

+17
-21
lines changed

.github/workflows/32-bit-linux.yml

+6
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,15 @@ jobs:
2323

2424
- name: Run 32-bit manylinux2014 Docker Build / Tests
2525
run: |
26+
# Without this (line 34), versioneer will not be able to determine the pandas version.
27+
# This is because of a security update to git that blocks it from reading the config folder if
28+
# it is not owned by the current user. We hit this since the "mounted" folder is not hit by the
29+
# Docker container.
30+
# xref https://github.com/pypa/manylinux/issues/1309
2631
docker pull quay.io/pypa/manylinux2014_i686
2732
docker run --platform linux/386 -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \
2833
/bin/bash -xc "cd pandas && \
34+
git config --global --add safe.directory /pandas && \
2935
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
3036
. ~/virtualenvs/pandas-dev/bin/activate && \
3137
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
- id: absolufy-imports
1212
files: ^pandas/
1313
- repo: https://github.com/jendrikseipp/vulture
14-
rev: 'v2.3'
14+
rev: 'v2.4'
1515
hooks:
1616
- id: vulture
1717
entry: python scripts/run_vulture.py
@@ -60,7 +60,7 @@ repos:
6060
hooks:
6161
- id: isort
6262
- repo: https://github.com/asottile/pyupgrade
63-
rev: v2.32.0
63+
rev: v2.32.1
6464
hooks:
6565
- id: pyupgrade
6666
args: [--py38-plus]
@@ -75,7 +75,7 @@ repos:
7575
types: [text] # overwrite types: [rst]
7676
types_or: [python, rst]
7777
- repo: https://github.com/sphinx-contrib/sphinx-lint
78-
rev: v0.4.1
78+
rev: v0.6
7979
hooks:
8080
- id: sphinx-lint
8181
- repo: https://github.com/asottile/yesqa

pandas/core/computation/align.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
)
1010
from typing import (
1111
TYPE_CHECKING,
12+
Callable,
1213
Sequence,
1314
)
1415
import warnings
@@ -28,6 +29,8 @@
2829
from pandas.core.computation.common import result_type_many
2930

3031
if TYPE_CHECKING:
32+
from pandas._typing import F
33+
3134
from pandas.core.generic import NDFrame
3235
from pandas.core.indexes.api import Index
3336

@@ -62,7 +65,7 @@ def _any_pandas_objects(terms) -> bool:
6265
return any(isinstance(term.value, PandasObject) for term in terms)
6366

6467

65-
def _filter_special_cases(f):
68+
def _filter_special_cases(f) -> Callable[[F], F]:
6669
@wraps(f)
6770
def wrapper(terms):
6871
# single unary operand

pandas/core/reshape/merge.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ def _groupby_and_merge(by, left: DataFrame, right: DataFrame, merge_pieces):
162162
lcols = lhs.columns.tolist()
163163
cols = lcols + [r for r in right.columns if r not in set(lcols)]
164164
merged = lhs.reindex(columns=cols)
165-
merged.index = range(len(merged))
165+
# error: Incompatible types in assignment (expression has type
166+
# "range", variable has type "Index")
167+
merged.index = range(len(merged)) # type: ignore[assignment]
166168
pieces.append(merged)
167169
continue
168170

pandas/tests/test_common.py

-8
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
import numpy as np
66
import pytest
77

8-
from pandas.compat import (
9-
IS64,
10-
is_ci_environment,
11-
)
12-
138
import pandas as pd
149
from pandas import Series
1510
import pandas._testing as tm
@@ -162,9 +157,6 @@ def test_standardize_mapping():
162157
assert isinstance(com.standardize_mapping(dd), partial)
163158

164159

165-
@pytest.mark.xfail(
166-
is_ci_environment() and not IS64, reason="Failing on 32 bit Python CI job"
167-
)
168160
def test_git_version():
169161
# GH 21295
170162
git_version = pd.__git_version__

pandas/tests/util/test_show_versions.py

-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44

55
import pytest
66

7-
from pandas.compat import (
8-
IS64,
9-
is_ci_environment,
10-
)
117
from pandas.util._print_versions import (
128
_get_dependency_info,
139
_get_sys_info,
@@ -73,9 +69,6 @@ def test_show_versions_console_json(capsys):
7369
assert result == expected
7470

7571

76-
@pytest.mark.xfail(
77-
is_ci_environment() and not IS64, reason="Failing on 32 bit Python CI job"
78-
)
7972
def test_show_versions_console(capsys):
8073
# gh-32041
8174
# gh-32041

pandas/util/_decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def wrapper(*args, **kwargs):
323323

324324
def rewrite_axis_style_signature(
325325
name: str, extra_params: list[tuple[str, Any]]
326-
) -> Callable[..., Any]:
326+
) -> Callable[[F], F]:
327327
def decorate(func: F) -> F:
328328
@wraps(func)
329329
def wrapper(*args, **kwargs) -> Callable[..., Any]:

0 commit comments

Comments
 (0)