Skip to content

Fix repl hang is python 3.12 and above. the module 'imp' was removed. - #8273

Merged
Bill Schnurr (bschnurr) merged 2 commits into
microsoft:mainfrom
bschnurr:fix-repl-hang
Aug 14, 2025
Merged

Fix repl hang is python 3.12 and above. the module 'imp' was removed.#8273
Bill Schnurr (bschnurr) merged 2 commits into
microsoft:mainfrom
bschnurr:fix-repl-hang

Conversation

@bschnurr

@bschnurr Bill Schnurr (bschnurr) commented Aug 13, 2025

Copy link
Copy Markdown
Member
  • also updating pylance and debugpy

How i figured it out
forced 'DEBUG' to be true. it opened another terminal window with some extra prints and callstack.
DEBUG = os.environ.get('DEBUG_REPL') or os.environ.get('_PTVS_DEBUG_REPL')
fixes internal issue 2527900

@bschnurr
Bill Schnurr (bschnurr) requested a review from a team as a code owner August 13, 2025 00:11
@bschnurr

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@bschnurr

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@sonarqubecloud

Copy link
Copy Markdown

@bschnurr

Copy link
Copy Markdown
Member Author

Oh. i think i should update our tests to run both latest and oldest supported python versions.

@bschnurr
Bill Schnurr (bschnurr) merged commit 2738912 into microsoft:main Aug 14, 2025
6 checks passed
import struct
import imp
import types
# Add compatibility code:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe this could be a function?

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.

2 participants