mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Depreate imageop for removal in 3.0.
This commit is contained in:
parent
b61d801adb
commit
42bfa90f02
5 changed files with 15 additions and 7 deletions
|
@ -4,7 +4,10 @@
|
||||||
|
|
||||||
.. module:: imageop
|
.. module:: imageop
|
||||||
:synopsis: Manipulate raw image data.
|
:synopsis: Manipulate raw image data.
|
||||||
|
:deprecated:
|
||||||
|
|
||||||
|
.. deprecated:: 2.6
|
||||||
|
The :mod:`imageop` module has been removed in Python 3.0.
|
||||||
|
|
||||||
The :mod:`imageop` module contains some useful operations on images. It operates
|
The :mod:`imageop` module contains some useful operations on images. It operates
|
||||||
on images consisting of 8 or 32 bit pixels stored in Python strings. This is
|
on images consisting of 8 or 32 bit pixels stored in Python strings. This is
|
||||||
|
|
|
@ -5,11 +5,10 @@
|
||||||
Roger E. Masse
|
Roger E. Masse
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from test.test_support import verbose, unlink
|
from test.test_support import verbose, unlink, import_module
|
||||||
|
|
||||||
import imageop, uu, os, imgfile
|
imageop = import_module('imageop', deprecated=True)
|
||||||
|
import uu, os, imgfile
|
||||||
import warnings
|
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
|
|
||||||
|
|
|
@ -132,8 +132,7 @@ class TestStdlibRemovals(unittest.TestCase):
|
||||||
'Bastion', 'compiler', 'dircache', 'fpformat',
|
'Bastion', 'compiler', 'dircache', 'fpformat',
|
||||||
'ihooks', 'mhlib')
|
'ihooks', 'mhlib')
|
||||||
inclusive_platforms = {'irix':('pure',)}
|
inclusive_platforms = {'irix':('pure',)}
|
||||||
# XXX Don't know if lib-tk is only installed if _tkinter is built.
|
optional_modules = ('bsddb185', 'Canvas', 'dl', 'linuxaudiodev', 'imageop')
|
||||||
optional_modules = ('bsddb185', 'Canvas', 'dl', 'linuxaudiodev')
|
|
||||||
|
|
||||||
def check_removal(self, module_name, optional=False):
|
def check_removal(self, module_name, optional=False):
|
||||||
"""Make sure the specified module, when imported, raises a
|
"""Make sure the specified module, when imported, raises a
|
||||||
|
|
|
@ -23,6 +23,8 @@ Extension Modules
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- The imageop module has been deprecated for removal in Python 3.0.
|
||||||
|
|
||||||
- #2250: Exceptions raised during evaluation of names in rlcompleter's
|
- #2250: Exceptions raised during evaluation of names in rlcompleter's
|
||||||
``Completer.complete()`` method are now caught and ignored.
|
``Completer.complete()`` method are now caught and ignored.
|
||||||
|
|
||||||
|
|
|
@ -775,6 +775,11 @@ PyMODINIT_FUNC
|
||||||
initimageop(void)
|
initimageop(void)
|
||||||
{
|
{
|
||||||
PyObject *m;
|
PyObject *m;
|
||||||
|
|
||||||
|
if (PyErr_WarnPy3k("the imageop module has been removed in "
|
||||||
|
"Python 3.0", 2) < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
m = Py_InitModule("imageop", imageop_methods);
|
m = Py_InitModule("imageop", imageop_methods);
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue