Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix possible undefined behaviour from signed overflow in struct module. | Mark Dickinson | 2010-06-11 | 1 | -0/+6 |
| | | | | Backport of revisions 81897, 81898 and 81902 from py3k. | ||||
* | Issue #8300 (__index__ handling in struct.pack): Remove redundant check | Mark Dickinson | 2010-04-04 | 1 | -10/+27 |
| | | | | and improve test coverage. Thanks Meador Inge for the patch. | ||||
* | Use more specific assert* methods in test_struct. | Ezio Melotti | 2010-04-04 | 1 | -8/+8 |
| | |||||
* | Issue #8300: Let struct.pack use __index__ to convert and pack non-integers. | Mark Dickinson | 2010-04-03 | 1 | -0/+18 |
| | | | | Based on a patch by Meador Inge. | ||||
* | Cleanup test_struct using check_warnings. | Florent Xicluna | 2010-03-20 | 1 | -68/+50 |
| | |||||
* | Issue #1530559: When packing a non-integer with any integer conversion | Mark Dickinson | 2010-03-07 | 1 | -22/+47 |
| | | | | | | | | | code using struct.pack, attempt to convert to an integer first using the argument's __int__ method (if present). Also raise a DeprecationWarning for any such usage of __int__. This fixes a regression from 2.6, where some (but not all) integer conversion codes already used __int__. | ||||
* | Fix incorrect stacklevel for DeprecationWarnings originating from the struct ↵ | Mark Dickinson | 2010-03-05 | 1 | -36/+15 |
| | | | | | | | module. Also clean up related tests in test_struct. The stacklevel fix should be backported to 2.6 once that branch is unfrozen. | ||||
* | Remove unused imports in test modules. | Georg Brandl | 2010-02-07 | 1 | -1/+1 |
| | |||||
* | Reverting the Revision: 77368. I committed Flox's big patch for tests by | Senthil Kumaran | 2010-01-08 | 1 | -6/+2 |
| | | | | mistake. ( It may come in for sure tough) | ||||
* | Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵ | Senthil Kumaran | 2010-01-08 | 1 | -2/+6 |
| | | | | Patch by flox | ||||
* | Issue #1523: Remove deprecated overflow masking in struct module, and | Mark Dickinson | 2009-07-07 | 1 | -19/+1 |
| | | | | make sure that out-of-range values consistently raise struct.error. | ||||
* | Expand test coverage for struct.pack with native integer packing; | Mark Dickinson | 2009-07-07 | 1 | -170/+107 |
| | | | | reorganize the test_struct module to remove duplicated code and tests. | ||||
* | Add skipping to struct test that only applies when overflow masking is in effect | Mark Dickinson | 2009-07-07 | 1 | -0/+2 |
| | |||||
* | Issues #1530559, #1741130: Fix various inconsistencies in struct.pack | Mark Dickinson | 2009-07-05 | 1 | -25/+26 |
| | | | | integer packing, and reenable some previously broken tests. | ||||
* | convert usage of fail* to assert* | Benjamin Peterson | 2009-06-30 | 1 | -2/+2 |
| | |||||
* | The unittest.TestCase.assertEqual() now displays the differences in lists, | Gregory P. Smith | 2009-03-31 | 1 | -0/+1 |
| | | | | | | | | | | tuples, dicts and sets on failure. Many new handy type and comparison specific assert* methods have been added that fail with error messages actually useful for debugging. Contributed in by Google and completed with help from mfoord and GvR at PyCon 2009 sprints. Discussion lives in http://bugs.python.org/issue2578. | ||||
* | #3694: add test for fix committed in r66693. | Georg Brandl | 2009-02-13 | 1 | -0/+4 |
| | |||||
* | Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError for | Mark Dickinson | 2009-02-10 | 1 | -2/+2 |
| | | | | | | negative arguments. Previously, it raised TypeError. Thanks Lisandro Dalcin. | ||||
* | #4228: Pack negative values the same way as 2.4 | Georg Brandl | 2009-01-01 | 1 | -0/+7 |
| | | | | in struct's L format. | ||||
* | warnings.catch_warnings() now returns a list or None instead of the custom | Brett Cannon | 2008-09-09 | 1 | -2/+2 |
| | | | | | | | | WarningsRecorder object. This makes the API simpler to use as no special object must be learned. Closes issue 3781. Review by Benjamin Peterson. | ||||
* | Fix bug 3625: test issues on 64bit windows. r=pitrou | Mark Hammond | 2008-08-23 | 1 | -1/+1 |
| | |||||
* | Make test.test_support.catch_warnings more robust as discussed on ↵ | Nick Coghlan | 2008-07-13 | 1 | -7/+4 |
| | | | | python-dev. Also add explicit tests for itto test_warnings. | ||||
* | silence the test when it is skipped on some platforms. should fix a | Gregory P. Smith | 2008-06-14 | 1 | -4/+2 |
| | | | | buildbot. | ||||
* | Merge in release25-maint r60793: | Gregory P. Smith | 2008-06-11 | 1 | -0/+8 |
| | | | | | | Added checks for integer overflows, contributed by Google. Some are only available if asserts are left in the code, in cases where they can't be triggered from Python code. | ||||
* | convert test_struct to a unittest thanks to Giampaolo Rodola | Benjamin Peterson | 2008-06-11 | 1 | -624/+524 |
| | | | | | I had to disable one test because it was functioning incorrectly, see #1530559 I also removed the debugging prints | ||||
* | Issue 705836: Fix struct.pack(">f", 1e40) to behave consistently | Mark Dickinson | 2008-03-14 | 1 | -1/+1 |
| | | | | | | | | | | across platforms: it should now raise OverflowError on all platforms. (Previously it raised OverflowError only on non IEEE 754 platforms.) Also fix the (already existing) test for this behaviour so that it actually raises TestFailed instead of just referencing it. | ||||
* | Issue 1872: Changed the struct module typecode from 't' to '?', for | Thomas Heller | 2008-03-05 | 1 | -14/+14 |
| | | | | compatibility with PEP3118. | ||||
* | Remove test.test_support.guard_warnings_filter. | Brett Cannon | 2007-08-14 | 1 | -1/+1 |
| | | | | | | | | test.test_support.catch_warning is more full-featured and provides the same functionality. Since guard_warnings_filter was added in 2.6 there is no backwards-compatibility issues. | ||||
* | Bug #1563759: struct.unpack doens't support buffer protocol objects | Raymond Hettinger | 2007-04-05 | 1 | -0/+8 |
| | |||||
* | Whitespace normalization. | Tim Peters | 2007-01-30 | 1 | -49/+49 |
| | |||||
* | Patch #1610575: Add support for _Bool to struct. | Martin v. Löwis | 2007-01-21 | 1 | -7/+61 |
| | |||||
* | Add test.test_support.guard_warnings_filter . This function returns a context | Brett Cannon | 2006-12-13 | 1 | -15/+10 |
| | | | | | manager that protects warnings.filter from being modified once the context is exited. | ||||
* | Fix #1530559, struct.pack raises TypeError where it used to convert. | Bob Ippolito | 2006-08-04 | 1 | -26/+69 |
| | | | | | Passing float arguments to struct.pack when integers are expected now triggers a DeprecationWarning. | ||||
* | Access _struct attributes directly instead of mucking with getattr. | Tim Peters | 2006-06-05 | 1 | -20/+18 |
| | | | | | | | | | | string_reverse(): Simplify. assertRaises(): Raise TestFailed on failure. test_unpack_from(), test_pack_into(), test_pack_into_fn(): never use `assert` to test for an expected result (it doesn't test anything when Python is run with -O). | ||||
* | Fixes in struct and socket from merge reviews. | Martin Blais | 2006-06-04 | 1 | -13/+13 |
| | | | | | | | | | | | | | - Following Guido's comments, renamed * pack_to -> pack_into * recv_buf -> recv_into * recvfrom_buf -> recvfrom_into - Made fixes to _struct.c according to Neal Norwitz comments on the checkins list. - Converted some ints into the appropriate -- I hope -- ssize_t and size_t. | ||||
* | Whitespace normalization. | Tim Peters | 2006-06-04 | 1 | -2/+1 |
| | |||||
* | Fixed struct test to not use unittest. | Martin Blais | 2006-06-02 | 1 | -78/+84 |
| | |||||
* | On 64-bit platforms running test_struct after test_tarfile would fail | Neal Norwitz | 2006-05-31 | 1 | -0/+6 |
| | | | | since the deprecation warning wouldn't be raised. | ||||
* | Change wrapping terminology to overflow masking | Bob Ippolito | 2006-05-30 | 1 | -3/+3 |
| | |||||
* | deprecated_err(): Stop bizarre warning messages when the tests | Tim Peters | 2006-05-30 | 1 | -2/+6 |
| | | | | | | | | | | | are run in the order: test_genexps (or any other doctest-based test) test_struct test_doctest The `warnings` module needs an advertised way to save/restore its internal filter list. | ||||
* | struct: modulo math plus warning on all endian-explicit formats for ↵ | Bob Ippolito | 2006-05-29 | 1 | -11/+36 |
| | | | | compatibility with older struct usage (ugly) | ||||
* | Fix up struct docstrings, add struct.pack_to function for symmetry | Bob Ippolito | 2006-05-27 | 1 | -0/+22 |
| | |||||
* | enable all of the struct tests, use ssize_t, fix some whitespace | Bob Ippolito | 2006-05-26 | 1 | -1/+1 |
| | |||||
* | fix #1229380 No struct.pack exception for some out of range integers | Bob Ippolito | 2006-05-26 | 1 | -3/+5 |
| | |||||
* | Whitespace normalization. | Tim Peters | 2006-05-26 | 1 | -2/+1 |
| | |||||
* | Support for buffer protocol for socket and struct. | Martin Blais | 2006-05-26 | 1 | -25/+60 |
| | | | | | | | | | | * Added socket.recv_buf() and socket.recvfrom_buf() methods, that use the buffer protocol (send and sendto already did). * Added struct.pack_to(), that is the corresponding buffer compatible method to unpack_from(). * Fixed minor typos in arraymodule. | ||||
* | refactor unpack, add unpack_from | Bob Ippolito | 2006-05-24 | 1 | -0/+41 |
| | |||||
* | Patch #1011240: SystemError generated by struct.pack('P', 'foo'). | Armin Rigo | 2004-09-27 | 1 | -0/+1 |
| | |||||
* | Replace backticks with repr() or "%r" | Walter Dörwald | 2004-02-12 | 1 | -9/+9 |
| | | | | From SF patch #852334. | ||||
* | SF bug 705836: struct.pack of floats in non-native endian order | Tim Peters | 2003-03-20 | 1 | -0/+46 |
| | | | | | | | | | | | | | | pack_float, pack_double, save_float: All the routines for creating IEEE-format packed representations of floats and doubles simply ignored that rounding can (in rare cases) propagate out of a long string of 1 bits. At worst, the end-off carry can (by mistake) interfere with the exponent value, and then unpacking yields a result wrong by a factor of 2. In less severe cases, it can end up losing more low-order bits than intended, or fail to catch overflow *caused* by rounding. Bugfix candidate, but I already backported this to 2.2. In 2.3, this code remains in severe need of refactoring. |