hython-lang 2.0.3__tar.gz → 2.0.4__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.
Files changed (93) hide show
  1. {hython_lang-2.0.3 → hython_lang-2.0.4}/CHANGELOG.md +10 -2
  2. {hython_lang-2.0.3/src/hython_lang.egg-info → hython_lang-2.0.4}/PKG-INFO +8 -1
  3. {hython_lang-2.0.3 → hython_lang-2.0.4}/README.md +7 -0
  4. {hython_lang-2.0.3 → hython_lang-2.0.4}/build-installer.bat +2 -0
  5. {hython_lang-2.0.3 → hython_lang-2.0.4}/installer/hython.wxs +12 -4
  6. {hython_lang-2.0.3 → hython_lang-2.0.4}/pyproject.toml +1 -1
  7. {hython_lang-2.0.3 → hython_lang-2.0.4}/scripts/build_installer.py +7 -4
  8. {hython_lang-2.0.3 → hython_lang-2.0.4}/scripts/build_setup.py +1 -1
  9. hython_lang-2.0.4/scripts/build_updater.py +60 -0
  10. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/__init__.py +1 -1
  11. {hython_lang-2.0.3 → hython_lang-2.0.4/src/hython_lang.egg-info}/PKG-INFO +8 -1
  12. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython_lang.egg-info/SOURCES.txt +2 -0
  13. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_release_contract.py +2 -2
  14. hython_lang-2.0.4/tests/test_windows_updater_contract.py +56 -0
  15. {hython_lang-2.0.3 → hython_lang-2.0.4}/LICENSE +0 -0
  16. {hython_lang-2.0.3 → hython_lang-2.0.4}/MANIFEST.in +0 -0
  17. {hython_lang-2.0.3 → hython_lang-2.0.4}/SECURITY.md +0 -0
  18. {hython_lang-2.0.3 → hython_lang-2.0.4}/assets/hython-icon.png +0 -0
  19. {hython_lang-2.0.3 → hython_lang-2.0.4}/assets/hython.ico +0 -0
  20. {hython_lang-2.0.3 → hython_lang-2.0.4}/build-hython.bat +0 -0
  21. {hython_lang-2.0.3 → hython_lang-2.0.4}/docs/COMPILER.md +0 -0
  22. {hython_lang-2.0.3 → hython_lang-2.0.4}/docs/LANGUAGE.md +0 -0
  23. {hython_lang-2.0.3 → hython_lang-2.0.4}/examples//354/225/210/353/205/225.hy" +0 -0
  24. {hython_lang-2.0.3 → hython_lang-2.0.4}/examples//354/273/264/355/214/214/354/235/274.hy" +0 -0
  25. {hython_lang-2.0.3 → hython_lang-2.0.4}/examples//355/225/234/352/270/200/354/230/244/353/245/230.hy" +0 -0
  26. {hython_lang-2.0.3 → hython_lang-2.0.4}/publish-pypi.bat +0 -0
  27. {hython_lang-2.0.3 → hython_lang-2.0.4}/scripts/build_hython_exe.py +0 -0
  28. {hython_lang-2.0.3 → hython_lang-2.0.4}/scripts/build_hython_native.py +0 -0
  29. {hython_lang-2.0.3 → hython_lang-2.0.4}/scripts/build_pypi.py +0 -0
  30. {hython_lang-2.0.3 → hython_lang-2.0.4}/scripts/hython_frozen_launcher.py +0 -0
  31. {hython_lang-2.0.3 → hython_lang-2.0.4}/scripts/stability.py +0 -0
  32. {hython_lang-2.0.3 → hython_lang-2.0.4}/setup.cfg +0 -0
  33. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/__main__.py +0 -0
  34. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/bytecode.py +0 -0
  35. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/cli.py +0 -0
  36. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/compiler.py +0 -0
  37. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/compiler_manager.py +0 -0
  38. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/diagnostics.py +0 -0
  39. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/environment.py +0 -0
  40. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/exe_builder.py +0 -0
  41. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/frontend.py +0 -0
  42. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/hir.py +0 -0
  43. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/importer.py +0 -0
  44. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/package_manager.py +0 -0
  45. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/phonetics.py +0 -0
  46. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/runtime.py +0 -0
  47. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/runtime_manager.py +0 -0
  48. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/translator.py +0 -0
  49. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/updater.py +0 -0
  50. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/vm.py +0 -0
  51. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython/vocabulary.py +0 -0
  52. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython_lang.egg-info/dependency_links.txt +0 -0
  53. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython_lang.egg-info/entry_points.txt +0 -0
  54. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython_lang.egg-info/requires.txt +0 -0
  55. {hython_lang-2.0.3 → hython_lang-2.0.4}/src/hython_lang.egg-info/top_level.txt +0 -0
  56. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_advanced_functions.py +0 -0
  57. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_annotations.py +0 -0
  58. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_assignment_semantics.py +0 -0
  59. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_async.py +0 -0
  60. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_build_cli.py +0 -0
  61. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_cli_diagnostics.py +0 -0
  62. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_closures.py +0 -0
  63. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_compiler.py +0 -0
  64. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_compiler_manager.py +0 -0
  65. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_comprehensions.py +0 -0
  66. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_control_imports.py +0 -0
  67. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_diagnostics.py +0 -0
  68. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_exe_builder.py +0 -0
  69. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_frontend.py +0 -0
  70. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_fstrings.py +0 -0
  71. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_generators.py +0 -0
  72. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_hir.py +0 -0
  73. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_importer.py +0 -0
  74. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_loop_control.py +0 -0
  75. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_loop_else.py +0 -0
  76. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_name_errors.py +0 -0
  77. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_native_builtins.py +0 -0
  78. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_native_classes.py +0 -0
  79. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_native_exceptions.py +0 -0
  80. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_native_features.py +0 -0
  81. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_native_modules.py +0 -0
  82. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_package_manager.py +0 -0
  83. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_patterns_expressions.py +0 -0
  84. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_phonetics.py +0 -0
  85. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_python314_semantic_matrix.py +0 -0
  86. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_python314_syntax_matrix.py +0 -0
  87. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_runtime.py +0 -0
  88. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_runtime_manager.py +0 -0
  89. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_stability.py +0 -0
  90. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_translator.py +0 -0
  91. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_unpacking.py +0 -0
  92. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_updater.py +0 -0
  93. {hython_lang-2.0.3 → hython_lang-2.0.4}/tests/test_with_lambda.py +0 -0
