This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Remove old-deprecated plistlib features
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: rhettinger, ronaldoussoren, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2017-01-07 16:52 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
plistlib_remove_deprecated_classes.patch serhiy.storchaka, 2017-01-07 16:52 review
Pull Requests
URL Status Linked Edit
PR 488 merged serhiy.storchaka, 2017-03-05 22:22
Messages (9)
msg284925 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-01-07 16:52
Seems many features of plistlib was deprecated from the start. The plistlib module was added in 2.6 and its code already contained deprecated features:

* The _InternalDict class is a dict subclass with implemented __getattr__/__setattr__/__delattr__ methods, but all these methods have been deprecated. Since deprecated methods shouldn't be used and they are not implemented in builting dict, _InternalDict can be replaced by builting dict.

* The Dict class has been deprecated. It doesn't used in the module. A user should use builting dict instead.

* The Plist class has been deprecated. It doesn't used in the module. A user should use module level functions instead of Plist methods.

It seems to me that all these classes can be removed. This doesn't break compatibility, since they were deprecated in 2.6. They are even not documented in 2.7.
msg289666 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-03-15 11:03
These classes was deprecated in 2.4. In 2.6 the plistlib module was moved from plat-mac to the general stdlib library.
msg293603 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-13 08:32
What are your thoughts about this Ronald?
msg293617 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-05-13 16:56
Ronald, I'm curious about why was the attribute access capability was ever deprecated.  That capability seemed nice to have.
msg293622 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-13 17:54
The deprecation was added in 368c0b22f8e43709afbbc3805f55ceffed127212. The comment added in 4c3d054d3d3fa693e4eff4574ab8e98772bd66cd said that Dict was kept for compatibility with Python 2.2.
msg293625 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-05-13 22:28
Too bad the checkin message didn't say why the feature was deprecated.  

That said, if anyone cared, they would have spoken-up by now.
msg293682 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2017-05-15 07:16
I don't know why the feature was deprecated, is was deprecated a long time ago by Just.

I agree that the feature is convenient at times, but it is also different from how dicts are generally used. 

BTW. I'm in favour of removing the feature, not having this deprecated feature makes the library easier to understand and maintain.

P.S. plistlib was not introduced in 2.6, but in 2.3. In 2.3 it was part of the MacOS library (Lib/plat-mac) and in 2.6 it was migrated to the regular stdlib.
msg293702 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-15 10:21
New changeset edef358ed6d05f927bf1636cc5a920a9d868b131 by Serhiy Storchaka in branch 'master':
bpo-29196: Removed old-deprecated classes Plist, Dict and _InternalDict (#488)
msg293705 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-05-15 10:39
If the capability of the former plistlib.Dict class is useful, it would be better to provide it for general use in modules collections or types.
Date User Action Args
2022-04-11 14:58:41adminsetgithub: 73382
2017-05-15 10:39:33serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg293705

stage: patch review -> resolved
2017-05-15 10:21:33serhiy.storchakasetmessages: + msg293702
2017-05-15 07:16:06ronaldoussorensetmessages: + msg293682
2017-05-13 22:28:30rhettingersetmessages: + msg293625
2017-05-13 17:54:50serhiy.storchakasetmessages: + msg293622
2017-05-13 16:56:38rhettingersetnosy: + rhettinger
messages: + msg293617
2017-05-13 08:32:41serhiy.storchakasetmessages: + msg293603
2017-03-15 11:03:06serhiy.storchakasetmessages: + msg289666
2017-03-05 22:22:17serhiy.storchakasetpull_requests: + pull_request401
2017-01-22 21:15:49serhiy.storchakasetassignee: ronaldoussoren
2017-01-07 16:52:20serhiy.storchakacreate