Skip to content

Commit 9b3891b

Browse files
committed
Merge branch 'master' into ref-replace-2
2 parents 56c8b84 + 1fde76f commit 9b3891b

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

.github/workflows/posix.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@ jobs:
3131
[actions-38-slow.yaml, "slow", "", "", "", "", ""],
3232
[actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
3333
[actions-39-slow.yaml, "slow", "", "", "", "", ""],
34-
[actions-pypy-38.yaml, "not slow and not clipboard", "", "", "", "", ""],
34+
[actions-pypy-38.yaml, "not slow and not clipboard", "", "", "", "", "--max-worker-restart 0"],
3535
[actions-39-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
3636
[actions-39.yaml, "not slow and not clipboard", "", "", "", "", ""]
3737
]
3838
fail-fast: false
3939
env:
40-
COVERAGE: true
4140
ENV_FILE: ci/deps/${{ matrix.settings[0] }}
4241
PATTERN: ${{ matrix.settings[1] }}
4342
EXTRA_APT: ${{ matrix.settings[2] }}
@@ -46,6 +45,9 @@ jobs:
4645
PANDAS_TESTING_MODE: ${{ matrix.settings[5] }}
4746
TEST_ARGS: ${{ matrix.settings[6] }}
4847
PYTEST_TARGET: pandas
48+
IS_PYPY: ${{ contains(matrix.settings[0], 'pypy') }}
49+
# TODO: re-enable coverage on pypy, its slow
50+
COVERAGE: ${{ !contains(matrix.settings[0], 'pypy') }}
4951
concurrency:
5052
# https://github.community/t/concurrecy-not-work-for-push/183068/7
5153
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.settings[0] }}
@@ -83,12 +85,29 @@ jobs:
8385
channel-priority: flexible
8486
environment-file: ${{ env.ENV_FILE }}
8587
use-only-tar-bz2: true
88+
if: ${{ env.IS_PYPY == 'false' }} # No pypy3.8 support
89+
90+
- name: Setup PyPy
91+
uses: actions/[email protected]
92+
with:
93+
python-version: "pypy-3.8"
94+
if: ${{ env.IS_PYPY == 'true' }}
95+
96+
- name: Setup PyPy dependencies
97+
shell: bash
98+
run: |
99+
# TODO: re-enable cov, its slowing the tests down though
100+
# TODO: Unpin Cython, the new Cython 0.29.26 is causing compilation errors
101+
pip install Cython==0.29.25 numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3
102+
if: ${{ env.IS_PYPY == 'true' }}
86103

87104
- name: Build Pandas
88105
uses: ./.github/actions/build_pandas
89106

90107
- name: Test
91108
run: ci/run_tests.sh
109+
# TODO: Don't continue on error for PyPy
110+
continue-on-error: ${{ env.IS_PYPY == 'true' }}
92111
if: always()
93112

94113
- name: Build Version

ci/deps/actions-pypy-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dependencies:
55
# TODO: Add the rest of the dependencies in here
66
# once the other plentiful failures/segfaults
77
# with base pandas has been dealt with
8-
- python=3.8
8+
- python=3.8[build=*_pypy] # TODO: use this once pypy3.8 is available
99

1010
# tools
1111
- cython>=0.29.24

ci/run_tests.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ if [[ "not network" == *"$PATTERN"* ]]; then
1212
export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4;
1313
fi
1414

15-
if [ "$COVERAGE" ]; then
15+
if [[ "$COVERAGE" == "true" ]]; then
1616
COVERAGE="-s --cov=pandas --cov-report=xml --cov-append"
17+
else
18+
COVERAGE="" # We need to reset this for COVERAGE="false" case
1719
fi
1820

1921
# If no X server is found, we use xvfb to emulate it

pandas/core/internals/array_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def _convert(arr):
413413

414414
return self.apply(_convert)
415415

416-
def replace_regex(self: T, **kwargs):
416+
def replace_regex(self: T, **kwargs) -> T:
417417
return self.apply_with_block("_replace_regex", **kwargs)
418418

419419
def replace(self: T, to_replace, value, inplace: bool) -> T:

0 commit comments

Comments
 (0)