ddns 4.0.0b3__py2.py3-none-any.whl → 4.0.0b4__py2.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.

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,20 +1,20 @@
1
- run.py,sha256=VvDzoIUwBOKCW0kD-8b1eyndPO_cbwV2A8J3GUIb-bo,5976
2
- ddns-4.0.0b3.dist-info/licenses/LICENSE,sha256=MI-ECjp-Vl7WZLiSPY6r5VwrOReNiICVB1QCXiUGt_s,1111
1
+ run.py,sha256=VXerRIy_4aCN0MnW0JX-KalVfj8osBQ0BA6FuAgV51k,6068
2
+ ddns-4.0.0b4.dist-info/licenses/LICENSE,sha256=MI-ECjp-Vl7WZLiSPY6r5VwrOReNiICVB1QCXiUGt_s,1111
3
3
  dns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  dns/alidns.py,sha256=fD8mzr7FJ5QxOWLA3ekoOhjeU1IFepOpxybrgZv2c9k,5782
5
5
  dns/callback.py,sha256=V8AG7kxtS0jIkyD9F7xnGJpu1L3E5KUcNDwOnQjcJKs,3208
6
6
  dns/cloudflare.py,sha256=OBq4TJwVHHiPMM6FJo-bz20FOHPvA-RSFbuGilw3tVw,5647
7
7
  dns/dnscom.py,sha256=Nhyl70JGnZY2IV0j5Ebgy_gYQGFb8hXTshaRG_rC0Ww,5297
8
- dns/dnspod.py,sha256=giivum1lyxfVtu8d-_muXhMxBcB-DZtpq_IGo7ApdFk,6143
8
+ dns/dnspod.py,sha256=52Hstd92-BkyEAicW5DkexfJiTww5KcNZkKs20HUIFE,6211
9
9
  dns/dnspod_com.py,sha256=9DW7Oz1f2fYSLDDGdwQKMp9OhRJ_CYB8bfzGhf0fIMI,339
10
10
  dns/he.py,sha256=X_WODK6vDTpHdAvPP_vUltaeAlHeG2jMPbzFkfYxWOg,2142
11
11
  dns/huaweidns.py,sha256=0A2jxcJ5zGaMxMMh7C9SsDewhP2zVRLI8FznB9BBBEc,8748
12
12
  util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- util/cache.py,sha256=nt_x_BUORwUAZZW13UNeEBOFrIksWWhdj9k4AGyvnU8,3337
13
+ util/cache.py,sha256=LVH5jGZFimXmD7XCQCtZULhagybM7gSjMo-73yqttiA,3338
14
14
  util/config.py,sha256=0yJ5Yfz6u__wrXm_SMqw6a9OuMf9usHOxXfRlB7C3mo,6836
15
15
  util/ip.py,sha256=GZzqrl_nq9JuGHTWhPB0fffpr94ITJA6BCVlS5KlWcE,3836
16
- ddns-4.0.0b3.dist-info/METADATA,sha256=P87QP5cH45_TvXiJxhOcyMZ0EiZqnxxc_3VogX3RLZE,15269
17
- ddns-4.0.0b3.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
18
- ddns-4.0.0b3.dist-info/entry_points.txt,sha256=vpxxBE6Kepc-SHatr-FRRLmZecrTupYejyDB8ovJbLg,34
19
- ddns-4.0.0b3.dist-info/top_level.txt,sha256=dS3_ClQTIG1ousHykZ1P3AzQa-MKq4jT_rbm21D-KxE,13
20
- ddns-4.0.0b3.dist-info/RECORD,,
16
+ ddns-4.0.0b4.dist-info/METADATA,sha256=JWsNhE92etdBLN_Sq3s3wEjGtOyxsG2x01_VNap9JMI,15269
17
+ ddns-4.0.0b4.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
18
+ ddns-4.0.0b4.dist-info/entry_points.txt,sha256=vpxxBE6Kepc-SHatr-FRRLmZecrTupYejyDB8ovJbLg,34
19
+ ddns-4.0.0b4.dist-info/top_level.txt,sha256=dS3_ClQTIG1ousHykZ1P3AzQa-MKq4jT_rbm21D-KxE,13
20
+ ddns-4.0.0b4.dist-info/RECORD,,
dns/dnspod.py CHANGED
@@ -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
run.py CHANGED
@@ -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()
util/cache.py CHANGED
@@ -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