@@ -1,5 +1,13 @@
1
- # 변경 기록
2
-
1
+ # 변경 기록
2
+
3
+ ## 2.0.4 - 2026-07-26
4
+
5
+ - Windows 로그인 시 트레이에서 실행되는 `HythonUpdater.exe`를 추가했습니다.
6
+ - 현재 설치 버전과 GitHub 최신 릴리스를 6시간마다 비교합니다.
7
+ - 새 버전의 x64 MSI를 자동 다운로드하고 SHA-256 검증 후 관리자 권한으로 설치합니다.
8
+ - 트레이 메뉴에서 즉시 업데이트 확인과 업데이터 종료를 지원합니다.
9
+ - 트레이 메뉴에서 한국어와 영어를 선택하고 사용자별 설정으로 저장할 수 있습니다.
10
+
3
11
  ## 2.0.3 - 2026-07-26
4
12
 
5
13
  - setup.exe가 기존 Hython 설치를 감지해 복구와 제거 작업을 제공합니다.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hython-lang
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Python, pronounced in Hangul
5
5
  Author: Hython contributors
6
6
  License-Expression: MIT
@@ -58,6 +58,13 @@ Windows에서는 GitHub Release의 `Hython-버전-setup.exe`를 사용할 수
58
58
  설치 프로그램은 한국어와 영어를 지원하며 PATH, 시작 메뉴, 바탕화면 바로가기를
