Skip to content

minor_version() returns and empty string on Debian 10 Buster #345

Description

@brendan-simon-indt

The minor_version() returns an empty string ('') on Debian 10 Buster (amd64 and armhf).

The platform module reports 10.12 for the version, but the distro equivalent does not. I consider this a bug.

# cat /etc/debian_version
10.12

In this case, distro.minor_version() should return '12', and distro.version(), distro.version_parts() should return the minor version number accordingly.

Similarly distro.build_number() also returns ''. This may or may not be correct, but might also be a bug if falling foul of the same bug as minor_version().

>>> import platform as p
>>> import distro as d

>>> d.__version__
'1.7.0'

>>> p.linux_distribution()
('debian', '10.12', '')

>>> d.linux_distribution( full_distribution_name=False )
('debian', '10', 'buster')

>>> d.version()
'10'

>>> d.major_version()
'10'

>>> d.minor_version()
''

>>> d.build_number()
''

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions