Skip to content
Prev Previous commit
Next Next commit
remove python2 references in docstrings
  • Loading branch information
sblondon committed Dec 5, 2022
commit e139aa5a786f130d69c4fc5eea48cc31febeb3b0
1 change: 0 additions & 1 deletion msgpack/_packer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ cdef class Packer(object):
If set to true, datetime with tzinfo is packed into Timestamp type.
Note that the tzinfo is stripped in the timestamp.
You can get UTC datetime with `timestamp=3` option of the Unpacker.
(Python 2 is not supported).

:param str unicode_errors:
The error handler for encoding unicode. (default: 'strict')
Expand Down
2 changes: 1 addition & 1 deletion msgpack/_unpacker.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ cdef class Unpacker(object):
0 - Timestamp
1 - float (Seconds from the EPOCH)
2 - int (Nanoseconds from the EPOCH)
3 - datetime.datetime (UTC). Python 2 is not supported.
3 - datetime.datetime (UTC).

:param bool strict_map_key:
If true (default), only str or bytes are accepted for map (dict) keys.
Expand Down
4 changes: 0 additions & 4 deletions msgpack/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ def to_unix_nano(self):
def to_datetime(self):
"""Get the timestamp as a UTC datetime.

Python 2 is not supported.

:rtype: datetime.
"""
utc = datetime.timezone.utc
Expand All @@ -177,8 +175,6 @@ def to_datetime(self):
def from_datetime(dt):
"""Create a Timestamp from datetime with tzinfo.

Python 2 is not supported.

:rtype: Timestamp
"""
return Timestamp.from_unix(dt.timestamp())
3 changes: 1 addition & 2 deletions msgpack/fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Unpacker(object):
0 - Timestamp
1 - float (Seconds from the EPOCH)
2 - int (Nanoseconds from the EPOCH)
3 - datetime.datetime (UTC). Python 2 is not supported.
3 - datetime.datetime (UTC).

:param bool strict_map_key:
If true (default), only str or bytes are accepted for map (dict) keys.
Expand Down Expand Up @@ -673,7 +673,6 @@ class Packer(object):
If set to true, datetime with tzinfo is packed into Timestamp type.
Note that the tzinfo is stripped in the timestamp.
You can get UTC datetime with `timestamp=3` option of the Unpacker.
(Python 2 is not supported).

:param str unicode_errors:
The error handler for encoding unicode. (default: 'strict')
Expand Down