mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 04:43:02 +07:00
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