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
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
Andreas Schawo added the comment:
Hi,
could you have a look at cleanup_float_coerce_patch.diff.
--
___
Python tracker
<http://bugs.python.org/issue5463>
___
___
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
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
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
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
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
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
Changes by Andreas Schawo :
Removed file: http://bugs.python.org/file13304/struct_overflow_patch.diff
___
Python tracker
<http://bugs.python.org/issue5463>
___
___
Pytho
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
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
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'
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
Changes by Andreas Schawo :
Removed file: http://bugs.python.org/file13288/get_ulong_patch.diff
___
Python tracker
<http://bugs.python.org/issue5463>
___
___
Python-bug
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
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
17 matches
Mail list logo