59
59
  선택적으로 설치합니다. 자동 배포와 Winget에는 x64 MSI를 사용합니다.
60
60
 
61
+ Windows 설치본에는 트레이 업데이터가 함께 포함됩니다. 로그인하면 자동 실행되어
62
+ 현재 설치 버전과 GitHub 최신 릴리스를 6시간마다 비교하며, 새 x64 MSI의 SHA-256을
63
+ 검증한 뒤 관리자 권한으로 자동 설치합니다. 트레이 아이콘을 두 번 누르거나 메뉴의
64
+ `지금 업데이트 확인`을 선택하면 즉시 검사할 수 있습니다.
65
+ `언어 / Language` 메뉴에서는 한국어와 영어를 선택할 수 있으며 선택값은 사용자별로
66
+ 저장됩니다.
67
+
61
68
  ## 첫 실행
62
69
 
63
70
  `안녕.hy` 파일을 만듭니다.
@@ -34,6 +34,13 @@ Windows에서는 GitHub Release의 `Hython-버전-setup.exe`를 사용할 수
34
34
  설치 프로그램은 한국어와 영어를 지원하며 PATH, 시작 메뉴, 바탕화면 바로가기를
35
35
  선택적으로 설치합니다. 자동 배포와 Winget에는 x64 MSI를 사용합니다.
36
36
 
37
+ Windows 설치본에는 트레이 업데이터가 함께 포함됩니다. 로그인하면 자동 실행되어
38
+ 현재 설치 버전과 GitHub 최신 릴리스를 6시간마다 비교하며, 새 x64 MSI의 SHA-256을
39
+ 검증한 뒤 관리자 권한으로 자동 설치합니다. 트레이 아이콘을 두 번 누르거나 메뉴의
40
+ `지금 업데이트 확인`을 선택하면 즉시 검사할 수 있습니다.
41
+ `언어 / Language` 메뉴에서는 한국어와 영어를 선택할 수 있으며 선택값은 사용자별로
42
+ 저장됩니다.
43
+
37
44
  ## 첫 실행
38
45
 
39
46
  `안녕.hy` 파일을 만듭니다.
@@ -4,5 +4,7 @@ cd /d "%~dp0"
4
4
  set "PYTHONPATH=%CD%\src;%PYTHONPATH%"
5
5
  if not exist release\hython.exe call build-hython.bat
6
6
  if errorlevel 1 exit /b 1
7
+ call build-updater.bat
8
+ if errorlevel 1 exit /b 1
7
9
  py -3.14 scripts\build_installer.py
8
10
  exit /b %ERRORLEVEL%
@@ -14,9 +14,16 @@
14
14
 
15
15
  <StandardDirectory Id="ProgramFiles64Folder">
16
16
  <Directory Id="INSTALLFOLDER" Name="Hython">
17
- <Component Id="HythonExecutable" Guid="*">
18
- <File Id="HythonExe" Source="$(HythonExe)" KeyPath="yes" />
19
- </Component>
17
+ <Component Id="HythonExecutable" Guid="*">
18
+ <File Id="HythonExe" Source="$(HythonExe)" KeyPath="yes" />
19
+ </Component>
20
+ <Component Id="HythonUpdaterComponent" Guid="*">
21
+ <File Id="HythonUpdaterExe" Source="$(HythonUpdaterExe)" KeyPath="yes" />
22
+ <RegistryValue Root="HKLM"
23
+ Key="Software\Microsoft\Windows\CurrentVersion\Run"
24
+ Name="Hython Updater" Type="string"
25
+ Value="&quot;[INSTALLFOLDER]HythonUpdater.exe&quot;" />
26
+ </Component>
20
27
  <Component Id="HythonPathComponent" Guid="*">
21
28
  <Environment Id="HythonPath" Name="PATH" Value="[INSTALLFOLDER]" Action="set"
22
29
  Part="last" System="yes" Permanent="no" />
@@ -50,7 +57,8 @@
50
57
 
