Skip to content

Commit 2e8a88d

Browse files
authored
Merge branch 'main' into bugfix-spss-kwargs
2 parents 20ef6f5 + 488f6bd commit 2e8a88d

36 files changed

+321
-210
lines changed

.github/workflows/unit-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ jobs:
9292
- name: "Numpy Dev"
9393
env_file: actions-311-numpydev.yaml
9494
pattern: "not slow and not network and not single_cpu"
95-
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
95+
# Currently restricted the warnings that error to Deprecation Warnings from numpy
96+
# done since pyarrow isn't compatible with numpydev always
97+
# TODO: work with pyarrow to revert this?
98+
test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy"
9699
- name: "Pyarrow Nightly"
97100
env_file: actions-311-pyarrownightly.yaml
98101
pattern: "not slow and not network and not single_cpu"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ BSD 3-Clause License
33
Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
44
All rights reserved.
55

6-
Copyright (c) 2011-2023, Open source contributors.
6+
Copyright (c) 2011-2024, Open source contributors.
77

88
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:

ci/code_checks.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7373
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX03 --ignore_functions \
7474
pandas.Series.plot.line \
7575
pandas.Series.to_sql \
76-
pandas.errors.SettingWithCopyWarning \
77-
pandas.errors.SpecificationError \
78-
pandas.errors.UndefinedVariableError \
7976
pandas.read_json \
80-
pandas.io.formats.style.Styler.to_latex \
81-
pandas.read_parquet \
82-
pandas.DataFrame.to_sql \
77+
pandas.DataFrame.to_sql # There should be no backslash in the final line, please keep this comment in the last ignored function
8378
RET=$(($RET + $?)) ; echo $MSG "DONE"
8479

8580
fi

doc/source/whatsnew/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ This is the list of changes to pandas between each release. For full details,
1010
see the `commit logs <https://github.com/pandas-dev/pandas/commits/>`_. For install and
1111
upgrade instructions, see :ref:`install`.
1212

13-
Version 2.3
13+
Version 3.0
1414
-----------
1515

1616
.. toctree::
1717
:maxdepth: 2
1818

19-
v2.3.0
19+
v3.0.0
2020

2121

2222
Version 2.2
@@ -25,6 +25,7 @@ Version 2.2
2525
.. toctree::
2626
:maxdepth: 2
2727

28+
v2.2.1
2829
v2.2.0
2930

3031
Version 2.1

doc/source/whatsnew/v2.2.1.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. _whatsnew_221:
2+
3+
What's new in 2.2.1 (February XX, 2024)
4+
---------------------------------------
5+
6+
These are the changes in pandas 2.2.1. See :ref:`release` for a full changelog
7+
including other versions of pandas.
8+
9+
{{ header }}
10+
11+
.. ---------------------------------------------------------------------------
12+
.. _whatsnew_221.regressions:
13+
14+
Fixed regressions
15+
~~~~~~~~~~~~~~~~~
16+
-
17+
18+
.. ---------------------------------------------------------------------------
19+
.. _whatsnew_221.bug_fixes:
20+
21+
Bug fixes
22+
~~~~~~~~~
23+
-
24+
25+
.. ---------------------------------------------------------------------------
26+
.. _whatsnew_221.other:
27+
28+
Other
29+
~~~~~
30+
-
31+
32+
.. ---------------------------------------------------------------------------
33+
.. _whatsnew_221.contributors:
34+
35+
Contributors
36+
~~~~~~~~~~~~

doc/source/whatsnew/v2.3.0.rst renamed to doc/source/whatsnew/v3.0.0.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
11
.. _whatsnew_230:
22

3-
What's new in 2.3.0 (Month XX, 2024)
3+
What's new in 3.0.0 (Month XX, 2024)
44
------------------------------------
55

6-
These are the changes in pandas 2.2.0. See :ref:`release` for a full changelog
6+
These are the changes in pandas 3.0.0. See :ref:`release` for a full changelog
77
including other versions of pandas.
88

99
{{ header }}
1010

1111
.. ---------------------------------------------------------------------------
12-
.. _whatsnew_230.enhancements:
12+
.. _whatsnew_300.enhancements:
1313

1414
Enhancements
1515
~~~~~~~~~~~~
1616

17-
.. _whatsnew_230.enhancements.enhancement1:
17+
.. _whatsnew_300.enhancements.enhancement1:
1818

1919
enhancement1
2020
^^^^^^^^^^^^
2121

22-
.. _whatsnew_230.enhancements.enhancement2:
22+
.. _whatsnew_300.enhancements.enhancement2:
2323

2424
enhancement2
2525
^^^^^^^^^^^^
2626

27-
.. _whatsnew_230.enhancements.other:
27+
.. _whatsnew_300.enhancements.other:
2828

2929
Other enhancements
3030
^^^^^^^^^^^^^^^^^^
3131
-
3232
-
3333

3434
.. ---------------------------------------------------------------------------
35-
.. _whatsnew_230.notable_bug_fixes:
35+
.. _whatsnew_300.notable_bug_fixes:
3636

3737
Notable bug fixes
3838
~~~~~~~~~~~~~~~~~
3939

4040
These are bug fixes that might have notable behavior changes.
4141

