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

Enable Pytest Rewrite to Users #20086

Open
eleanorjboyd opened this issue Oct 26, 2022 · 15 comments
Open

Enable Pytest Rewrite to Users #20086

eleanorjboyd opened this issue Oct 26, 2022 · 15 comments
Assignees
Labels
area-testing feature-request Request for new features or functionality

Comments

@eleanorjboyd
Copy link
Member

Enable the pytest rewrite code and disable the old pytest coding method. This may also include doing the same for unittests but for reduced load these two might need to be at separate times. Dependencies between the two workflows should be analyzed to determine a best release schedule.

@eleanorjboyd eleanorjboyd added the feature-request Request for new features or functionality label Oct 26, 2022
@eleanorjboyd eleanorjboyd self-assigned this Oct 26, 2022
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 26, 2022
@eleanorjboyd eleanorjboyd added area-testing and removed triage-needed Needs assignment to the proper sub-team labels Oct 26, 2022
@DetachHead
Copy link

DetachHead commented Mar 7, 2024

is there a way for users to enable this themselves if the experiment isn't enabled for them? i wrote a pytest hook that relies on the new test adapter (pytest-dev/pytest-xdist#853 (comment)) and it would be nice if i could set something in .vscode/settings.json to enable it for everyone in my team.

edit: i just found python.experiments.optInto, but it looks like that can only be configured on the user's settings.json and not the workspace one

@eleanorjboyd
Copy link
Member Author

@DetachHead, the experiment should be enabled for all users by default- do you have a setting that might turn on this default behavior?

@eleanorjboyd eleanorjboyd added the info-needed Issue requires more information from poster label Mar 27, 2024
@DetachHead
Copy link

looks like it was because i have "telemetry.telemetryLevel" set to "off"

@DetachHead
Copy link

@eleanorjboyd do experiments work differently on the insiders version of vscode? the pythonTestAdapter experiment seems to be disabled by default, even though i have telemetry.telemetryLevel set to all

@eleanorjboyd
Copy link
Member Author

It should be enabled for everyone on both stable and insiders. To confirm both your user and workspace settings do not reference anything about experiments?

@DetachHead
Copy link

yep, no experiments or telemetry settings have been changed from the defaults. same thing happens on a colleague's PC with a fresh install. i even deleted everything in both my user and workspace settings.json files just to be sure

@eleanorjboyd
Copy link
Member Author

@luabud could you take a look at this?

@luabud
Copy link
Member

luabud commented Apr 16, 2024

Hmm it should be enabled on both Insiders and Public. A couple of things to check:

  • Make sure you have the latest VS Code Insiders version (1.89.0-insider) and the latest Python extension version (v2024.4.X or v2024.5.XXXXXXX)
  • Make sure telemetry isn't disabled (which you already did)
  • Make sure experiments are not disabled (i.e. there's no "workbench.enableExperiments":false or "python.experiments.enabled":false set in User, Workspace, Remote or Profile settings)

I am also curious if there are any other experiments enabled, or if it's just this one that is disabled? You should be able to check this by opening the Python output channel ("Python: Show Output" command in the command palette) and looking into the first few lines there:

image

@DetachHead
Copy link

  • Make sure you have the latest VS Code Insiders version (1.89.0-insider) and the latest Python extension version (v2024.4.X or v2024.5.XXXXXXX)

yep, i'm on vscode 1.89.0-insider and python extension 2024.5.11021008 (pre-release)

  • Make sure telemetry isn't disabled (which you already did)
  • Make sure experiments are not disabled (i.e. there's no "workbench.enableExperiments":false or "python.experiments.enabled":false set in User, Workspace, Remote or Profile settings)

not sure where to find profile settings, but here's some screenshots of my user settings to show that there's no "modified elsewhere" messages on any of these settings:

image
image

I am also curious if there are any other experiments enabled, or if it's just this one that is disabled? You should be able to check this by opening the Python output channel ("Python: Show Output" command in the command palette) and looking into the first few lines there:

no experiments showed up in the log, this is all i see:

image

@luabud
Copy link
Member

luabud commented Apr 16, 2024

that's definitely unexpected. What happens if you explicitly add "python.experiments.optInto": [ "pythonTestAdapter", ], to your settings?

And you've downloaded VS Code from the official website, right?

@DetachHead
Copy link

that's definitely unexpected. What happens if you explicitly add "python.experiments.optInto": [ "pythonTestAdapter", ], to your settings?

it works when i do that

And you've downloaded VS Code from the official website, right?

yep

@DetachHead
Copy link

also happened on a different colleague's PC with the stable version of vscode (1.88.1) and the stable version of the python extension (2024.4.1).

i checked all the same things on their PC. telemetry is enabled, no experiment settings have been changed, yet no experiments were active in the python output terminal.

@luabud
Copy link
Member

luabud commented Apr 20, 2024

I've done some digging and the only hypothesis I could come up with is a mis configuration on our end. I made some changes so if that was the culprit, it should be fixed now. Would you mind removing the opt into setting, reloading VS Code and checking your Python Output to see if you have the experiment enabled?

If that didn't work, then I think #23241 is the fastest workaround we can provide for this issue indeed (cc @karthiknadig)

@DetachHead
Copy link

I've done some digging and the only hypothesis I could come up with is a mis configuration on our end. I made some changes so if that was the culprit, it should be fixed now. Would you mind removing the opt into setting, reloading VS Code and checking your Python Output to see if you have the experiment enabled?

didn't work, still no experiments enabled for me on vscode insiders

If that didn't work, then I think #23241 is the fastest workaround we can provide for this issue indeed (cc @karthiknadig)

in that case, i went ahead and made a PR: #23267

Copy link

github-actions bot commented Jun 7, 2024

Hey @eleanorjboyd, this issue might need further attention.

@eleanorjboyd, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@eleanorjboyd eleanorjboyd removed the info-needed Issue requires more information from poster label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants