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.py uses deprecated feature of plistlib #64428

Closed
MarcTamlyn mannequin opened this issue Jan 13, 2014 · 4 comments
Closed

platform.py uses deprecated feature of plistlib #64428

MarcTamlyn mannequin opened this issue Jan 13, 2014 · 4 comments
Assignees
Labels

Comments

@MarcTamlyn
Copy link
Mannequin

MarcTamlyn mannequin commented Jan 13, 2014

BPO 20229
Nosy @ronaldoussoren, @ned-deily, @serhiy-storchaka
Files
  • issue20229.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 = 'https://github.com/ronaldoussoren'
    closed_at = <Date 2014-01-13.19:36:20.591>
    created_at = <Date 2014-01-13.00:03:50.610>
    labels = ['OS-mac']
    title = 'platform.py uses deprecated feature of plistlib'
    updated_at = <Date 2014-01-13.19:36:20.590>
    user = 'https://bugs.python.org/MarcTamlyn'

    bugs.python.org fields:

    activity = <Date 2014-01-13.19:36:20.590>
    actor = 'ned.deily'
    assignee = 'ronaldoussoren'
    closed = True
    closed_date = <Date 2014-01-13.19:36:20.591>
    closer = 'ned.deily'
    components = ['macOS']
    creation = <Date 2014-01-13.00:03:50.610>
    creator = 'Marc.Tamlyn'
    dependencies = []
    files = ['33437']
    hgrepos = []
    issue_num = 20229
    keywords = ['needs review']
    message_count = 4.0
    messages = ['207987', '207996', '208016', '208041']
    nosy_count = 5.0
    nosy_names = ['ronaldoussoren', 'ned.deily', 'python-dev', 'serhiy.storchaka', 'Marc.Tamlyn']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue20229'
    versions = ['Python 3.4']

    @MarcTamlyn
    Copy link
    Mannequin Author

    MarcTamlyn mannequin commented Jan 13, 2014

    platform.mac_ver() triggers the following deprecation warning:

    python3.4 -Wall
    Python 3.4.0b2 (v3.4.0b2:ba32913eb13e, Jan  5 2014, 11:02:52)
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import platform
    >>> platform.mac_ver()
    /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/platform.py:652: DeprecationWarning: The readPlist function is deprecated, use load() instead
      pl = plistlib.readPlist(fn)
    ('10.9.1', ('', '', ''), 'x86_64')

    @MarcTamlyn MarcTamlyn mannequin added the OS-mac label Jan 13, 2014
    @ned-deily
    Copy link
    Member

    Thanks for the report! Here's a patch.

    @serhiy-storchaka
    Copy link
    Member

    There is no need to indent any except the "pl = plistlib.load(f)" line.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 13, 2014

    New changeset cd728dc893c9 by Ned Deily in branch 'default':
    Issue bpo-20229: Avoid plistlib deprecation warning in platform.mac_ver().
    http://hg.python.org/cpython/rev/cd728dc893c9

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants