@danhachuel/thunderbolt 0.4.83 → 0.4.84

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.
package/app/main.py CHANGED
@@ -1,4 +1,12 @@
1
- from __future__ import annotations
1
+ import os
2
+ import sys
3
+
4
+ os.environ["PYTHONIOENCODING"] = "utf-8"
5
+ os.environ["PYTHONUTF8"] = "1"
6
+ if hasattr(sys.stdout, "reconfigure"):
7
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
8
+ if hasattr(sys.stderr, "reconfigure"):
9
+ sys.stderr.reconfigure(encoding="utf-8", errors="replace")
2
10
 
3
11
  import hashlib
4
12
  import json
@@ -7,7 +15,6 @@ import re
7
15
  import time
8
16
  from contextlib import nullcontext
9
17
  from datetime import date, datetime, timezone
10
- import sys
11
18
  import uuid
12
19
  from pathlib import Path
13
20
  from typing import Any
@@ -1,7 +1,14 @@
1
- from __future__ import annotations
1
+ import os
2
+ import sys
3
+
4
+ os.environ["PYTHONIOENCODING"] = "utf-8"
5
+ os.environ["PYTHONUTF8"] = "1"
6
+ if hasattr(sys.stdout, "reconfigure"):
7
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
8
+ if hasattr(sys.stderr, "reconfigure"):
9
+ sys.stderr.reconfigure(encoding="utf-8", errors="replace")
2
10
 
3
11
  import argparse
4
- import os
5
12
  import time
6
13
  from datetime import datetime, tzinfo
7
14
  from pathlib import Path
@@ -1,7 +1,14 @@
1
- from __future__ import annotations
1
+ import os
2
+ import sys
3
+
4
+ os.environ["PYTHONIOENCODING"] = "utf-8"
5
+ os.environ["PYTHONUTF8"] = "1"
6
+ if hasattr(sys.stdout, "reconfigure"):
7
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
8
+ if hasattr(sys.stderr, "reconfigure"):
9
+ sys.stderr.reconfigure(encoding="utf-8", errors="replace")
2
10
 
3
11
  import json
4
- import os
5
12
  import queue
6
13
  import re
7
14
  import signal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.4.83",
3
+ "version": "0.4.84",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",
@@ -27,6 +27,7 @@
27
27
  "MANUAL-INSTALACAO.md",
28
28
  "THIRD-PARTY-NOTICES.md",
29
29
  "requirements.txt",
30
+ "sitecustomize.py",
30
31
  "package.json",
31
32
  ".streamlit/config.toml"
32
33
  ],
@@ -0,0 +1,16 @@
1
+ """Process-wide UTF-8 protection for Windows terminals and MobaXterm."""
2
+ from __future__ import annotations
3
+
4
+ import os
5
+ import sys
6
+
7
+ os.environ["PYTHONIOENCODING"] = "utf-8"
8
+ os.environ["PYTHONUTF8"] = "1"
9
+
10
+ for stream_name in ("stdin", "stdout", "stderr"):
11
+ stream = getattr(sys, stream_name, None)
12
+ if stream is not None and hasattr(stream, "reconfigure"):
13
+ try:
14
+ stream.reconfigure(encoding="utf-8", errors="replace")
15
+ except (OSError, ValueError):
16
+ pass