Skip to content

Commit 95ea746

Browse files
authored
fix: logItem nano time now become fourth pos in the ctor, which may cause a breaking change. (#347)
1 parent 2829d8f commit 95ea746

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

HISTORY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Release History
22

3+
## 0.9.36 (2025-11-13)
4+
5+
**Breaking Changes**
6+
7+
Fix: Adapt to [LogItem](aliyun/log/logitem.py) breaking change from v0.8.10
8+
9+
Updates code to reflect the new LogItem signature, where the
10+
`nano_time_part` argument moved from the 3rd to the 4th position.
11+
312
## 0.9.35 (2025-11-05)
413

514
**Feature**

aliyun/log/logitem.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ class LogItem(object):
1717
1818
:type contents: tuple(key-value) list
1919
:param contents: the data of the log item, including many (key,value) pairs.
20+
21+
:type time_nano_part: int
22+
:param time_nano_part: time nano part of the log item, ranges from 0 to 999999999.
2023
"""
2124

22-
def __init__(self, timestamp=None, time_nano_part=None, contents=None):
25+
def __init__(self, timestamp=None, contents=None, time_nano_part=None):
2326
nano_time = int(time.time() * 10**9)
2427
self.timestamp = int(timestamp) if timestamp else int(nano_time / 1000000000)
2528
# milliseconds

aliyun/log/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '0.9.35'
1+
__version__ = '0.9.36'
22

33
import sys
44
OS_VERSION = str(sys.platform)

0 commit comments

Comments
 (0)