Commit Graph

5418 Commits

Author SHA1 Message Date
Georg Brandl 392c6fc02d ConfigParser renaming reversal part 3: move module into place and adapt imports. 2008-05-25 07:25:25 +00:00
Georg Brandl a6168f9e0a Queue renaming reversal part 3: move module into place and
change imports and other references. Closes #2925.
2008-05-25 07:20:14 +00:00
Gregory P. Smith 8107290fa1 * Give the test_bsddb3 tests a unique temporary directory to run their
stuff in and clean it up afterwards regardless of the result.
* Get rid of duplicate list of test modules to run, they're maintained
  within test_all now.
* Print the BerkeleyDB version to stderr when running test_bsddb3 to
  help buildbot problem diagnosis.
2008-05-25 07:14:09 +00:00
Georg Brandl e152a77d96 socketserver renaming reversal part 3: move the module into the right
place and fix all references to it.  Closes #2926.
2008-05-24 18:31:28 +00:00
Martin v. Löwis 7d3d04d6db Don't try to get the window size if it was never set before.
Fixes the test failure on Solaris.
2008-05-24 09:36:45 +00:00
Martin v. Löwis 27e4a179f2 Issue #1390: Raise ValueError in toxml when an invalid comment would
otherwise be produced.
2008-05-23 15:18:28 +00:00
Mark Dickinson badd7da622 Skip math.sum tests on non IEEE 754 platforms, and on IEEE 754 platforms
that exhibit the problem described in issue #2937.
2008-05-23 12:07:36 +00:00
Brett Cannon 2ee0e8eaec Revert the renaming of repr to reprlib. 2008-05-23 05:03:59 +00:00
Mark Dickinson d055835253 Better error reporting in test_math.py 2008-05-23 03:30:01 +00:00
Mark Dickinson c11c3391b0 Add tests for math.sum (Issue #2819) 2008-05-23 02:36:48 +00:00
Benjamin Peterson 3a7305ed14 fix test_pydoc so it works on make installed Python installations
Also let it pass when invoked directly
2008-05-22 23:09:26 +00:00
Benjamin Peterson 83d453421f remove redundant invocation of json doctests 2008-05-22 01:02:23 +00:00
Benjamin Peterson 948ee7a7c8 use more specific asserts in test_opcode 2008-05-22 00:57:02 +00:00
Benjamin Peterson a4e4ef1cea check for toolbox glue before testing platform.mac_ver intensly 2008-05-21 22:52:39 +00:00
Georg Brandl 88659b0ab2 #2592: delegate nb_index and the floor/truediv slots in weakref.proxy. 2008-05-20 08:40:43 +00:00
Georg Brandl 112aa50329 Patch #1775025: allow opening zipfile members via ZipInfo instances.
Patch by Graham Horler.
2008-05-20 08:25:48 +00:00
Georg Brandl b7e419ebb9 Use inspect.getabsfile() to get the documented module's filename. 2008-05-20 08:10:03 +00:00
Georg Brandl fb3de1fcd2 Improve diffing logic and output for test_pydoc. 2008-05-20 08:07:36 +00:00
Georg Brandl bcdafa44f2 Remove html package and fix test_htmlparser. 2008-05-20 07:58:42 +00:00
Georg Brandl dffbf5f542 Revert copy_reg -> copyreg rename. 2008-05-20 07:49:57 +00:00
Georg Brandl 6634bf2919 Tkinter rename reversal: remove tkinter package, adapt imports and docs. 2008-05-20 07:13:37 +00:00
Georg Brandl 7bb1653cc3 Argh, this is the *actual* test that works under Windows. 2008-05-20 06:47:31 +00:00
Georg Brandl b740f6a0c7 Activate two more test cases in test_httpservers. 2008-05-20 06:15:36 +00:00
Fred Drake d995e1150c revert creation of the html.entities and html.parser modules
(http://bugs.python.org/issue2882)
2008-05-20 06:08:38 +00:00
Benjamin Peterson d21dabc890 change some imports in tests so they will not be skipped in 3.0 2008-05-18 23:07:07 +00:00
Benjamin Peterson 913c15c1c6 fix test_platform (os was not imported) 2008-05-18 22:07:42 +00:00
Georg Brandl 6e7e0790de Fix test_pyclbr after another platform-dependent function was added to urllib. 2008-05-18 21:10:19 +00:00
Ronald Oussoren 7a0f4c75b1 - Add unittests for platform.mac_ver (or rather, ensure that the unittest for
that function actually tests something on OSX).

- Add documentation to platform.mac_ver that explains why the middle element
  of the return value will not contain useful information.
2008-05-18 20:54:47 +00:00
Benjamin Peterson f5c38dadf6 bring test_pydoc up to my high standards (now that I have them) 2008-05-18 20:48:07 +00:00
Georg Brandl 8632cc2573 GHOP #121: improve test_pydoc, by Benjamin Peterson. 2008-05-18 16:32:48 +00:00
Georg Brandl 0bb0299ad8 Take namedtuple item names only from ascii_letters (this blew up on OSX),
and make sure there are no duplicate names.
2008-05-18 10:39:26 +00:00
Georg Brandl f899dfa1d1 GHOP #134, #171, #137: unit tests for the three HTTPServer modules. 2008-05-18 09:12:20 +00:00
Georg Brandl a9916b55de #2353: raise Py3k warning in file.xreadlines(). 2008-05-17 22:11:54 +00:00
Fred Drake cb51d84214 update references and documentation for modules in the new html package
(http://bugs.python.org/issue2882)
2008-05-17 21:14:05 +00:00
Fred Drake 91ae250273 rename HTMLParser to html.parser, htmlentitydefs to html.entities
(http://bugs.python.org/issue2882)
2008-05-17 20:30:04 +00:00
Benjamin Peterson c6d64ec83f revert 63425 over Guido's Febuary message about this, that I missed 2008-05-17 20:09:42 +00:00
Benjamin Peterson d7943cb71d fix spelling 2008-05-17 19:51:10 +00:00
Benjamin Peterson 79a922d6df add Py3k warnings to oct and hex. backport hex behavior (because it's not different) 2008-05-17 19:21:20 +00:00
Gregory P. Smith af8a68733f fix issue2381: test_subprocess fails if your sys.executable is on a
path with a space in it.
2008-05-17 07:17:34 +00:00
Alexandre Vassalotti 3c4971c40e Added Python 3.0 warning to cPickle. 2008-05-16 19:14:31 +00:00
Alexandre Vassalotti ea0b22a167 Patch by Quentin Gallet-Gilles: Renaming leftovers for 2.6.
This fixes the omissions of configparser, copyreg, queue and
socketserver renaming.
2008-05-16 18:03:52 +00:00
Georg Brandl ad9afeb8f0 Tkinter rename, step 2: fix imports and add stub modules. 2008-05-16 15:48:15 +00:00
Georg Brandl ecf9091f59 Don't allow keyword arguments to reversed(). 2008-05-16 13:24:29 +00:00
Georg Brandl 5ffad6646e Make generator repr consistent with function and code object repr. 2008-05-16 09:34:48 +00:00
Alexandre Vassalotti a8eaf8faf3 Rename the test file of reprlib. 2008-05-16 07:14:08 +00:00
Alexandre Vassalotti 50a1acb2ab Changed references to the reprlib module to use its new name. 2008-05-16 06:58:49 +00:00
Alexandre Vassalotti 95d97c7390 Renamed the repr module to reprlib.
Added stub module for repr.
2008-05-16 06:37:57 +00:00
Benjamin Peterson 5915a4dcfe make test_platform a bit more assertive (We'll see what the buildbots say.) 2008-05-16 02:24:49 +00:00
Brett Cannon fa40bbf625 Deprecated statvfs for removal in 3.0. 2008-05-16 00:50:02 +00:00
Brett Cannon 90f2cb422f Remove the last usage of statvfs in the stdlib. 2008-05-16 00:37:42 +00:00
Brett Cannon 2224817cdf Deprecate sunaudiodev/SUNAUDIODEV for removal in 3.0. 2008-05-16 00:10:24 +00:00
Alexandre Vassalotti f7f439b6f1 Fixed typo in a doctest of test_genexps. 2008-05-15 20:31:42 +00:00
Georg Brandl c91210c06b #2863: add gen.__name__ and add this name to generator repr(). 2008-05-15 15:08:32 +00:00
Brett Cannon 74a596c068 Deprecate WAIT for removal in 3.0. 2008-05-15 04:17:35 +00:00
Brett Cannon f56b6aeb06 Deprecated torgb for removal in 3.0. 2008-05-15 04:15:25 +00:00
Brett Cannon 518c5da219 Deprecate SV for removal in 3.0. 2008-05-15 04:13:19 +00:00
Brett Cannon cd2de08257 Deprecate readcd for removal in 3.0. 2008-05-15 03:51:21 +00:00
Brett Cannon 7e37586c50 The panel module for IRIX has been deprecated for removal in 3.0. 2008-05-15 03:46:27 +00:00
Brett Cannon 89f5d9cc81 Deprecate jpeg for IRIX for removal in 3.0. 2008-05-15 03:44:00 +00:00
Brett Cannon d8c41ecc17 Deprecate IOCTL from IRIX for removal in 3.0. 2008-05-15 03:41:55 +00:00
Brett Cannon 6328b297dc Deprecate IN from IRIX for removal in 3.0. 2008-05-15 03:36:13 +00:00
Brett Cannon 4652537ba4 Deprecate imgfile for removal in 3.0. 2008-05-15 03:32:11 +00:00
Brett Cannon 707e384a7a Deprecate GLWS from IRIX for removal in 3.0. 2008-05-15 03:29:18 +00:00
Brett Cannon 82bd94e651 Deprecate GET from IRIX for removal in 3.0. 2008-05-15 03:27:12 +00:00
Brett Cannon 75ba465099 Deprecated 'fm' for removal in 3.0. 2008-05-15 03:23:17 +00:00
Brett Cannon 178582e2a4 FL, flp, and fl from IRIX have been deprecated for removal in 3.0. 2008-05-15 03:20:36 +00:00
Brett Cannon 72ccc40db5 FILE from IRIX has been deprecated for removal in 3.0. 2008-05-15 03:17:24 +00:00
Brett Cannon 2773b6f1c9 Deprecate ERRNO for removal in 3.0. 2008-05-15 03:14:57 +00:00
Brett Cannon 044616aa24 Deprecate DEVICE, GL, gl, and the related modules cgen and cgensupport for removal in 3.0. 2008-05-15 02:33:55 +00:00
Alexandre Vassalotti e2514c6f10 Updated import statements to use the new `configparser` module name.
Updated the documentation to use the new name.
Revert addition of the stub entry for the old name.

Georg, I am reverting your changes since this commit should propagate
to py3k.
2008-05-14 22:44:22 +00:00
Alexandre Vassalotti e3a23c0734 Renamed the ConfigParser module to 'configparser'. 2008-05-14 22:07:07 +00:00
Brett Cannon 650f5161f4 Deprecate CL, CL_old, and cl for 3.0. 2008-05-14 21:12:12 +00:00
Brett Cannon 54c77aa459 Deprecate the cdplayer module for IRIX for 3.0. 2008-05-14 21:08:41 +00:00
Brett Cannon 9eebe49d07 The cddb module for IRIX has been deprecated for 3.0. 2008-05-14 20:34:22 +00:00
Brett Cannon ddf949f194 The CD and cd modules for IRIX are deprecated for 3.0. 2008-05-14 20:31:38 +00:00
Georg Brandl 885982283e Fix another "refleak" by clearing the filters after test. 2008-05-14 07:18:22 +00:00
Neal Norwitz 40388cc330 Fix "refleak" by restoring the tearDown method removed by accident (AFAICT)
in r62788.
2008-05-14 06:47:56 +00:00
Gregory P. Smith ee365b9f92 Enable the updated Lib/bsddb/test suite to run. 2008-05-14 04:27:01 +00:00
Brett Cannon ea785fb0cf Rewrap some lines in test_py3kwarn. 2008-05-14 01:09:40 +00:00
Brett Cannon 34721d5683 Deprecate al/AL for removal in 3.0. 2008-05-14 01:08:21 +00:00
Georg Brandl 913835763a #2831: add start argument to enumerate(). Patch by Scott Dial and me. 2008-05-13 19:04:54 +00:00
Benjamin Peterson bbb093751c use .format and fix a bug 2008-05-13 00:09:46 +00:00
Benjamin Peterson ab1fb9f728 Make error messages more helpful 2008-05-12 22:26:05 +00:00
Amaury Forgeot d'Arc e1b93f2855 Adapt test_pyclbr to the new version of urllib.py:
The new mac-specific functions must be ignored.
2008-05-12 22:21:39 +00:00
Benjamin Peterson 236819310d Add warnings to and deprecated all those Mac modules 2008-05-12 21:42:13 +00:00
Georg Brandl 23da6e6545 #1713041: fix pprint's handling of maximum depth. 2008-05-12 16:26:52 +00:00
Brett Cannon ac861b5a17 Deprecate the sv module as per PEP 4. 2008-05-12 03:45:59 +00:00
Brett Cannon 43e5ef49b1 Deprecate the multifile module as per PEP 4. 2008-05-12 03:19:20 +00:00
Alexandre Vassalotti d192c925ac Updated all import statements to use the new socketserver module name.
Renamed socketserver module in its own documentation.
Renamed documentation references.
2008-05-12 02:11:22 +00:00
Alexandre Vassalotti fb9ce65a91 Renamed SocketServer to 'socketserver'.
Deprecated old name.
2008-05-12 01:37:10 +00:00
Benjamin Peterson b9030f4f0d #2196 hasattr now allows SystemExit and KeyboardInterrupt to propagate 2008-05-12 00:41:23 +00:00
Brett Cannon 42bfa90f02 Depreate imageop for removal in 3.0. 2008-05-12 00:08:34 +00:00
Alexandre Vassalotti 1fcaa77ac5 Revert commit r63086. 2008-05-11 23:12:38 +00:00
Alexandre Vassalotti 8940ecd39d Added stub for the PixMapWrapper module to be renamed in 3.0.
Modified TestStdlibRenames to support platform specific renames.
Added test for PixMapWrapper rename warning.
Added note to documentation about PixMapWrapper rename.
2008-05-11 20:30:43 +00:00
Alexandre Vassalotti 73812bf2a6 Added test for Queue rename warning.
Added note to documentation about Queue rename.
2008-05-11 20:04:03 +00:00
Eric Smith cf537ff39e Addresses issue 2802: 'n' formatting for integers.
Adds 'n' as a format specifier for integers, to mirror the same
specifier which is already available for floats.  'n' is the same as
'd', but inserts the current locale-specific thousands grouping.

I added this as a stringlib function, but it's only used by str type,
not unicode.  This is because of an implementation detail in
unicode.format(), which does its own str->unicode conversion.  But the
unicode version will be needed in 3.0, and it may be needed by other
code eventually in 2.6 (maybe decimal?), so I left it as a stringlib
implementation.  As long as the unicode version isn't instantiated,
there's no overhead for this.
2008-05-11 19:52:48 +00:00
Alexandre Vassalotti 30ece44f2e Added stub for the Queue module to be renamed in 3.0.
Use the 3.0 module name to avoid spurious warnings.
2008-05-11 19:39:48 +00:00
Georg Brandl b52a74b517 #2816: clarify error messages for EOF while scanning strings. 2008-05-11 15:07:39 +00:00
Georg Brandl 6a57c08dc8 #1326: document and test zipimporter.archive and zipimporter.prefix. 2008-05-11 15:05:13 +00:00
Andrew M. Kuchling 6c02916dfb #1792: Improve performance of marshal.dumps() on large objects by increasing
the size of the buffer more quickly.
2008-05-11 13:33:56 +00:00
Georg Brandl 6f95ae55b1 #2659: add ``break_on_hyphens`` to TextWrapper. 2008-05-11 10:42:28 +00:00
Alexandre Vassalotti 25ad76c91d Added test for copy_reg rename.
Added note to documentation about copy_reg rename.
2008-05-11 09:01:51 +00:00
Alexandre Vassalotti 9510e4a9f8 Added module stub for copy_reg renaming in 3.0.
Renamed copy_reg to copyreg in the standard library, to avoid
spurious warnings and ease later merging to py3k branch. Public
documentation remains intact.
2008-05-11 08:25:28 +00:00
Alexandre Vassalotti f602c71b07 Removed a dead line of code. 2008-05-11 07:10:25 +00:00
Alexandre Vassalotti 445ff35d5c Fixed typo in a comment of test_support.CleanImport. 2008-05-11 07:08:12 +00:00
Alexandre Vassalotti eb83f70586 Added test framework for handling module renames.
Factored the import guard in test_py3kwarn.TestStdlibRemovals into
a context manager, namely test_support.CleanImport.
2008-05-11 07:06:04 +00:00
Brett Cannon 2a86913864 Deprecated the mhlib module for removal in 3.0. 2008-05-11 03:01:47 +00:00
Brett Cannon df0a717037 The linuxaudidev module has been deprecated for removal in Python 3.0. 2008-05-11 00:50:51 +00:00
Brett Cannon 27508d4eb9 Deprecate ihooks for removal in 3.0. 2008-05-10 22:45:07 +00:00
Brett Cannon fe5985188d Deprecate the fpformat module for removal in 3.0. 2008-05-10 22:11:45 +00:00
Brett Cannon 7f874fce63 Deprecate the dl module for removal in 3.0. 2008-05-10 21:20:19 +00:00
Brett Cannon 0aa6e1b8fb Deprecate the dircache module for 3.0. 2008-05-10 21:12:57 +00:00
Brett Cannon ddf7a4214e Make sure warnings are not suppressed when testing for the raised
DeprecationWarning.
2008-05-10 03:16:38 +00:00
Brett Cannon d5a0985265 The Canvas module has been deprecated for removal in 3.0. 2008-05-10 03:14:32 +00:00
Brett Cannon 756bc0b722 Add a test for the deprecation of the compiler package. 2008-05-10 03:09:35 +00:00
Benjamin Peterson 5f9050a1c6 Add the examples in the json module docstring as a doctest 2008-05-10 03:08:17 +00:00
Brett Cannon 6192df10b6 Deprecate the compiler package for removal in 3.0. 2008-05-10 02:58:26 +00:00
Brett Cannon af87804831 Also ignore package deprecations. 2008-05-10 02:57:03 +00:00
Brett Cannon edb628f241 Suppress deprecations for packages as well when using
test.test_support.import_module().
2008-05-10 02:54:52 +00:00
Brett Cannon 768d44f54d Deprecate the bsddb185 module for removal in 3.0. 2008-05-10 02:47:54 +00:00
Brett Cannon 4c1f881f13 Deprecate Bastion and rexec for 3.0. 2008-05-10 02:27:04 +00:00
Brett Cannon 9ac3974de8 Deprecate the pure module for 3.0. 2008-05-09 22:51:58 +00:00
Alexandre Vassalotti 1aed624f7c Backport fast alternate io.BytesIO implementation.
Merged r62778, r62779, r62802, r62806, r62807, r62808, r62809, r62844,
r62846, r62952, r62956.
2008-05-09 21:49:43 +00:00
Mark Dickinson f8476c1573 Issue #2487. math.ldexp(x, n) raised OverflowError when n was large and
negative; fix to return an (appropriately signed) zero instead.
2008-05-09 17:54:23 +00:00
Brett Cannon 3c75914434 Deprecate test.testall for removal in 3.0. 2008-05-09 05:25:37 +00:00
Brett Cannon d7265d6483 Deprecate the new module for removal in 3.0. 2008-05-09 05:18:40 +00:00
Benjamin Peterson 0893a0a961 Add Py3k warnings to os.path.walk 2008-05-09 00:27:01 +00:00
Benjamin Peterson 9ec4aa01f9 Replace instances of os.path.walk with os.walk 2008-05-08 22:09:54 +00:00
Brett Cannon e3b1940eb9 Deprecate the user module for removal in 3.0. 2008-05-08 20:36:09 +00:00
Brett Cannon be1501b976 Fix sys.flags to properly expose bytes_warning.
Closes issue #2790.
2008-05-08 20:23:06 +00:00
Brett Cannon 5d023c3afa Fix a bug introduced by the addition of the 'record' argument to
test.test_support.catch_warning() where showwarning() was not being set
properly.
2008-05-08 20:20:24 +00:00
Brett Cannon bfb997d6a5 Make test.test_support.catch_warning() take an argument specifying if any
triggered warnings should be captured. This allows the context manager to be
used to just prevent the internal state of the 'warnings' framework and thus
allow triggered warnings to be displayed.
2008-05-08 19:50:51 +00:00
Brett Cannon 9d44182427 The mutex module has been deprecated for removal in 3.0. 2008-05-08 19:26:08 +00:00
Brett Cannon 80bb9d92e3 Deprecate the imputil module for removal in 3.0. 2008-05-08 18:15:14 +00:00
Christian Heimes c2ca6db143 Disabled some unit tests for the upcoming release. See #2777 2008-05-06 23:42:58 +00:00
Brett Cannon e5d2cbaeaf Deprecate the audiodev module for 3.0. 2008-05-06 23:23:34 +00:00
Brett Cannon 79618239d1 When testing a module's __all__, we really don't care if it is deprecated. 2008-05-06 23:22:02 +00:00
Christian Heimes af748c3ab8 Implemented PEP 370 2008-05-06 22:41:46 +00:00
Benjamin Peterson d295032910 Fix logic error in Python/_warnings.c and add a test to verify 2008-05-06 22:18:11 +00:00
Brett Cannon e3dcb01bfc Fix a bug in the handling of the stacklevel argument in warnings.warn() where
the stack was being unwound by two levels instead of one each time.
2008-05-06 04:37:31 +00:00
Gregory P. Smith 24237ea8a1 Fix a bug introduced in r62627. see issue2760 and issue2632.
An assertion in readline() would fail as data was already in the
internal buffer even though the socket was in unbuffered read mode.
That case is now handled.  More importantly, read() has been fixed to
not over-recv() and leave newly recv()d data in the _fileobject buffer.

The max() vs min() issue in read() is now gone.  Neither was correct.
On bounded reads, always ask recv() for the exact amount of data we
still need.

Candidate for backporting to release25-maint along with r62627.
2008-05-05 21:53:45 +00:00
Brett Cannon 4b964f9c90 Add the 'json' package. Code taken from simplejson 1.9 and contributed by Bob
Ippolito.

Closes issue #2750.
2008-05-05 20:21:38 +00:00
Martin v. Löwis 5f2e0e5ccb Revert bogus checkin in r62724 to that file. 2008-05-05 17:54:01 +00:00
Martin v. Löwis c3ad68c88a Fix Unicode filename test. 2008-05-05 17:47:06 +00:00
Martin v. Löwis 471617d6d3 Issue #1734346: Support Unicode file names for zipfiles. 2008-05-05 17:16:58 +00:00
Brett Cannon 8a232cc385 Add a DeprecationWarning for when warnings.showwarning() is set to a function
that lacks support for the new 'line' argument.
2008-05-05 05:32:07 +00:00
Benjamin Peterson 979395b7a8 Moved testing of builtin types out of test_builtin and into type specific modules 2008-05-03 21:35:18 +00:00
Amaury Forgeot d'Arc 7684f85297 In test_io, StatefulIncrementalDecoderTest was not part of the test suite.
And of course, the test failed:
a bytearray was used without reason in io.TextIOWrapper.tell().

The difference is that iterating over bytes (i.e. str in python2.6) returns 1-char bytes,
whereas bytearrays yield integers.
This code should still work with python3.0
2008-05-03 12:21:13 +00:00
Brett Cannon 64a4bbeb25 Fix the C implementation of 'warnings' to infer the filename of the module that
raised an exception properly when __file__ is not set, __name__ == '__main__',
and sys.argv[0] is a false value.

Closes issue2743.
2008-05-03 03:19:39 +00:00
Facundo Batista ee340e501d Fixed some test structures. Thanks Mark Dickinson. 2008-05-02 17:39:00 +00:00