Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/manage/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

WELCOME = f"""!B!Python install manager was successfully updated to {__version__}.!W!
Configuration and runtime tags have been hardened, which may cause some unusual
(and likely incorrect) settings to fail.
Please see !B!{CHANGELOG_URL}!W! for all changes.
"""

Expand All @@ -49,6 +51,8 @@
WELCOME_ARM64 = f"""!B!Python install manager was successfully updated to {__version__}.!W!
The default platform on this PC is now !Y!-arm64!W! instead of !Y!-64!W!.
Configuration and runtime tags have been hardened, which may cause some unusual
(and likely incorrect) settings to fail.
Please see !B!{CHANGELOG_URL}!W! for more details and all other changes.
"""

Expand Down Expand Up @@ -96,13 +100,14 @@


GLOBAL_OPTIONS_HELP_TEXT = fr"""!G!Global options: !B!(options must follow the command)!W!
-v, --verbose Increased output (!B!log_level={logging.INFO}!W!)
-v, --verbose Increased output (!B!log_level={logging.VERBOSE}!W!)
-vv Further increased output (!B!log_level={logging.DEBUG}!W!)
-q, --quiet Less output (!B!log_level={logging.WARN}!W!)
-qq Even less output (!B!log_level={logging.ERROR}!W!)
-y, --yes Always accept confirmation prompts (!B!confirm=false!W!)
-h, -?, --help Show help for a specific command
--config=!B!<PATH>!W! Override configuration with JSON file
--log=!B!<PATH>!W! Override log file location
"""


Expand Down Expand Up @@ -155,6 +160,8 @@ def execute(self):
* 'path' to make a Path object, resolved against the config file's location
* 'uri' to call 'as_uri()' (so it chains with 'path'), and ensure the argument
is vaguely URI-shaped and minimally exploitable.
* 'sensitive' to avoid printing the value to logs files or consoles ('uri'
values always treat user/pass parts as sensitive)
Arguments passed on the command line always override any config files.
"""
Expand Down Expand Up @@ -743,7 +750,7 @@ class ListCommand(BaseCommand):
-f, --format=!B!<table,json,jsonl,csv,exe,prefix,url,formats>!W!
Specify list format, defaults to !B!table!W!.
Pass !B!-f formats!W! for the full list of formats.
-1, --one Only display first result that matches the filter
-1, --one Display the default or best runtime matching the filter
--online List runtimes available to install from the default index
-s, --source=!B!<URL>!W!
List runtimes from a particular index
Expand Down Expand Up @@ -837,6 +844,7 @@ class InstallCommand(BaseCommand):
Prepare an offline index with one or more runtimes
-f, --force Re-download and overwrite existing install
-u, --update Overwrite existing install if a newer version is available.
--repair Clean reinstalls an existing runtime
--dry-run Choose runtime but do not install
--refresh Update shortcuts and aliases for all installed versions.
--configure Re-run the system configuration helper.
Expand All @@ -850,7 +858,7 @@ class InstallCommand(BaseCommand):
> py install --target=.\runtime 3.13-arm64
!B!EXAMPLE:!W! Clean reinstall of 3.13
> py install --force 3.13
> py install --repair 3.13
!B!EXAMPLE:!W! Refresh and replace all shortcuts
> py install --refresh
Expand Down
2 changes: 1 addition & 1 deletion src/manage/tagutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def tag_or_range(tag):
tag = tag.lstrip(" =")
if not tag:
return CompanyTag("", "")
if tag[:1] in "<>!":
if tag[:1] in "<>!~":
return TagRange(tag)
if tag.lower() in ("default", "latest", "help"):
raise ValueError(f"'{tag}' is not a valid tag or filter.")
Expand Down