msg284925 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
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) *  |
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) *  |
Date: 2017-05-13 08:32 |
What are your thoughts about this Ronald? |
|
|
msg293617 - (view) |
Author: Raymond Hettinger (rhettinger) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) https://github.com/python/cpython/commit/edef358ed6d05f927bf1636cc5a920a9d868b131 |
|
|
msg293705 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
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. |
|
|