[issue5463] Remove deprecated features from struct module

2009-07-04 Thread Mark Dickinson
Mark Dickinson added the comment: The trunk warning was squashed in r73004. -- status: open -> closed ___ Python tracker ___ ___ Pytho

[issue5463] Remove deprecated features from struct module

2009-04-29 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, there should probably be a python-dev discussion. I'll add it to my list of things to do, if you like! And I still have to deal with the original compiler warning that started it all in trunk... -- ___ Python

[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 ___ Python tracker

[issue5463] Remove deprecated features from struct module

2009-04-19 Thread Mark Dickinson
Changes by Mark Dickinson : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue5463] Remove deprecated features from struct module

2009-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: That should be r71754, of course. -- status: pending -> open ___ Python tracker ___ ___ Python-bugs-

[issue5463] Remove deprecated features from struct module

2009-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: Committed part 3 in r71755. Thank you! Is there anything else you think we need to fix up here? -- resolution: -> accepted stage: test needed -> committed/rejected status: open -> pending ___ Python tracker

[issue5463] Remove deprecated features from struct module

2009-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: Here's an updated version of your patch: all I've done is fix up get_(u)long, get_(u)longlong and get_pylong so that they only accept integers. -- Added file: http://bugs.python.org/file13722/cleanup_float_coerce_patch_v2.diff ___

[issue5463] Remove deprecated features from struct module

2009-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. In 3.0 and 2.7, I get: >>> from struct import pack >>> pack('L', 123.0) sys:1: DeprecationWarning: integer argument expected, got float b'{\x00\x00\x00' So it looks like we already changed py3k to get rid of the DeprecationWarning. I think the idea was

[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 Mark Dickinson
Changes by Mark Dickinson : -- stage: patch review -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5463] Remove deprecated features from struct module

2009-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: The _struct.c part of the patch looks good. For the tests, there should be some tests to check that attempting to pack a float with an integer format gives either TypeError or struct.error. Thanks! -- ___ Python tr

[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 ___ ___ Python-

[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 did PyLong_Check the pa

[issue5463] Remove deprecated features from struct module

2009-03-29 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks again, Andreas. Applied in r70688. There's no particular hurry on removing the float coercion, except that I'd like to get it in before the first 3.1 beta. -- ___ Python tracker

[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 coercion

[issue5463] Remove deprecated features from struct module

2009-03-28 Thread Mark Dickinson
Changes by Mark Dickinson : -- priority: -> normal stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue5463] Remove deprecated features from struct module

2009-03-28 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file13441/cleanup_range_check_patch2.diff ___ Python tracker ___ ___ Python-bu

[issue5463] Remove deprecated features from struct module

2009-03-28 Thread Mark Dickinson
Mark Dickinson added the comment: Oops. Out-of-date version of the diff. Here's the right one. -- Added file: http://bugs.python.org/file13443/cleanup_range_check_patch2.diff ___ Python tracker __

[issue5463] Remove deprecated features from struct module

2009-03-28 Thread Mark Dickinson
Mark Dickinson added the comment: I've messed with your patch a bit more. :) Here's the latest version. Apart from the things I mentioned earlier, test_struct was failing on 64-bit machines with your original patch; I think that's fixed now. I also updated the docs. Does this version loo

[issue5463] Remove deprecated features from struct module

2009-03-27 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch. A couple of questions and comments: (1) at line 300-ish of test_struct, should (struct.error, TypeError) be (struct.error, OverflowError)? I don't think out-of-range values should be raising TypeError. If they are, perhaps we should c

[issue5463] Remove deprecated features from struct module

2009-03-23 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[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 ___ ___ Python-bugs-li

[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://bugs.python.org

[issue5463] Remove deprecated features from struct module

2009-03-21 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks! Committed your patch in r70497. I think _PY_STRUCT_RANGE_CHECKING can also be removed from the module and the tests (treated as though it's 1 throughout). In theory there could be people using it, but it's not documented and the leading underscore i

[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 about _PY_STR

[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've already ch

[issue5463] Remove deprecated features from struct module

2009-03-18 Thread Mark Dickinson
Mark Dickinson added the comment: I think you're right about issue 4228: we should go ahead and clean up the struct module anyway. As far as I can tell, only the Python 2.5 zipfile module is using the deprecated behaviour. The _struct.c portion of your patch looks fine. I think there's still