Skip to content

Encourage using feature detection instead of distro name/version #221

@encukou

Description

@encukou

Hello! I'm the person responsible for dropping platform.linux_distrubution from Python 3.8. We're now recommending distro instead. Thank you for all the work going into this module – it's certainly useful in certain cases, like finding out what to put in a log or problem report.

However, think that distro's docs should include a warning against using it for decisions, because a platform's name is not a good indicator of what is possible on it.

Once people apply custom workarounds for Ubuntu (and use distro info for that), less popular derivatives like Linux Mint will need to report themselves as Ubuntu to get those workarounds. That then leads to the need for better distro reporting tools, like this one... which then leads to more distro-specific workarounds. It's a vicious circle.

It's the same problem as "browser sniffing" in the web world, where modern “user agent” strings contain mostly lies:

Mozilla/5.0 (Linux; Android 4.4.2); Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Mobile Safari/537.36 OPR/20.0.1396.72047

You'll find warnings against using browser-agent in any respectable recent documentation on the topic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions