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-112660: Do not clear arbitrary errors on import by serhiy-storchaka · Pull Request #112661 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Dec 3, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Previously arbitrary errors could be cleared during formatting error messages for ImportError or AttributeError for modules. Now all unexpected errors are reported.

  • Issue: Do not clear arbitrary errors on import #112660

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka
pythongh-112660: Do not clear arbitrary errors on import
8097bc4
Previously arbitrary errors could be cleared during formatting error
messages for ImportError or AttributeError for modules. Now all
unexpected errors are reported.
@serhiy-storchaka
serhiy-storchaka requested a review from vstinner December 3, 2023 13:33
@serhiy-storchaka
serhiy-storchaka requested review from gvanrossum, kumaraditya303 and markshannon as code owners December 3, 2023 13:33
@bedevere-app bedevere-app Bot added the awaiting core review label Dec 3, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Dec 3, 2023
Do not clear arbitrary errors on import #112660
Closed
@serhiy-storchaka
serhiy-storchaka merged commit 8660fb7 into python:main Dec 7, 2023
@bedevere-app bedevere-app Bot removed the awaiting core review label Dec 7, 2023
@serhiy-storchaka
serhiy-storchaka deleted the import-no-clear-error branch December 7, 2023 10:19
This was referenced Dec 7, 2023
gh-105716 breaks greenlet/eventlet #112826
Closed
[3.12] gh-112826: Fix the threading Module When _thread is Missing _is_main_interpreter() #112850
Merged
gh-112826: Add a "What's New" Entry About _thread._is_main_interpreter #112853
Merged
ericsnowcurrently added a commit that referenced this pull request Dec 7, 2023
@ericsnowcurrently
gh-112826: Add a "What's New" Entry About _thread._is_main_interpreter (
64d8b4c
gh-112853)

As of gh-112661, the threading module expects the _thread module to have a _is_main_interpreter(), which is used in the internal threading._shutdown().  This change causes a problem for anyone that replaces the _thread module with a custom one (only if they don't provide _is_main_interpreter()).  They need to be sure to add it for 3.13+, thus this PR is adding a note in "What's New".

This also forward-ports the "What's New" entry from 3.12 (gh-112850).  Note that we do not also forward-port the fix in that PR.  The fix is there only due to a regression from 3.12.0. There is no regression in 3.13+.
@ericsnowcurrently ericsnowcurrently mentioned this pull request Dec 7, 2023
Missing _thread._is_main_interpreter() python-greenlet/greenlet#390
Closed
@hauntsaninja hauntsaninja mentioned this pull request Jan 28, 2024
gh-95754: Better error when script shadows a standard library or third party module #113769
Merged
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@serhiy-storchaka @aisk
pythongh-112660: Do not clear arbitrary errors on import (pythonGH-11…
f467718
…2661)

Previously arbitrary errors could be cleared during formatting error
messages for ImportError or AttributeError for modules. Now all
unexpected errors are reported.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@ericsnowcurrently @aisk
pythongh-112826: Add a "What's New" Entry About _thread._is_main_inte…
d1cfbb7
…rpreter (pythongh-112853)

As of pythongh-112661, the threading module expects the _thread module to have a _is_main_interpreter(), which is used in the internal threading._shutdown().  This change causes a problem for anyone that replaces the _thread module with a custom one (only if they don't provide _is_main_interpreter()).  They need to be sure to add it for 3.13+, thus this PR is adding a note in "What's New".

This also forward-ports the "What's New" entry from 3.12 (pythongh-112850).  Note that we do not also forward-port the fix in that PR.  The fix is there only due to a regression from 3.12.0. There is no regression in 3.13+.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@serhiy-storchaka @Glyphack
pythongh-112660: Do not clear arbitrary errors on import (pythonGH-11…
5237cf3
…2661)

Previously arbitrary errors could be cleared during formatting error
messages for ImportError or AttributeError for modules. Now all
unexpected errors are reported.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@ericsnowcurrently @Glyphack
pythongh-112826: Add a "What's New" Entry About _thread._is_main_inte…
d98bb49
…rpreter (pythongh-112853)

As of pythongh-112661, the threading module expects the _thread module to have a _is_main_interpreter(), which is used in the internal threading._shutdown().  This change causes a problem for anyone that replaces the _thread module with a custom one (only if they don't provide _is_main_interpreter()).  They need to be sure to add it for 3.13+, thus this PR is adding a note in "What's New".

This also forward-ports the "What's New" entry from 3.12 (pythongh-112850).  Note that we do not also forward-port the fix in that PR.  The fix is there only due to a regression from 3.12.0. There is no regression in 3.13+.
hauntsaninja added a commit to hauntsaninja/cpython that referenced this pull request Dec 17, 2024
@hauntsaninja
pythongh-128030: Avoid error from PyModule_GetFilenameObject for non-…
256e3c3
…module

I missed the extra `PyModule_Check` in python#127660 because I was looking at
3.12 as the base implementation for import from. This meant that I
missed the `PyModuleCheck` introduced in python#112661.
@hauntsaninja hauntsaninja mentioned this pull request Dec 17, 2024
gh-128030: Avoid error from PyModule_GetFilenameObject for non-module #128047
Merged
hauntsaninja added a commit that referenced this pull request Dec 20, 2024
@hauntsaninja
gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (…
45e6dd6
…#128047)

I missed the extra `PyModule_Check` in #127660 because I was looking at
3.12 as the base implementation for import from. This meant that I
missed the `PyModuleCheck` introduced in #112661.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 20, 2024
@hauntsaninja @miss-islington
pythongh-128030: Avoid error from PyModule_GetFilenameObject for non-…
76b88e6
…module (pythonGH-128047)

I missed the extra `PyModule_Check` in pythonGH-127660 because I was looking at
3.12 as the base implementation for import from. This meant that I
missed the `PyModuleCheck` introduced in pythonGH-112661.
(cherry picked from commit 45e6dd6)

Co-authored-by: Shantanu <[email protected]>
@miss-islington miss-islington mentioned this pull request Dec 20, 2024
[3.13] gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (GH-128047) #128114
Merged
hauntsaninja added a commit that referenced this pull request Dec 20, 2024
@miss-islington @hauntsaninja
[3.13] gh-128030: Avoid error from PyModule_GetFilenameObject for non…
f320f74
…-module (GH-128047) (#128114)

gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (GH-128047)

I missed the extra `PyModule_Check` in GH-127660 because I was looking at
3.12 as the base implementation for import from. This meant that I
missed the `PyModuleCheck` introduced in GH-112661.
(cherry picked from commit 45e6dd6)

Co-authored-by: Shantanu <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Dec 23, 2024
@hauntsaninja @srinivasreddy
pythongh-128030: Avoid error from PyModule_GetFilenameObject for non-…
a548261
…module (python#128047)

I missed the extra `PyModule_Check` in python#127660 because I was looking at
3.12 as the base implementation for import from. This meant that I
missed the `PyModuleCheck` introduced in python#112661.
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
@hauntsaninja @srinivasreddy
pythongh-128030: Avoid error from PyModule_GetFilenameObject for non-…
628b0d2
…module (python#128047)

I missed the extra `PyModule_Check` in python#127660 because I was looking at
3.12 as the base implementation for import from. This meant that I
missed the `PyModuleCheck` introduced in python#112661.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner Awaiting requested review from vstinner
@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 is a code owner
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
@gvanrossum gvanrossum Awaiting requested review from gvanrossum

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

1 participant

@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.