[issue3129] struct allows repeat spec. without a format specifier

2010-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue3129] struct allows repeat spec. without a format specifier

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: I don't think it's a good idea to make a change like this in a bugfix release, since it could break existing code (though admittedly code that probably isn't doing anything useful). It's not a huge thing: both the risk and the gain from making the change are

[issue3129] struct allows repeat spec. without a format specifier

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is borderline enough that I am not comfortable making a call. If anyone speaks in support of backporting I'll do it. For 2.7 or 2.7.1. -- status: closed -> pending ___ Python tracker

[issue3129] struct allows repeat spec. without a format specifier

2010-06-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you think of this as this as a bug fix, it could go into 2.7.1. If you think of it as an ambiguity elimination that should only go into a new version, fine with me. My main concern is getting 3.2 as clear, clear, and consistent as possible. Thanks for fini

[issue3129] struct allows repeat spec. without a format specifier

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: py3k patch committed (by Alexander) in r81895. Closing this; I would ideally like to see this change go into trunk too, but it's not essential and we're too close to the 2.7 release. -- resolution: accepted -> fixed status: open -> closed _

[issue3129] struct allows repeat spec. without a format specifier

2010-06-11 Thread Mark Dickinson
Mark Dickinson added the comment: On second thoughts, I think I *would* like to see this backported to 2.7. Not to the maintenance branches, though. -- ___ Python tracker ___ _

[issue3129] struct allows repeat spec. without a format specifier

2010-06-11 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: mark.dickinson -> belopolsky resolution: -> accepted ___ Python tracker ___ ___ Python-bugs-l

[issue3129] struct allows repeat spec. without a format specifier

2010-06-11 Thread Mark Dickinson
Mark Dickinson added the comment: Patch looks great! Please apply (with suitable Misc/NEWS entry). Since the bug is fairly harmless, I think it's fine just to apply this to py3k, and not to backport to 2.x or to 3.1. I also noticed some dependence on undefined behaviour in prepare_s, but I

[issue3129] struct allows repeat spec. without a format specifier

2010-06-11 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch; I'll take a look. -- assignee: belopolsky -> mark.dickinson nosy: +mark.dickinson ___ Python tracker ___ _

[issue3129] struct allows repeat spec. without a format specifier

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17624/issue3129.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue3129] struct allows repeat spec. without a format specifier

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch works and passes the tests. The failing test was clearly wrong. I am still not sure that it is right to raise TypeError rather than struct.error on invalid offset in pack_into, but this is a separate issue. -- Added file: http:/

[issue3129] struct allows repeat spec. without a format specifier

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching an updated patch, but it fails one of the old tests. Need to investigate this some more. -- resolution: accepted -> Added file: http://bugs.python.org/file17624/issue3129.diff ___ Python track

[issue3129] struct allows repeat spec. without a format specifier

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looks reasonable to me as well. Code patch applies cleanly, but tests don't. I'll get it ready for commit. -- assignee: -> belopolsky nosy: +belopolsky resolution: -> accepted versions: -Python 2.6, Python 2.7, Python 3.1 __

[issue3129] struct allows repeat spec. without a format specifier

2010-06-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: I verified that 3.1 has same behavior. Doc says format strings "are built up from format characters" which "may be preceded by an integral repeat count". So I agree that such formats are bugs that should be reported and that ignoring repeat counts of nothing

[issue3129] struct allows repeat spec. without a format specifier

2008-06-17 Thread Caleb Deveraux
New submission from Caleb Deveraux <[EMAIL PROTECTED]>: I'm not exactly sure if this is a bug or by design. Within the struct module, whenever you provide a format string containing a repeat count with no associated format specifier, the count is silently ignored. eg. >>> struct.pack("12345")