Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block interpreters from Positron dropdown #6525

Merged
merged 3 commits into from
Feb 28, 2025
Merged

Conversation

isabelizimm
Copy link
Contributor

Should block <3.8 interpreters from being registered when found. It seems to fix everything for me locally, I think this is the only place where old interpreters could sneak by.

Release Notes

New Features

  • N/A

Bug Fixes

QA Notes

  1. Create a Python interpreter <3.8 (if you are a pyenv user, you can do pyenv install 3.6)
  2. Fo to Python: Select Interpreter, should not appear in dropdown
  3. Go to Positron interpreter selector, should not appear here either

Copy link

github-actions bot commented Feb 27, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

@@ -116,7 +118,14 @@ export class PythonRuntimeManager implements IPythonRuntimeManager {
*/
public registerLanguageRuntime(runtime: positron.LanguageRuntimeMetadata): void {
const extraData = runtime.extraRuntimeData as PythonRuntimeExtraData;
const pythonVersion: PythonVersion = toSemverLikeVersion(parseVersion(runtime.languageVersion));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be the best way to get from a version string to the PythonVersion type. toSemverLikeVersion is only used in legacy code upstream, so it has been deprecated.

I'm happy to put together a custom function for us if we don't want the deprecated function though.

Copy link
Contributor

@testlabauto testlabauto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally with a 3.7 pyenv. Looks great!

Copy link
Contributor

@seeM seeM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think it's fine to use the deprecated function given the note you added.

@isabelizimm isabelizimm merged commit 3de92ca into main Feb 28, 2025
28 checks passed
@isabelizimm isabelizimm deleted the block-interpreters branch February 28, 2025 14:51
@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants