[issue5463] Remove deprecated features from struct module

2009-04-29 Thread Andreas Schawo
Andreas Schawo added the comment: I think we're done here. There's only the struct.error to be replaced by OverflowError or TypeError. Do you start the discussion on python-dev? I don't know how to. -- status: pending -> open

[issue5463] Remove deprecated features from struct module

2009-04-16 Thread Andreas Schawo
Andreas Schawo added the comment: Hi Mark, currently there will be no struct.error neither TypeErorr because PyLong_AsLong floors a given float (see my msg84620). The Question is: should I test for long explicitly and raise an error if a different type is given? In this case a test is needed

[issue5463] Remove deprecated features from struct module

2009-04-15 Thread Andreas Schawo
Andreas Schawo added the comment: Hi, could you have a look at cleanup_float_coerce_patch.diff. -- ___ Python tracker <http://bugs.python.org/issue5463> ___ ___

[issue5463] Remove deprecated features from struct module

2009-03-30 Thread Andreas Schawo
Andreas Schawo added the comment: Doesn't took much time. Even nothing happend. PyLong_AsLong trys to convert to int bevor raising an Exception. I'm not sure if struct.pack('l', x) should raise an Exception when a float is given. In case of string there is one. I first

[issue5463] Remove deprecated features from struct module

2009-03-29 Thread Andreas Schawo
Andreas Schawo added the comment: Yes you're right. The TypeError should be an OverflowError. It was just the copy and paste thing. Hm, I also wondering why struct.error is used. But someone already wanted to change this. The patch looks fine. Do you want to go ahead with the float coe

[issue5544] test_fileio fails on windows MSVC Assertion

2009-03-24 Thread Andreas Schawo
Andreas Schawo added the comment: r69214 works with os.close(f.fileno());f.close() (Exception with Errno 9) r69560 does not compile r70152 test_fileio failed (different reason) MSVC Assertion with os.close(f.fileno());f.close() I was not able to use _fileio.c from r69214 in cause of

[issue5544] test_fileio fails on windows MSVC Assertion

2009-03-24 Thread Andreas Schawo
Andreas Schawo added the comment: I stepped back to r70187 and got no assertion. An update to r70349 result in an assertion. So I reverted the changes in test_fileio.py of r70349 and got no assertion. But the test should work without assertion. I tested releases 2.6.1, 3.0.1 and current

[issue5544] test_fileio fails on windows MSVC Assertion

2009-03-23 Thread Andreas Schawo
Andreas Schawo added the comment: I'm afraid your patch doesn't solve it. I got the same popup: Debug Assertion Failed! Program: .\python_d.exe File: f:\dd\vctoools\crt_bld\self_x86\crt\src\close.c Line: 48 Expression: (_osfile(fh) & FOPEN) It failed while running testErrn

[issue5544] test_fileio fials on windows MSVC Assertion

2009-03-23 Thread Andreas Schawo
New submission from Andreas Schawo : test_fileio fails on windows with MSVC "Debug Assertion failed" message since last week. -- components: Tests messages: 84015 nosy: andreas.schawo, pitrou severity: normal status: open title: test_fileio fials on windows MSVC Assertio

[issue5463] Remove deprecated features from struct module

2009-03-23 Thread Andreas Schawo
Changes by Andreas Schawo : Removed file: http://bugs.python.org/file13304/struct_overflow_patch.diff ___ Python tracker <http://bugs.python.org/issue5463> ___ ___ Pytho

[issue5463] Remove deprecated features from struct module

2009-03-23 Thread Andreas Schawo
Andreas Schawo added the comment: I removed definition of _PY_STRUCT_RANGE_CHECKING. The test_standard_integers now expects struct.errors when there are out of range values (should have been part of my last patch). So test_1229380 is now obsolete. -- Added file: http

[issue5463] Remove deprecated features from struct module

2009-03-20 Thread Andreas Schawo
Andreas Schawo added the comment: Ok, heres the patch again. Passed regression tests. Should the version number increase to 0.3? Maybe to reflect there are no more deprecated features. It should then take place after FLOAT_COERCE cleanup. I'm currently trying to figure out whats

[issue5463] Remove deprecated features from struct module

2009-03-18 Thread Andreas Schawo
Andreas Schawo added the comment: I agree with you. A separate patch will do better. In the next days I'm able to provide a new patch with the test_struct cleanup. Currently all tests succeeded on Windows and Linux. So I think no other module relies on this feature explicitly. I'

[issue4228] struct.pack('L', -1)

2009-03-18 Thread Andreas Schawo
Andreas Schawo added the comment: As I understand actually the zipfile module possibly creates damaged zip files after version 2.4 because of '\x00\x00\x00\x00' instead of '\xff\xff\xff\xff' as header offset. But without any error. I think the _struct.c should be cleaned

[issue5463] Compiler warning get_ulong is never used 3.x

2009-03-11 Thread Andreas Schawo
Changes by Andreas Schawo : Removed file: http://bugs.python.org/file13288/get_ulong_patch.diff ___ Python tracker <http://bugs.python.org/issue5463> ___ ___ Python-bug

[issue5463] Compiler warning get_ulong is never used 3.x

2009-03-11 Thread Andreas Schawo
Andreas Schawo added the comment: Hi Mark, I've removed all overflow masking from _struct.c. Running the regression test test_struct failed for test_issue4228 wich I think have to be removed too because it tests the deprecated feature. I've tested the constraints with some valu

[issue5463] Compiler warning get_ulong is never used 3.x

2009-03-09 Thread Andreas Schawo
New submission from Andreas Schawo : When compiling the newest 3.x trunk I've got a compiler warning that get_ulong is defined but never used. I moved the function near the only place where it is used (disabled code). Now I have no more warnings. I don't know if it&#x