Bug 1699790
| Summary: | fedpkg lint fails with: Could not execute lint: decoding str is not supported | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Petr Pisar <ppisar> |
| Component: | rpkg | Assignee: | cqi |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | cqi, dennis, jkeating, lsedlar, onosek, s |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-04-25 08:06:19 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Petr Pisar
2019-04-15 08:52:25 UTC
python3-rpkg-1.57-8.fc31 fixed in: python3-rpkg-1.57-8.fc31 Now it does not fail. That's great. But it reports this warning when running in a full-arch package repository (e.g. rpms/libffi): $ fedpkg --release f31 lint /usr/lib/python3.7/site-packages/pyrpkg/__init__.py:1241: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 return [arch.decode('utf-8') for arch in archlist] It would be great to fix it completely. You can try another fix at python3-rpkg-1.57-9.fc31 The warning has moved: $ rpm -q python3-rpkg python3-rpkg-1.57-9.fc31.noarch $ fedpkg --release f31 lint /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 s.decode('UTF-8') rpkg code is: def is_utf8_bytestr(s): try: → s.decode('UTF-8') except UnicodeError: return False return True If decode() can recognize the variable contains is a Unicode string and emit the warning, you could you the same recognition method instead of calling decode(). (In reply to Petr Pisar from comment #5) > The warning has moved: > > $ rpm -q python3-rpkg > python3-rpkg-1.57-9.fc31.noarch > > $ fedpkg --release f31 lint > /usr/share/rpmlint/Pkg.py:168: UnicodeWarning: decode() called on unicode > string, see https://bugzilla.redhat.com/show_bug.cgi?id=1693751 > s.decode('UTF-8') > That's rpmlint bug #1699789. |