Files
openide/python/python-pyproject/resources/intellij.python.pyproject.xml
T
Vitaly Legchilkin fa8d191a6d PY-87408 unblock declared-packages reads from inspections
PyRequirementVisitor used to call listDeclaredPackagesCached() via
runBlockingMaybeCancellable, parking a JobScheduler FJ pool thread for
the duration of listDeclaredPackages(). Introduce a DependencyCache in
PythonPackageManager that publishes an Entry of (dependency files ->
modification stamps, background Deferred) keyed by the result of
resolveDependencyFilesTree(); concurrent readers share the entry via a
Mutex, and a non-blocking listDeclaredPackagesSnapshot() (driven by the
Deferred's invokeOnCompletion) lets inspection visitors read packages
without suspending. getDependencyFiles/getRootDependencyFile are
separated from listDeclaredPackagesCached so file-list readers don't
wait on the package compute.

Add Pythonid.pyDependenciesFileProvider with one provider per
PyDependenciesFile inheritor (setup.py, requirements*.txt,
environment.y[a]ml, pyproject.toml, Pipfile.lock), each co-located with
its file class; resolve() returns the first non-null match. Promote
PipFileLockFile to a data class so the cache's Map.equals on Entry.files
matches pipenv entries, and move RequirementsUtil into python-requirements
so RequirementsTxtFileProvider can reuse isRequirementsFile.

GitOrigin-RevId: e1c10352d1d695be5abda4c02c726d8f62cc8fd1
2026-05-13 10:17:33 +00:00

36 lines
1.7 KiB
XML

<idea-plugin visibility="internal">
<dependencies>
<plugin id="org.toml.lang"/>
<!-- region Generated dependencies - run `Generate Product Layouts` to regenerate -->
<module name="intellij.python.common"/>
<module name="intellij.python.community"/>
<module name="intellij.python.psi.impl"/>
<module name="intellij.python.requirements"/>
<module name="intellij.python.sdk"/>
<module name="intellij.toml.core"/>
<!-- endregion -->
</dependencies>
<resource-bundle>messages.PyProjectTomlBundle</resource-bundle>
<extensions defaultExtensionNs="com.intellij">
<!-- "ask" means "ask user"-->
<registryKey defaultValue="[off*|on|ask]" description="Load project structure from pyproject.toml" key="intellij.python.pyproject.model"
restartRequired="true"/>
<notificationGroup id="PyProject.toml" displayType="STICKY_BALLOON" isLogByDefault="true"
bundle="messages.PyProjectTomlBundle" key="pyproject.notification.title"/>
<backgroundPostStartupActivity implementation="com.intellij.python.pyproject.model.internal.platformBridge.PyProjectSyncActivity"/>
<statistics.projectUsagesCollector implementation="com.intellij.python.pyproject.statistics.PythonTomlStatsUsagesCollector"/>
<projectSettings service="com.intellij.python.pyproject.model.PyProjectModelSettings"/>
</extensions>
<extensions defaultExtensionNs="Pythonid">
<pyDependenciesFileProvider implementation="com.intellij.python.pyproject.PyProjectTomlFileProvider"/>
</extensions>
<extensionPoints>
<extensionPoint qualifiedName="com.intellij.python.pyproject.model.tool" interface="com.intellij.python.pyproject.model.spi.Tool"
dynamic="true"/>
</extensionPoints>
</idea-plugin>