[issue2027] Module containing C implementations of common text algorithms

2008-02-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I don't think that this should be part of the core standard library. Did you look at the TextIndexNG project? http://opensource.zopyx.com/projects/TextIndexNG3/ -- nosy: +amaury.forgeotdarc __ Tracker [EMAIL

[issue1292] libffi needs an update to support mips64, arm and armeabi on linux

2008-02-07 Thread Matthias Klose
Matthias Klose added the comment: there's a buildbot for mips-linux, none for mips64, so lets close this one. -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1292 __

[issue1597000] Use \r\n, not \n for HTTP headers

2008-02-07 Thread Guilherme Polo
Guilherme Polo added the comment: cgitb just creates a html document with a traceback, it doesn't send it over network. I would like to take a look at this, but before it would be good to know if the author of this bug found some other place that this issue applies. -- nosy: +gpolo

[issue1979] Make Decimal comparisons with NaN less arbitrary

2008-02-07 Thread Facundo Batista
Facundo Batista added the comment: Thanks Mark! Shall this issue be closed? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1979 __ ___ Python-bugs-list mailing list

[issue1947] Exception exceptions.AttributeError '_shutdown' in module 'threading'

2008-02-07 Thread Facundo Batista
Facundo Batista added the comment: It seems that it's more a problem related to your environment. It could be a problem in the installation, execution of the program, or even in the XP itself. In any case, you should ask for help in the python list, or in #python at irc.freenode.org.

[issue1160] Medium size regexp crashes python

2008-02-07 Thread Guilherme Polo
Guilherme Polo added the comment: I tried Frederik's solution against trunk and it works. I compiled python with ucs2 so it is surely setting SRE_CODE to unsigned long. Before this change I got the same exception as pointed by Guido Ostkamp. -- nosy: +gpolo

[issue2028] _fmode = O_TEXT is obsolete

2008-02-07 Thread Zdeněk Pavlas
New submission from Zdeněk Pavlas: Please consider setting the default file mode to O_BINARY. O_TEXT breaks many unix programs and Windows has stopped to use CRLF files for anything of use since the introduction of Win95's registry anyway. Days when majority of C codebase actually DID process

[issue2029] python -m pydoc -g fails

2008-02-07 Thread Ben Bass
New submission from Ben Bass: To quickly open a PyDoc browser, I want to be able to run the following: python -m pydoc -g This works fine on Python2.4, but fails on 2.5(.1), with following traceback (tested on both WinXP and Solaris 8, same result): Traceback (most recent call last): File

[issue2028] _fmode = O_TEXT is obsolete

2008-02-07 Thread Facundo Batista
Facundo Batista added the comment: O_TEXT is not obsolete, as the behaviour is different even in a win2k. a = open(ubuntu-6.06.1-server-i386.iso) len(a.read()) 46424 a = open(ubuntu-6.06.1-server-i386.iso, rb) len(a.read()) 453132288 I agree that the default should be Binary. Note that

[issue1401] urllib2 302 POST

2008-02-07 Thread Facundo Batista
Facundo Batista added the comment: So, the general agreement is that: - After receiven the 302, it's ok to generate a GET request. - There's a problem with the generated GET request (there should not be a Content-Length field in the headers) Right? If this is ok, I'll fix it. But, what other

[issue2029] python -m pydoc -g fails

2008-02-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: There is a difference between -m and starting the module directly: - when running a module, its directory is inserted in front of sys.path. - with -m, the empty string '' is inserted in front of sys.path. The problem with pydoc.py is that there is

[issue2028] _fmode = O_TEXT is obsolete

2008-02-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Windows has stopped to use CRLF files No, there are some places where a text file must be CRLF. To name a few: - Notepad - Visual Studio .sln files. Days when majority of C codebase actually DID process text files AND CRLF files were used are long

[issue2040] Class instance attributes that are property() should appear in __dict__

2008-02-07 Thread Christian Heimes
Christian Heimes added the comment: Descriptors like properties are bound to the class and not to the instance. The behavior is consistent with class attributes and methods: class Foo: ... a = 1 ... bar = property(lambda self: 'baz') ... dict(Foo.__dict__) {'a': 1, '__module__':

[issue1916] Add inspect.isgenerator

2008-02-07 Thread Guilherme Polo
Guilherme Polo added the comment: Maybe there should be two new functions then ? isgeneratorfunction and isgenerator. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1916 __ ___

[issue2041] __getslice__ still called

2008-02-07 Thread Stefan Seefeld
Stefan Seefeld added the comment: Mark, thanks for the quick follow-up. OK, i now understand the situation better. The documentation I had read originally didn't talk about special-casing built-in objects. (And since I want to extend a tuple, I do have to override __getslice__ since I want

[issue2041] __getslice__ still called

2008-02-07 Thread Mark Dickinson
Mark Dickinson added the comment: I think the docs do a good job of explaining this; in particular, they say, in http://docs.python.org/dev/reference/datamodel.html#special-method- names: However, built-in types in CPython currently still implement __getslice__(). and explain that

[issue2041] __getslice__ still called

2008-02-07 Thread Stefan Seefeld
New submission from Stefan Seefeld: The python documentation states that since python 2.0 __getslice__ is obsoleted by __getitem__. However, testing with python 2.3 as well as 2.5, I find the following surprising behavior: class Tuple(tuple): def __getitem__(self, i): print '__getitem__', i

[issue1401] urllib2 302 POST

2008-02-07 Thread Facundo Batista
Facundo Batista added the comment: Fixed in r60648, in the trunk. Now the content-length and content-type headers are removed from from the headers in the redirection. Thank you all! -- resolution: - fixed status: open - closed __ Tracker [EMAIL

[issue2041] __getslice__ still called

2008-02-07 Thread Mark Dickinson
Mark Dickinson added the comment: Well, documentation patches are always welcome, I believe :) If you can point to a particular place in the documentation and suggest alternative (or extra) wording that might help, post it here and I'll deal with it. -- resolution: - invalid status:

[issue1764286] inspect.getsource does not work with decorated functions

2008-02-07 Thread Guilherme Polo
Guilherme Polo added the comment: I am attaching a patch that address this issue. -- nosy: +gpolo Added file: http://bugs.python.org/file9384/inspect.py.diff _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1764286

[issue2040] Class instance attributes that are property() should appear in __dict__

2008-02-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Well, a regular method also takes self as its first argument. And it will not appear in the instance's __dict__. The __dict__ of an object is intended to *store* its attributes. A property can be accessed like an attribute (foo_obj.bar), but it is

[issue1916] Add inspect.isgenerator

2008-02-07 Thread Guilherme Polo
Guilherme Polo added the comment: I'm attaching a patch, it adds two new functions and removes some constants defined in the code that can be retrieved from compiler.consts Added file: http://bugs.python.org/file9380/inspect.py.diff __ Tracker [EMAIL PROTECTED]

[issue2027] Module containing C implementations of common text algorithms

2008-02-07 Thread Christian Heimes
Christian Heimes added the comment: I agree with Amaury. Pyhton uses the slogan batteries included and not fusion reactor included. We can and will never include every library that may be useful for some users. Python core's development cycles are too slow for fast moving software. Andreas'

[issue2040] Class instance attributes that are property() should appear in __dict__

2008-02-07 Thread Jag Ginsberg
New submission from Jag Ginsberg: If I have a class: class Foo(object): bar = property(lambda self: 'baz') # ignore the value's trivial nature and then run: foo_obj = Foo() foo_obj.__dict__ ... I would expect to see: {'bar': 'baz'} ... and not: {} This would seem consistent with what

[issue1916] Add inspect.isgenerator

2008-02-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I know two real usages: - the nose and py.test packages accept a generator function, as described here: http://codespeak.net/py/dist/test.html#generative-tests-yielding-more-tests http://somethingaboutorange.com/mrl/projects/nose/#test-generators.

[issue1401] urllib2 302 POST

2008-02-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Content-Type is probably meaningless but harmless as well. I'd say the priority is in getting rid of headers whose misinterpretation can be annoying, such as Content-Length. __ Tracker [EMAIL PROTECTED]

[issue2038] win32pdh.EnumObjects fails on Windows Server 2003 R2

2008-02-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: A quick google search on 2147481648 reveals that you are not alone: http://mail.python.org/pipermail/python-win32/2004-October/002519.html In addition, this tracker only deals with core python. I close the issue. Please discuss this problem on the pywin32

[issue2038] win32pdh.EnumObjects fails on Windows Server 2003 R2

2008-02-07 Thread Richard Mason
New submission from Richard Mason: The following test script works OK on all windows platforms apart from Windows Server 2003 R2: import win32pdh win32pdh.EnumObjects(None, None, 0, 1) When I run on Windows Server 2003 R2 get the following dump: E:\fusiondx\libtest.py Traceback (most recent

[issue1881] increase parser stack limit

2008-02-07 Thread Ralf Schmitt
Ralf Schmitt added the comment: when I set the the stack size to 128kb on a 64bit linux with ulimit -s 128, the tests still pass (default stack size is 8192 kb). However the following fails at recursion level 180 with a segfault: def f(count): print count f(count+1) f(0) If I set the

[issue725149] SRE bugs with capturing groups in negative assertions

2008-02-07 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: looks to have been fixed. -- nosy: +draghuram resolution: - fixed status: open - closed Tracker [EMAIL PROTECTED] http://bugs.python.org/issue725149

[issue2018] TextCalendar.formatmonth is not influenced by setfirstweekday

2008-02-07 Thread Walter Dörwald
Walter Dörwald added the comment: You're supposed to use firstweekday as a property instead of using the getter method getfirstweekday(). Anyway this is fixed now in r60651 (trunk) and r60652 (release25-maint) -- resolution: accepted - fixed status: open - closed

[issue2018] TextCalendar.formatmonth is not influenced by setfirstweekday

2008-02-07 Thread Walter Dörwald
Walter Dörwald added the comment: The doccumentation is here:http://docs.python.org/dev/library/calendar.html#calendar.TextCalendar.formatmonth (or in Doc/library/calendar.rst in the source). Anyway the first of those documentation bugs is fixed now in r60649 (trunk) and r60650

[issue2006] asyncore loop lacks timers and work tasks

2008-02-07 Thread Bill Janssen
Bill Janssen added the comment: Yes, I think we're talking about the same thing, too. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2006 __ ___ Python-bugs-list mailing list

[issue2044] test_sunaudiodev.py converted to unittest

2008-02-07 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': In attachment. I didn't try it since I don't have a SunOS system but it should be ok (it's very minimalistic). As far as I can tell it should work also for Python 3.0. -- components: Tests files: test_sunaudiodev.diff messages: 62182 nosy:

[issue2045] defaultdict subclasses segfault with a bound method set as a default_factory

2008-02-07 Thread jason kirtland
New submission from jason kirtland: Python 2.5.1 (r251:54863, May 23 2007, 16:25:53) [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2 Type help, copyright, credits or license for more information. from collections import defaultdict class sub(defaultdict): ... def __init__(self): ...

[issue2028] _fmode = O_TEXT is obsolete

2008-02-07 Thread Zdeněk Pavlas
Zdeněk Pavlas added the comment: if they want binary data, they will have to open files in binary mode. There were binary files. *THEN* dos and mac came with text files. To keep the *ORIGINAL* semantics we have to add *NEW* flags to open/fopen. Looks we'll run out of O_ bitfields and

[issue2028] _fmode = O_TEXT is obsolete

2008-02-07 Thread Martin v. Löwis
Martin v. Löwis added the comment: I'll close this issue as rejected. As discussed, changing it in 2.x would be incompatible. To change the default for open in 3.x to return bytes instead of character string (i.e. open files in binary) would require convincing Guido van Rossum, which is unlikely

[issue2028] _fmode = O_TEXT is obsolete

2008-02-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Exactly. First computer files were filled with numbers, then with English words, then with accented letters now with kanjis. Imagine that binary is a kind of language. And not spoken by many people anymore ;-) __ Tracker

[issue1916] Add inspect.isgenerator

2008-02-07 Thread Guilherme Polo
Guilherme Polo added the comment: Adding a patch that fixes inspect test and doc. Added file: http://bugs.python.org/file9381/inspect_doc_and_test.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1916 __

[issue1966] infinite loop in httplib

2008-02-07 Thread Georgij Kondratjev
Changes by Georgij Kondratjev: -- nosy: +orivej __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1966 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1979] Make Decimal comparisons with NaN less arbitrary

