lclarkmichalek / archey3

Simple python script to print the Archlinux logo with basic system information.
http://bluepeppers.github.com/archey3
Other
62 stars 27 forks source link

New python packages breaks archey3 #47

Closed graysky2 closed 3 years ago

graysky2 commented 6 years ago

Quite a few packages were pushed into their respective repos recently. Archey3 is broken as a result:

% archey3
/usr/bin/archey3:862: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
  config = ArcheyConfigParser()
Traceback (most recent call last):
  File "/usr/bin/archey3", line 805, in parse_display
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/archey3", line 869, in <module>
    main()
  File "/usr/bin/archey3", line 866, in main
    archey.run(options.screenshot)
  File "/usr/bin/archey3", line 728, in run
    print(self.render())
  File "/usr/bin/archey3", line 734, in render
    results = self.prepare_results()
  File "/usr/bin/archey3", line 753, in prepare_results
    for cls_name, args in self.parse_display():
RuntimeError: generator raised StopIteration

To help narrow it down:

% grep 2018-08-06 /var/log/pacman.log
[2018-08-06 15:19] [PACMAN] Running 'pacman -Syu'
[2018-08-06 15:19] [PACMAN] synchronizing package lists
[2018-08-06 15:19] [PACMAN] starting full system upgrade
[2018-08-06 15:20] [ALPM] transaction started
[2018-08-06 15:20] [ALPM] upgraded linux-api-headers (4.16.1-1 -> 4.17.11-1)
[2018-08-06 15:20] [ALPM] warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
[2018-08-06 15:20] [ALPM] upgraded glibc (2.27-3 -> 2.28-1)
[2018-08-06 15:20] [ALPM-SCRIPTLET] Generating locales...
[2018-08-06 15:20] [ALPM-SCRIPTLET]   en_US.UTF-8... done
[2018-08-06 15:20] [ALPM-SCRIPTLET] Generation complete.
[2018-08-06 15:20] [ALPM] upgraded gcc-libs (8.1.1+20180531-1 -> 8.2.0-2)
[2018-08-06 15:20] [ALPM] upgraded libutil-linux (2.32.1-1 -> 2.32.1-2)
[2018-08-06 15:20] [ALPM] upgraded perl (5.26.2-2 -> 5.28.0-1)
[2018-08-06 15:20] [ALPM] upgraded libldap (2.4.46-1 -> 2.4.46-2)
[2018-08-06 15:20] [ALPM] upgraded python (3.6.6-1 -> 3.7.0-3)
[2018-08-06 15:20] [ALPM] upgraded archey3 (0.5-7 -> 0.5-8)
[2018-08-06 15:20] [ALPM] upgraded libxml2 (2.9.8-2 -> 2.9.8-3)
[2018-08-06 15:20] [ALPM] upgraded bind-tools (9.13.0-2 -> 9.13.0-3)
[2018-08-06 15:20] [ALPM] upgraded binutils (2.30-5 -> 2.31.1-1)
[2018-08-06 15:20] [ALPM] upgraded boost-libs (1.67.0-5 -> 1.67.0-6)
[2018-08-06 15:20] [ALPM] upgraded btrfs-progs (4.17-1 -> 4.17-2)
[2018-08-06 15:20] [ALPM] upgraded device-mapper (2.02.180-1 -> 2.02.181-1)
[2018-08-06 15:20] [ALPM] upgraded cryptsetup (2.0.3-2 -> 2.0.4-1)
[2018-08-06 15:20] [ALPM] upgraded distcc (3.3-2 -> 3.3-3)
[2018-08-06 15:20] [ALPM] upgraded util-linux (2.32.1-1 -> 2.32.1-2)
[2018-08-06 15:20] [ALPM] upgraded xcb-proto (1.13-1 -> 1.13-2)
[2018-08-06 15:20] [ALPM] upgraded llvm-libs (6.0.1-1 -> 6.0.1-2)
[2018-08-06 15:20] [ALPM] upgraded libibus (1.5.18-1 -> 1.5.18-2)
[2018-08-06 15:20] [ALPM] upgraded gcc (8.1.1+20180531-1 -> 8.2.0-2)
[2018-08-06 15:20] [ALPM] upgraded libxkbcommon (0.8.0-2 -> 0.8.2-1)
[2018-08-06 15:20] [ALPM] upgraded libtool (2.4.6+40+g6ca5e224-7 -> 2.4.6+42+gb88cebd5-1)
[2018-08-06 15:20] [ALPM] upgraded libproxy (0.4.15-6 -> 0.4.15-8)
[2018-08-06 15:20] [ALPM] upgraded gpgme (1.11.1-1 -> 1.11.1-2)
[2018-08-06 15:20] [ALPM] upgraded libbytesize (1.3-1 -> 1.3-2)
[2018-08-06 15:20] [ALPM] upgraded lvm2 (2.02.180-1 -> 2.02.181-1)
[2018-08-06 15:20] [ALPM] upgraded volume_key (0.3.10-1 -> 0.3.11-2)
[2018-08-06 15:20] [ALPM] upgraded libblockdev (2.18-1 -> 2.18-2)
[2018-08-06 15:20] [ALPM] upgraded libgexiv2 (0.10.8-1 -> 0.10.8-2)
[2018-08-06 15:20] [ALPM] upgraded libplist (2.0.0+11+gec9ba8b-1 -> 2.0.0+11+gec9ba8b-2)
[2018-08-06 15:20] [ALPM] upgraded liblouis (3.6.0-1 -> 3.6.0-2)
[2018-08-06 15:20] [ALPM] upgraded libxkbcommon-x11 (0.8.0-2 -> 0.8.2-1)
[2018-08-06 15:20] [ALPM] upgraded mutagen (1.41.0-1 -> 1.41.0-2)
[2018-08-06 15:20] [ALPM] upgraded pyalpm (0.8.4-1 -> 0.8.4-2)
[2018-08-06 15:20] [ALPM] upgraded python-pyelftools (0.24-2 -> 0.24-3)
[2018-08-06 15:20] [ALPM] upgraded namcap (3.2.7-2 -> 3.2.8-2)
[2018-08-06 15:20] [ALPM] upgraded pass (1.7.2-1 -> 1.7.3-1)
[2018-08-06 15:20] [ALPM] upgraded perl-clone (0.39-4 -> 0.39-5)
[2018-08-06 15:20] [ALPM] upgraded perl-date-manip (6.72-1 -> 6.72-2)
[2018-08-06 15:20] [ALPM] upgraded perl-dbi (1.641-1 -> 1.641-2)
[2018-08-06 15:20] [ALPM] upgraded perl-encode-locale (1.05-3 -> 1.05-4)
[2018-08-06 15:20] [ALPM] upgraded perl-error (0.17026-1 -> 0.17026-2)
[2018-08-06 15:20] [ALPM] upgraded perl-http-date (6.02-4 -> 6.02-5)
[2018-08-06 15:20] [ALPM] upgraded perl-file-listing (6.04-4 -> 6.04-5)
[2018-08-06 15:20] [ALPM] upgraded perl-html-tagset (3.20-6 -> 3.20-7)
[2018-08-06 15:20] [ALPM] upgraded perl-html-parser (3.72-5 -> 3.72-6)
[2018-08-06 15:20] [ALPM] upgraded perl-lwp-mediatypes (6.02-4 -> 6.02-5)
[2018-08-06 15:20] [ALPM] upgraded perl-uri (1.74-1 -> 1.74-2)
[2018-08-06 15:20] [ALPM] upgraded perl-io-html (1.001-3 -> 1.001-4)
[2018-08-06 15:20] [ALPM] upgraded perl-http-message (6.18-1 -> 6.18-2)
[2018-08-06 15:20] [ALPM] upgraded perl-http-cookies (6.04-2 -> 6.04-3)
[2018-08-06 15:20] [ALPM] upgraded perl-http-daemon (6.01-5 -> 6.01-6)
[2018-08-06 15:20] [ALPM] upgraded perl-http-negotiate (6.01-4 -> 6.01-5)
[2018-08-06 15:20] [ALPM] upgraded perl-image-exiftool (11.01-1 -> 11.01-2)
[2018-08-06 15:20] [ALPM] upgraded perl-net-http (6.18-1 -> 6.18-2)
[2018-08-06 15:20] [ALPM] upgraded perl-www-robotrules (6.02-4 -> 6.02-5)
[2018-08-06 15:20] [ALPM] upgraded perl-try-tiny (0.30-1 -> 0.30-2)
[2018-08-06 15:20] [ALPM] upgraded perl-libwww (6.33-1 -> 6.33-2)
[2018-08-06 15:20] [ALPM] upgraded perl-timedate (2.30-4 -> 2.30-5)
[2018-08-06 15:20] [ALPM] upgraded perl-mailtools (2.20-1 -> 2.20-2)
[2018-08-06 15:20] [ALPM] upgraded perl-xml-libxml (2.0132-1 -> 2.0132-2)
[2018-08-06 15:20] [ALPM] upgraded python-sip-pyqt5 (4.19.12-4 -> 4.19.12-5)
[2018-08-06 15:20] [ALPM] upgraded pyqt5-common (5.11.2-1 -> 5.11.2-2)
[2018-08-06 15:20] [ALPM] upgraded python-pyqt5 (5.11.2-1 -> 5.11.2-2)
[2018-08-06 15:20] [ALPM] upgraded python-mutagen (1.41.0-1 -> 1.41.0-2)
[2018-08-06 15:20] [ALPM] upgraded pygobject2-devel (2.28.7-1 -> 2.28.7-2)
[2018-08-06 15:20] [ALPM] upgraded pyqt4-common (4.12.1-1 -> 4.12.1-2)
[2018-08-06 15:20] [ALPM] upgraded python-appdirs (1.4.3-1 -> 1.4.3-2)
[2018-08-06 15:20] [ALPM] upgraded python-asn1crypto (0.24.0-1 -> 0.24.0-2)
[2018-08-06 15:20] [ALPM] upgraded python-ply (3.11-1 -> 3.11-2)
[2018-08-06 15:20] [ALPM] upgraded python-pycparser (2.18-1 -> 2.18-2)
[2018-08-06 15:20] [ALPM] upgraded python-cffi (1.11.5-1 -> 1.11.5-2)
[2018-08-06 15:20] [ALPM] upgraded python-coverage (4.5.1-1 -> 4.5.1-2)
[2018-08-06 15:20] [ALPM] upgraded python-six (1.11.0-1 -> 1.11.0-3)
[2018-08-06 15:20] [ALPM] upgraded python-idna (2.7-2 -> 2.7-3)
[2018-08-06 15:20] [ALPM] upgraded python-pyparsing (2.2.0-1 -> 2.2.0-2)
[2018-08-06 15:20] [ALPM] upgraded python-packaging (17.1-1 -> 17.1-2)
[2018-08-06 15:20] [ALPM] upgraded python-setuptools (1:39.2.0-2 -> 1:39.2.0-3)
[2018-08-06 15:20] [ALPM] upgraded python-cryptography (2.2.2-1 -> 2.3-1)
[2018-08-06 15:20] [ALPM] upgraded python-dbus-common (1.2.8-1 -> 1.2.8-2)
[2018-08-06 15:20] [ALPM] upgraded python-dbus (1.2.8-1 -> 1.2.8-2)
[2018-08-06 15:20] [ALPM] upgraded python-entrypoints (0.2.3-1 -> 0.2.3-2)
[2018-08-06 15:20] [ALPM] upgraded python-jeepney (0.3.1-1 -> 0.3.1-2)
[2018-08-06 15:20] [ALPM] upgraded python-secretstorage (3.0.1-1 -> 3.0.1-2)
[2018-08-06 15:20] [ALPM] upgraded python-keyring (13.2.1-1 -> 13.2.1-2)
[2018-08-06 15:20] [ALPM] upgraded python-lxml (4.2.3-1 -> 4.2.4-1)
[2018-08-06 15:20] [ALPM] upgraded python-sip (4.19.12-4 -> 4.19.12-5)
[2018-08-06 15:20] [ALPM] upgraded python-pyqt4 (4.12.1-1 -> 4.12.1-2)
[2018-08-06 15:20] [ALPM] upgraded python2-appdirs (1.4.3-1 -> 1.4.3-2)
[2018-08-06 15:20] [ALPM] upgraded python2-asn1crypto (0.24.0-1 -> 0.24.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-attrs (18.1.0-1 -> 18.1.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-pyparsing (2.2.0-1 -> 2.2.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-six (1.11.0-1 -> 1.11.0-3)
[2018-08-06 15:20] [ALPM] upgraded python2-packaging (17.1-1 -> 17.1-2)
[2018-08-06 15:20] [ALPM] upgraded python2-setuptools (1:39.2.0-2 -> 1:39.2.0-3)
[2018-08-06 15:20] [ALPM] upgraded python2-automat (0.7.0-1 -> 0.7.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-cairo (1.17.0-1 -> 1.17.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-ply (3.11-1 -> 3.11-2)
[2018-08-06 15:20] [ALPM] upgraded python2-pycparser (2.18-1 -> 2.18-2)
[2018-08-06 15:20] [ALPM] upgraded python2-cffi (1.11.5-1 -> 1.11.5-2)
[2018-08-06 15:20] [ALPM] upgraded python2-chardet (3.0.4-1 -> 3.0.4-2)
[2018-08-06 15:20] [ALPM] upgraded python2-click (6.7-1 -> 6.7-2)
[2018-08-06 15:20] [ALPM] upgraded python2-constantly (15.1.0-2 -> 15.1.0-3)
[2018-08-06 15:20] [ALPM] upgraded python2-idna (2.7-2 -> 2.7-3)
[2018-08-06 15:20] [ALPM] upgraded python2-cryptography (2.2.2-1 -> 2.3-1)
[2018-08-06 15:20] [ALPM] upgraded python2-gobject2 (2.28.7-1 -> 2.28.7-2)
[2018-08-06 15:20] [ALPM] upgraded python2-hyperlink (18.0.0-1 -> 18.0.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-zope-interface (4.5.0-1 -> 4.5.0-2)
[2018-08-06 15:20] [ALPM] installed python2-pyhamcrest (1.9.0-3)
[2018-08-06 15:20] [ALPM] upgraded python2-twisted (18.4.0-1 -> 18.7.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-incremental (17.5.0-1 -> 17.5.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-pyasn1 (0.4.3-1 -> 0.4.3-2)
[2018-08-06 15:20] [ALPM] upgraded python2-pyopenssl (18.0.0-1 -> 18.0.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-pyasn1-modules (0.2.2-1 -> 0.2.2-2)
[2018-08-06 15:20] [ALPM] upgraded python2-service-identity (17.0.0-1 -> 17.0.0-2)
[2018-08-06 15:20] [ALPM] upgraded python2-xdg (0.26-1 -> 0.26-2)
[2018-08-06 15:20] [ALPM] transaction completed
graysky2 commented 6 years ago

https://github.com/lclarkmichalek/archey3/pull/46 does not fix the issue for me. After applying the patch:

% archey3
Traceback (most recent call last):
  File "/usr/bin/archey3", line 805, in parse_display
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/archey3", line 869, in <module>
    main()
  File "/usr/bin/archey3", line 866, in main
    archey.run(options.screenshot)
  File "/usr/bin/archey3", line 728, in run
    print(self.render())
  File "/usr/bin/archey3", line 734, in render
    results = self.prepare_results()
  File "/usr/bin/archey3", line 753, in prepare_results
    for cls_name, args in self.parse_display():
RuntimeError: generator raised StopIteration

EDIT: BUT, applying https://github.com/lclarkmichalek/archey3/pull/45 and https://github.com/lclarkmichalek/archey3/pull/46 together does fix it.


--- a/archey3   2018-06-30 14:18:37.000000000 -0400
+++ b/archey3   2018-08-06 15:29:44.196044373 -0400
@@ -548,7 +548,7 @@ class systemUpgrade(display):

 #------------ Config    -----------

-class ArcheyConfigParser(configparser.SafeConfigParser):
+class ArcheyConfigParser(configparser.ConfigParser):
     """
     A parser for the archey config file.
     """
@@ -802,7 +802,6 @@ class Archey(object):
                 args = ()

             yield groups["func"], args
-        raise StopIteration

     def format_item(self, item):
         title = item[0].rstrip(':')
michael-n0813 commented 6 years ago

Yeah replacing lines 551 and 805 works for me:

551: class ArcheyConfigParser(configparser.SafeConfigParser): (depreciated?) 551: class ArcheyConfigParser(configparser.ConfigParser):

805: raise StopIteration (depreciated?) 805: return

szalishchuk commented 6 years ago

Any plans for incorporating the fix into master anytime soon?

graysky2 commented 6 years ago

@lclarkmichalek will need to commit and push.

lclarkmichalek commented 6 years ago

Sorry folks, my email notifications for github seem to be screwed up. Thanks for tagging me @graysky2. I merged one of the PRs, will bump the version

graysky2 commented 6 years ago

@lclarkmichalek :+1:

eli-schwartz commented 6 years ago

@lclarkmichalek, You definitively did not add a git tag, and you now have three different version numbers.

It's impossible to know what the actual version is, and moreover, the [community] package (which should really be removed as low-quality software) is "newer" than the current version, being packaged as 0.5 :frowning_face: and thus providing no reasonable upgrade path at all.

lclarkmichalek commented 6 years ago

Fork it then, I haven't used this shit in years.

On Sun, 12 Aug 2018 at 14:21, Eli Schwartz notifications@github.com wrote:

@lclarkmichalek https://github.com/lclarkmichalek, You definitively did not add a git tag, and you now have three different version numbers.

  • According to git describe, the current version from 2011 is 0.4-57-gac68752 (version 0.4 was correctly tagged, and has its version number consistent with setup.py and the actual file).
  • According to the script itself, the version is 0.5 and has been since commit d44b1c5 https://github.com/lclarkmichalek/archey3/commit/d44b1c55b9b26851b8b40442326bef5ca11810f0 in 2013.
  • According to your just-now-committed updates, the version is 0.4.1, but only in setup.py

It's impossible to know what the actual version is, and moreover, the [community] package (which should really be removed as low-quality software) is "newer" than the current version, being packaged as 0.5 ☹️ and thus providing no reasonable upgrade path at all.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lclarkmichalek/archey3/issues/47#issuecomment-412342502, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEyNROKpuYZ9kY78Xh3NdoyH8WeYfYrks5uQCu-gaJpZM4Vw89O .