Skip to content

Commit d5de40f

Browse files
Merge remote-tracking branch 'upstream/main' into bisect
2 parents 302ede3 + 7bf3c75 commit d5de40f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+310
-310
lines changed

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

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: 32 Bit Linux
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 1.4.x
8+
pull_request:
9+
branches:
10+
- main
11+
- 1.4.x
12+
paths-ignore:
13+
- "doc/**"
14+
15+
jobs:
16+
pytest:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Run 32-bit manylinux2014 Docker Build / Tests
25+
run: |
26+
docker pull quay.io/pypa/manylinux2014_i686
27+
docker run --platform linux/386 -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \
28+
/bin/bash -xc "cd pandas && \
29+
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
30+
. ~/virtualenvs/pandas-dev/bin/activate && \
31+
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
32+
pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
33+
python setup.py build_ext -q -j2 && \
34+
python -m pip install --no-build-isolation --no-use-pep517 -e . && \
35+
export PANDAS_CI=1 && \
36+
pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml"
37+
38+
- name: Publish test results for Python 3.8-32 bit full Linux
39+
uses: actions/upload-artifact@v3
40+
with:
41+
name: Test results
42+
path: test-data.xml
43+
if: failure()

.github/workflows/code-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474

7575
- name: Install pyright
7676
# note: keep version in sync with .pre-commit-config.yaml
77-
run: npm install -g [email protected].245
77+
run: npm install -g [email protected].247
7878

7979
- name: Build Pandas
8080
id: build

.github/workflows/windows.yml renamed to .github/workflows/macos-windows.yml

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Windows
1+
name: Windows-MacOS
22

33
on:
44
push:
@@ -21,18 +21,20 @@ env:
2121

2222
jobs:
2323
pytest:
24-
runs-on: windows-latest
2524
defaults:
2625
run:
2726
shell: bash -el {0}
2827
timeout-minutes: 90
2928
strategy:
3029
matrix:
30+
os: [macos-latest, windows-latest]
3131
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
3232
fail-fast: false
33+
runs-on: ${{ matrix.os }}
34+
name: ${{ format('{0} {1}', matrix.os, matrix.env_file) }}
3335
concurrency:
3436
# https://github.community/t/concurrecy-not-work-for-push/183068/7
35-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-windows
37+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.os }}
3638
cancel-in-progress: true
3739

3840
steps:
@@ -47,10 +49,17 @@ jobs:
4749
mamba-version: "*"
4850
channels: conda-forge
4951
activate-environment: pandas-dev
50-
channel-priority: strict
52+
channel-priority: ${{ matrix.os == 'macos-latest' && 'flexible' || 'strict' }}
5153
environment-file: ci/deps/${{ matrix.env_file }}
5254
use-only-tar-bz2: true
5355

56+
# ImportError: 2): Library not loaded: @rpath/libssl.1.1.dylib
57+
# Referenced from: /Users/runner/miniconda3/envs/pandas-dev/lib/libthrift.0.13.0.dylib
58+
# Reason: image not found
59+
- name: Upgrade pyarrow on MacOS
60+
run: conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=6
61+
if: ${{ matrix.os == 'macos-latest' }}
62+
5463
- name: Build Pandas
5564
uses: ./.github/actions/build_pandas
5665

.github/workflows/python-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Unfreeze(by commentingthe if: false() condition) once the
33
# next Python Dev version has released beta 1 and both Cython and numpy support it
44
# After that Python has released, migrate the workflows to the
5-
# posix GHA workflows/Azure pipelines and "freeze" this file by
5+
# posix GHA workflows and "freeze" this file by
66
# uncommenting the if: false() condition
77
# Feel free to modify this comment as necessary.
88

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ repos:
8989
types: [python]
9090
stages: [manual]
9191
# note: keep version in sync with .github/workflows/code-checks.yml
92-
additional_dependencies: ['[email protected].245']
92+
additional_dependencies: ['[email protected].247']
9393
- repo: local
9494
hooks:
9595
- id: flake8-rst

LICENSES/ULTRAJSON_LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Portions of code from MODP_ASCII - Ascii transformations (upper/lower, etc)
2828
https://github.com/client9/stringencoders
2929
Copyright (c) 2007 Nick Galbreath -- nickg [at] modp [dot] com. All rights reserved.
3030

