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 eric.smith
Recipients amaury.forgeotdarc, benjamin.peterson, eric.smith, nnorwitz
Date 2008-05-09.12:57:52
SpamBayes Score 0.002346936
Marked as misclassified No
Message-id <1210337883.1.0.653202866171.issue2772@psf.upfronthosting.co.za>
In-reply-to
Content
The attached patch (percent_formatting_pending_deprecation_0.diff) adds
both the simple global lock to unicode_mod() and changes warnings.py to
use .format() instead of % formatting.

I think this is good enough.  We should add a warning to the docs saying
user code used for warnings should also avoid % formatting.  The only
problem they'll see, however, is dropping an occasional warning in a
multi-threaded app.  But I'm not sure yet exactly where this mention
would go.

I also don't have any tests for this.  I haven't found a test of a
PendingDeprecationWarning.

The biggest problem is that this patch breaks test_doctest with
"RuntimeError: dictionary changed size during iteration".  I've tried to
find out why, but so far it escapes me.  If someone else could look at
the issue, I'd appreciate it.
History
Date User Action Args
2008-05-09 12:58:04eric.smithsetspambayes_score: 0.00234694 -> 0.002346936
recipients: + eric.smith, nnorwitz, amaury.forgeotdarc, benjamin.peterson
2008-05-09 12:58:03eric.smithsetspambayes_score: 0.00234694 -> 0.00234694
messageid: <1210337883.1.0.653202866171.issue2772@psf.upfronthosting.co.za>
2008-05-09 12:58:01eric.smithlinkissue2772 messages
2008-05-09 12:58:01eric.smithcreate