Skip to content

Migration guides

Samuel FORESTIER edited this page Apr 6, 2024 · 13 revisions

Migration guides

v4.14.2 → v4.14.3

WindowManager entry now exposes display server protocol

- archey -j | jq -r '.data."Window Manager"'
- Cinnamon
+ archey -j | jq -r '.data."Window Manager"'
+ {
+   "name": "Cinnamon",
+   "display_server_protocol": "X11"
+ }
+ archey -j | jq -r '.data."Window Manager".name'
+ Cinnamon

Enabling icons for entries change their name

New entries_icon option (disabled by default) controls whether (Nerd Fonts) icons should be added next to entry names .
Internal implementation appends icons to each entry own name. This means enabling the option while consuming the API will cause breakage.

- archey -j | jq -r '.data.DesktopEnvironment.release'
+ archey -j | jq -r '.data." Desktop Environment".release'

v4.11 → v4.12

Multi-words names entries will be now "prettified" in output

Following renaming have been performed :

  • DesktopEnvironment -> Desktop Environment
  • WindowManager -> Window Manager
  • LAN_IP -> LAN IP
  • WAN_IP -> WAN IP

You may be affected if you don't play with name entries configuration option.
Due to Archey's internal, this affect both text and API outputs, so you might have to adapt your consumption usages :

- archey -j | jq -r '.data.DesktopEnvironment.release'
+ archey -j | jq -r '.data."Desktop Environment".release'

v4.10 → v4.11

Python 3.5 has been dropped

So as to keep a clean core and reduce technical debt, support for Python < 3.6 has been finally dropped too.
The v4.10 branch of Archey will be the last one supporting Python 3.5.

Two Distributions public methods have been renamed

- Distributions.get_distribution_identifiers
+ Distributions.get_identifiers

- Distributions.run_detection
+ Distributions.get_local

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}