Skip to content

Commit b6343b2

Browse files
authored
Minor tweaks for release (#442)
1 parent 1f527ae commit b6343b2

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

‎src/manage/commands.py‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141

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

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

@@ -96,13 +100,14 @@
96100

97101

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

108113

@@ -155,6 +160,8 @@ def execute(self):
155160
* 'path' to make a Path object, resolved against the config file's location
156161
* 'uri' to call 'as_uri()' (so it chains with 'path'), and ensure the argument
157162
is vaguely URI-shaped and minimally exploitable.
163+
* 'sensitive' to avoid printing the value to logs files or consoles ('uri'
164+
values always treat user/pass parts as sensitive)
158165
159166
Arguments passed on the command line always override any config files.
160167
"""
@@ -743,7 +750,7 @@ class ListCommand(BaseCommand):
743750
-f, --format=!B!<table,json,jsonl,csv,exe,prefix,url,formats>!W!
744751
Specify list format, defaults to !B!table!W!.
745752
Pass !B!-f formats!W! for the full list of formats.
746-
-1, --one Only display first result that matches the filter
753+
-1, --one Display the default or best runtime matching the filter
747754
--online List runtimes available to install from the default index
748755
-s, --source=!B!<URL>!W!
749756
List runtimes from a particular index
@@ -837,6 +844,7 @@ class InstallCommand(BaseCommand):
837844
Prepare an offline index with one or more runtimes
838845
-f, --force Re-download and overwrite existing install
839846
-u, --update Overwrite existing install if a newer version is available.
847+
--repair Clean reinstalls an existing runtime
840848
--dry-run Choose runtime but do not install
841849
--refresh Update shortcuts and aliases for all installed versions.
842850
--configure Re-run the system configuration helper.
@@ -850,7 +858,7 @@ class InstallCommand(BaseCommand):
850858
> py install --target=.\runtime 3.13-arm64
851859
852860
!B!EXAMPLE:!W! Clean reinstall of 3.13
853-
> py install --force 3.13
861+
> py install --repair 3.13
854862
855863
!B!EXAMPLE:!W! Refresh and replace all shortcuts
856864
> py install --refresh

‎src/manage/tagutils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def tag_or_range(tag):
627627
tag = tag.lstrip(" =")
628628
if not tag:
629629
return CompanyTag("", "")
630-
if tag[:1] in "<>!":
630+
if tag[:1] in "<>!~":
631631
return TagRange(tag)
632632
if tag.lower() in ("default", "latest", "help"):
633633
raise ValueError(f"'{tag}' is not a valid tag or filter.")

0 commit comments

Comments
 (0)