51
58
  <Feature Id="MainFeature" Title="Hython Programming Language" Level="1"
52
59
  AllowAbsent="no" Display="expand">
53
- <ComponentRef Id="HythonExecutable" />
60
+ <ComponentRef Id="HythonExecutable" />
61
+ <ComponentRef Id="HythonUpdaterComponent" />
54
62
  <Feature Id="PathFeature" Title="Add Hython to the system PATH"
55
63
  Description="Run hython from Command Prompt, PowerShell, and Terminal." Level="1">
56
64
  <ComponentRef Id="HythonPathComponent" />
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hython-lang"
7
- version = "2.0.3"
7
+ version = "2.0.4"
8
8
  description = "Python, pronounced in Hangul"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.14"
@@ -16,8 +16,10 @@ from hython import __version__
16
16
  def main():
17
17
  wix=shutil.which("wix")
18
18
  if not wix: raise SystemExit("WiX가 없습니다: dotnet tool install --global wix")
19
- executable=ROOT/"release"/"hython.exe"
20
- if not executable.is_file(): raise SystemExit("먼저 build-hython.bat을 실행하세요.")
19
+ executable=ROOT/"release"/"hython.exe"
20
+ updater=ROOT/"release"/"HythonUpdater.exe"
21
+ if not executable.is_file(): raise SystemExit("먼저 build-hython.bat을 실행하세요.")
22
+ if not updater.is_file(): raise SystemExit("먼저 build-updater.bat을 실행하세요.")
21
23
  version_check=subprocess.run(
22
24
  [str(executable), "--version"],
23
25
  capture_output=True,
@@ -35,8 +37,9 @@ def main():
35
37
  match=re.fullmatch(r"(\d+)\.(\d+)\.(\d+)(?:-dev(\d+))?",__version__)
36
38
  msi_version=f"{match.group(1)}.{match.group(2)}.{match.group(4) or match.group(3)}" if match else "1.0.0"
37
39
  output=ROOT/"release"/f"Hython-{__version__}-x64.msi"
38
- command=[wix,"build",str(ROOT/"installer"/"hython.wxs"),"-arch","x64",
39
- "-d",f"HythonExe={executable.resolve()}","-d",f"MsiVersion={msi_version}",
40
+ command=[wix,"build",str(ROOT/"installer"/"hython.wxs"),"-arch","x64",
41
+ "-d",f"HythonExe={executable.resolve()}","-d",f"MsiVersion={msi_version}",
42
+ "-d",f"HythonUpdaterExe={updater.resolve()}",
40
43
  "-d",f"LicenseRtf={(ROOT/'installer'/'license.rtf').resolve()}",
41
44
  "-d",f"HythonIcon={(ROOT/'assets'/'hython.ico').resolve()}",
42
45
  "-ext","WixToolset.UI.wixext",
@@ -41,7 +41,7 @@ def find_csc() -> Path:
41
41
 
42
42
 
43
43
  def main() -> int:
44
- if __version__ != "2.0.3":
44
+ if __version__ != "2.0.4":
45
45
  raise SystemExit(f"setup.exe 버전을 갱신하세요: 현재 {__version__}")
46
46
  msi = ROOT / "release" / f"Hython-{__version__}-x64.msi"
47
47
  if not msi.is_file():
@@ -0,0 +1,60 @@
1
+ """Build the Hython Windows tray updater."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import hashlib
6
+ import shutil
7
+ import subprocess
8
+ import sys
9
+ from pathlib import Path
10
+
11
+ ROOT = Path(__file__).resolve().parents[1]
12
+ sys.path.insert(0, str(ROOT / "src"))
13
+ from hython import __version__
14
+
15
+
16
+ def find_csc() -> Path:
17
+ direct = shutil.which("csc")
18
+ if direct:
19
+ return Path(direct)
20
+ vswhere = Path(
21
+ r"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
22
+ )
23
+ if vswhere.is_file():
24
+ result = subprocess.run(
25
+ [str(vswhere), "-latest", "-products", "*", "-property", "installationPath"],
26
+ capture_output=True, text=True, check=True,
27
+ )
28
+ candidate = Path(result.stdout.strip()) / "MSBuild/Current/Bin/Roslyn/csc.exe"
29
+ if candidate.is_file():
30
+ return candidate
31
+ raise SystemExit("C# 컴파일러를 찾을 수 없습니다. Visual Studio Build Tools가 필요합니다.")
32
+
33
+
34
+ def main() -> int:
35
+ source = ROOT / "installer" / "hython_updater.cs"
36
+ text = source.read_text(encoding="utf-8")
37
+ if f'AssemblyFileVersion("{__version__}.0")' not in text:
38
+ raise SystemExit(f"업데이터 버전을 {__version__}.0으로 맞추세요.")
39
+ output = ROOT / "release" / "HythonUpdater.exe"
40
+ command = [
41
+ str(find_csc()), "/nologo", "/target:winexe", "/optimize+", "/platform:x64",
42
+ "/reference:System.dll", "/reference:System.Core.dll",
43
+ "/reference:System.Drawing.dll", "/reference:System.Windows.Forms.dll",
44
+ "/reference:System.Web.Extensions.dll",
45
+ f"/win32icon:{ROOT / 'assets' / 'hython.ico'}",
46
+ f"/out:{output}", str(source),
47
+ ]
48
+ result = subprocess.run(command, cwd=ROOT)
49
+ if result.returncode:
50
+ return result.returncode
51
+ digest = hashlib.sha256(output.read_bytes()).hexdigest()
52
+ output.with_suffix(".exe.sha256").write_text(
53
+ f"{digest} {output.name}\n", encoding="ascii"
54
+ )
55
+ print(f"Hython updater: {output}")
56
+ return 0
57
+
58
+
59
+ if __name__ == "__main__":
60
+ raise SystemExit(main())
@@ -4,7 +4,7 @@ from .environment import activate_package_store
4
4
 
5
5
  activate_package_store()
6
6
 
7
- __version__ = "2.0.3"
7
+ __version__ = "2.0.4"
8
8
 
9
9
  from .translator import audit_english, koreanize, to_hython, to_python
10
10
  from .importer import install_importer
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hython-lang
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Python, pronounced in Hangul
5
5
  Author: Hython contributors
6
6
  License-Expression: MIT
@@ -58,6 +58,13 @@ Windows에서는 GitHub Release의 `Hython-버전-setup.exe`를 사용할 수
58
58
  설치 프로그램은 한국어와 영어를 지원하며 PATH, 시작 메뉴, 바탕화면 바로가기를
59
59
  선택적으로 설치합니다. 자동 배포와 Winget에는 x64 MSI를 사용합니다.
60
60
 
61
+ Windows 설치본에는 트레이 업데이터가 함께 포함됩니다. 로그인하면 자동 실행되어
62
+ 현재 설치 버전과 GitHub 최신 릴리스를 6시간마다 비교하며, 새 x64 MSI의 SHA-256을
63
+ 검증한 뒤 관리자 권한으로 자동 설치합니다. 트레이 아이콘을 두 번 누르거나 메뉴의
64
+ `지금 업데이트 확인`을 선택하면 즉시 검사할 수 있습니다.
65
+ `언어 / Language` 메뉴에서는 한국어와 영어를 선택할 수 있으며 선택값은 사용자별로
66
+ 저장됩니다.
67
+
61
68
  ## 첫 실행
62
69
 
63
70
  `안녕.hy` 파일을 만듭니다.
@@ -20,6 +20,7 @@ scripts/build_hython_native.py
20
20
  scripts/build_installer.py
21
21
  scripts/build_pypi.py
22
22
  scripts/build_setup.py
23
+ scripts/build_updater.py
23
24
  scripts/hython_frozen_launcher.py
24
25
  scripts/stability.py
25
26
  src/hython/__init__.py
@@ -86,4 +87,5 @@ tests/test_stability.py
86
87
  tests/test_translator.py
87
88
  tests/test_unpacking.py
88
89
  tests/test_updater.py
90
+ tests/test_windows_updater_contract.py
89
91
  tests/test_with_lambda.py
@@ -10,12 +10,12 @@ from hython.vocabulary import BUILTINS, KEYWORDS, LIBRARY_NAMES, SPECIAL_NAMES
10
10
 
11
11
  class ReleaseContractTests(unittest.TestCase):
12
12
  def test_public_version(self):
13
- self.assertEqual(hython.__version__,"2.0.3")
13
+ self.assertEqual(hython.__version__,"2.0.4")
14
14
 
15
15
  def test_stable_release_metadata(self):
16
16
  root = Path(__file__).resolve().parents[1]
17
17
  project = tomllib.loads((root / "pyproject.toml").read_text(encoding="utf-8"))["project"]
18
- self.assertEqual(project["version"], "2.0.3")
18
+ self.assertEqual(project["version"], "2.0.4")
19
19
  self.assertIn("Development Status :: 5 - Production/Stable", project["classifiers"])
20
20
  self.assertNotIn("Development Status :: 4 - Beta", project["classifiers"])
21
21
 
@@ -0,0 +1,56 @@
1
+ import re
2
+ import unittest
3
+ from pathlib import Path
4
+
5
+ import hython
6
+
7
+
8
+ class WindowsUpdaterContractTests(unittest.TestCase):
9
+ @classmethod
10
+ def setUpClass(cls):
11
+ cls.root = Path(__file__).resolve().parents[1]
12
+ cls.source = (cls.root / "installer" / "hython_updater.cs").read_text(
13
+ encoding="utf-8"
14
+ )
15
+ cls.wix = (cls.root / "installer" / "hython.wxs").read_text(encoding="utf-8")
16
+
17
+ def test_updater_version_matches_release(self):
18
+ self.assertIn(
19
+ f'AssemblyFileVersion("{hython.__version__}.0")', self.source
20
+ )
21
+
22
+ def test_updater_only_uses_official_repository(self):
23
+ self.assertIn(
24
+ "https://api.github.com/repos/kooyoseb/hython/releases/latest",
25
+ self.source,
26
+ )
27
+ self.assertNotRegex(self.source, r"http://")
28
+ self.assertIn("client.Encoding = Encoding.UTF8", self.source)
29
+
30
+ def test_download_is_sha256_verified_before_install(self):
31
+ verify_at = self.source.index("SHA256.Create()")
32
+ install_at = self.source.index("public static int Install")
33
+ self.assertLess(verify_at, install_at)
34
+ self.assertIn("MSI SHA-256 검증 정보를 찾을 수 없습니다.", self.source)
35
+
36
+ def test_installed_version_comes_from_windows_uninstall_registry(self):
37
+ self.assertIn(
38
+ r"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", self.source
39
+ )
40
+ self.assertIn('child.GetValue("DisplayVersion")', self.source)
41
+
42
+ def test_msi_contains_updater_and_login_startup(self):
43
+ self.assertIn('File Id="HythonUpdaterExe"', self.wix)
44
+ self.assertIn(r"Microsoft\Windows\CurrentVersion\Run", self.wix)
45
+ self.assertIn('Name="Hython Updater"', self.wix)
46
+ self.assertIn('ComponentRef Id="HythonUpdaterComponent"', self.wix)
47
+
48
+ def test_language_selection_is_persisted_per_user(self):
49
+ self.assertIn(r"Software\Kooyoseb\Hython Updater", self.source)
50
+ self.assertIn('key.SetValue("Language", korean ? "ko" : "en"', self.source)
51
+ self.assertIn('new ToolStripMenuItem("한국어")', self.source)
52
+ self.assertIn('new ToolStripMenuItem("English")', self.source)
53
+
54
+
55
+ if __name__ == "__main__":
56
+ unittest.main()
File without changes
File without changes
File without changes
File without changes