ggcode 1.3.67__tar.gz → 1.3.69__tar.gz

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.4
2
2
  Name: ggcode
3
- Version: 1.3.67
3
+ Version: 1.3.69
4
4
  Summary: Thin Python wrapper that installs the ggcode GitHub Release binary
5
5
  Author: topcheer
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ggcode
3
- Version: 1.3.67
3
+ Version: 1.3.69
4
4
  Summary: Thin Python wrapper that installs the ggcode GitHub Release binary
5
5
  Author: topcheer
6
6
  License: MIT
@@ -0,0 +1 @@
1
+ __version__ = "1.3.69"
@@ -10,7 +10,6 @@ import shutil
10
10
  import stat
11
11
  import subprocess
12
12
  import sys
13
- import ssl
14
13
  import tarfile
15
14
  import tempfile
16
15
  import urllib.parse
@@ -87,16 +86,8 @@ def metadata_path(directory: Path) -> Path:
87
86
  return directory / METADATA
88
87
 
89
88
 
90
- def _build_ssl_context() -> ssl.SSLContext:
91
- ctx = ssl.create_default_context()
92
- ctx.check_hostname = False
93
- ctx.verify_mode = ssl.CERT_NONE
94
- return ctx
95
-
96
-
97
89
  def _urlopen(url: str) -> object:
98
- ctx = _build_ssl_context()
99
- return urllib.request.urlopen(url, context=ctx)
90
+ return urllib.request.urlopen(url)
100
91
 
101
92
 
102
93
  def download(url: str) -> bytes:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ggcode"
7
- version = "1.3.67"
7
+ version = "1.3.69"
8
8
  description = "Thin Python wrapper that installs the ggcode GitHub Release binary"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -30,6 +30,12 @@ class ResolveTargetTests(unittest.TestCase):
30
30
  with patch.object(cli.platform, "machine", return_value=""):
31
31
  self.assertEqual(cli.resolve_target(), ("windows", "x86_64"))
32
32
 
33
+ def test_urlopen_uses_default_tls_verification(self) -> None:
34
+ response = unittest.mock.Mock()
35
+ with patch.object(cli.urllib.request, "urlopen", return_value=response) as mocked:
36
+ self.assertIs(cli._urlopen("https://github.com/topcheer/ggcode"), response)
37
+ mocked.assert_called_once_with("https://github.com/topcheer/ggcode")
38
+
33
39
  def test_resolve_release_version_follows_latest_redirect(self) -> None:
34
40
  response = unittest.mock.Mock()
35
41
  response.geturl.return_value = "https://github.com/topcheer/ggcode/releases/tag/v9.9.9"
@@ -1 +0,0 @@
1
- __version__ = "1.1.20"
File without changes
File without changes