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.

Author serhiy.storchaka
Recipients Arfrever, bob.ippolito, ezio.melotti, pitrou, r.david.murray, rhettinger, serhiy.storchaka
Date 2013-09-01.08:44:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378025089.16.0.406266596731.issue18726@psf.upfronthosting.co.za>
In-reply-to
Content
> We don't want to create more obstacles to upgrading or converting from Python 2.

But these obstacles already exists.

The 10th parameter of dump() is "encoding" in Python 2 and simplejson, and "default" in Python 3.

The 12th parameter of dump() is "use_decimal" simplejson, and "sort_keys" in Python 2.

The 2nd parameter of load() is "encoding" in Python 2 and simplejson, and "cls" in Python 3.

Due to the fact that most arguments are boolean or accepts None some shifting of positional arguments can left unnoticed long time and causes subtle bugs when upgrading from Python 2 to Python 3 or switching between stdlib json module and simplejson.

Proposed change doesn't break any code at first stage, it just adds deprecation warning about using dangerous non-portable feature. We can defer forbidding positional parameters until Python 2 will gone and simplejson will be changed to keyword-only parameters too.
History
Date User Action Args
2013-09-01 08:44:49serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, bob.ippolito, pitrou, ezio.melotti, Arfrever, r.david.murray
2013-09-01 08:44:49serhiy.storchakasetmessageid: <1378025089.16.0.406266596731.issue18726@psf.upfronthosting.co.za>
2013-09-01 08:44:49serhiy.storchakalinkissue18726 messages
2013-09-01 08:44:48serhiy.storchakacreate