Skip to content

Is there a way to disable the browser open behavior? #160

Closed

Description

@zanieb

Background

Over in uv, we need to invoke interpreters when discovering them on the system. We have a report at astral-sh/uv#15707 that running a command that discovers interpreters (e.g., uv python list) opens their browser.

Details

I'm a little wary of this behavior in general and maybe there should be heuristics about whether this is appropriate. The smallest change would probably be to add an environment variable uv could set at query-time to disable this?

I briefly looked at the documentation and didn't see anything about configuring this, but I didn't poke around the source code.

Activity

  1. dalito commented on Sep 6, 2025

    @dalito

    It looks like this was fixed in the latest release (#157). Version 25.0b13 (AKA 25.0.189.0) still had the issue, version 25.0b14 (AKA 25.0.190.0) fixed it.

    I wonder how the automatic update described in the Python Windows help page is supposed to work. How is it triggered? It did not update for me from b13 to b14.

  2. zanieb commented on Sep 8, 2025

    @zanieb
    Author

    Oh so it was pymanager.exe that exhibits this behavior and it was being installed as python.exe incorrectly?

  3. zooba commented on Sep 8, 2025

    @zooba
    Member

    Yeah, that's exactly what happened.

    The automatic update only applies to the MSIX, and will either trigger automatically by the OS within 24 hours of a release going up (if you have network access), or triggered through the Store app if you installed it that way. The MSI doesn't do automatic update (we should probably document that more clearly under one of the "you probably don't want this one" warnings).

  4. zooba commented on Sep 8, 2025

    @zooba
    Member

    For use in uv (assuming you're finding and using pymanager.exe or py.exe directly), you probably want to set %PYTHON_MANAGER_CONFIRM%=False to disable confirmations, which should prevent the browser from opening. But also, passing any arguments at all to those commands should do it as well. The python.exe command shouldn't be affected, that was definitely a bug that we fixed.

  5. zanieb commented on Sep 8, 2025

    @zanieb
    Author

    We were finding python.exe, so I think we're no longer affected. If we ever query the pymanager.exe or py.exe, I'll keep that option in mind! Thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions