Skip to content
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

Add compatibility with python 3.13.1 #2647

Merged
merged 3 commits into from
Dec 8, 2024

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Refs python/cpython#125415
Closes pylint-dev/pylint#10112

astroid/const.py Outdated Show resolved Hide resolved
@jacobtylerwalls
Copy link
Member Author

jacobtylerwalls commented Dec 8, 2024

@Pierre-Sassoulas how do you feel about xfailing those 3 failing deque tests on python 3.13? We need to get some sort of hotfix out and I can't commit to debugging them. edit: got it, was just a "haste makes waste" thing!

@jacobtylerwalls jacobtylerwalls marked this pull request as ready for review December 8, 2024 00:10
@jacobtylerwalls jacobtylerwalls force-pushed the jtw/collections-abc-3-13-1 branch from 02f6334 to ab301db Compare December 8, 2024 01:30
@jacobtylerwalls jacobtylerwalls added this to the 3.3.6 milestone Dec 8, 2024
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work ! I think the pylint job is expected to fail and I rerun the python 3.9 job that failed with a core dump due to solar flares

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 93.19%. Comparing base (cae4388) to head (94036c3).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2647      +/-   ##
==========================================
- Coverage   93.20%   93.19%   -0.01%     
==========================================
  Files          93       93              
  Lines       11077    11078       +1     
==========================================
  Hits        10324    10324              
- Misses        753      754       +1     
Flag Coverage Ξ”
linux 93.08% <100.00%> (-0.01%) ⬇️
pypy 93.19% <100.00%> (-0.01%) ⬇️
windows 93.19% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Ξ”
astroid/brain/brain_collections.py 94.44% <100.00%> (-5.56%) ⬇️
astroid/const.py 100.00% <100.00%> (ΓΈ)

... and 1 file with indirect coverage changes

@Pierre-Sassoulas Pierre-Sassoulas merged commit fe01bda into main Dec 8, 2024
19 of 20 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the jtw/collections-abc-3-13-1 branch December 8, 2024 05:56
Copy link
Contributor

github-actions bot commented Dec 8, 2024

The backport to maintenance/3.3.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-maintenance/3.3.x maintenance/3.3.x
# Navigate to the new working tree
cd .worktrees/backport-maintenance/3.3.x
# Create a new branch
git switch --create backport-2647-to-maintenance/3.3.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 fe01bda8d9b3e118b1713f726dea6efffa0c6b07
# Push it to GitHub
git push --set-upstream origin backport-2647-to-maintenance/3.3.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-maintenance/3.3.x

Then, create a pull request where the base branch is maintenance/3.3.x and the compare/head branch is backport-2647-to-maintenance/3.3.x.

jacobtylerwalls added a commit to jacobtylerwalls/astroid that referenced this pull request Dec 8, 2024
jacobtylerwalls added a commit that referenced this pull request Dec 8, 2024
@jacobtylerwalls
Copy link
Member Author

@Pierre-Sassoulas Well, now I'm doubtful this accomplished anything because I'm having trouble reproducing the original issue. Ugh. I have no idea how to proceed.

@Pierre-Sassoulas
Copy link
Member

Should we create a brain for collection.abc when the python interpreter is > 3.13.1 ? Feels dirty but we might not have a choice.

@jacobtylerwalls
Copy link
Member Author

Well that's what I tried, but it didn't make a difference. At a loss until I can repro the problem.

@jacobtylerwalls
Copy link
Member Author

okay, progress.

verified everything still fails with 3.13.6 (not a big deal, haven't updated pylint yet)

but pylint job passes with this commit adding a brain for the underlying _collections_abc.

@jacobtylerwalls
Copy link
Member Author

never mind, that job was running python 3.12 for some reason. back to square one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to import 'collections.abc' using python 3.13.1
2 participants