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-86291: linecache: get module name from __spec__ if available #22908

Merged

Conversation

eltoder
Copy link
Contributor

@eltoder eltoder commented Oct 23, 2020

This allows getting source code for the __main__ module when a custom
loader is used.

https://bugs.python.org/issue42125

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@eltoder

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Dec 16, 2020
@eltoder eltoder force-pushed the feature/linecache-name-from-spec branch from 43f2aec to d5ada2d Compare December 16, 2020 03:04
@eltoder
Copy link
Contributor Author

eltoder commented Dec 16, 2020

Resolved conflicts with the latest master.

@eltoder eltoder force-pushed the feature/linecache-name-from-spec branch from d5ada2d to 883b65d Compare December 16, 2020 03:31
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Dec 17, 2020
Copy link

cpython-cla-bot bot commented Jan 16, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@erlend-aasland erlend-aasland changed the title bpo-42125: linecache: get module name from __spec__ if available gh-86291: linecache: get module name from __spec__ if available Jan 16, 2024
@eltoder eltoder force-pushed the feature/linecache-name-from-spec branch from f82077b to 96fcdf3 Compare January 16, 2024 21:33
This allows getting source code for the __main__ module when a custom
loader is used.
@eltoder eltoder force-pushed the feature/linecache-name-from-spec branch from 96fcdf3 to 15a4344 Compare January 16, 2024 21:37
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.

LGTM.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Feb 20, 2024
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) February 20, 2024 15:34
@serhiy-storchaka serhiy-storchaka merged commit e976bab into python:main Feb 20, 2024
36 checks passed
@miss-islington-app
Copy link

Thanks @eltoder for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 20, 2024
…pythonGH-22908)

This allows getting source code for the __main__ module when a custom
loader is used.
(cherry picked from commit e976bab)

Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 20, 2024

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 20, 2024
…pythonGH-22908)

This allows getting source code for the __main__ module when a custom
loader is used.
(cherry picked from commit e976bab)

Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Feb 20, 2024
@bedevere-app
Copy link

bedevere-app bot commented Feb 20, 2024

GH-115732 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Feb 20, 2024
@eltoder eltoder deleted the feature/linecache-name-from-spec branch February 20, 2024 16:54
serhiy-storchaka pushed a commit that referenced this pull request Feb 20, 2024
GH-22908) (GH-115731)

This allows getting source code for the __main__ module when a custom
loader is used.
(cherry picked from commit e976bab)

Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
serhiy-storchaka pushed a commit that referenced this pull request Feb 20, 2024
GH-22908) (GH-115732)

This allows getting source code for the __main__ module when a custom
loader is used.
(cherry picked from commit e976bab)

Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
…pythonGH-22908)

This allows getting source code for the __main__ module when a custom
loader is used.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…pythonGH-22908)

This allows getting source code for the __main__ module when a custom
loader is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants