-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
TST: run python-dev CI on 3.14-dev #61950
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
Conversation
f90ca53
to
534e1a9
Compare
After turning off the warning the tests results look much more reasonable. Here's the summary on Linux CI:
Besides the tests looking for warnings but not seeing any, I see some failures due to new deprecations in Python, some that look like changes in the regex and datetime modules maybe and a few other failures that I can't classify just looking at the failure report. @jorisvandenbossche did you ever have time to look closer at generating the chained assignment warning on 3.14 since it was reported in April? Unfortunately we're probably past the time when we can get C API changes merged into CPython to support this use-case, so it may not be easily feasible to detect what you're looking for just based on refcounts in 3.14 and newer. |
I didn't get to it yet, but now installed python 3.14 to try myself and took a first look. I added some more context to the issue #61368. Based on that I am also afraid we won't be able to "fix" this (but let's further discuss that on the issue). |
OK, I think I've gotten everything except for the two test failures in
|
@@ -143,7 +142,7 @@ def show_versions(as_json: str | bool = False) -> None: | |||
sys.stdout.writelines(json.dumps(j, indent=2)) | |||
else: | |||
assert isinstance(as_json, str) # needed for mypy | |||
with codecs.open(as_json, "wb", encoding="utf8") as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I leave this as "wb" then I get an error, not sure if this choice of specifying bytes mode and utf-8 encoding was on purpose or if it was just a bug masked by the api of codecs.open
.
OK, here's a weird one. This script runs without error on Python 3.13 but dies with an uncaught import pandas as pd
obj1 = pd.DataFrame({'0': [1, 1, 1, 1], '1': [1, 1, 1, 1]})
obj2 = pd.DataFrame({'0': [1, 1, 1, 1], '1': [1, 1, 1, 1]})
try:
obj1 and obj2
except ValueError:
pass
Seems kinda like a Python bug to me? |
@ngoldbaum I've been tracking this PR and happened to see your comments tonight and thought "no way, that can't be", but yeah I don't understand how that's possible without it being a python. Even if pandas is doing something wrong somehow it shouldn't be magically getting around a try/except. |
I think this is python/cpython#137288, which I think should be fixed in 3.14.0rc2. It's a little tricky to ignore these test failures because I can't actually catch these particular exceptions... I guess I can just skip them for |
@ngoldbaum thanks for finding that upstream issue, good to see it is already fixed. FWIW, numpy has the same issue ( |
Yup! Not really surprising to me that the Pandas test suite caught the upstream bug but the NumPy tests missed it, Pandas has much more comprehensive tests... I think I might split off the changes for the new error messages and |
Actually on second thought I don't think it makes sense to PR the warnings changes without any 3.14 testing, so I'll leave that here. @jorisvandenbossche please feel free to cherry-pick fc51e5f if you end up coming up with a better approach. I'll go ahead and re-enable all the CI to make sure I didn't break anything on older Python versions. |
Closing in favor of Joris' PRs. Please feel free to cherry-pick 180081b |
I'd like to see how widespread the test breakage is due to #61368.
Also 3.14rc1 came out earlier this week so Pandas should probably start thinking about 3.14 support soonish.