PY-87576 Fix read access violation in InstallAndImportPackageQuickFix

onSuccess() was called from a coroutine on Dispatchers.Default but
accessed PSI elements without a read action. Use suspend
writeCommandAction to properly dispatch to EDT with write access.

Add InstallPackageQuickFixTest to verify that onSuccess correctly
adds import statements to the file.

Make InstallPackageQuickFix and InstallAndImportPackageQuickFix
non-internal (annotated with @ApiStatus.Internal instead) so they
are accessible from the test module.

GitOrigin-RevId: 4b8ef9194803cdd12192351ef357b18321ba482a
This commit is contained in:
Vitaly Legchilkin
2026-02-13 13:27:58 +00:00
committed by intellij-monorepo-bot
parent 2c5de4b64a
commit 3b0c8ef38e
5 changed files with 74 additions and 21 deletions
@@ -0,0 +1 @@
pandas.array()
@@ -0,0 +1 @@
pd.array()