From: Serhiy Storchaka Date: Sun, 26 Jan 2014 21:52:57 +0000 (+0200) Subject: Issue #19990: Added tests for the imghdr module. X-Git-Tag: v3.4.0rc1~229^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=62a85b54a3c6819b41a23443242974935cc23a89;p=thirdparty%2FPython%2Fcpython.git Issue #19990: Added tests for the imghdr module. Based on patch by Claudiu Popa. --- 62a85b54a3c6819b41a23443242974935cc23a89 diff --cc Lib/test/test_sundry.py index 2da3ac05dc75,8808c47edded..e99ca9ed37f8 --- a/Lib/test/test_sundry.py +++ b/Lib/test/test_sundry.py @@@ -5,18 -5,10 +5,18 @@@ from test import suppor import unittest class TestUntestedModules(unittest.TestCase): - def test_at_least_import_untested_modules(self): + def test_untested_modules_can_be_imported(self): - untested = ('bdb', 'encodings', 'formatter', 'imghdr', ++ untested = ('bdb', 'encodings', 'formatter', + 'nturl2path', 'tabnanny') with support.check_warnings(quiet=True): - import bdb - import cgitb + for name in untested: + try: + support.import_module('test.test_{}'.format(name)) + except unittest.SkipTest: + importlib.import_module(name) + else: + self.fail('{} has tests even though test_sundry claims ' + 'otherwise'.format(name)) import distutils.bcppcompiler import distutils.ccompiler diff --cc Misc/NEWS index 7fb39c0aec57,10cb08e54b28..31f206315c03 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -127,196 -114,12 +127,202 @@@ Librar - Issue #20113: os.readv() and os.writev() now raise an OSError exception on error instead of returning -1. +- Issue #19719: Make importlib.abc.MetaPathFinder.find_module(), + PathEntryFinder.find_loader(), and Loader.load_module() use PEP 451 APIs to + help with backwards-compatibility. + +- Issue #20144: inspect.Signature now supports parsing simple symbolic + constants as parameter default values in __text_signature__. + - Issue #20072: Fixed multiple errors in tkinter with wantobjects is False. +- Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver(). + +- Issue #14455: Fix some problems with the new binary plist support in plistlib. + +IDLE +---- + +- Issue #17390: Add Python version to Idle editor window title bar. + Original patches by Edmond Burnett and Kent Johnson. + +- Issue #18960: IDLE now ignores the source encoding declaration on the second + line if the first line contains anything except a comment. + +Tests +----- + ++- Issue #19990: Added tests for the imghdr module. Based on patch by ++ Claudiu Popa. ++ +- Issue #20358: Tests for curses.window.overlay and curses.window.overwrite + no longer specify min{row,col} > max{row,col}. + ++- Issue #19804: The test_find_mac test in test_uuid is now skipped if the ++ ifconfig executable is not available. ++ +- Issue #19886: Use better estimated memory requirements for bigmem tests. + +Tools/Demos +----------- + +- Issue #20390: Argument Clinic's "file" output preset now defaults to + "{dirname}/clinic/{basename}.h". + +- Issue #20390: Argument Clinic's "class" directive syntax has been extended + with two new required arguments: "typedef" and "type_object". + +- Issue #20390: Argument Clinic: If __new__ or __init__ functions didn't use + kwargs (or args), the PyArg_NoKeywords (or PyArg_NoPositional) calls + generated are only run when the type object is an exact match. + +- Issue #20390: Argument Clinic now fails if you have required parameters after + optional parameters. + +- Issue #20390: Argument Clinic converters now have a new template they can + inject code into: "modifiers". Code put there is run in the parsing + function after argument parsing but before the call to the impl. + +- Issue #20376: Argument Clinic now escapes backslashes in docstrings. + +- Issue #20381: Argument Clinic now sanity checks the default argument when + c_default is also specified, providing a nice failure message for + disallowed values. + +- Issue #20189: Argument Clinic now ensures that parser functions for + __new__ are always of type newfunc, the type of the tp_new slot. + Similarly, parser functions for __init__ are now always of type initproc, + the type of tp_init. + +- Issue #20189: Argument Clinic now suppresses the docstring for __new__ + and __init__ functions if no docstring is provided in the input. + +- Issue #20189: Argument Clinic now suppresses the "self" parameter in the + impl for @staticmethod functions. + +- Issue #20294: Argument Clinic now supports argument parsing for __new__ and + __init__ functions. + +- Issue #20299: Argument Clinic custom converters may now change the default + value of c_default and py_default with a class member. + +- Issue #20287: Argument Clinic's output is now configurable, allowing + delaying its output or even redirecting it to a separate file. + +- Issue #20226: Argument Clinic now permits simple expressions + (e.g. "sys.maxsize - 1") as default values for parameters. + +- Issue #19936: Added executable bits or shebang lines to Python scripts which + requires them. Disable executable bits and shebang lines in test and + benchmark files in order to prevent using a random system python, and in + source files of modules which don't provide command line interface. Fixed + shebang lines in the unittestgui and checkpip scripts. + +- Issue #20268: Argument Clinic now supports cloning the parameters and + return converter of existing functions. + +- Issue #20228: Argument Clinic now has special support for class special + methods. + +- Issue #20214: Fixed a number of small issues and documentation errors in + Argument Clinic (see issue for details). + +- Issue #20196: Fixed a bug where Argument Clinic did not generate correct + parsing code for functions with positional-only parameters where all arguments + are optional. + +- Issue #18960: 2to3 and the findnocoding.py script now ignore the source + encoding declaration on the second line if the first line contains anything + except a comment. + +- Issue #19723: The marker comments Argument Clinic uses have been changed + to improve readability. + +- Issue #20157: When Argument Clinic renames a parameter because its name + collides with a C keyword, it no longer exposes that rename to PyArg_Parse. + +- Issue #20141: Improved Argument Clinic's support for the PyArg_Parse "O!" + format unit. + +- Issue #20144: Argument Clinic now supports simple symbolic constants + as parameter default values. + +- Issue #20143: The line numbers reported in Argument Clinic errors are + now more accurate. + +- Issue #20142: Py_buffer variables generated by Argument Clinic are now + initialized with a default value. + +Build +----- + +- Issue #12837: Silence a tautological comparison warning on OS X under Clang in + socketmodule.c. + +What's New in Python 3.4.0 Beta 2? +================================== + +Release date: 2014-01-05 + +Core and Builtins +----------------- + +- Issue #17432: Drop UCS2 from names of Unicode functions in python3.def. + +- Issue #19526: Exclude all new API from the stable ABI. Exceptions can be + made if a need is demonstrated. + +- Issue #19969: PyBytes_FromFormatV() now raises an OverflowError if "%c" + argument is not in range [0; 255]. + +- Issue #19995: %c, %o, %x, and %X now issue a DeprecationWarning on non-integer + input; reworded docs to clarify that an integer type should define both __int__ + and __index__. + +- Issue #19787: PyThread_set_key_value() now always set the value. In Python + 3.3, the function did nothing if the key already exists (if the current value + is a non-NULL pointer). + +- Issue #14432: Remove the thread state field from the frame structure. Fix a + crash when a generator is created in a C thread that is destroyed while the + generator is still used. The issue was that a generator contains a frame, and + the frame kept a reference to the Python state of the destroyed C thread. The + crash occurs when a trace function is setup. + +- Issue #19576: PyGILState_Ensure() now initializes threads. At startup, Python + has no concrete GIL. If PyGILState_Ensure() is called from a new thread for + the first time and PyEval_InitThreads() was not called yet, a GIL needs to be + created. + +- Issue #17576: Deprecation warning emitted now when __int__() or __index__() + return not int instance. + +- Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes. + +- Issue #19736: Add module-level statvfs constants defined for GNU/glibc + based systems. + +- Issue #20097: Fix bad use of "self" in importlib's WindowsRegistryFinder. + +- Issue #19729: In str.format(), fix recursive expansion in format spec. + +- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2 + billion characters) input strings in _Py_dg_strtod. + +Library +------- + +- Issue #20154: Deadlock in asyncio.StreamReader.readexactly(). + +- Issue #16113: Remove sha3 module again. + +- Issue #20111: pathlib.Path.with_suffix() now sanity checks the given suffix. + +- Fix breakage in TestSuite.countTestCases() introduced by issue #11798. + - Issue #20108: Avoid parameter name clash in inspect.getcallargs(). -- Issue #12692: Backport the fix for ResourceWarning in test_urllib2net. This - also helps in closing the socket when Connection Close header is not sent. +- Issue #19918: Fix PurePath.relative_to() under Windows. - Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl module, rather than silently let them emit clear text data. @@@ -551,9 -292,14 +557,6 @@@ IDL Tests ----- -- Issue #19990: Added tests for the imghdr module. Based on patch by - Claudiu Popa. - --- Issue #19804: The test_find_mac test in test_uuid is now skipped if the -- ifconfig executable is not available. - -- Issue #19886: Use better estimated memory requirements for bigmem tests. -- - Issue #20055: Fix test_shutil under Windows with symlink privileges held. Patch by Vajrasky Kok.