[Python-checkins] r63013 - in python/trunk: Doc/library/fpformat.rst Lib/fpformat.py Lib/test/test_fpformat.py Lib/test/test_py3kwarn.py Misc/NEWS
brett.cannon
python-checkins at python.org
Sun May 11 00:11:46 CEST 2008
Author: brett.cannon
Date: Sun May 11 00:11:45 2008
New Revision: 63013
Log:
Deprecate the fpformat module for removal in 3.0.
Modified:
python/trunk/Doc/library/fpformat.rst
python/trunk/Lib/fpformat.py
python/trunk/Lib/test/test_fpformat.py
python/trunk/Lib/test/test_py3kwarn.py
python/trunk/Misc/NEWS
Modified: python/trunk/Doc/library/fpformat.rst
==============================================================================
--- python/trunk/Doc/library/fpformat.rst (original)
+++ python/trunk/Doc/library/fpformat.rst Sun May 11 00:11:45 2008
@@ -4,6 +4,11 @@
.. module:: fpformat
:synopsis: General floating point formatting functions.
+ :deprecated:
+
+.. deprecated:: 2.6
+ The fpformat module has been removed in Python 3.0.
+
.. sectionauthor:: Moshe Zadka <moshez at zadka.site.co.il>
Modified: python/trunk/Lib/fpformat.py
==============================================================================
--- python/trunk/Lib/fpformat.py (original)
+++ python/trunk/Lib/fpformat.py Sun May 11 00:11:45 2008
@@ -10,6 +10,9 @@
x: number to be formatted; or a string resembling a number
digits_behind: number of digits behind the decimal point
"""
+from warnings import warnpy3k
+warnpy3k("the fpformat module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
import re
Modified: python/trunk/Lib/test/test_fpformat.py
==============================================================================
--- python/trunk/Lib/test/test_fpformat.py (original)
+++ python/trunk/Lib/test/test_fpformat.py Sun May 11 00:11:45 2008
@@ -2,9 +2,10 @@
Tests for fpformat module
Nick Mathewson
'''
-from test.test_support import run_unittest
+from test.test_support import run_unittest, import_module
import unittest
-from fpformat import fix, sci, NotANumber
+fpformat = import_module('fpformat', deprecated=True)
+fix, sci, NotANumber = fpformat.fix, fpformat.sci, fpformat.NotANumber
StringType = type('')
Modified: python/trunk/Lib/test/test_py3kwarn.py
==============================================================================
--- python/trunk/Lib/test/test_py3kwarn.py (original)
+++ python/trunk/Lib/test/test_py3kwarn.py Sun May 11 00:11:45 2008
@@ -129,7 +129,7 @@
# test.testall not tested as it executes all unit tests as an
# import side-effect.
all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
- 'Bastion', 'compiler', 'dircache')
+ 'Bastion', 'compiler', 'dircache', 'fpformat')
inclusive_platforms = {'irix':('pure',)}
# XXX Don't know if lib-tk is only installed if _tkinter is built.
optional_modules = ('bsddb185', 'Canvas', 'dl')
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Sun May 11 00:11:45 2008
@@ -23,6 +23,8 @@
Library
-------
+- The fpformat module has been deprecated for removal in Python 3.0.
+
- The dl module has been deprecated for removal in Python 3.0.
- The Canvas module has been deprecated for removal in Python 3.0.
More information about the Python-checkins
mailing list