2008-02-07 Thread Mark Dickinson
Mark Dickinson added the comment: Closing. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1979 __ ___ Python-bugs-list

[issue2029] python -m pydoc -g fails

2008-02-07 Thread Guilherme Polo
Guilherme Polo added the comment: I don't see the point of lines below that comment # Scripts don't get the current directory in their path by default.. I'm adding a patch that removes those lines and makes use of pathdirs function instead of using sys.path in serve function, so you get unique

[issue2040] Class instance attributes that are property() should appear in __dict__

2008-02-07 Thread Jag Ginsberg
Jag Ginsberg added the comment: I appreciate your quick response, and I certainly hope you won't read this as me being anything but ignorant, but how can a property whose function definitions include self be about the class and not the instance? I agree that Foo.__dict__ should include the

[issue2042] test_audioop.py converted to unittest

2008-02-07 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': In attachment. Original tests are unchanged. -- components: Tests files: test_audioop.diff messages: 62176 nosy: facundobatista, giampaolo.rodola severity: normal status: open title: test_audioop.py converted to unittest type: rfe versions: Python

[issue2043] test_cl.py converted to unittest

2008-02-07 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': In attachment. -- components: Tests files: test_cl.diff messages: 62178 nosy: facundobatista, giampaolo.rodola severity: normal status: open title: test_cl.py converted to unittest versions: Python 2.6 Added file:

