[systemd-bugs] [Bug 77086] New: python-systemd: Incompatibility with Python 3.x UUID class
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Apr 5 09:29:04 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=77086
Priority: medium
Bug ID: 77086
Assignee: systemd-bugs at lists.freedesktop.org
Summary: python-systemd: Incompatibility with Python 3.x UUID
class
QA Contact: systemd-bugs at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: All
Reporter: gandro at gmx.net
Hardware: Other
Status: NEW
Version: unspecified
Component: general
Product: systemd
Using the UUID class in the systemd.journal module in Python 3.x causes an
AttributeError. The problem seems to be that the python-systemd wrapper is
using
the undocumented UUID.get_hex() method. This undocumented, private method is
present in Python 2.7, but not in Python 3.x.
The documented way to retrieve the hex string is the UUID.hex attribute:
See: https://docs.python.org/3/library/uuid.html#uuid.UUID.hex
systemd version: 212
Relevant python tracebacks:
$ python3
Python 3.4.0 (default, Mar 17 2014, 23:20:09)
[GCC 4.8.2 20140206 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from systemd import journal
>>> from uuid import UUID
>>>
>>> journal.get_catalog(UUID('0123456789ABCDEF0123456789ABCDEF'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/systemd/journal.py", line 349, in
get_catalog
mid = mid.get_hex()
AttributeError: 'UUID' object has no attribute 'get_hex'
>>>
>>> j=journal.Reader()
>>> j.messageid_match(UUID('0123456789ABCDEF0123456789ABCDEF'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.3/site-packages/systemd/journal.py", line 317, in
messageid_match
messageid = messageid.get_hex()
AttributeError: 'UUID' object has no attribute 'get_hex'
>>>
>>> j=journal.Reader()
>>> j.seek_monotonic(0, UUID('0123456789ABCDEF0123456789ABCDEF'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.3/site-packages/systemd/journal.py", line 296, in
seek_monotonic
bootid = bootid.get_hex()
AttributeError: 'UUID' object has no attribute 'get_hex'
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20140405/08ff2664/attachment.html>
More information about the systemd-bugs
mailing list