[issue3127] Segfault provoked by generators and exceptions
New submission from Aldona Majorek [EMAIL PROTECTED]: Copy of issue 1579370 Programs using generators, exceptions and threads could crash. I was not able to make plain python program to crash, but python program embedded in C++ crashed very reliably. No more crashes after applying patch from 2.5 version stopped helped. I verified that bug and patch on python 2.4.3. Looking at the source code in svn, the same but lurks in latest 2.3 and 2.2 (since generators were introduced). -- components: Interpreter Core messages: 68303 nosy: amajorek, awaters, eric_noyau, klaas, loewis, mwh, nnorwitz, tim_one severity: normal status: open title: Segfault provoked by generators and exceptions type: crash versions: Python 2.2.3, Python 2.3, Python 2.4 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3128] Regex causes python to hang up? / loop infinite?
New submission from André Fritzsche [EMAIL PROTECTED]: After struggling around with my code for nearly 1 hour now, I found out that one of my regular expressions with a special string causes python to hang up - not really hang up, because the processor usage is at nearly 100%, so I think the regex machine is looping infinite. Here is the regex-string: re_exc_line = re.compile ( # ignore everything before the first match r'^.*' + # first group (includes second | third) r'(?:' + # second group (line) (file) r'(?:' + # (text to ignore, line [number]) r'\([^,]+\s*,\s*line\s+(?Pline1\d+)\)' + # any text ([filename]) any text r'.*\((?:(?Pfile1[^)]+))*\).*' + # end of second group r')' + # or r'|' + # third group (file) (line) r'(?:' + # ([filename]) r'\((?:(?Pfile2[^)]+))*\)' + # any text (text to ignore, line [number]) any text r'.*\([^,]+\s*,\s*line\s+(?Pline2\d+)\).*' + # end of third group r')' + # end of first group r')' + # any text after it r'.*$' , re.I ) It should match either the construct: 1. some optional text (text to ignore, line [12]) ([any_filename]) followed by optional text or: 2. some optional text ([any_filename]) (text to ignore, line [12]) followed by optional text If first text matches, it is put into 'line1' and 'file1' and if the second one matches into 'line2' and 'file2' of the groupdict. For the upper both examples everything is ok, but having the following string (I had to change some pathnames, because they contained customer names): msg = ( rError: Error during parsing: invalid syntax + r(D:\Projects\retest\ver_700\lib\_test\test_sapekl.py, line 14) + r-- Error during parsing: invalid syntax + r(D:\projects\retest\ver_700\modules\sapekl\__init__.py, line 21) + r-- Attempted relative import in non-package, or beyond toplevel + rpackage) used with the upper regex: re_exc_line.match(msg) is running for two hours now (on a 3Ghz Machine)! I've attached everything as an example file and hope, I could help you. -- components: Regular Expressions files: re_problem.py messages: 68304 nosy: computercrustie severity: normal status: open title: Regex causes python to hang up? / loop infinite? type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10642/re_problem.py ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3128 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3127] Segfault provoked by generators and exceptions
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: This is right, but there won't be any more 2.4 release. Either apply the patch to your local copy of the sources, or simply upgrade to 2.5. -- nosy: +amaury.forgeotdarc resolution: - out of date status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3128] Regex causes python to hang up? / loop infinite?
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: To optimize your query, you could remove '^.*' and '.*$', and replace match() with search(). Now it returns instantly... -- nosy: +amaury.forgeotdarc ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3128 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3128] Regex causes python to hang up? / loop infinite?
André Fritzsche [EMAIL PROTECTED] added the comment: Thank you for this answer. It solves my problem, but I think that the issues ist still existing - or not? (The regex is running on - 3 hours now) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3128 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3129] struct allows repeat spec. without a format specifier
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) '' struct.pack(3s42, abc) 'abc' (This also happens with unpack*, and pack_into) The attached patch changes the above behavior to the following: struct.pack(12345) struct.error: repeat count given without format specifier struct.pack(3s42, abc) struct.error: repeat count given without format specifier Unit tests are included. The attached patch is built against revision 64324 of the python SVN trunk. Odd behavior observed in both 2.6 (svn r64324), and 2.5.2. (Tested on Ubuntu x86_64 w/ Linux kernel 2.6.24) -- components: Library (Lib) files: patch.p0 messages: 68309 nosy: carrus85 severity: normal status: open title: struct allows repeat spec. without a format specifier type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10643/patch.p0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3129 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3130] In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4.
New submission from Robert Schuppenies [EMAIL PROTECTED]: This issue is a branch from issue3098. Below a summary of the discussion: Antoine Pitrou wrote: It seems that in some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4 if the native int type is itself larger than 32 bits; although the latter is probably quite rare (64-bit platforms are usually either LP64 or LLP64). Marc-Andre Lemburg wrote: AFAIK, only Crays have this problem, but apart from that: I'd consider it a bug if sizeof(Py_UCS4) != 4. Antoine Pitrou wrote: Perhaps a #error can be added to that effect? Something like (untested): #if SIZEOF_INT == 4 typedef unsigned int Py_UCS4; #elif SIZEOF_LONG == 4 typedef unsigned long Py_UCS4; #else #error Could not find a 4-byte integer type for Py_UCS4, aborting #endif Marc-Andre Lemburg wrote: Sounds good ! Python should really try to use uint32_t as fallback solution for UCS4 where available (and uint16_t for UCS2). We'd have to add an AC_TYPE_INT32_T and AC_TYPE_INT16_T check to configure: http://www.gnu.org/software/autoconf/manual/html_node/Particular-Types.html#Particular-Types and could then use typedef uint32_t Py_UCS4 and typedef uint16_t Py_UCS2 Note that the code for supporting UCS2/UCS4 is not really all that clean. It was a quick sprint between Martin and Fredrik and appears to be only half-done... e.g. there currently is no Py_UCS2. -- components: Unicode messages: 68310 nosy: schuppenies severity: normal status: open title: In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4. type: behavior ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3130 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3130] In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4.
Changes by Antoine Pitrou [EMAIL PROTECTED]: -- nosy: +effbot, lemburg, loewis, pitrou ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3130 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3128] Regex causes python to hang up? / loop infinite?
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Are you sure your regexp will return what you want? The best match for the first part of the alternative is (14, D:\projects\retest\ver_700\modules\sapekl\__init__.py, line 21 ) The best match for the second part is (D:\Projects\retest\ver_700\lib\_test\test_sapekl.py, line 14, 21 ) IOW, don't forget that the * operator will first try the longest possible match. Also, there seem to be an extra * here: # any text ([filename]) any text r'.*\((?:(?Pfile1[^)]+))*\).*' + ^ This alone can make the number of combinations explodes. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3128 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3098] sys.sizeof test fails with wide unicode
Robert Schuppenies [EMAIL PROTECTED] added the comment: I followed Marc's advise and checked-in a corrected test. Besides, I opened a new issue to address the fallback solution for UCS4 and UCS2 (see issue3130). -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3098 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3126] Lib/logging/__init__.py assumes its stream has flush and close methods
Vinay Sajip [EMAIL PROTECTED] added the comment: Fix checked into SVN. Thanks for the patch. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3126 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3128] Regex causes python to hang up? / loop infinite?
André Fritzsche [EMAIL PROTECTED] added the comment: Further I was, because the upper listed string wasn't expected for this code (until it occured the first time ;-) ) Normally there has been only one occurence of (file) (.., line) or (.., line) (file) per string, so the regex did quite do what I expected - never the less you are right - instead of the '*' operator I should have used a '?' operator for the repetition. So far many thanks for your recommendations - but the question is if it is ok that a regex may block a process such a long time? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3128 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3128] Regex causes python to hang up? / loop infinite?
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Yes, this can happen. See http://www.regular-expressions.info/catastrophic.html I am sure your regexp belongs to the same category. -- resolution: - invalid status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3128 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3128] Regex causes python to hang up? / loop infinite?
André Fritzsche [EMAIL PROTECTED] added the comment: Thanks for the link, it was very interesting to read what can happen in some circumstances. I think, the first two chapters can match to the problem. So the type of this issue should be feature request ;-) Never the less I learned something new, so the invested time wasn't wasted. Greez ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3128 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2610] string representation of range and dictionary views
Brad Miller [EMAIL PROTECTED] added the comment: On Tue, Jun 17, 2008 at 12:23 AM, Martin v. Löwis [EMAIL PROTECTED] wrote: Martin v. Löwis [EMAIL PROTECTED] added the comment: After reviewing this again, I'm skeptical that this is a good idea. It doesn't achieve its original purpose (anymore), as it only changes tp_str for range objects (although it does change tp_repr for dict views - why this inconsistency?). The reason for the inconsistency is that there was a strong argument that the tp_repr for range already returned something useful that people could take advantage of in their code. The same was not the case for the dict views. I do not understand why you think that having the interpreter display dict_keys: 2, 3, 4, ... when x.keys() is called is not an improvement over dict_keys object at 0xe72b0 Maybe it is just because I spend a lot more time in the interactive interpreter that I see this as a big improvement. So if, as Raymond Hettinger suggests, the interpreter is the right place to make this change I'd still be happy to provide a patch if someone could give me a pointer for where to start looking. Brad So I'm -0 on the patch, meaning that I won't commit it, but won't object to anybody else committing it, either. Technically, in dictview_repr, the first call to PyUnicode_Concat isn't checked for exceptions. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2610 ___ ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3056] Simplify the Integral ABC
Raymond Hettinger [EMAIL PROTECTED] added the comment: Jeffrey, do you have an interest in taking it from here? -- assignee: rhettinger - jyasskin nosy: +jyasskin ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3056 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3131] 2to3 can't find fixes_dir
New submission from Haoyu Bai [EMAIL PROTECTED]: After install Python 3.0 r64319 on my Linux system, running 2to3 given the below error: $ 2to3 hello23.py Traceback (most recent call last): File /usr/bin/2to3, line 5, in module sys.exit(refactor.main(lib2to3/fixes)) File /usr/lib/python3.0/lib2to3/refactor.py, line 81, in main rt = RefactoringTool(fixer_dir, options) File /usr/lib/python3.0/lib2to3/refactor.py, line 160, in __init__ self.pre_order, self.post_order = self.get_fixers() File /usr/lib/python3.0/lib2to3/refactor.py, line 180, in get_fixers fix_names = get_all_fix_names(self.fixer_dir) File /usr/lib/python3.0/lib2to3/refactor.py, line 95, in get_all_fix_names names = os.listdir(fixer_dir) OSError: [Errno 2] No such file or directory: 'lib2to3/fixes' -- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 68319 nosy: bhy, collinwinter severity: normal status: open title: 2to3 can't find fixes_dir ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3078] tokenize.py improvements
Aristotelis Mikropoulos [EMAIL PROTECTED] added the comment: So, will this patch be applied? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1778443] robotparser.py fixes
Aristotelis Mikropoulos [EMAIL PROTECTED] added the comment: Is the patch, now, in an acceptable format? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1778443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1778443] robotparser.py fixes
Benjamin Peterson [EMAIL PROTECTED] added the comment: Skip, are you still maintaining this? -- assignee: - skip.montanaro nosy: +skip.montanaro ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1778443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1778443] robotparser.py fixes
Aristotelis Mikropoulos [EMAIL PROTECTED] added the comment: Yes, why not? Actually, I am the original author of the patch, but I changed my username like I said above (in a previous post). ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1778443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1778443] robotparser.py fixes
Aristotelis Mikropoulos [EMAIL PROTECTED] added the comment: Oh, I am sorry, I thought you were talking to me. Excuse me. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1778443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3078] tokenize.py improvements
Raymond Hettinger [EMAIL PROTECTED] added the comment: Sorry, I don't see any value in this kind of patch. The line contline = += line is broken. The += transformations and else-clause eliminations trivially re-arrange code without any real savings. The while 1 to while True transformation should not be done in Py2.x because the latter is much slower (while True requires loading a global variable and a test; in contrast, while 1 is optimized to an unconditional jump. -- nosy: +rhettinger resolution: - rejected status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1778443] robotparser.py fixes
Raymond Hettinger [EMAIL PROTECTED] added the comment: These changes mostly look fine but shouldn't go it until after the beta. This is really the wrong time in the release cycle to be making minor spacing changes and making it harder to get a meaningful svn ann. BTW, the first change should go the distance and use map() instead of a list comprehension: lines = map(str.strip, f) -- nosy: +rhettinger priority: normal - low versions: +Python 2.6 -Python 2.5 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1778443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1778443] robotparser.py fixes
Aristotelis Mikropoulos [EMAIL PROTECTED] added the comment: OK ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1778443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Jesse Noller [EMAIL PROTECTED] added the comment: I believe this is a Linux-specific problem relating to chroot jails missing the /dev/shm filesystem. I am suggesting we skip the test for now if /dev/shm does not exist, via: if (sys.platform.startswith(linux): if not os.path.exists(/dev/shm): raise TestSkipped(Missing required /dev/shm device on Linux!) at the top of test_multiprocessing.py Anyone see a problem with this? -- nosy: +Rhamphoryncus, benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2931] optparse: various problems with unicode and gettext
Sam Pablo Kuper [EMAIL PROTECTED] added the comment: Using non-ASCII characters in an optparse help string also causes UnicodeDecodeErrors. Here's the relevant part of the traceback: File /home/spk30/opt/ActivePython-2.5/lib/python2.5/optparse.py, line 1655, in print_help file.write(self.format_help().encode(encoding, replace)) NB. Adding an encoding declaration at the beginning of the python script which used a non-ASCII character in an optparse help string didn't solve the problem. -- nosy: +sampablokuper versions: +Python 2.5 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3110] Multiprocessing package build problem on Solaris 10
Skip Montanaro [EMAIL PROTECTED] added the comment: Jesse Per skip's email: Jesse FWIW, it appears that Solaris doesn't define SEM_VALUE_MAX but does Jesse define Jesse _SEM_VALUE_MAX in sys/params.h. ... Thanks for submitting the bug report. I wonder why the processing module installs on Solaris10 but multiprocessing fails to compile. Did the SEM_VALUE_MAX code change between the two variants? Skip ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3118] test_math fails on 64bit
Mark Dickinson [EMAIL PROTECTED] added the comment: I suspect that what's happening is that errno is being set to ERANGE on a subnormal results; this is somewhat ... um ... unorthodox. In that case, the fix would be to raise OverflowError when errno is set to ERANGE and the function result x is larger than 1, say, in absolute value. (Currently the code ignores errno=ERANGE only when x == 0.) Could someone with access to ia64 hardware test the attached patch? -- keywords: +patch nosy: +marketdickinson Added file: http://bugs.python.org/file10644/math_64.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3056] Simplify the Integral ABC
Guido van Rossum [EMAIL PROTECTED] added the comment: Raymond, mind if we roll back your previous (incorrect) changes? They really should not have been submitted in the first place. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3056 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3056] Simplify the Integral ABC
Raymond Hettinger [EMAIL PROTECTED] added the comment: No problem. Whatever you think is best. Still hoping that Jeffrey can take a look at the mixin approach and the __rand__ logic. No one else seems to have an interest and I won't have time to write the tests for a few days (they are complicated because Integral requires so many abstract methods to be defined before it will instantiate). ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3056 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Adam Olsen [EMAIL PROTECTED] added the comment: I don't see a problem with skipping it, but if chroot is the problem, maybe the chroot environment should be fixed to include /dev/shm? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Jesse Noller [EMAIL PROTECTED] added the comment: I agree, fixing the chroot is the long-term solution, however this gets us over the beta hump ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.6 (modifications to current re 2.2.2)
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: Well, it's time for another update on my progress... Some good news first: Atomic Grouping is now completed, tested and documented, and as stated above, is classified as issue2636-01 and related patches. Secondly, with caveats listed below, Named Match Group Attributes on a match object (item 2) is also more or less complete at issue2636-02 -- it only lacks documentation. Now, I want to also update my list of items. We left off at 11: Other Perl-specific modifications. Since that time, I have spawned a number of other branches, the first of which (issue2636-12) I am happy to announce is also complete! 12) Implement the changes to the documentation of re as per Jim J. Jewett suggestion from 2008-04-24 14:09. Again, this has been done. 13) Implement a grouptuples(...) method as per Mark Summerfield's suggest on 2008-05-28 09:38. grouptuples would take the same filtering parameters as the other group* functions, and would return a list of 3- tuples (unless only 1 group was requested). It should default to all match groups (1..n, not group 0, the matching string). 14) As per PEP-3131 and the move to Python 3.0, python will begin to allow full UNICODE-compliant identifier names. Correspondingly, it would be the responsibility of this item to allow UNICODE names for match groups. This would allow retrieval of UNICODE names via the group* functions or when combined with Item 3, the getitem handler (m[u'...']) (03+14) and the attribute name itself (e.g. getattr(m, u'...')) when combined with item 2 (02+14). 15) Change the Pattern_Type, Match_Type and Scanner_Type (experimental) to become richer Python Types. Specifically, add __doc__ strings to each of these types' methods and members. 16) Implement various FIXMEs. 16-1) Implement the FIXME such that if m is a MatchObject, del m.string will disassociate the original matched string from the match object; string would be the only member that would allow modification or deletion and you will not be able to modify the m.string value, only delete it. - Finally, I want to say a couple notes about Item 2: Firstly, as noted in Item 14, I wish to add support for UNICODE match group names, and the current version of the C-code would not allow that; it would only make sense to add UNICODE support if 14 is implemented, so adding support for UNICODE match object attributes would depend on both items 2 and 14. Thus, that would be implemented in issue2636-02+14. Secondly, there is a FIXME which I discussed in Item 16; I gave that problem it's own item and branch. Also, as stated in Item 15, I would like to add more robust help code to the Match object and bind __doc__ strings to the fixed attributes. Although this would not directly effect the Item 2 implementation, it would probably involve moving some code around in its vicinity. Finally, I would like suggestions on how to handle name collisions when match group names are provided as attributes. For instance, an expression like '(?Ppos.*)' would match more or less any string and assign it to the name pos. But pos is already an attribute of the Match object, and therefore pos cannot be exposed as a named match group attribute, since match.pos will return the usual meaning of pos for a match object, not the value of the capture group names pos. I have 3 proposals as to how to handle this: a) Simply disallow the exposure of match group name attributes if the names collide with an existing member of the basic Match Object interface. b) Expose the reserved names through a special prefix notation, and for forward compatibility, expose all names via this prefix notation. In other words, if the prefix was 'k', match.kpos could be used to access pos; if it was '_', match._pos would be used. If Item 3 is implemented, it may be sufficient to allow access via match['pos'] as the canonical way of handling match group names using reserved words. c) Don't expose the names directly; only expose them through a prefixed name, e.g. match._pos or match.kpos. Personally, I like a because if Item 3 is implemented, it makes a fairly useful shorthand for retrieving keyword names when a keyword is used for a name. Also, we could put a deprecation warning in to inform users that eventually match groups names that are keywords in the Match Object will eventually be disallowed. However, I don't support restricting the match group names any more than they already are (they must be a valid python identifier only) so again I would go with a) and nothing more and that's what's implemented in issue2636-02.patch. - Now, rather than posting umteen patch files I am posting one bz2- compressed tar of ALL patch files for all threads, where each file is of the form: issue2636(-\d\d|+\d\d)*(-only)?.patch For instance, issue2636-01.patch is the p1 patch that is a difference between the current Python trunk
[issue2636] Regexp 2.6 (modifications to current re 2.2.2)
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10052/issue2636-09.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.6 (modifications to current re 2.2.2)
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10467/issue2636.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.6 (modifications to current re 2.2.2)
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10428/issue2636-05-only.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.6 (modifications to current re 2.2.2)
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10468/issue2636-05.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.6 (modifications to current re 2.2.2)
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10469/issue2636-07.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.6 (modifications to current re 2.2.2)
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10470/issue2636-07-only.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue433030] SRE: Atomic Grouping (?...) is not supported
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: I have finished work on the Atomic Grouping / Possessive Qualifiers support and am including a patch to achieve this; however, http://bugs.python.org/issue2636 should be consulted for the complete list of changes in the works for the Regexp engine. -- keywords: +patch Added file: http://bugs.python.org/file10646/issue2636-01.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue433030 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue433030] SRE: Atomic Grouping (?...) is not supported
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9897/PyLibDiffs.txt ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue433030 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Adam Olsen [EMAIL PROTECTED] added the comment: I agree with your agreement. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.6 (modifications to current re 2.2.2)
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: Sorry, as I stated in the last post, I generated the patches then realized that I was missing the documentation for Item 2, so I have updated the issue2636-02.patch file and am attaching that separately until the next release of the patch tarball. issue2636-02-only.patch should be ignored and I will only regenerate it with the correct documentation in the next tarball release so I can move on to either Character Classes or Relative Back-references. I wanna pause Item 3 for the moment because 2, 3, 13, 14, 15 and 16 all seem closely related and I need a break to allow my mind to wrap around the big picture before I try and tackle each one. Added file: http://bugs.python.org/file10647/issue2636-02.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Benjamin Peterson [EMAIL PROTECTED] added the comment: Jesse, I say go ahead and make it so. I think you should make another report thought to keep track of getting /dev/shm in the buildbot enviroment. (Is that a buildbot bug?) -- assignee: - jnoller ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3118] test_math fails on 64bit
Mark Dickinson [EMAIL PROTECTED] added the comment: I further suspect that no-one with access to ia64 is monitoring this issue. :-) So maybe this should just be checked in, and then reverted if it either causes other buildbots to fail or doesn't help with Ubuntu/ia64. Benjamin, are you in a position to verify that the patch looks sane and/or test it on Windows? It works for me on OS X 10.5/Intel and SuSE Linux/x86. I'm reasonably confident that the patch shouldn't break anything on already-working platforms, but with floating-point stuff it's always hard to be 100% certain. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3004] Bug in slice.indices()
Mark Dickinson [EMAIL PROTECTED] added the comment: Could you provide some tests for the fixed behaviour? I'll try to check this in (with appropriate tests) after the beta. -- assignee: - marketdickinson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3118] test_math fails on 64bit
Benjamin Peterson [EMAIL PROTECTED] added the comment: It looks fine to me. Please apply. -- assignee: - marketdickinson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3118] test_math fails on 64bit
Mark Dickinson [EMAIL PROTECTED] added the comment: Committed, r64349. I'm watching the buildbots. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3118] test_math fails on 64bit
Benjamin Peterson [EMAIL PROTECTED] added the comment: On Tue, Jun 17, 2008 at 4:17 PM, Mark Dickinson [EMAIL PROTECTED] wrote: Mark Dickinson [EMAIL PROTECTED] added the comment: Committed, r64349. I'm watching the buildbots. You can bet I am, too. :) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2610] string representation of range and dictionary views
Martin v. Löwis [EMAIL PROTECTED] added the comment: I do not understand why you think that having the interpreter display dict_keys: 2, 3, 4, ... when x.keys() is called is not an improvement over dict_keys object at 0xe72b0 I didn't say that the change in dict_keys is not an improvement, but that the patch doesn't achieve its objective anymore, which was to display range() nicely at the interactive prompt. Maybe it is just because I spend a lot more time in the interactive interpreter that I see this as a big improvement. So do I. But I typically display the dictionary itself when looking at it in an interactive prompt; I would not normally look at .keys(), except when I want to know what all the keys in the dictionary are, in which case the new repr won't help, either (and I will have to apply list() in 3.0, or, rather, sorted()) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3132] implement PEP 3118 struct changes
New submission from Benjamin Peterson [EMAIL PROTECTED]: It seems the new modifiers to the struct.unpack/pack module that were proposed in PEP 3118 haven't been implemented yet. -- assignee: teoliphant messages: 68347 nosy: benjamin.peterson, teoliphant priority: critical severity: normal status: open title: implement PEP 3118 struct changes type: feature request versions: Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3118] test_math fails on 64bit
Benjamin Peterson [EMAIL PROTECTED] added the comment: Thanks Mark. That seems to have done the trick. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Benjamin Peterson [EMAIL PROTECTED] added the comment: I committed the skip in r64356. Let's sit back and watch. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Jesse Noller [EMAIL PROTECTED] added the comment: Did you add the import and fix the syntax error On Jun 17, 2008, at 6:44 PM, Benjamin Peterson [EMAIL PROTECTED] wrote: Benjamin Peterson [EMAIL PROTECTED] added the comment: I committed the skip in r64356. Let's sit back and watch. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Benjamin Peterson [EMAIL PROTECTED] added the comment: 1 for 2. :) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Jesse Noller [EMAIL PROTECTED] added the comment: I apologize, I should have just posted the diff On Jun 17, 2008, at 7:00 PM, Benjamin Peterson [EMAIL PROTECTED] wrote: Benjamin Peterson [EMAIL PROTECTED] added the comment: 1 for 2. :) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error
Benjamin Peterson [EMAIL PROTECTED] added the comment: On Tue, Jun 17, 2008 at 6:08 PM, Jesse Noller [EMAIL PROTECTED] wrote: Jesse Noller [EMAIL PROTECTED] added the comment: I apologize, I should have just posted the diff It's not your fault. I'm impatient. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2931] optparse: various problems with unicode and gettext
Alexey Shamrin [EMAIL PROTECTED] added the comment: sampablokuper, I don't think your problem is relevant to this issue. In addition to encoding declaration you should use unicode strings: uyour non-ASCII text. Or wait for Python 3.0, where strings will be unicode by default. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2138] Add a factorial function
Mark Dickinson [EMAIL PROTECTED] added the comment: It looks like there's a refcounting bug in the code: if the call to PyNumber_Multiply fails then iobj gets DECREF'd twice. This means that a keyboard interrupt of factorial() can exit the interpreter: Python 2.6a3+ (trunk:64341M, Jun 17 2008, 13:19:01) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type help, copyright, credits or license for more information. from math import factorial [36374 refs] factorial(10**9) ^CFatal Python error: /Users/dickinsm/python_source/trunk/Modules/mathmodule.c:562 object at 0x81f63c has negative ref count -1 Abort trap ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1778443] robotparser.py fixes
Skip Montanaro [EMAIL PROTECTED] added the comment: I suppose I'm as good a person to continue maintaining this as any, though my time is largely spent doing other stuff these days. The patch doesn't apply cleanly right now and lots of the changes it suggests have been made already (or done in slightly different ways). I've attached a simplified patch which takes care of the only two changes I see which seem to still be worthwhile. Assigning to Benjamin and changing resolution to remind so he can either apply himself when the time is right or toss it back to me. (I apologize, but I am not intimately tuned into the alpha/beta release process at the moment.) Skip -- assignee: skip.montanaro - benjamin.peterson resolution: - remind Added file: http://bugs.python.org/file10648/rb.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1778443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1778443] robotparser.py fixes
Changes by Skip Montanaro [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file8179/robotparser.py.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1778443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1778443] robotparser.py fixes
Changes by Skip Montanaro [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10617/robotparser.py.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1778443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2931] optparse: various problems with unicode and gettext
Sam Pablo Kuper [EMAIL PROTECTED] added the comment: ash, you are correct; my bad. Thanks for the heads-up. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com