[issue1218234] inspect.getsource doesn't update when a module is reloaded

2008-02-07 Thread Guilherme Polo
Guilherme Polo added the comment: I'm attaching a patch. Is there some hidden problem that it may cause ? By the way, this issue is a duplicate of http://bugs.python.org/issue993580 -- nosy: +gpolo Added file: http://bugs.python.org/file9382/inspect.py.diff

[issue2046] patch to fix_import: UserDict - collections

2008-02-07 Thread Eduardo Padoan
New submission from Eduardo Padoan: UserDict moved from UserDict module (deleted) to collections on py3k. This patch adds this case to fix_import.py on 2to3. -- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) files: fix_import_udict.diff messages: 62186 nosy:

[issue2045] defaultdict subclasses segfault with a bound method set as a default_factory

2008-02-07 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc: -- assignee: - amaury.forgeotdarc nosy: +amaury.forgeotdarc resolution: - fixed status: open - pending __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2045 __

[issue2027] Module containing C implementations of common text algorithms

2008-02-07 Thread Matt Chaput
Matt Chaput added the comment: The Porter stemming and Levenshtein edit-distance algorithms are not fast-moving nor are they fusion reactors... they've been around forever, and are simple to implement, but are still useful in various common scenarios. I'd say this is similar to Python including

[issue2045] defaultdict subclasses segfault with a bound method set as a default_factory

2008-02-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Committed r60663 in trunk. Thanks for the report! Will backport to the 2.5 branch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2045 __

[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.

2008-02-07 Thread Mark Dickinson
Mark Dickinson added the comment: from Guido: I have one minor nit on the current rational.py code: all internal accesses to the numerator and denominator should use self._numerator and self._denominator -- going through the properties makes it *much* slower. Remember that Python

[issue2045] defaultdict subclasses segfault with a bound method set as a default_factory

2008-02-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Committed r60664 for the coming 2.5.2. -- status: pending - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2045 __ ___

[issue2018] TextCalendar.formatmonth is not influenced by setfirstweekday

2008-02-07 Thread MATSUI Tetsushi
MATSUI Tetsushi added the comment: In the message msg62100, I asked about the place of *setfirstweekday()*. Your answer in the message msg62173 was about *formatmonth()*. I don't think the fix is complete until some explanations are given for firstweekday and/or its getter/setter, since they

[issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path

2008-02-07 Thread André Fritzsche
New submission from André Fritzsche: shutil.destinsrc(src,dst) Checks if 'dst' starts with 'src', which can return a wrong result if 'dst' even starts with 'scr' but isn't really a subdirector of it. E.g. (src=r'C:\data', dst=r'C:\data.old') returned true, although dst isn't a subdirectory of