-
Hello!
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @bageljrkhanofemus, thank you for your interest in improving rope and Python tooling in general. Rope is in the process of deprecating Python 2, and it's likely Python 3.5 will also go away together with it when it does. Currently, I am planning the next release to drop Python 2 support. The current rope import cache is basically just a pickled dictionary, with a very simple schema. I agree that they could be improved by moving towards a proper database. Sqlite would enable future possibilities to implement incremental updates (useful for larger codebases) or more sophisticated completion queries (e.g. fuzzy or fts completions). In the past, I also have had thoughts on moving the import cache to sqlite. Currently, auto completion and auto import isn't an area of priority for me to implement the sqlite3 cache backend myself, but I'd be happy to provide any assistance you need and I'll accept code contributions towards this goal.
Currently rope doesn't have any dependencies on anything other than the standard library, and I prefer to keep it that way. There are many people that installs rope into the same site-packages/virtualenv as the one they use for their own project, rope not having additional dependencies minimises version conflicts with the user's project's dependencies. That said, I'm open to discussing adding dependencies if there is a sufficiently strong argument for it and there's minimal risks of conflicts with user projects.
Currently, I think sqlite3 will be the best candidate for an improved rope caches. However, other alternatives I've considered in the past was dbm/shelves modules. Like sqlite3, these are also embedded databases that's available as part of the standard library, but unlike sqlite3, they are a key-value database instead of a relational database. Since the current cache was a pickled dictionary, my thinking was that moving to an embedded key-value database likely would more closely match the existing implementation and be an easier upgrade than to a relational database. That said, I don't think dbm would be a sufficiently worthwhile upgrade, since they would share many of the same issues as the current dictionary-based cache.
Nothing beyond the regular contribution guideline. Basically just update the CHANGELOG and if applicable, update The rope autoimport cache is an implementation detail. I don't expect any editor/IDE integrations to directly depend on specifics of the autoimport cache, so no need to worry about breaking compatibilities. |
Beta Was this translation helpful? Give feedback.
Hi @bageljrkhanofemus, thank you for your interest in improving rope and Python tooling in general.
Rope is in the process of deprecating Python 2, and it's likely Python 3.5 will also go away together with it when it does. Currently, I am planning the next release to drop Python 2 support.
The current rope import cache is basically just a pickled dictionary, with a very simple schema. I agree that they could be improved by moving towards a proper database. Sqlite would enable future possibilities to implement incremental updates (useful for larger codebases) or more sophisticated completion queries (e.g. fuzzy or fts completions).
In the past, I also have had thoughts on moving the impor…