GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-119698: fix a special case in `symtable.Class.get_methods` by picnixz · Pull Request #121802 · python/cpython

Conversation

@picnixz

@picnixz picnixz commented Jul 15, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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 =/)

  • Issue: symtable.Class.get_methods() returns non-methods #119698

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@picnixz
fix symtable.Class.get_methods() (again)
e5f0f45
@bedevere-app bedevere-app Bot mentioned this pull request Jul 15, 2024
symtable.Class.get_methods() returns non-methods #119698
Closed
@picnixz picnixz added the skip news label Jul 15, 2024
@picnixz
picnixz marked this pull request as ready for review July 15, 2024 17:20
@bedevere-app bedevere-app Bot added the awaiting review label Jul 15, 2024
JelleZijlstra
JelleZijlstra reviewed Jul 15, 2024
View reviewed changes

@JelleZijlstra JelleZijlstra left a comment

Copy link
Copy Markdown
Member

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_symtable.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

picnixz added 3 commits July 16, 2024 10:46
@picnixz
address review
9adbb27
@picnixz
update docs
e9d00c0
@picnixz
remove unused imports
0981fcf
@picnixz

picnixz commented Jul 16, 2024

Copy link
Copy Markdown
Member Author

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)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
fix doctest?
89eb370
JelleZijlstra
JelleZijlstra reviewed Jul 16, 2024
View reviewed changes
Comment thread Doc/library/symtable.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

picnixz added 2 commits July 16, 2024 17:44
@picnixz
add deprecation notice
0781ccd
@picnixz
configure doctest correctly?
e1402f2
serhiy-storchaka
serhiy-storchaka reviewed Jul 17, 2024
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@picnixz

picnixz commented Jul 17, 2024

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

picnixz added 2 commits July 17, 2024 09:40
@picnixz
remove deprecation notice for a separate PR
8a06e53
@picnixz
fixup blurb entry
3f1877f
@picnixz picnixz mentioned this pull request Jul 17, 2024
gh-119698: deprecate symtable.Class.get_methods #121902
Merged
serhiy-storchaka
serhiy-storchaka approved these changes Jul 17, 2024
View reviewed changes
@bedevere-app bedevere-app Bot removed the awaiting review label Jul 17, 2024
@picnixz
reduce the diff
39276b4
@bedevere-app bedevere-app Bot added the awaiting merge label Jul 17, 2024
@picnixz

picnixz commented Jul 17, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

(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))

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz picnixz added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Jul 17, 2024
@JelleZijlstra
JelleZijlstra merged commit 6682d91 into python:main Jul 17, 2024
@miss-islington-app

miss-islington-app Bot commented Jul 17, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Jul 17, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 17, 2024
@picnixz @miss-islington
pythongh-119698: fix a special case in symtable.Class.get_methods (p…
2205149
…ythonGH-121802)

(cherry picked from commit 6682d91)

Co-authored-by: Bénédikt Tran <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 17, 2024
@picnixz @miss-islington
pythongh-119698: fix a special case in symtable.Class.get_methods (p…
0febef0
…ythonGH-121802)

(cherry picked from commit 6682d91)

Co-authored-by: Bénédikt Tran <[email protected]>
@bedevere-app

bedevere-app Bot commented Jul 17, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jul 17, 2024
@bedevere-app

bedevere-app Bot commented Jul 17, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jul 17, 2024
JelleZijlstra pushed a commit that referenced this pull request Jul 17, 2024
@miss-islington @picnixz
[3.13] gh-119698: fix a special case in symtable.Class.get_methods (G…
c6ef5ac
…H-121802) (#121909)

(cherry picked from commit 6682d91)

Co-authored-by: Bénédikt Tran <[email protected]>
@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
@miss-islington @picnixz
[3.12] gh-119698: fix a special case in symtable.Class.get_methods (G…
3279a4f
…H-121802) (#121910)

(cherry picked from commit 6682d91)

Co-authored-by: Bénédikt Tran <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra left review comments
@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@picnixz @JelleZijlstra @serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.