Skip to content

Commit 4bb454f

Browse files
Backport PR #47096 on branch 1.4.x (fix pandas.show_versions() and remove pin for setuptools) (#47118)
Backport PR #47096: fix pandas.show_versions() and remove pin for setuptools Co-authored-by: Simon Hawkins <[email protected]>
1 parent 52a9bed commit 4bb454f

File tree

5 files changed

+4
-20
lines changed

5 files changed

+4
-20
lines changed

.github/workflows/python-dev.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ jobs:
5454
with:
5555
python-version: '3.11-dev'
5656

57-
# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
5857
- name: Install dependencies
5958
shell: bash -el {0}
6059
run: |
61-
python -m pip install --upgrade pip "setuptools<60.0.0" wheel
60+
python -m pip install --upgrade pip setuptools wheel
6261
pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
6362
pip install git+https://github.com/nedbat/coveragepy.git
6463
pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov

.github/workflows/sdist.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ jobs:
3939
with:
4040
python-version: ${{ matrix.python-version }}
4141

42-
# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
4342
- name: Install dependencies
4443
run: |
45-
python -m pip install --upgrade pip "setuptools<60.0.0" wheel
44+
python -m pip install --upgrade pip setuptools wheel
4645
4746
# GH 39416
4847
pip install numpy
@@ -64,10 +63,8 @@ jobs:
6463
channels: conda-forge
6564
python-version: '${{ matrix.python-version }}'
6665

67-
# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
6866
- name: Install pandas from sdist
6967
run: |
70-
python -m pip install --upgrade "setuptools<60.0.0"
7168
pip list
7269
python -m pip install dist/*.gz
7370

ci/setup_env.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ echo
5151
echo "update conda"
5252
conda config --set ssl_verify false
5353
conda config --set quiet true --set always_yes true --set changeps1 false
54-
# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
55-
conda install -y -c conda-forge -n base 'mamba>=0.21.2' pip
54+
conda install -y -c conda-forge -n base 'mamba>=0.21.2' pip setuptools
5655

5756
echo "conda info -a"
5857
conda info -a
@@ -67,8 +66,6 @@ echo "mamba env update --file=${ENV_FILE}"
6766
# See https://github.com/mamba-org/mamba/issues/633
6867
mamba create -q -n pandas-dev
6968
time mamba env update -n pandas-dev --file="${ENV_FILE}"
70-
# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
71-
mamba install -n pandas-dev 'setuptools<60'
7269

7370
echo "conda list -n pandas-dev"
7471
conda list -n pandas-dev

pandas/tests/util/test_show_versions.py

-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from pandas.compat import (
88
IS64,
99
is_ci_environment,
10-
is_numpy_dev,
1110
)
1211
from pandas.util._print_versions import (
1312
_get_dependency_info,
@@ -16,14 +15,6 @@
1615

1716
import pandas as pd
1817

19-
# This is failing on the Numpy Dev build,
20-
# but the error may just be from distutils?
21-
pytestmark = pytest.mark.xfail(
22-
is_numpy_dev,
23-
reason="_distutils not in python3.10/distutils/core.py",
24-
raises=AssertionError,
25-
)
26-
2718

2819
@pytest.mark.filterwarnings(
2920
# openpyxl

pandas/util/_print_versions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def _get_dependency_info() -> dict[str, JSONSerializable]:
6060
"pytz",
6161
"dateutil",
6262
# install / build,
63-
"pip",
6463
"setuptools",
64+
"pip",
6565
"Cython",
6666
# test
6767
"pytest",

0 commit comments

Comments
 (0)