ddns 4.0.0b3__tar.gz → 4.0.0b4__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.

Potentially problematic release.


This version of ddns might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ddns
3
- Version: 4.0.0b3
3
+ Version: 4.0.0b4
4
4
  Summary: automatically update DNS records to dynamic local IP [自动更新DNS记录指向本地IP]
5
5
  Home-page: https://ddns.newfuture.cc
6
6
  Author: NewFuture
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ddns
3
- Version: 4.0.0b3
3
+ Version: 4.0.0b4
4
4
  Summary: automatically update DNS records to dynamic local IP [自动更新DNS记录指向本地IP]
5
5
  Home-page: https://ddns.newfuture.cc
6
6
  Author: NewFuture
@@ -106,10 +106,11 @@ def get_domain_id(domain):
106
106
  return get_domain_id.domain_list[domain]
107
107
  else:
108
108
  try:
109
- info = request('Domain.Info', domain=domain)
110
- except Exception:
109
+ d_info = request('Domain.Info', domain=domain)
110
+ except Exception as e:
111
+ info("get_domain_id(%s) error: %s", domain, e)
111
112
  return
112
- did = info.get("domain", {}).get("id")
113
+ did = d_info.get("domain", {}).get("id")
113
114
  if did:
114
115
  get_domain_id.domain_list[domain] = did
115
116
  return did
@@ -19,7 +19,7 @@ from util import ip
19
19
  from util.cache import Cache
20
20
  from util.config import init_config, get_config
21
21
 
22
- __version__ = "v4.0.0-beta3@2025-06-04T17:36:22+00:00" # CI 时会被Tag替换
22
+ __version__ = "v4.0.0-beta4@2025-06-10T17:58:37+00:00" # CI 时会被Tag替换
23
23
  __description__ = "automatically update DNS records to dynamic local IP [自动更新DNS记录指向本地IP]"
24
24
  __doc__ = """
25
25
  ddns[%s]
@@ -28,7 +28,7 @@ ddns[%s]
28
28
  Copyright (c) New Future (MIT License)
29
29
  """ % (__version__)
30
30
 
31
- environ["DDNS_VERSION"] = "v4.0.0-beta3"
31
+ environ["DDNS_VERSION"] = "v4.0.0-beta4"
32
32
 
33
33
  if getattr(sys, 'frozen', False):
34
34
  # https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OpenSSL-Certificate
@@ -153,7 +153,7 @@ def main():
153
153
  if cache is False:
154
154
  info('Cache is disabled!')
155
155
  elif not get_config('config_modified_time') or get_config('config_modified_time') >= cache.time:
156
- warning('Cache file is out of dated.')
156
+ warning('Cache file is outdated.')
157
157
  cache.clear()
158
158
  else:
159
159
  debug('Cache is empty.')
@@ -162,8 +162,10 @@ def main():
162
162
 
163
163
 
164
164
  if __name__ == '__main__':
165
- if sys.version_info.major == 3 and os_name == 'nt':
165
+ encoding = sys.stdout.encoding
166
+ if encoding is not None and encoding.lower() != 'utf-8':
167
+ # 兼容windows 和部分ASCII编码的老旧系统
166
168
  from io import TextIOWrapper
167
- sys.stdout = TextIOWrapper(sys.stdout.detach(), encoding='utf-8')
168
- sys.stderr = TextIOWrapper(sys.stderr.detach(), encoding='utf-8')
169
+ sys.stdout = TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
170
+ sys.stderr = TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
169
171
  main()
@@ -38,7 +38,7 @@ elif 'BUILD_SOURCEBRANCHNAME' in environ:
38
38
  elif 'GITHUB_REF_NAME' in environ: # github actions
39
39
  ref = environ['GITHUB_REF_NAME']
40
40
  if ref == 'master' or ref == 'main': # CI
41
- version = '0.0.b' + str(int(time()))
41
+ version = '4.0.b' + str(int(time()))
42
42
  elif ref.startswith('v') or ref.startswith('V'): # Tag
43
43
  version = ref
44
44
  else: # PR
@@ -11,10 +11,9 @@ from time import time
11
11
 
12
12
  from logging import info, debug, warning
13
13
 
14
- try:
14
+ try: # python 3
15
15
  from collections.abc import MutableMapping
16
- except ImportError:
17
- # Python 2 imports
16
+ except ImportError: # python 2
18
17
  from collections import MutableMapping
19
18
 
20
19
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes