github-backup 0.51.1__py3-none-any.whl → 0.51.2__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.
github_backup/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.51.1"
1
+ __version__ = "0.51.2"
@@ -37,22 +37,33 @@ FNULL = open(os.devnull, "w")
37
37
  FILE_URI_PREFIX = "file://"
38
38
  logger = logging.getLogger(__name__)
39
39
 
40
+ # Setup SSL context with fallback chain
40
41
  https_ctx = ssl.create_default_context()
41
- if not https_ctx.get_ca_certs():
42
- import warnings
43
-
44
- warnings.warn(
45
- "\n\nYOUR DEFAULT CA CERTS ARE EMPTY.\n"
46
- + "PLEASE POPULATE ANY OF:"
47
- + "".join(
48
- ["\n - " + x for x in ssl.get_default_verify_paths() if type(x) is str]
49
- )
50
- + "\n",
51
- stacklevel=2,
52
- )
53
- import certifi
54
-
55
- https_ctx = ssl.create_default_context(cafile=certifi.where())
42
+ if https_ctx.get_ca_certs():
43
+ # Layer 1: Certificates pre-loaded from system (file-based)
44
+ pass
45
+ else:
46
+ paths = ssl.get_default_verify_paths()
47
+ if (paths.cafile and os.path.exists(paths.cafile)) or (
48
+ paths.capath and os.path.exists(paths.capath)
49
+ ):
50
+ # Layer 2: Cert paths exist, will be lazy-loaded on first use (directory-based)
51
+ pass
52
+ else:
53
+ # Layer 3: Try certifi package as optional fallback
54
+ try:
55
+ import certifi
56
+
57
+ https_ctx = ssl.create_default_context(cafile=certifi.where())
58
+ except ImportError:
59
+ # All layers failed - no certificates available anywhere
60
+ sys.exit(
61
+ "\nERROR: No CA certificates found. Cannot connect to GitHub over SSL.\n\n"
62
+ "Solutions you can explore:\n"
63
+ " 1. pip install certifi\n"
64
+ " 2. Alpine: apk add ca-certificates\n"
65
+ " 3. Debian/Ubuntu: apt-get install ca-certificates\n\n"
66
+ )
56
67
 
57
68
 
58
69
  def logging_subprocess(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-backup
3
- Version: 0.51.1
3
+ Version: 0.51.2
4
4
  Summary: backup a github user or organization
5
5
  Home-page: http://github.com/josegonzalez/python-github-backup
6
6
  Author: Jose Diaz-Gonzalez
@@ -0,0 +1,9 @@
1
+ github_backup/__init__.py,sha256=2AuLzuHMBBPVOM-m0Woty11pTO9ExwPKWRWtj1LvS-g,23
2
+ github_backup/github_backup.py,sha256=ousskr9hBtfKgAh1x78vnSefQhPGqa9K2fLxWLUKdyY,75428
3
+ github_backup-0.51.2.data/scripts/github-backup,sha256=I79TNA67phytRmI9nm_LlD9h2zauXFOsOn9tYyAy9pU,1546
4
+ github_backup-0.51.2.dist-info/licenses/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
5
+ github_backup-0.51.2.dist-info/METADATA,sha256=zoLPP4sNYwAsnFUXTZR1K1NB5J-i2xQidc9DZ3hbkfk,21544
6
+ github_backup-0.51.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ github_backup-0.51.2.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
8
+ github_backup-0.51.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
+ github_backup-0.51.2.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- github_backup/__init__.py,sha256=1aQCHIs4QPNUtw_wChzJwhINvlLDSxS3S3qxxd-DKeU,23
2
- github_backup/github_backup.py,sha256=2N0crWKzRfkb5ZOlI5pn2NRxSXOmApmdB68noATWAbk,74783
3
- github_backup-0.51.1.data/scripts/github-backup,sha256=I79TNA67phytRmI9nm_LlD9h2zauXFOsOn9tYyAy9pU,1546
4
- github_backup-0.51.1.dist-info/licenses/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
5
- github_backup-0.51.1.dist-info/METADATA,sha256=rjm9_2D5ivEA1y9NUJhVbKA3C113jd0Jq3ATaGrvdhA,21544
6
- github_backup-0.51.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- github_backup-0.51.1.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
8
- github_backup-0.51.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
- github_backup-0.51.1.dist-info/RECORD,,