Skip to content

No configurations support (or undocumentd) aka py.ini #270

Closed

Description

@ssbarnea

While official Python documentation mentions where py.ini can be loaded from and what you can configure inside, the unix python-launcher does not see to have any support for it, or lacks documentation.

I reached this while trying to configure py on macos to prefer using the latest release of python instead of using the latest pre-release (which obviously does not work with most tools).

py --list
 3.12 │ /usr/local/bin/python3.12    
 3.11 │ /opt/homebrew/bin/python3.11 
 3.10 │ /opt/homebrew/bin/python3.10 
 3.9  │ /opt/homebrew/bin/python3.9  
 3.8  │ /opt/homebrew/bin/python3.8  

I created a py.ini in user home with expected config but it was not loaded. Should I assume that python-launcher already knowns to use XDG standard. (XDG_CONFIG_HOME) and look for confing in ~/.config/py.ini or similar? I tried to run with verbose mode but apparently --list does not even accept that argument.

$ py --list -vv      
The `--list` flag must be specified on its own; see `py --help` for details
FAIL: 64

Later I found that export PYLAUNCH_DEBUG=1 added some extra debugging info and I attempted to trick py to default to another version of python using the documented environment variables:

export PY_PYTHON=3.11
export PY_PYTHON3=3.11

While this works, I still think that lack of config file support is a bug, probably the missing -v too.

Activity

  1. Repository owner locked and limited conversation to collaborators on Jan 24, 2023
  2. converted this issue into a discussion #271 on Jan 24, 2023
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions