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

gh-119698: fix a special case in symtable.Class.get_methods #121802

Merged
merged 10 commits into from
Jul 17, 2024

Conversation

picnixz
Copy link
Contributor

@picnixz picnixz commented Jul 15, 2024

cc @JelleZijlstra @serhiy-storchaka

So, this is the fix of the fix for the following bug: #119698 (comment)

While this fixes what I did, I'm less and less convinced about keeping the method as well...

It is pretty complex now, with complex tests and documentation, and I am not even sure that it is correct. It has high maintenance cost, and its usefulness is questionable.

Well.. it indeed becomes more and more complex =/ the tests are not really complex but we need a lot of them just to be sure that we cover the cases. Maintenance cost is not that much for me, unless the symtable changes. However, I agree that usefulness is questionable... (still didn't manage to find concrete use cases =/)

@picnixz picnixz marked this pull request as ready for review July 15, 2024 17:20
Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Yeah, deprecating this may be the right call after all.

Lib/test/test_symtable.py Outdated Show resolved Hide resolved
@picnixz
Copy link
Contributor Author

picnixz commented Jul 16, 2024

So, I deprecated the method but kept the fix (I can also revert all the fixes and just mark it as deprecated, but I think it's better to keep something that is working even though we are deprecating it)

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

I suggest to split this PR on two. The genexpr fix should be backported to 3.13 and 3.12. The deprecation should only be applied to 3.14.

@picnixz
Copy link
Contributor Author

picnixz commented Jul 17, 2024

I forgot that we backported the original fix... Thanks Serhiy, it should definitely be split into two!

@picnixz
Copy link
Contributor Author

picnixz commented Jul 17, 2024

(FTR, the last commit is just about reverting some RST content that will be included in the next PR (Serhiy approved the changes at the same time I pushed the commit))

@picnixz picnixz added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jul 17, 2024
@JelleZijlstra JelleZijlstra merged commit 6682d91 into python:main Jul 17, 2024
33 checks passed
@miss-islington-app
Copy link

Thanks @picnixz for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 17, 2024
…ythonGH-121802)

(cherry picked from commit 6682d91)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 17, 2024
…ythonGH-121802)

(cherry picked from commit 6682d91)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 17, 2024

GH-121909 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 17, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jul 17, 2024

GH-121910 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jul 17, 2024
JelleZijlstra pushed a commit that referenced this pull request Jul 17, 2024
…H-121802) (#121909)

(cherry picked from commit 6682d91)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@picnixz picnixz deleted the fix-get-methods-again branch July 17, 2024 14:10
JelleZijlstra pushed a commit that referenced this pull request Jul 17, 2024
…H-121802) (#121910)

(cherry picked from commit 6682d91)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
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.

None yet

3 participants