Skip to content

Commit dd2ad0f

Browse files
Vitaly Legchilkinintellij-monorepo-bot
authored andcommitted
[python] don't resolve package versions for conda in bridge (PY-80823)
* conda package manager now is a composite manager and it contains more than 600k packages (both from conda and pypi). resolving version for each package takes too much resources. (cherry picked from commit caa153b999675319cbcdb558e7d96bc2575b3ab5) IJ-MR-162902 GitOrigin-RevId: 35263c983004fd3c6e5fa7c89219d670c1238832
1 parent 92d9c52 commit dd2ad0f

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

python/src/com/jetbrains/python/packaging/bridge/PythonPackageManagementServiceBridge.kt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import com.intellij.webcore.packaging.RepoPackage
1616
import com.jetbrains.python.PyBundle
1717
import com.jetbrains.python.packaging.PyPackagingSettings
1818
import com.jetbrains.python.packaging.common.*
19-
import com.jetbrains.python.packaging.conda.CondaPackageCache
2019
import com.jetbrains.python.packaging.management.PythonPackageManager
2120
import com.jetbrains.python.packaging.management.packagesByRepository
2221
import com.jetbrains.python.packaging.repository.PyPIPackageRepository
@@ -63,18 +62,7 @@ class PythonPackageManagementServiceBridge(project: Project, sdk: Sdk) : PyPacka
6362
repository.isCustom -> repository.repositoryUrl
6463
else -> null
6564
}
66-
val latestVersion = getLatestVersion(pkg)
67-
return RepoPackage(pkg, repositoryUrl, latestVersion)
68-
}
69-
70-
// TODO unify logic of retrieving package versions for pypi and conda
71-
private fun getLatestVersion(pkg: String): String? {
72-
if (!isConda || !useConda) return null
73-
74-
val settings = PyPackagingSettings.getInstance(project)
75-
val cache = service<CondaPackageCache>()
76-
val versions = cache[pkg] ?: emptyList()
77-
return settings.selectLatestVersion(versions)
65+
return RepoPackage(pkg, repositoryUrl, null)
7866
}
7967

8068
override fun getAllPackagesCached(): List<RepoPackage> {

0 commit comments

Comments
 (0)