pystand 2.7__py3-none-any.whl → 2.8__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.8
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
@@ -0,0 +1,6 @@
1
+ pystand.py,sha256=g4gecuHyKZuaeJU2eit38KXp7Oz7xVomSBjYJ8TrvAw,36292
2
+ pystand-2.8.dist-info/METADATA,sha256=68VwJgo9pXhBxyffYSP0qcrbmVpM4wWXwudE7i7EV9U,24774
3
+ pystand-2.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
4
+ pystand-2.8.dist-info/entry_points.txt,sha256=DG4ps3I3nni1bubV1tXs6u8FARgkdbAYaEAzZD4RAo8,41
5
+ pystand-2.8.dist-info/top_level.txt,sha256=NoWUh19UQymAJLHTCdxMnVwV6Teftef5fzyF3OWLyNY,8
6
+ pystand-2.8.dist-info/RECORD,,
pystand.py CHANGED
@@ -19,13 +19,14 @@ 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
@@ -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