Skip to content

Migration guides

Samuel FORESTIER edited this page Feb 3, 2021 · 13 revisions

Migration guides

v4.9 → v4.10

Python 3.4 has been dropped

Everything's in the title. We really advise you to upgrade to Python >= 3.6 if possible.
The v4.9 branch of Archey will be the last one supporting Python 3.4, sorry 🙄

Standalone building breakage

TL;DR If you happen to standalone-build Archey, we now advise you to use PEX for a much simpler procedure.

Distributions' logos are now lazy-imported by Python (for performance purposes).
This broke standalone building against Stickytape & PyInstaller (they are not capable to include those "hidden/static/non-implicit" imports).
As a workaround, one way to still use them is to specify one of their options to manually add required logos to final "builds".
If you do not plan to move n' use your build result on another system, you could simply run something like :

stickytape \
    --copy-shebang \
    --add-python-path . \
    --output-file dist/archey \
    --add-python-module archey.logos."$(python3 -c 'import distro; print(distro.id())')" \
    archey/__main__.py

# OR

pyinstaller \
    --distpath dist \
    --specpath dist \
    --name archey \
    --onefile archey/__main__.py \
    --hidden-import archey.logos."$(python3 -c 'import distro; print(distro.id())')" \
    --log-level WARN

This would "automatically" include your CURRENT distribution logo to the final file.
You can repeat respective flags to import multiple logos (including all of them if you want 😜).

v4.8 → v4.9

Configuration file layout change

TL;DR You should get the new template and backport your configuration to it.
Also (and always) check the README for some examples and further explanations.

Starting with v4.9.0, entries can be re-ordered, renamed (name special key) and temporary disabled (disabled special key).
Additionally, their respective options are now declared as neighbor key-value pairs.

{
	// ...
	"entries": [
		// ...
		{ "type": "Packages" },
		{
			"type": "Temperature",
			"char_before_unit": " ",
			"sensors_chipsets": [],
			"use_fahrenheit": false
		},
		{
			"type": "CPU",
			"one_line": false,
			"show_cores": true
		},
		// ...
	],
	// ...
}

As consequences and for consistency purposes :

  • colors_palette.honor_ansi_color is now a "root" option (honor_ansi_color) ;
  • colors_palette.use_unicode has been moved to Terminal entry specific options ;
  • limits.{disk,ram}.{warning,danger} have been respectively moved to their respective entries options as {warning,danger}_use_percent ;
  • ip_settings & timeout options have been puzzled across LAN_IP & WAN_IP.

New settings have also appeared (should be self-explanatory) :

  • CPU : one_line & show_cores
  • WAN_IP : {ipv4,ipv6}.{dns_query,dns_resolver,dns_timeout,http_url,http_timeout}
Clone this wiki locally