Skip to content

Backport PR #52260 on branch 2.0.x (CI/DEPS: Correct xfail condition for new pymysql) #52265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pandas/tests/io/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
ArrowStringArray,
StringArray,
)
from pandas.util.version import Version

from pandas.io import sql
from pandas.io.sql import (
Expand Down Expand Up @@ -2393,9 +2394,12 @@ def test_to_sql_with_negative_npinf(self, input, request):
# The input {"foo": [-np.inf], "infe0": ["bar"]} does not raise any error
# for pymysql version >= 0.10
# TODO(GH#36465): remove this version check after GH 36465 is fixed
import pymysql
pymysql = pytest.importorskip("pymysql")

if pymysql.VERSION[0:3] >= (0, 10, 0) and "infe0" in df.columns:
if (
Version(pymysql.__version__) < Version("1.0.3")
and "infe0" in df.columns
):
mark = pytest.mark.xfail(reason="GH 36465")
request.node.add_marker(mark)

Expand Down