Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platform.linux_distribution() doesn't recognize Amazon Linux #63072

Closed
LorinHochstein mannequin opened this issue Aug 28, 2013 · 5 comments
Closed

platform.linux_distribution() doesn't recognize Amazon Linux #63072

LorinHochstein mannequin opened this issue Aug 28, 2013 · 5 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@LorinHochstein
Copy link
Mannequin

LorinHochstein mannequin commented Aug 28, 2013

BPO 18872
Nosy @malemburg, @encukou
Files
  • amazon-linux.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-05-25.17:21:18.101>
    created_at = <Date 2013-08-28.20:59:44.102>
    labels = ['type-feature', 'library']
    title = "platform.linux_distribution() doesn't recognize Amazon Linux"
    updated_at = <Date 2018-05-25.17:21:18.099>
    user = 'https://bugs.python.org/LorinHochstein'

    bugs.python.org fields:

    activity = <Date 2018-05-25.17:21:18.099>
    actor = 'petr.viktorin'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-05-25.17:21:18.101>
    closer = 'petr.viktorin'
    components = ['Library (Lib)']
    creation = <Date 2013-08-28.20:59:44.102>
    creator = 'Lorin.Hochstein'
    dependencies = []
    files = ['31503']
    hgrepos = []
    issue_num = 18872
    keywords = ['patch']
    message_count = 5.0
    messages = ['196420', '196423', '196440', '221055', '317691']
    nosy_count = 4.0
    nosy_names = ['lemburg', 'petr.viktorin', 'BreamoreBoy', 'Lorin.Hochstein']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue18872'
    versions = ['Python 2.6']

    @LorinHochstein
    Copy link
    Mannequin Author

    LorinHochstein mannequin commented Aug 28, 2013

    Amazon EC2 has their own Fedora-like Linux distribution (http://aws.amazon.com/amazon-linux-ami/). This distribution isn't recognized by platform.linux_distribution():

    >>> import platform
    >>> platform.linux_distribution()
    ('', '', '')
    $ cat /etc/issue
    Amazon Linux AMI release 2013.03
    Kernel \r on an \m

    Tested on Python 2.6.8.

    @LorinHochstein LorinHochstein mannequin added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir labels Aug 28, 2013
    @LorinHochstein
    Copy link
    Mannequin Author

    LorinHochstein mannequin commented Aug 28, 2013

    $ cat /etc/system-release
    Amazon Linux AMI release 2013.03

    @LorinHochstein
    Copy link
    Mannequin Author

    LorinHochstein mannequin commented Aug 29, 2013

    Adding 'system' as one of the supported distros does the trick.

    >>> platform.linux_distribution(supported_dists=['system'])
    ('Amazon Linux AMI', '2013.03', '')

    Simple patch attached.

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jun 20, 2014

    The patch adds 'system' to _supported_dists in platform.py. I've no idea whether or not this is acceptable.

    @BreamoreBoy BreamoreBoy mannequin added type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error labels Jun 20, 2014
    @encukou
    Copy link
    Member

    encukou commented May 25, 2018

    linux_distribution is removed in Python 3.8.

    @encukou encukou closed this as completed May 25, 2018
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant