File tree Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## [ 1.2.45] - 2024-02-25
4
+
5
+ ### Fixed
6
+
7
+ - 兼容高版本cryptography库
8
+
3
9
## [ 1.2.44] - 2024-02-05
4
10
5
11
### Fixed
Original file line number Diff line number Diff line change 6
6
7
7
setup (
8
8
name = "wechatpayv3" ,
9
- version = "1.2.44 " ,
9
+ version = "1.2.45 " ,
10
10
author = "minibear" ,
11
11
description = "微信支付 API v3 Python SDK(python sdk for wechatpay v3)" ,
12
12
long_description = long_description ,
Original file line number Diff line number Diff line change @@ -53,9 +53,14 @@ def _update_certificates(self):
53
53
certificate = load_certificate (cert_str )
54
54
if not certificate :
55
55
continue
56
- now = datetime .now (timezone .utc )
57
- if now < certificate .not_valid_before_utc or now > certificate .not_valid_after_utc :
58
- continue
56
+ if (int (cryptography_version .split ("." )[0 ]) < 42 ):
57
+ now = datetime .utcnow ()
58
+ if now < certificate .not_valid_before or now > certificate .not_valid_after :
59
+ continue
60
+ else :
61
+ now = datetime .now (timezone .utc )
62
+ if now < certificate .not_valid_before_utc or now > certificate .not_valid_after_utc :
63
+ continue
59
64
self ._certificates .append (certificate )
60
65
if not self ._cert_dir :
61
66
continue
You can’t perform that action at this time.
0 commit comments