github-backup 0.46.0__py3-none-any.whl → 0.47.0__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.46.0"
1
+ __version__ = "0.47.0"
@@ -15,6 +15,7 @@ import platform
15
15
  import re
16
16
  import select
17
17
  import socket
18
+ import ssl
18
19
  import subprocess
19
20
  import sys
20
21
  import time
@@ -36,6 +37,18 @@ FNULL = open(os.devnull, "w")
36
37
  FILE_URI_PREFIX = "file://"
37
38
  logger = logging.getLogger(__name__)
38
39
 
40
+ https_ctx = ssl.create_default_context()
41
+ if not https_ctx.get_ca_certs():
42
+ import warnings
43
+ warnings.warn('\n\nYOUR DEFAULT CA CERTS ARE EMPTY.\n' +
44
+ 'PLEASE POPULATE ANY OF:' +
45
+ ''.join([
46
+ '\n - ' + x
47
+ for x in ssl.get_default_verify_paths()
48
+ if type(x) is str
49
+ ]) + '\n', stacklevel=2)
50
+ import certifi
51
+ https_ctx = ssl.create_default_context(cafile=certifi.where())
39
52
 
40
53
  def logging_subprocess(
41
54
  popenargs, stdout_log_level=logging.DEBUG, stderr_log_level=logging.ERROR, **kwargs
@@ -666,7 +679,7 @@ def _get_response(request, auth, template):
666
679
  while True:
667
680
  should_continue = False
668
681
  try:
669
- r = urlopen(request)
682
+ r = urlopen(request, context=https_ctx)
670
683
  except HTTPError as exc:
671
684
  errors, should_continue = _request_http_error(exc, auth, errors) # noqa
672
685
  r = exc
@@ -931,11 +944,11 @@ def filter_repositories(args, unfiltered_repositories):
931
944
  if r.get("language") and r.get("language").lower() in languages
932
945
  ] # noqa
933
946
  if name_regex:
934
- repositories = [r for r in repositories if name_regex.match(r["name"])]
947
+ repositories = [r for r in repositories if "name" not in r or name_regex.match(r["name"])]
935
948
  if args.skip_archived:
936
949
  repositories = [r for r in repositories if not r.get("archived")]
937
950
  if args.exclude:
938
- repositories = [r for r in repositories if r["name"] not in args.exclude]
951
+ repositories = [r for r in repositories if "name" not in r or r["name"] not in args.exclude]
939
952
 
940
953
  return repositories
941
954
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: github-backup
3
- Version: 0.46.0
3
+ Version: 0.47.0
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
@@ -244,7 +244,7 @@ Gotchas / Known-issues
244
244
  All is not everything
245
245
  ---------------------
246
246
 
247
- The ``--all`` argument does not include; cloning private repos (``-P, --private``), cloning forks (``-F, --fork``) cloning starred repositories (``--all-starred``), ``--pull-details``, cloning LFS repositories (``--lfs``), cloning gists (``--starred-gists``) or cloning starred gist repos (``--starred-gists``). See examples for more.
247
+ The ``--all`` argument does not include: cloning private repos (``-P, --private``), cloning forks (``-F, --fork``), cloning starred repositories (``--all-starred``), ``--pull-details``, cloning LFS repositories (``--lfs``), cloning gists (``--starred-gists``) or cloning starred gist repos (``--starred-gists``). See examples for more.
248
248
 
249
249
  Cloning all starred size
250
250
  ------------------------
@@ -0,0 +1,9 @@
1
+ github_backup/__init__.py,sha256=aqLqdmGXCjcE1UvvJF8OHznHKbGMeoRrk-C4_mjzdPs,23
2
+ github_backup/github_backup.py,sha256=h6lu2QBhjx5yHrSA0ocQ3xga0GdJuj4yG92zJZYtz-0,48732
3
+ github_backup-0.47.0.data/scripts/github-backup,sha256=I79TNA67phytRmI9nm_LlD9h2zauXFOsOn9tYyAy9pU,1546
4
+ github_backup-0.47.0.dist-info/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
5
+ github_backup-0.47.0.dist-info/METADATA,sha256=Yokav5VhHSroGqxzvkvXZSSPRrD4K4t9vGsCSt1H0Mg,19291
6
+ github_backup-0.47.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
7
+ github_backup-0.47.0.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
8
+ github_backup-0.47.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
+ github_backup-0.47.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,9 +0,0 @@
1
- github_backup/__init__.py,sha256=VTDTPpzZ6KwzjCPZhHgalFxPlpuy4ZGRkHB_n3WGwYs,23
2
- github_backup/github_backup.py,sha256=EVF5gspuh6HZ7DIN4exIBZ4HO4lzBvLyAavlP1luWN4,48176
3
- github_backup-0.46.0.data/scripts/github-backup,sha256=I79TNA67phytRmI9nm_LlD9h2zauXFOsOn9tYyAy9pU,1546
4
- github_backup-0.46.0.dist-info/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
5
- github_backup-0.46.0.dist-info/METADATA,sha256=2ZUxBjhvUTKFFfjzbtw-ugrUKaMNoWyx28HtcVveymA,19290
6
- github_backup-0.46.0.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
7
- github_backup-0.46.0.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
8
- github_backup-0.46.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
- github_backup-0.46.0.dist-info/RECORD,,