31-
Numeric decoder derived from from TCL library
31+
Numeric decoder derived from TCL library
3232
http://www.opensource.apple.com/source/tcl/tcl-14/tcl/license.terms
3333
* Copyright (c) 1988-1993 The Regents of the University of California.
3434
* Copyright (c) 1994 Sun Microsystems, Inc.

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3509134.svg)](https://doi.org/10.5281/zenodo.3509134)
1111
[![Package Status](https://img.shields.io/pypi/status/pandas.svg)](https://pypi.org/project/pandas/)
1212
[![License](https://img.shields.io/pypi/l/pandas.svg)](https://github.com/pandas-dev/pandas/blob/main/LICENSE)
13-
[![Azure Build Status](https://dev.azure.com/pandas-dev/pandas/_apis/build/status/pandas-dev.pandas?branch=main)](https://dev.azure.com/pandas-dev/pandas/_build/latest?definitionId=1&branch=main)
1413
[![Coverage](https://codecov.io/github/pandas-dev/pandas/coverage.svg?branch=main)](https://codecov.io/gh/pandas-dev/pandas)
1514
[![Downloads](https://static.pepy.tech/personalized-badge/pandas?period=month&units=international_system&left_color=black&right_color=orange&left_text=PyPI%20downloads%20per%20month)](https://pepy.tech/project/pandas)
1615
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pydata/pandas)

asv_bench/benchmarks/sparse.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ def setup(self, fill_value):
146146

147147
def make_block_array(self, length, num_blocks, block_size, fill_value):
148148
arr = np.full(length, fill_value)
149-
indicies = np.random.choice(
149+
indices = np.random.choice(
150150
np.arange(0, length, block_size), num_blocks, replace=False
151151
)
152-
for ind in indicies:
152+
for ind in indices:
153153
arr[ind : ind + block_size] = np.random.randint(0, 100, block_size)
154154
return SparseArray(arr, fill_value=fill_value)
155155

azure-pipelines.yml

-55
This file was deleted.

ci/azure/posix.yml

-50
This file was deleted.

ci/setup_env.sh

+1-10
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@ mamba install -n pandas-dev 'setuptools<60'
7373
echo "conda list -n pandas-dev"
7474
conda list -n pandas-dev
7575

76-
# From pyarrow on MacOS
77-
# ImportError: 2): Library not loaded: @rpath/libssl.1.1.dylib
78-
# Referenced from: /Users/runner/miniconda3/envs/pandas-dev/lib/libthrift.0.13.0.dylib
79-
# Reason: image not found
80-
if [[ "$(uname)" == 'Darwin' ]]; then
81-
echo "Update pyarrow for pyarrow on MacOS"
82-
conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=6
83-
fi
84-
8576
if [[ "$BITS32" == "yes" ]]; then
8677
# activate 32-bit compiler
8778
export CONDA_BUILD=1
@@ -113,6 +104,6 @@ echo "Build extensions"
113104
python setup.py build_ext -q -j3
114105

115106
echo "Install pandas"
116-
python -m pip install --no-build-isolation -e .
107+
python -m pip install --no-build-isolation --no-use-pep517 -e .
117108

118109
echo "done"

doc/source/development/contributing_codebase.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,11 @@ library. This makes type checkers aware of the type annotations shipped with pan
289289
Testing with continuous integration
290290
-----------------------------------
291291

292-
The pandas test suite will run automatically on `GitHub Actions <https://github.com/features/actions/>`__ and
293-
`Azure Pipelines <https://azure.microsoft.com/en-us/services/devops/pipelines/>`__
292+
The pandas test suite will run automatically on `GitHub Actions <https://github.com/features/actions/>`__
294293
continuous integration services, once your pull request is submitted.
295294
However, if you wish to run the test suite on a branch prior to submitting the pull request,
296295
then the continuous integration services need to be hooked to your GitHub repository. Instructions are here
297-
for `GitHub Actions <https://docs.github.com/en/actions/>`__ and
298-
`Azure Pipelines <https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops>`__.
296+
for `GitHub Actions <https://docs.github.com/en/actions/>`__.
299297

300298
A pull-request will be considered for merging when you have an all 'green' build. If any tests are failing,
301299
then you will get a red 'X', where you can click through to see the individual failed tests.

doc/source/user_guide/io.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3529,7 +3529,7 @@ See the :ref:`cookbook<cookbook.excel>` for some advanced strategies.
35293529
**Please do not report issues when using ``xlrd`` to read ``.xlsx`` files.**
35303530
This is no longer supported, switch to using ``openpyxl`` instead.
35313531

3532-
Attempting to use the the ``xlwt`` engine will raise a ``FutureWarning``
3532+
Attempting to use the ``xlwt`` engine will raise a ``FutureWarning``
35333533
unless the option :attr:`io.excel.xls.writer` is set to ``"xlwt"``.
35343534
While this option is now deprecated and will also raise a ``FutureWarning``,
35353535
it can be globally set and the warning suppressed. Users are recommended to
@@ -5470,7 +5470,7 @@ See the documentation for `pyarrow <https://arrow.apache.org/docs/python/>`__ an
54705470
.. note::
54715471

54725472
These engines are very similar and should read/write nearly identical parquet format files.
5473-
Currently ``pyarrow`` does not support timedelta data, ``fastparquet>=0.1.4`` supports timezone aware datetimes.
5473+
``pyarrow>=8.0.0`` supports timedelta data, ``fastparquet>=0.1.4`` supports timezone aware datetimes.
54745474
These libraries differ by having different underlying dependencies (``fastparquet`` by using ``numba``, while ``pyarrow`` uses a c-library).
54755475

54765476
.. ipython:: python

doc/source/user_guide/style.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@
612612
"source": [
613613
"### Acting on the Index and Column Headers\n",
614614
"\n",
615-
"Similar application is acheived for headers by using:\n",
615+
"Similar application is achieved for headers by using:\n",
616616
" \n",
617617
"- [.applymap_index()][applymapindex] (elementwise): accepts a function that takes a single value and returns a string with the CSS attribute-value pair.\n",
618618
"- [.apply_index()][applyindex] (level-wise): accepts a function that takes a Series and returns a Series, or numpy array with an identical shape where each element is a string with a CSS attribute-value pair. This method passes each level of your Index one-at-a-time. To style the index use `axis=0` and to style the column headers use `axis=1`.\n",

doc/source/whatsnew/v1.5.0.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ If installed, we now require:
360360
+-----------------+-----------------+----------+---------+
361361
| Package | Minimum Version | Required | Changed |
362362
+=================+=================+==========+=========+
363-
| mypy (dev) | 0.941 | | X |
363+
| mypy (dev) | 0.950 | | X |
364364
+-----------------+-----------------+----------+---------+
365365

366366

@@ -732,6 +732,7 @@ Groupby/resample/rolling
732732
- Bug in :meth:`SeriesGroupBy.apply` would incorrectly name its result when there was a unique group (:issue:`46369`)
733733
- Bug in :meth:`Rolling.sum` and :meth:`Rolling.mean` would give incorrect result with window of same values (:issue:`42064`, :issue:`46431`)
734734
- Bug in :meth:`Rolling.var` and :meth:`Rolling.std` would give non-zero result with window of same values (:issue:`42064`)
735+
- Bug in :meth:`Rolling.skew` and :meth:`Rolling.kurt` would give NaN with window of same values (:issue:`30993`)
735736
- Bug in :meth:`.Rolling.var` would segfault calculating weighted variance when window size was larger than data size (:issue:`46760`)
736737
- Bug in :meth:`Grouper.__repr__` where ``dropna`` was not included. Now it is (:issue:`46754`)
737738
- Bug in :meth:`DataFrame.rolling` gives ValueError when center=True, axis=1 and win_type is specified (:issue:`46135`)

environment.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies:
2424
- flake8-bugbear=21.3.2 # used by flake8, find likely bugs
2525
- flake8-comprehensions=3.7.0 # used by flake8, linting of unnecessary comprehensions
2626
- isort>=5.2.1 # check that imports are in the right order
27-
- mypy=0.941
27+
- mypy=0.950
2828
- pre-commit>=2.9.2
2929
- pycodestyle # used by flake8
3030
- pyupgrade
@@ -116,7 +116,7 @@ dependencies:
116116
- fsspec>=0.7.4 # for generic remote file operations
117117
- gcsfs>=0.6.0 # file IO when using 'gcs://...' path
118118
- sqlalchemy # pandas.read_sql, DataFrame.to_sql
119-
- xarray<0.19 # DataFrame.to_xarray
119+
- xarray # DataFrame.to_xarray
120120
- cftime # Needed for downstream xarray.CFTimeIndex test
121121
- pyreadstat # pandas.read_spss
122122
- tabulate>=0.8.3 # DataFrame.to_markdown

pandas/_config/localization.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def set_locale(
4545
locale.setlocale(lc_var, new_locale)
4646
normalized_locale = locale.getlocale()
4747
if all(x is not None for x in normalized_locale):
48-
yield ".".join(normalized_locale)
48+
# error: Argument 1 to "join" of "str" has incompatible type
49+
# "Tuple[Optional[str], Optional[str]]"; expected "Iterable[str]"
50+
yield ".".join(normalized_locale) # type: ignore[arg-type]
4951
else:
5052
yield new_locale
5153
finally:

pandas/_libs/tslibs/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@
5858
)
5959
from pandas._libs.tslibs.timestamps import Timestamp
6060
from pandas._libs.tslibs.timezones import tz_compare
61-
from pandas._libs.tslibs.tzconversion import (
62-
py_tz_convert_from_utc_single as tz_convert_from_utc_single,
63-
)
61+
from pandas._libs.tslibs.tzconversion import tz_convert_from_utc_single
6462
from pandas._libs.tslibs.vectorized import (
6563
dt64arr_to_periodarr,
6664
get_resolution,

pandas/_libs/tslibs/dtypes.pxd

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ from pandas._libs.tslibs.np_datetime cimport NPY_DATETIMEUNIT
66
cdef str npy_unit_to_abbrev(NPY_DATETIMEUNIT unit)
77
cdef NPY_DATETIMEUNIT freq_group_code_to_npy_unit(int freq) nogil
88
cdef int64_t periods_per_day(NPY_DATETIMEUNIT reso=*) except? -1
9+
cdef int64_t periods_per_second(NPY_DATETIMEUNIT reso) except? -1
910

1011
cdef dict attrname_to_abbrevs
1112

0 commit comments

Comments
 (0)