Skip to content

Commit 5910018

Browse files
committed
Merge remote-tracking branch 'upstream/main' into Solution-for-issue-#60044-by-ZKaoChi
2 parents aeb73af + 2a10e04 commit 5910018

Some content is hidden

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

58 files changed

+410
-258
lines changed

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
157157

158158
- name: Build wheels
159-
uses: pypa/cibuildwheel@v2.20.0
159+
uses: pypa/cibuildwheel@v2.21.0
160160
with:
161161
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
162162
env:

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ repos:
7474
hooks:
7575
- id: isort
7676
- repo: https://github.com/asottile/pyupgrade
77-
rev: v3.16.0
77+
rev: v3.17.0
7878
hooks:
7979
- id: pyupgrade
8080
args: [--py310-plus]
@@ -112,7 +112,7 @@ repos:
112112
types: [python]
113113
stages: [manual]
114114
additional_dependencies: &pyright_dependencies
115-
115+
116116
- id: pyright
117117
# note: assumes python env is setup and activated
118118
name: pyright reportGeneralTypeIssues

doc/source/whatsnew/v0.12.0.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ API changes
133133
to be inserted if ``True``, default is ``False`` (same as prior to 0.12) (:issue:`3679`)
134134
- Implement ``__nonzero__`` for ``NDFrame`` objects (:issue:`3691`, :issue:`3696`)
135135

136-
- IO api
136+
- IO API
137137

138-
- added top-level function ``read_excel`` to replace the following,
138+
- Added top-level function ``read_excel`` to replace the following,
139139
The original API is deprecated and will be removed in a future version
140140

141141
.. code-block:: python
@@ -153,7 +153,7 @@ API changes
153153
154154
pd.read_excel("path_to_file.xls", "Sheet1", index_col=None, na_values=["NA"])
155155
156-
- added top-level function ``read_sql`` that is equivalent to the following
156+
- Added top-level function ``read_sql`` that is equivalent to the following
157157

158158
.. code-block:: python
159159
@@ -482,11 +482,11 @@ Bug fixes
482482

483483
- ``HDFStore``
484484

485-
- will retain index attributes (freq,tz,name) on recreation (:issue:`3499`)
486-
- will warn with a ``AttributeConflictWarning`` if you are attempting to append
485+
- Will retain index attributes (freq,tz,name) on recreation (:issue:`3499`)
486+
- Will warn with a ``AttributeConflictWarning`` if you are attempting to append
487487
an index with a different frequency than the existing, or attempting
488488
to append an index with a different name than the existing
489-
- support datelike columns with a timezone as data_columns (:issue:`2852`)
489+
- Support datelike columns with a timezone as data_columns (:issue:`2852`)
490490

491491
- Non-unique index support clarified (:issue:`3468`).
492492

doc/source/whatsnew/v3.0.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ Enhancements
1616

1717
.. _whatsnew_300.enhancements.enhancement1:
1818

19-
enhancement1
19+
Enhancement1
2020
^^^^^^^^^^^^
2121

2222
.. _whatsnew_300.enhancements.enhancement2:
2323

24-
enhancement2
24+
Enhancement2
2525
^^^^^^^^^^^^
2626

2727
.. _whatsnew_300.enhancements.other:

environment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ dependencies:
7676
- cxx-compiler
7777

7878
# code checks
79-
- flake8=6.1.0 # run in subprocess over docstring examples
80-
- mypy=1.9.0 # pre-commit uses locally installed mypy
79+
- flake8=7.1.0 # run in subprocess over docstring examples
80+
- mypy=1.11.2 # pre-commit uses locally installed mypy
8181
- tokenize-rt # scripts/check_for_inconsistent_pandas_namespace.py
82-
- pre-commit>=3.6.0
82+
- pre-commit>=4.0.1
8383

8484
# documentation
8585
- gitpython # obtain contributors from git for whatsnew

pandas/_config/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def __dir__(self) -> list[str]:
411411

412412

413413
@contextmanager
414-
def option_context(*args) -> Generator[None, None, None]:
414+
def option_context(*args) -> Generator[None]:
415415
"""
416416
Context manager to temporarily set options in a ``with`` statement.
417417
@@ -718,7 +718,7 @@ def _build_option_description(k: str) -> str:
718718

719719

720720
@contextmanager
721-
def config_prefix(prefix: str) -> Generator[None, None, None]:
721+
def config_prefix(prefix: str) -> Generator[None]:
722722
"""
723723
contextmanager for multiple invocations of API with a common prefix
724724

pandas/_config/localization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@contextmanager
2626
def set_locale(
2727
new_locale: str | tuple[str, str], lc_var: int = locale.LC_ALL
28-
) -> Generator[str | tuple[str, str], None, None]:
28+
) -> Generator[str | tuple[str, str]]:
2929
"""
3030
Context manager for temporarily setting a locale.
3131

pandas/_testing/_warnings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def assert_produces_warning(
3535
raise_on_extra_warnings: bool = True,
3636
match: str | tuple[str | None, ...] | None = None,
3737
must_find_all_warnings: bool = True,
38-
) -> Generator[list[warnings.WarningMessage], None, None]:
38+
) -> Generator[list[warnings.WarningMessage]]:
3939
"""
4040
Context manager for running code expected to either raise a specific warning,
4141
multiple specific warnings, or not raise any warnings. Verifies that the code

pandas/_testing/contexts.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
@contextmanager
3030
def decompress_file(
3131
path: FilePath | BaseBuffer, compression: CompressionOptions
32-
) -> Generator[IO[bytes], None, None]:
32+
) -> Generator[IO[bytes]]:
3333
"""
3434
Open a compressed file and return a file object.
3535
@@ -50,7 +50,7 @@ def decompress_file(
5050

5151

5252
@contextmanager
53-
def set_timezone(tz: str) -> Generator[None, None, None]:
53+
def set_timezone(tz: str) -> Generator[None]:
5454
"""
5555
Context manager for temporarily setting a timezone.
5656
@@ -92,7 +92,7 @@ def setTZ(tz) -> None:
9292

9393

9494
@contextmanager
95-
def ensure_clean(filename=None) -> Generator[Any, None, None]:
95+
def ensure_clean(filename=None) -> Generator[Any]:
9696
"""
9797
Gets a temporary path and agrees to remove on close.
9898
@@ -124,7 +124,7 @@ def ensure_clean(filename=None) -> Generator[Any, None, None]:
124124

125125

126126
@contextmanager
127-
def with_csv_dialect(name: str, **kwargs) -> Generator[None, None, None]:
127+
def with_csv_dialect(name: str, **kwargs) -> Generator[None]:
128128
"""
129129
Context manager to temporarily register a CSV dialect for parsing CSV.
130130

pandas/compat/pickle_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def loads(
131131

132132

133133
@contextlib.contextmanager
134-
def patch_pickle() -> Generator[None, None, None]:
134+
def patch_pickle() -> Generator[None]:
135135
"""
136136
Temporarily patch pickle to use our unpickler.
137137
"""

0 commit comments

Comments
 (0)