pystand 2.7__py3-none-any.whl → 2.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pystand
3
- Version: 2.7
3
+ Version: 2.9
4
4
  Summary: Install Python versions from python-build-standalone project
5
5
  Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
6
6
  License: GPLv3
@@ -134,8 +134,8 @@ usage: pystand [-h] [-D DISTRIBUTION] [-P PREFIX_DIR] [-C CACHE_DIR]
134
134
  {install,update,upgrade,remove,uninstall,list,show,path} ...
135
135
 
136
136
  Command line tool to download, install, and update pre-built Python versions
137
- from the python-build-standalone project at
138
- https://github.com/indygreg/python-build-standalone.
137
+ from the python-build-standalone project at https://github.com/astral-
138
+ sh/python-build-standalone.
139
139
 
140
140
  options:
141
141
  -h, --help show this help message and exit
@@ -273,7 +273,8 @@ options:
273
273
  usage: pystand show [-h] [-l | -r RELEASE] [-a] [re_match]
274
274
 
275
275
  Show versions available from a release. View available releases and their
276
- distributions at https://github.com/indygreg/python-build-standalone/releases.
276
+ distributions at https://github.com/astral-sh/python-build-
277
+ standalone/releases.
277
278
 
278
279
  positional arguments:
279
280
  re_match show only versions+distributions matching this regular
@@ -555,9 +556,10 @@ install many different versions particularly across various releases,
555
556
  you may get rate limited by Github so the command can block and you will
556
557
  see "backoff" messages reported. You can create a Github access token to
557
558
  gain increased rate limits. Create a token in your Github account under
558
- `Settings -> Developer settings -> Personal access tokens`. Specify the
559
- token on the command line with `--github-access-token`, or set that as a
560
- [default option](#command-default-options).
559
+ `Settings -> Developer settings -> Personal access tokens`. You can use
560
+ either a Github "fine-grained" or "classic" token. Specify the token on
561
+ the command line with `--github-access-token`, or set that as a [default
562
+ option](#command-default-options).
561
563
 
562
564
  ## Command Line Tab Completion
563
565
 
@@ -581,8 +583,8 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at
581
583
  <http://www.gnu.org/licenses/> for more details.
582
584
 
583
585
  [pystand]: https://github.com/bulletmark/pystand
584
- [pbs]: https://github.com/indygreg/python-build-standalone
585
- [pbs-rel]: https://github.com/indygreg/python-build-standalone/releases
586
+ [pbs]: https://github.com/astral-sh/python-build-standalone
587
+ [pbs-rel]: https://github.com/astral-sh/python-build-standalone/releases
586
588
  [pipx]: https://github.com/pypa/pipx
587
589
  [pipxu]: https://github.com/bulletmark/pipxu
588
590
  [uvtool]: https://docs.astral.sh/uv/guides/tools/#installing-tools
@@ -0,0 +1,6 @@
1
+ pystand.py,sha256=bvWRxN3JrIodS5p1pvBy6Lf2evbpACtNp6LPl3XO2xI,36294
2
+ pystand-2.9.dist-info/METADATA,sha256=y5bHXt3xX-XT8Ow7dxQyYI2GhmUlM29V-Eawq7c3uqk,24843
3
+ pystand-2.9.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
4
+ pystand-2.9.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
5
+ pystand-2.9.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
6
+ pystand-2.9.dist-info/RECORD,,
pystand.py CHANGED
@@ -3,7 +3,7 @@
3
3
  '''
4
4
  Command line tool to download, install, and update pre-built Python
5
5
  versions from the python-build-standalone project at
6
- https://github.com/indygreg/python-build-standalone.
6
+ https://github.com/astral-sh/python-build-standalone.
7
7
  '''
8
8
  from __future__ import annotations
9
9
 
@@ -19,19 +19,20 @@ import tarfile
19
19
  import time
20
20
  import urllib.parse
21
21
  import urllib.request
22
- from argparse import ArgumentParser, Namespace, SUPPRESS
22
+ from argparse import SUPPRESS, ArgumentParser, Namespace
23
23
  from collections import defaultdict
24
- from datetime import datetime, date, timedelta
24
+ from datetime import date, datetime, timedelta
25
25
  from pathlib import Path
26
26
  from typing import Any, Iterable, Iterator
27
27
 
28
28
  import argcomplete
29
+ import github
29
30
  import platformdirs
30
31
  import zstandard
31
32
  from packaging.version import parse as parse_version
32
33
 
33
34
  REPO = 'python-build-standalone'
34
- GITHUB_REPO = f'indygreg/{REPO}'
35
+ GITHUB_REPO = f'astral-sh/{REPO}'
35
36
  GITHUB_SITE = f'https://github.com/{GITHUB_REPO}'
36
37
  LATEST_RELEASE = f'{GITHUB_SITE}/releases.atom'
37
38
 
@@ -106,15 +107,13 @@ def get_gh(args: Namespace) -> Any:
106
107
  if get_gh_handle:
107
108
  return get_gh_handle
108
109
 
109
- from github import Github
110
110
  if args.github_access_token:
111
- from github import Auth
112
- auth = Auth.Token(args.github_access_token)
111
+ auth = github.Auth.Token(args.github_access_token)
113
112
  else:
114
113
  auth = None
115
114
 
116
115
  # Save this handle globally for future use
117
- get_gh_handle = Github(auth=auth) # type: ignore
116
+ get_gh_handle = github.Github(auth=auth) # type: ignore
118
117
  return get_gh_handle
119
118
 
120
119
  def rm_path(path: Path) -> None:
@@ -350,6 +349,7 @@ def add_file(files: dict, tag: str, name: str, url: str) -> None:
350
349
 
351
350
  def get_release_files(args, tag, implementation: str | None = None) -> dict:
352
351
  'Return the release files for the given tag'
352
+ from github.GithubException import UnknownObjectException
353
353
  # Look for tag data in our release cache
354
354
  jfile = args._releases / tag
355
355
  if not (files := get_json(jfile)):
@@ -362,7 +362,7 @@ def get_release_files(args, tag, implementation: str | None = None) -> dict:
362
362
  gh = get_gh(args)
363
363
  try:
364
364
  release = gh.get_repo(GITHUB_REPO).get_release(tag)
365
- except Exception:
365
+ except UnknownObjectException:
366
366
  return {}
367
367
 
368
368
  # Iterate over the release assets and store pertinent files in a
@@ -1,6 +0,0 @@
1
- pystand.py,sha256=mTEw8JKSQrSBKR8ZOR0YjzUGj6kyONz0XHgXXfevyIQ,36251
2
- pystand-2.7.dist-info/METADATA,sha256=7SHzF64a1egBqA-pbvIPbLwhbR7VObS46pbyko3JiuA,24774
3
- pystand-2.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
4
- pystand-2.7.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
5
- pystand-2.7.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
6
- pystand-2.7.dist-info/RECORD,,
File without changes