[issue7616] test_memoryview test_setitem_writable failures with Intel ICC

2009-12-31 Thread ivank
New submission from ivank : 3 memoryview tests fail with Intel ICC 11.1. They don't fail with gcc 4.4.1-4ubuntu8 on the same machine. == FAIL: test_setitem_writable (__main__.BytesMemorySliceSliceTest) -

[issue7615] unicode_escape codec does not escape quotes

2009-12-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal stage: -> test needed ___ Python tracker ___ ___ Python-bugs-lis

[issue7615] unicode_escape codec does not escape quotes

2009-12-31 Thread Richard Hansen
New submission from Richard Hansen : The description of the unicode_escape codec says that it produces "a string that is suitable as Unicode literal in Python source code." [1] Unfortunately, this is not true as it does not escape quotes. For example: print u'a\'b"c\'\'\'d"""e'.encode('unico

[issue6943] setup.py fails to find headers of system libffi

2009-12-31 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: The previous patches don't work with Python 3, in which os.popen() internally uses subprocess.Popen(), and also don't work during crosscompilation, so I'm attaching the new patch. -- Added file: http://bugs.python.org/file15715/pyt

[issue7614] Python 2.6.4 segfaults

2009-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: The recursion limit exists precisely so that Python can avoid overflowing the C stack and hence crashing. So if you increase the recursion limit without also increasing the stack space assigned to the process, you should expect a crash. Closing as won't fix

[issue7614] Python 2.6.4 segfaults

2009-12-31 Thread ttsiod
New submission from ttsiod : I found a nice yield-based implementation of the sieve of Eratosthenes. I tried to find the last prime number less than 1.000.000 (1M) - so I had to increase the recursion limit (via sys.setrecursionlimit). It seemed to work - but after running for about 3 minutes,

[issue936813] fast modular exponentiation

2009-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: Okay, I retested the original patch without any of my refactoring (besides fixing the twodigits cast), and got pretty much the same numbers. On a 32-bit non-debug trunk build (still on OS X 10.6), I get: Unpatched - Mark-Dickinsons-MacBook-Pro:trunk

[issue7412] distutils install race condition

2009-12-31 Thread Rene Dudfield
Rene Dudfield added the comment: Hi Tarek, moving a package into place right at the end is the best thing to do I think. It solves a couple common problems: - broken packages after an install is stopped half way for one of many common reasons. - old files left around will not be there

[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-31 Thread Florent Xicluna
Florent Xicluna added the comment: The benchmark tests show significant improvements in most cases up to 10 times faster. And I found no test case which show performance regression (using the "stringbench" benchmark from GvR, and additional tests). Moreover, the very same algorithm is already

[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Are there any simple, common cases that are made slower by this patch? IIRC, that was the reason this wasn't implemented previously. -- nosy: +rhettinger ___ Python tracker ___

[issue936813] fast modular exponentiation

2009-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: One more lot of timings, from Trevor's pow_benchmark.txt: Unpatched - 1024 bits: 0.008256 2048 bits: 0.052324 3072 bits: 0.159689 4096 bits: 0.357264 Patched (percent speedup) --- 1024 bits: 0.006576 (+25.5%) 2048 bits: 0.045878 (+14.1%) 3072 bit

[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I will take a last look at it and commit if I see nothing wrong. -- assignee: -> pitrou priority: -> normal stage: patch review -> commit review versions: -Python 2.6, Python 3.1 ___ Python tracker

[issue936813] fast modular exponentiation

2009-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. For smaller inputs, I'm actually getting significant slowdowns: Unpatched: >>> timeit('pow(123, 123456789, 123456789L)') 7.355183839797974 Patched: >>> timeit('pow(123, 123456789, 123456789L)') 8.873976945877075 -- ___

[issue936813] fast modular exponentiation

2009-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: Some timings on my machine (OS X 10.6, 64-bit nondebug build, trunk r77157). These are just doing an RSA-like powmod pow(c, d, n), with n the product of two similarly-sized primes, d the inverse of 7 modulo eulerPhi(n), and c of similar magnitude to n. Wit

[issue7609] Add --with-system-expat option

2009-12-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2009/12/31 Georg Brandl : > > Georg Brandl added the comment: > > The comment "Usage of a system shared libexpat.so/expat.dll is not > advised." just above the change should probably be revised. Good point. Done in r77186. -- _

[issue2100] unit test UnicodeWarning

2009-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: Closing as "out of date". -- resolution: -> out of date stage: -> committed/rejected status: pending -> closed ___ Python tracker ___ __

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-12-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue936813] fast modular exponentiation

2009-12-31 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a second revision of Trevor's patch: - factor out the code for creating Montgomery representatives; this simplifies the changes to the main long_pow function - get rid of l_invmod and use a simple function for computing the negation of an invers

[issue7593] Computed-goto patch for RE engine

2009-12-31 Thread Georg Brandl
Georg Brandl added the comment: _sre is listed in Modules/Setup, so it will be a built-in module by default. -- nosy: +georg.brandl ___ Python tracker ___ ___

[issue7609] Add --with-system-expat option

2009-12-31 Thread Georg Brandl
Georg Brandl added the comment: The comment "Usage of a system shared libexpat.so/expat.dll is not advised." just above the change should probably be revised. -- nosy: +georg.brandl ___ Python tracker _

[issue4814] ftplib does not honour "timeout" parameter for active data connections

2009-12-31 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: This time it's not easy as I see no way to distinguish whether the timeout exception gets raised by the command or the control socket, as makeport() method implementation deals with both: host = self.sock.getsockname()[0] if self.af == so

[issue7613] [cppcheck] found a regression : Invalid number of character ((). Can't process file.

2009-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: The regression has been introduced in r46534, it's now fixed in r77181 (trunk) and r77182 (release26-maint), thanks! -- assignee: -> ezio.melotti components: +Extension Modules -None nosy: +ezio.melotti priority: -> normal resolution: -> fixed stage:

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Mark Summerfield
Mark Summerfield added the comment: On Thu, Dec 31, 2009 at 1:30 PM, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > I don't understand. How is the subprocess stdout related to the main > program output? > Stream-specific encoding could be useful for subprocesses th

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I don't understand. How is the subprocess stdout related to the main program output? Stream-specific encoding could be useful for subprocesses that expect latin-1 from stdin but write utf-8 to stdout. I'm not sure we should support this. -- _

[issue7591] test_get_platform fails on 3.1

2009-12-31 Thread Tarek Ziadé
Tarek Ziadé added the comment: Thanks Ronald -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue7591] test_get_platform fails on 3.1

2009-12-31 Thread R. David Murray
Changes by R. David Murray : -- keywords: +buildbot ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Mark Summerfield
Mark Summerfield added the comment: I agree with Florian Mayer that the encoding handling should be stream-specific. You could easily be reading the stdout of some third party program that uses, say, latin1, but want to do your own output in, say, utf-8. One solution that builds on what Amaury

[issue7613] [cppcheck] found a regression : Invalid number of character ((). Can't process file.

2009-12-31 Thread Ettl Martin
New submission from Ettl Martin : during a check with the static code analysis tool cppcheck (http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page) the tool found a missing ')' in python-svn/Modules/flmodule.c that leads to a regression. Please refer the attached patch that f

[issue1759845] subprocess.call fails with unicode strings in command line

2009-12-31 Thread Shahar Or
Changes by Shahar Or : -- nosy: +DawnLight ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Shahar Or
Changes by Shahar Or : -- nosy: +DawnLight ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue7612] Fix "pass and object" typo in Library Reference / Built-in Types / Sequence Types

2009-12-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: georg.brandl -> ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2009-12-31 Thread Nir Aides
Changes by Nir Aides : -- nosy: +nirai ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/ma

[issue7612] Fix "pass and object" typo in Library Reference / Built-in Types / Sequence Types

2009-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r77176 (py3k) and r77177 (release31-maint), thanks! -- nosy: +ezio.melotti priority: -> normal resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 ___ Python track

[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I checked the code, and it is the right thing: Indeed, you are right. My bad! -- ___ Python tracker ___ _

[issue7612] Fix "pass and object" typo in Library Reference / Built-in Types / Sequence Types

2009-12-31 Thread Yitz Gale
New submission from Yitz Gale : Change "if you pass and object of the wrong type" to "if you pass an object of the wrong type" in stdtypes.rst. -- assignee: georg.brandl components: Documentation files: typo_pass_and_object.patch keywords: patch messages: 97086 nosy: georg.brandl, ygale

[issue7591] test_get_platform fails on 3.1

2009-12-31 Thread Ronald Oussoren
Ronald Oussoren added the comment: I will look at this in the weekend. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-31 Thread Florent Xicluna
Florent Xicluna added the comment: I checked the code, and it is the right thing: Example 1 (fastsearch): s, p = "ABCDEABCF", "BCD" s.rfind(p) # i = 6 is first candidate, but "BCF" != "BCD" # then s[i-1] = "A" is not part of pattern # so we skip 3 chars: next loop is i = 2 # etc... Example

[issue7591] test_get_platform fails on 3.1

2009-12-31 Thread Tarek Ziadé
Tarek Ziadé added the comment: That's related to Ronald last change. I am adding him in the loop -- assignee: tarek -> ronaldoussoren nosy: +ronaldoussoren ___ Python tracker ___

[issue7611] shlex not posix compliant when parsing "foo#bar"

2009-12-31 Thread Jan David Mol
Jan David Mol added the comment: Attached a program which shows the relevant behaviour: import shlex tests = [ "foo#bar", "foo #bar" ] for t in tests: print "%s -> %s" % (t,[x for x in shlex.shlex(t,posix=True)]) results in $ python lexer_test.py foo#bar -> ['foo'] foo #bar -> ['foo'] (e

[issue7611] shlex not posix compliant when parsing "foo#bar"

2009-12-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ferringb priority: -> normal stage: -> test needed versions: -Python 2.5 ___ Python tracker ___

[issue7611] shlex not posix compliant when parsing "foo#bar"

2009-12-31 Thread Jan David Mol
New submission from Jan David Mol : The shlex parser parses "foo#bar" as "foo", discarding the rest as a comment. This is actually one of the test cases, even in POSIX mode. However, POSIX (see below) only allows comments to start at the beginning of a token, so "foo#bar" has to result in a "foo

[issue7089] shlex behaves unexpected if newlines are not whitespace

2009-12-31 Thread Jan David Mol
Jan David Mol added the comment: As there seems to be some interest, I've continued working on patching this issue. Attached is an improved version of the patch, including additions to test_shlex.py. Improved in the sense that newlines after a comment are not considered to be actually part of t

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2009-12-31 Thread lucifer
New submission from lucifer : open a file in the zip file through ZipFile.open method, if invoke read method after readline method in the ZipExtFile object, the data is not correct. I was trying to get a ZipExtFile and pass it to pickle.load(f), a exception was thrown. The reason is readline

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2009-12-31 Thread lucifer
Changes by lucifer : -- components: Extension Modules nosy: lucifer severity: normal status: open title: Cannot use both read and readline method in same ZipExtFile object type: behavior versions: Python 2.6 ___ Python tracker

[issue7089] shlex behaves unexpected if newlines are not whitespace

2009-12-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ferringb priority: -> normal stage: -> test needed versions: -Python 2.4, Python 2.5, Python 3.0 ___ Python tracker ___