42-
.. _whatsnew_230.notable_bug_fixes.notable_bug_fix1:
42+
.. _whatsnew_300.notable_bug_fixes.notable_bug_fix1:
4343

4444
notable_bug_fix1
4545
^^^^^^^^^^^^^^^^
4646

47-
.. _whatsnew_230.notable_bug_fixes.notable_bug_fix2:
47+
.. _whatsnew_300.notable_bug_fixes.notable_bug_fix2:
4848

4949
notable_bug_fix2
5050
^^^^^^^^^^^^^^^^
5151

5252
.. ---------------------------------------------------------------------------
53-
.. _whatsnew_230.api_breaking:
53+
.. _whatsnew_300.api_breaking:
5454

5555
Backwards incompatible API changes
5656
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5757

58-
.. _whatsnew_230.api_breaking.deps:
58+
.. _whatsnew_300.api_breaking.deps:
5959

6060
Increased minimum versions for dependencies
6161
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -80,15 +80,15 @@ Optional libraries below the lowest tested version may still work, but are not c
8080

8181
See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for more.
8282

83-
.. _whatsnew_230.api_breaking.other:
83+
.. _whatsnew_300.api_breaking.other:
8484

8585
Other API changes
8686
^^^^^^^^^^^^^^^^^
8787
-
8888
-
8989

9090
.. ---------------------------------------------------------------------------
91-
.. _whatsnew_230.deprecations:
91+
.. _whatsnew_300.deprecations:
9292

9393
Deprecations
9494
~~~~~~~~~~~~
@@ -97,7 +97,7 @@ Deprecations
9797
-
9898

9999
.. ---------------------------------------------------------------------------
100-
.. _whatsnew_230.performance:
100+
.. _whatsnew_300.performance:
101101

102102
Performance improvements
103103
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -109,7 +109,7 @@ Performance improvements
109109
-
110110

111111
.. ---------------------------------------------------------------------------
112-
.. _whatsnew_230.bug_fixes:
112+
.. _whatsnew_300.bug_fixes:
113113

114114
Bug fixes
115115
~~~~~~~~~
@@ -222,7 +222,7 @@ Other
222222
-
223223

224224
.. ---------------------------------------------------------------------------
225-
.. _whatsnew_230.contributors:
225+
.. _whatsnew_300.contributors:
226226

227227
Contributors
228228
~~~~~~~~~~~~

pandas/__init__.py

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,37 @@
202202
FutureWarning,
203203
stacklevel=2,
204204
)
205-
# Don't allow users to use pandas.os or pandas.warnings
206-
del os, warnings
205+
206+
# DeprecationWarning for missing pyarrow
207+
from pandas.compat.pyarrow import pa_version_under10p1, pa_not_found
208+
209+
if pa_version_under10p1:
210+
# pyarrow is either too old or nonexistent, warn
211+
from pandas.compat._optional import VERSIONS
212+
213+
if pa_not_found:
214+
pa_msg = "was not found to be installed on your system."
215+
else:
216+
pa_msg = (
217+
f"was too old on your system - pyarrow {VERSIONS['pyarrow']} "
218+
"is the current minimum supported version as of this release."
219+
)
220+
221+
warnings.warn(
222+
f"""
223+
Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
224+
(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
225+
but {pa_msg}
226+
If this would cause problems for you,
227+
please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466
228+
""", # noqa: E501
229+
DeprecationWarning,
230+
stacklevel=2,
231+
)
232+
del VERSIONS, pa_msg
233+
234+
# Delete all unnecessary imported modules
235+
del pa_version_under10p1, pa_not_found, warnings, os
207236

208237
# module level doc-string
209238
__doc__ = """

pandas/compat/pyarrow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import pyarrow as pa
99

1010
_palv = Version(Version(pa.__version__).base_version)
11+
pa_not_found = False
1112
pa_version_under10p1 = _palv < Version("10.0.1")
1213
pa_version_under11p0 = _palv < Version("11.0.0")
1314
pa_version_under12p0 = _palv < Version("12.0.0")
@@ -16,6 +17,7 @@
1617
pa_version_under14p1 = _palv < Version("14.0.1")
1718
pa_version_under15p0 = _palv < Version("15.0.0")
1819
except ImportError:
20+
pa_not_found = True
1921
pa_version_under10p1 = True
2022
pa_version_under11p0 = True
2123
pa_version_under12p0 = True

pandas/core/dtypes/dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ def __from_arrow__(self, array: pa.Array | pa.ChunkedArray) -> DatetimeArray:
919919
else:
920920
np_arr = array.to_numpy()
921921

922-
return DatetimeArray._from_sequence(np_arr, dtype=self, copy=False)
922+
return DatetimeArray._simple_new(np_arr, dtype=self)
923923

924924
def __setstate__(self, state) -> None:
925925
# for pickle compat. __get_state__ is defined in the

pandas/core/groupby/groupby.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,7 @@ def f(g):
18561856
message=_apply_groupings_depr.format(
18571857
type(self).__name__, "apply"
18581858
),
1859-
category=FutureWarning,
1859+
category=DeprecationWarning,
18601860
stacklevel=find_stack_level(),
18611861
)
18621862
except TypeError:

0 commit comments

Comments
 (0)