Skip to content

Enable Pytest Rewrite to Users #20086

Description

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.

Activity

  1. DetachHead commented on Mar 7, 2024

    @DetachHead

    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

  2. eleanorjboyd commented on Mar 27, 2024

    @eleanorjboyd
    MemberAuthor

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

  3. DetachHead commented on Mar 28, 2024

    @DetachHead

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

  4. DetachHead commented on Apr 11, 2024

    @DetachHead

    Eleanor Boyd (@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

  5. eleanorjboyd commented on Apr 15, 2024

    @eleanorjboyd
    MemberAuthor

    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?

  6. DetachHead commented on Apr 15, 2024

    @DetachHead

    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

  7. eleanorjboyd commented on Apr 16, 2024

    @eleanorjboyd
    MemberAuthor

    Luciana Abud (@luabud) could you take a look at this?

  8. luabud commented on Apr 16, 2024

    @luabud
    Member

    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

  9. DetachHead commented on Apr 16, 2024

    @DetachHead
    • 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

  10. luabud commented on Apr 16, 2024

    @luabud
    Member

    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?

  11. DetachHead commented on Apr 16, 2024

    @DetachHead

    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

  12. DetachHead commented on Apr 16, 2024

    @DetachHead

    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.

  13. luabud commented on Apr 20, 2024

    @luabud
    Member

    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 Karthik Nadig (@karthiknadig))

  14. DetachHead commented on Apr 20, 2024

    @DetachHead

    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 Karthik Nadig (@karthiknadig))

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

  15. github-actions commented on Jun 7, 2024

    @github-actions

    Hey Eleanor Boyd (@eleanorjboyd), this issue might need further attention.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions