[issue13618] bytes.decode() UnicodeEncodeError on Apple iOS (16-bit) characters

2011-12-17 Thread Silverback Networks

Silverback Networks silverback...@gmail.com added the comment:

I feel like a 'tard now, it was because I was trying to print() it at the same 
time I decoded it, which is what threw up. Well, sorry about that, next time 
I'll be a little more careful to separate every step before I go reporting it.

--
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13620] Support Chrome in webbrowser.py

2011-12-17 Thread Oleg Broytman

New submission from Oleg Broytman p...@phdru.name:

Support Google Chrome/Chromium browsers in webbrowser.py.

The attached patch is against Python 2.7, but it should be applied cleanly to 
Python 3+.

--
components: Library (Lib)
files: webbrowser.py.patch
keywords: patch
messages: 149666
nosy: phd
priority: normal
severity: normal
status: open
title: Support Chrome in webbrowser.py
type: enhancement
Added file: http://bugs.python.org/file23986/webbrowser.py.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13620
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12809] Missing new setsockopts in Linux (eg: IP_TRANSPARENT)

2011-12-17 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 59ea1d1a4137 by Charles-François Natali in branch 'default':
Issue #12809: Expose IP_TRANSPARENT in the socket module. Patch by Michael
http://hg.python.org/cpython/rev/59ea1d1a4137

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12809
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12809] Missing new setsockopts in Linux (eg: IP_TRANSPARENT)

2011-12-17 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

Thanks Michael.
I committed a simpler version of your patch.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12809
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13453] Tests and network timeouts

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%203.x/builds/1327/steps/test/logs/stdio

==
ERROR: test_list_active (test.test_nntplib.NetworkedNNTPTests)
--
Traceback (most recent call last):
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_nntplib.py, 
line 243, in wrapped
meth(self)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_nntplib.py, 
line 41, in test_list_active
resp, groups = self.server.list(self.GROUP_PAT)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 596, 
in list
resp, lines = self._longcmdstring(command, file)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 513, 
in _longcmdstring
resp, list = self._getlongresp(file)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 464, 
in _getlongresp
resp = self._getresp()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 437, 
in _getresp
resp = self._getline()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 422, 
in _getline
line = self.file.readline()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/socket.py, line 275, 
in readinto
raise IOError(cannot read from timed out object)
OSError: cannot read from timed out object

==
ERROR: test_newgroups (test.test_nntplib.NetworkedNNTPTests)
--
Traceback (most recent call last):
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_nntplib.py, 
line 243, in wrapped
meth(self)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_nntplib.py, 
line 56, in test_newgroups
resp, groups = self.server.newgroups(dt)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 565, 
in newgroups
resp, lines = self._longcmdstring(cmd, file)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 513, 
in _longcmdstring
resp, list = self._getlongresp(file)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 464, 
in _getlongresp
resp = self._getresp()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 437, 
in _getresp
resp = self._getline()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 422, 
in _getline
line = self.file.readline()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/socket.py, line 275, 
in readinto
raise IOError(cannot read from timed out object)
OSError: cannot read from timed out object

==
ERROR: test_over (test.test_nntplib.NetworkedNNTPTests)
--
Traceback (most recent call last):
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_nntplib.py, 
line 243, in wrapped
meth(self)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_nntplib.py, 
line 127, in test_over
resp, count, first, last, name = self.server.group(self.GROUP_NAME)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 649, 
in group
resp = self._shortcmd('GROUP ' + name)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 499, 
in _shortcmd
return self._getresp()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 437, 
in _getresp
resp = self._getline()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 422, 
in _getline
line = self.file.readline()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/socket.py, line 275, 
in readinto
raise IOError(cannot read from timed out object)
OSError: cannot read from timed out object

==
ERROR: test_starttls (test.test_nntplib.NetworkedNNTPTests)
--
Traceback (most recent call last):
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_nntplib.py, 
line 243, in wrapped
meth(self)
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_nntplib.py, 
line 201, in test_starttls
self.server.starttls()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 986, 
in starttls
resp = self._shortcmd('STARTTLS')
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 499, 
in _shortcmd
return self._getresp()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 437, 
in _getresp
resp = self._getline()
  File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/nntplib.py, line 422, 
in _getline
line = self.file.readline()
  File 

[issue11231] bytes() constructor is not correctly documented

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Oooh, I missed the important sentence Accordingly, constructor arguments are 
interpreted as for bytearray(). The 5 constructors are documented in bytearray 
doc:

http://docs.python.org/dev/library/functions.html#bytearray

--
resolution:  - works for me
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13619] Add a new codec: locale, the current locale encoding

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Patch version 2: improve the test. Try also the user locale encoding if the C 
locale uses ISO-8859-1 (should improve the code coverage on FreeBSD, Mac OS X 
and Solaris).

--
Added file: http://bugs.python.org/file23987/locale_encoding-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13619
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13610] On Python parsing numbers.

2011-12-17 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I don't see a good reason to change this.

--
nosy: +georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13610
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13619] Add a new codec: locale, the current locale encoding

2011-12-17 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
components: +Unicode
nosy: +ezio.melotti, lemburg
stage:  - patch review
type:  - enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13619
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-17 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

 So it seems unlikely to be the explanation.

Victor reproduced in on IRC, and it's indeed an overflow.
The problematic code is in readline_file:

bigger = self-buf_size  1;
if (bigger = 0) {  /* overflow */
PyErr_NoMemory();
return -1;
}
newbuf = (char *)realloc(self-buf, bigger);
if (!newbuf)  {
PyErr_NoMemory();
return -1;
}


self-buf_size is an int, which overflow pretty easily.

 196 * 24
4704
 196 * 24 * 8   # assuming 8 bytes per float
37632
 2**31
2147483648

Hmmm... A byte is 8 bit, which gives:
 196 * 24 * 8 * 8
301056L
 196 * 24 * 8 * 8  2**31
True

Now, if it works on your box, it's probably due to the compiler optimizing the 
check away. Since `bigger` is cast to an unsigned 64-bit (size_t) when calling 
malloc(), it happens to work.
Maybe your distro doesn't build python with -fwrapv.

So, what do you suggest? Should we fix this (Py_ssize_t, overflow check before 
computation), as in #11564?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 Should we fix this (Py_ssize_t, overflow check before computation), as in 
 #11564?

Yes. Use Py_ssize_t type for the buf_size attribute, and replace bigger = 0 
(test if an overflow occurred) by self-buf_size  (PY_SSIZE_T_MAX  1).

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13530] Docs for os.lseek neglect to mention what it returns

2011-12-17 Thread Jérémy Anger

Jérémy Anger kidan...@gmail.com added the comment:

Here is a patch which add the return value of lseek into the documentation.

--
nosy: +kidanger
Added file: http://bugs.python.org/file23988/patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13530
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-17 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Ah, I see. It's a bit of a pity not to be able to load files  1GB, especially 
on a 64-bit build (!). Perhaps cPickle could be made partly 64-bit compatible? 
Or at least, indeed, do a proper anti-overflow check.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13530] Docs for os.lseek neglect to mention what it returns

2011-12-17 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage:  - patch review
type:  - behavior
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13530
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13610] On Python parsing numbers.

2011-12-17 Thread Jean-Michel Fauth

Jean-Michel Fauth wxjmfa...@gmail.com added the comment:

I have done a little bit hd/files archeology and
found some of my comments.

Pointing on number litterals is probably wrong. The fact
is that, this happens with practically any expression. And 
strangely, not all keywords (constructs?) are affected.

 999if 1 else 888
999
 if 1 else 888

 {1: 'a'}if 1 else 888
{1: 'a'}
 999 if 'a' else 888
999
 999if 'a' else 888
999
 999if 'a'else 888
999
 999if 888else 888
  File eta last command, line 1
999if 888else 888
 ^
SyntaxError: invalid token
 999if else 888
888

To summarize: The Python syntax does not require an isolated
keyword, something like \bkeyword\b.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13610
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13610] On Python parsing numbers.

2011-12-17 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +gvanrossum
versions: +Python 3.3 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13610
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11231] bytes() constructor is not correctly documented

2011-12-17 Thread brendel

brendel brice.be...@gmail.com added the comment:

Here is a patch for the docstring of bytes and bytesarray.

--
nosy: +brendel
Added file: http://bugs.python.org/file23989/patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13619] Add a new codec: locale, the current locale encoding

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I tested locale_encoding-2.patch on Linux, FreeBSD and Windows: UTF-8 and 
ISO-8859-1 locales on Linux and FreeBSD, and the cp1252 ANSI code page on 
Windows.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13619
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11231] bytes() constructor is not correctly documented

2011-12-17 Thread brendel

Changes by brendel brice.be...@gmail.com:


Removed file: http://bugs.python.org/file23989/patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11231] bytes() constructor is not correctly documented

2011-12-17 Thread brendel

Changes by brendel brice.be...@gmail.com:


Added file: http://bugs.python.org/file23990/patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13610] On Python parsing numbers.

2011-12-17 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

 999if 888else 888
  File eta last command, line 1
999if 888else 888
 ^
SyntaxError: invalid token

This might be because 888e5 is a valid expression, so the 'e' is parsed as part 
of the number rather than a separate token.

 999 if 888.else 888
  File stdin, line 1
999 if 888.else 888
   ^
SyntaxError: invalid token
 999 if 888jelse 888
999

--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13610
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

New submission from Boris FELD lothiral...@gmail.com:

Hello everyone, I juste tried to launch the stringbench on python3.2 and 
python3.3 dev versions and some unicode tests run slower in python3.3 than in 
python3.2.

I cc the two raw output of both runs. I also extracted most interesting data 
(all the tests with more than 20% of performance regression):
- (A*1000).find(B) (*1000): -30.379747%
- Hello\t   \t.rstrip() (*1000): -33.33%
- this\nis\na\ntest\n.rsplit(\n) (*1000): -23.437500%
- \nHello!\n.strip() (*1000): -33.33%
- dna.split(ACTAT) (*10): -21.07%
- Andrew.endswith(w) (*1000): -23.529412%
- ...text.with.2000.lines...replace(\n,  ) (*10): -37.668161%
- \t   \tHello.rstrip() (*1000): -33.33%
- (A*1000).rpartition(A) (*1000): -21.212121%
- (Here are some words. *2).split() (*1000): -22.105263%
- Hello!\n.rstrip() (*1000): -35.714286%
- B in A*1000 (*1000): -32.089552%
- Hello!\n.strip() (*1000): -35.714286%
- \nHello!.strip() (*1000): -28.571429%
- this\nis\na\ntest\n.split(\n) (*1000): -23.437500%
- Andrew.startswith(A) (*1000): -20.588235%
- \nHello!.rstrip() (*1000): -35.714286%
- Andrew.endswith(Andrew) (*1000): -22.857143%
- Andrew.endswith(Anders) (*1000): -23.529412%
- The %(k1)s is %(k2)s the %(k3)s.%{k1:x,k2:y,k3:z,} (*1000): 
-49.411765%
- Andrew.startswith(Anders) (*1000): -23.529412%
- this--is--a--test--of--the--emergency--broadcast--system.split(--) 
(*1000): -22.429907%
- Andrew+Dalke (*1000): -23.076923%

--
assignee: collinwinter
components: Benchmarks
files: stringbench_log_cpython3.2
messages: 149681
nosy: Boris.FELD, collinwinter
priority: normal
severity: normal
status: open
title: Unicode performance regression in python3.3 vs python3.2
type: performance
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file23991/stringbench_log_cpython3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Added file: http://bugs.python.org/file23992/stringbench_log_cpython3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Added file: http://bugs.python.org/file23993/stringbench.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
assignee: collinwinter - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Thanks, this is a known issue. I'm not too worried, since they are fairly 
artificial. In the cases I've looked at, I don't think anything can be done 
about that.

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +haypo, pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Removed file: http://bugs.python.org/file23993/stringbench.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Added file: http://bugs.python.org/file23994/compare.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13622] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

New submission from Boris FELD lothiral...@gmail.com:

Hello everyone, I juste tried to launch the stringbench on python3.2 and 
python3.3 dev versions and some bytes tests run slower in python3.3 than in 
python3.2.

I cc the two raw output of both runs. I also extracted most interesting data 
(all the tests with more than 20% of performance regression):
- (bA*1000).find(bB) (*1000): -30.379747%
- bHello\t   \t.rstrip() (*1000): -33.33%
- bthis\nis\na\ntest\n.rsplit(b\n) (*1000): -23.437500%
- b\nHello!\n.strip() (*1000): -33.33%
- dna.split(bACTAT) (*10): -21.07%
- bAndrew.endswith(bw) (*1000): -23.529412%
- b...text.with.2000.lines...replace(b\n, b ) (*10): -37.668161%
- b\t   \tHello.rstrip() (*1000): -33.33%
- (bA*1000).rpartition(bA) (*1000): -21.212121%
- (bHere are some words. *2).split() (*1000): -22.105263%
- bthis\nis\na\ntest\n.split(b\n) (*1000): -23.437500%
- bHello!\n.rstrip() (*1000): -35.714286%
- bB in bA*1000 (*1000): -32.089552%
- bHello!\n.strip() (*1000): -35.714286%
- b\nHello!.strip() (*1000): -28.571429%
- bAndrew.startswith(bA) (*1000): -20.588235%
- b\nHello!.rstrip() (*1000): -35.714286%
- bAndrew.endswith(bAndrew) (*1000): -22.857143%
- bAndrew.endswith(bAnders) (*1000): -23.529412%
- bAndrew.startswith(bAnders) (*1000): -23.529412%
- bthis--is--a--test--of--the--emergency--broadcast--system.split(b--) 
(*1000): -22.429907%
- bAndrew+bDalke (*1000): -23.076923%

Hope it help

--
assignee: collinwinter
components: Benchmarks
files: stringbench_log_cpython3.2
messages: 149683
nosy: Boris.FELD, collinwinter
priority: normal
severity: normal
status: open
title: Bytes performance regression in python3.3 vs python3.2
type: performance
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file23995/stringbench_log_cpython3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13622
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13622] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Added file: http://bugs.python.org/file23996/stringbench_log_cpython3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13622
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13622] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Added file: http://bugs.python.org/file23997/compare.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13622
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Sorted and grouped results. replace, find and concat should be easy to 
fix, format is a little bit more complex, strip and split depends on 
find performance and require to scan the substring to ensure that the result 
is canonical (except if inputs are all ASCII, which is the case in these 
examples).

replace:

- ...text.with.2000.lines...replace(\n,  ) (*10): -37.668161%
- ...text.with.2000.lines...replace(\n,  ) (*10): -37.668161%

find:

- (A*1000).find(B) (*1000): -30.379747%
- Andrew+Dalke (*1000): -23.076923%- (A*1000).find(B) (*1000): 
-30.379747%

- Andrew.startswith(A) (*1000): -20.588235%
- Andrew.startswith(Anders) (*1000): -23.529412%
- Andrew.startswith(A) (*1000): -20.588235%
- Andrew.startswith(Anders) (*1000): -23.529412%

- Andrew.endswith(w) (*1000): -23.529412%
- Andrew.endswith(Andrew) (*1000): -22.857143%
- Andrew.endswith(Anders) (*1000): -23.529412%
- Andrew.endswith(w) (*1000): -23.529412%
- Andrew.endswith(Andrew) (*1000): -22.857143%
- Andrew.endswith(Anders) (*1000): -23.529412%

- B in A*1000 (*1000): -32.089552%
- B in A*1000 (*1000): -32.089552%

concat:

- Andrew+Dalke (*1000): -23.076923%

format:

- The %(k1)s is %(k2)s the %(k3)s.%{k1:x,k2:y,k3:z,} (*1000): 
-49.411765%
- The %(k1)s is %(k2)s the %(k3)s.%{k1:x,k2:y,k3:z,} (*1000): 
-49.411765%

strip:

- \nHello!\n.strip() (*1000): -33.33%
- Hello!\n.strip() (*1000): -35.714286%
- \nHello!.strip() (*1000): -28.571429%
- \nHello!\n.strip() (*1000): -33.33%
- Hello!\n.strip() (*1000): -35.714286%
- \nHello!.strip() (*1000): -28.571429%

- Hello\t   \t.rstrip() (*1000): -33.33%
- \t   \tHello.rstrip() (*1000): -33.33%
- Hello!\n.rstrip() (*1000): -35.714286%
- \nHello!.rstrip() (*1000): -35.714286%
- Hello\t   \t.rstrip() (*1000): -33.33%
- \t   \tHello.rstrip() (*1000): -33.33%
- Hello!\n.rstrip() (*1000): -35.714286%
- \nHello!.rstrip() (*1000): -35.714286%

split:

- dna.split(ACTAT) (*10): -21.07%
- (Here are some words. *2).split() (*1000): -22.105263%
- this\nis\na\ntest\n.split(\n) (*1000): -23.437500%
- this--is--a--test--of--the--emergency--broadcast--system.split(--) 
(*1000): -22.429907%
- dna.split(ACTAT) (*10): -21.07%
- (Here are some words. *2).split() (*1000): -22.105263%
- this\nis\na\ntest\n.split(\n) (*1000): -23.437500%
- this--is--a--test--of--the--emergency--broadcast--system.split(--) 
(*1000): -22.429907%

- this\nis\na\ntest\n.rsplit(\n) (*1000): -23.437500%
- this\nis\na\ntest\n.rsplit(\n) (*1000): -23.437500%

- (A*1000).rpartition(A) (*1000): -21.212121%
- (A*1000).rpartition(A) (*1000): -21.212121%

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13622] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Sorted and grouped results. replace, find and concat should be easy to 
fix, strip and split depend on find performance.


replace:

- b...text.with.2000.lines...replace(b\n, b ) (*10): -37.668161%

find:

- (bA*1000).find(bB) (*1000): -30.379747%

- bAndrew.startswith(bA) (*1000): -20.588235%
- bAndrew.startswith(bAnders) (*1000): -23.529412%

- bAndrew.endswith(bw) (*1000): -23.529412%
- bAndrew.endswith(bAndrew) (*1000): -22.857143%
- bAndrew.endswith(bAnders) (*1000): -23.529412%

- bB in bA*1000 (*1000): -32.089552%

concat:

- bAndrew+bDalke (*1000): -23.076923%

strip:

- b\nHello!\n.strip() (*1000): -33.33%
- bHello!\n.strip() (*1000): -35.714286%
- b\nHello!.strip() (*1000): -28.571429%

- bHello\t   \t.rstrip() (*1000): -33.33%
- b\t   \tHello.rstrip() (*1000): -33.33%
- bHello!\n.rstrip() (*1000): -35.714286%
- b\nHello!.rstrip() (*1000): -35.714286%

split:

- dna.split(bACTAT) (*10): -21.07%
- (bHere are some words. *2).split() (*1000): -22.105263%
- bthis\nis\na\ntest\n.split(b\n) (*1000): -23.437500%
- bthis--is--a--test--of--the--emergency--broadcast--system.split(b--) 
(*1000): -22.429907%

- bthis\nis\na\ntest\n.rsplit(b\n) (*1000): -23.437500%

- (bA*1000).rpartition(bA) (*1000): -21.212121%

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13622
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13561] os.listdir documentation should mention surrogateescape

2011-12-17 Thread misdre

misdre misdre+pyt...@gmail.com added the comment:

Added a small patch to mention surrogateescape and PEP 383.

--
keywords: +patch
nosy: +misdre
Added file: http://bugs.python.org/file23998/listdir-pep383.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13561
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13622] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Boris FELD lothiral...@gmail.com added the comment:

Forgot to describe my environment:
Mac OS X 10.6.8
GCC i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
CPython3.3 revision ea421c534305
CPython3.2 revision 0b86da9d6964

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13622
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Boris FELD lothiral...@gmail.com added the comment:

Forgot to describe my environment:
Mac OS X 10.6.8
GCC i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
CPython3.3 revision ea421c534305
CPython3.2 revision 0b86da9d6964

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

New submission from Boris FELD lothiral...@gmail.com:

Hello everyone, I juste tried to launch the stringbench on python3.2 and 
python3.3 dev versions and some bytes tests run slower in python3.3 than in 
python3.2.

I cc the two raw output of both runs. I also extracted most interesting data 
(all the tests with more than 20% of performance regression):
- (bA*1000).rfind(bA) (*1000): -70.103093%
- (bA*1000).find(bB) (*1000): -48.372093%
- (bA*1000).rindex(bA) (*1000): -68.89%
- s=bABC*33; (s+bE+(bD+s)*500).rfind(s+bE) (*100): -28.982301%
- (bC+bAB*300).rfind(bCA) (*1000): -29.565217%
- (bAB*1000).index(bAB) (*1000): -68.539326%
- bAndrew.endswith(bw) (*1000): -21.212121%
- (bA*1000).index(bA) (*1000): -71.11%
- (bBC+bAB*300).rfind(bBC) (*1000): -42.788462%
- bAndrew.startswith(bAndrew) (*1000): -20.588235%
- (bAB*1000).find(bAB) (*1000): -69.318182%
- (bAB*1000).rfind(bAB) (*1000): -69.791667%
- (bA*1000).rfind(bB) (*1000): -37.988827%
- (bAB*300+C).index(bBC) (*1000): -28.75%
- bB in bA*1000 (*1000): -24.479167%
- (bAB*300+CA).find(bCA) (*1000): -33.673469%
- (bAB*1000).rindex(bAB) (*1000): -67.78%
- (bC+AB*300).rindex(bCA) (*1000): -29.017857%
- (bAB*300+C).find(bBC) (*1000): -28.451883%
- bAndrew.startswith(bA) (*1000): -21.212121%
- bAndrew.startswith(bAnders) (*1000): -21.212121%
- (bA*1000).partition(bB) (*1000): -30.656934%
- (bAB*1000).rfind(bCA) (*1000): -20.603015%
- (bAB*1000).rfind(bBC) (*1000): -35.645472%
- (bA*1000).find(bA) (*1000): -70.454545%

My environment is:
Mac OS X 10.6.8
GCC i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
CPython3.3 revision ea421c534305
CPython3.2 revision 0b86da9d6964

--
assignee: collinwinter
components: Benchmarks
files: stringbench_log_cpython3.2
messages: 149689
nosy: Boris.FELD, collinwinter
priority: normal
severity: normal
status: open
title: Bytes performance regression in python3.3 vs python3.2
type: performance
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file23999/stringbench_log_cpython3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Added file: http://bugs.python.org/file24000/iobench_log_python3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Added file: http://bugs.python.org/file24001/compare.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Removed file: http://bugs.python.org/file24000/iobench_log_python3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


Added file: http://bugs.python.org/file24002/stringbench_log_cpython3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13616] Never ending loop in in update_refs Modules/gcmodule.c

2011-12-17 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

The only way of this thing actually happening is if the GC link list has 
actually a cycle.

Without a testcase to try to reproduce, it can't be debugged.

David, can you reproduce this consistently, even if it takes a few hours?.

As Amaury pointed out, if you have tons of objects, GC can take a while. And if 
your memory is paged out to swap, this can actually be VERY slow.

To know if this is actually a infinite loop, when you think it is stuck in the 
loop, just check current value of gc and set a breakpoint for that value in 
the loop. So GDB will stop again if gc gets the same value again and so we 
are actually in a loop.

In the meantime, check your page-in rate. If you are paging-in furiously, you 
are not in a loop, you are (mechanically slow) bringing objects back to memory.

Can you tell us how big your python process is (in memory), how much physical 
RAM you have, and if some other processes are competing for memory?.

If you can confirm that we are actually in an infinite loop... there is little 
that we can do without some testcase we can reproduce. The key here is that if 
you can reproduce, we can slowly move forward.

--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13616
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Grouped results.

find (first):

- (bA*1000).find(bA): -70%
- (bA*1000).rfind(bA)   : -70%
- (bA*1000).index(bA)   : -71%
- (bA*1000).rindex(bA)  : -68%

- (bAB*1000).index(bAB) : -68%
- (bAB*1000).rindex(bAB): -67%
- (bAB*1000).find(bAB)  : -69%
- (bAB*1000).rfind(bAB) : -69%

- bAndrew.startswith(bAndrew): -20%
- bAndrew.startswith(bA) : -21%
- bAndrew.startswith(bAnders): -21%

- bAndrew.endswith(bw): -21%

find (last):

- (bAB*300+CA).find(bCA)  : -33%
- (bC+AB*300).rindex(bCA) : -29%
- (bAB*300+C).find(bBC)   : -28%
- (bAB*300+C).index(bBC)  : -28%
- (bC+bAB*300).rfind(bCA) : -29%
- (bBC+bAB*300).rfind(bBC): -42%
- s=bABC*33; (s+bE+(bD+s)*500).rfind(s+bE): -28%

find (not found):

- (bA*1000).find(bB): -48%
- (bA*1000).rfind(bB)   : -37%
- (bAB*1000).rfind(bCA) : -20%
- (bAB*1000).rfind(bBC) : -35%

others:

- bB in bA*1000   : -24%
- (bA*1000).partition(bB) : -30%

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13622] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Boris.FELD told me that there was a bug in compare.py: all numbers are related 
to Unicode (see #13621), not bytes.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13622
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13622] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13622
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

See also the issue #13621 for results on Unicode.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

See also the issue #13623 for results on bytes.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13624] UTF-8 encoder performance regression in python3.3

2011-12-17 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

iobench benchmarking tool showed that the UTF-8 encoder is slower in Python 3.3 
than Python 3.2. The performance depends on the characters of the input string:

 * 8x faster (!) for a string of 50.000 ASCII characters
 * 1.5x slower for a string of 50.000 UCS-1 characters
 * 2.5x slower for a string of 50.000 UCS-2 characters

The bottleneck looks to be the the PyUnicode_READ() macro.

 * Python 3.2: s[i++]
 * Python 3.3: PyUnicode_READ(kind, data, i++)

Because encoding string to UTF-8 is a very common operation, performances do 
matter. Antoine suggests to have different versions of the function for each 
Unicode kind (1, 2, 4).

--
components: Unicode
messages: 149695
nosy: ezio.melotti, haypo, pitrou
priority: normal
severity: normal
status: open
title: UTF-8 encoder performance regression in python3.3
type: performance
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +flox

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +flox

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13624] UTF-8 encoder performance regression in python3.3

2011-12-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
assignee:  - collinwinter
components: +Unicode
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Just a note: performance reports shouldn't be assigned to the benchmarks 
category, except if the problem is in the benchmarks themselves.

--
assignee: collinwinter - 
components: +Interpreter Core -Benchmarks
versions:  -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13586] IDLE: Replace selected not working/consistent with find

2011-12-17 Thread Roger Serwy

Roger Serwy roger.se...@gmail.com added the comment:

On Linux using 2.7.1 and 3.2, the Replace dialog does not contain the selected 
text in the Find field.

The find functionality that copies the selected text was introduced in 
868ff0dfabd2 on 2002-11-06. Unfortunately it wasn't added to the Replace Dialog 
code. The attached patch (against 3.3a0) adds this functionality to Replace 
Dialog and also removes some non-functional (arguably broken) code.

--
keywords: +patch
nosy: +serwy
Added file: http://bugs.python.org/file24003/issue13586.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13586
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10951] gcc 4.6 warnings

2011-12-17 Thread Jérémy Anger

Jérémy Anger kidan...@gmail.com added the comment:

I've fixed two more warnings, see my patch. (gcc 4.6.2)

--
nosy: +kidanger
Added file: http://bugs.python.org/file24004/fix_2warnings.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8231] Unable to run IDLE without write-access to config directory

2011-12-17 Thread Roger Serwy

Changes by Roger Serwy roger.se...@gmail.com:


--
components: +IDLE -Library (Lib), Windows
nosy: +serwy
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13624] UTF-8 encoder performance regression in python3.3

2011-12-17 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Can you please provide your exact testing procedure? Standard iobench.py 
doesn't support testing for separate ASCII, UCS-1 and UCS-2 data, so you must 
have used some other tool. Exact code, command line parameters, hardware 
description and timing results would be appreciated.

Looking at the encoder, I think the first thing to change is to reduce the 
over-allocation for UCS-1 and UCS-2 strings. This may or may not help the 
run-time, but should reduce memory consumption.

I wonder whether making two passes over the string (one to compute the size, 
and the other one with an allocated result buffer) could improve the 
performance.

If there is further special-casing, I'd only special-case UCS-1. I doubt that 
the _READ() macro really is the bottleneck, and would rather expect that loop 
unrolling can help. Because of unallowed surrogates, unrolling is not practical 
for UCS-2.

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13610] On Python parsing numbers.

2011-12-17 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

-1 I'm with Mark, Georg, and Benjamin on this one.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13610
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13610] On Python parsing numbers.

2011-12-17 Thread Jean-Michel Fauth

Jean-Michel Fauth wxjmfa...@gmail.com added the comment:

 Ezio Melotti
Good catch.

I'm not complaining. I just find funny to see the number of editors
not colorizing this kind of Python valid expressions. (IDLE included)

For me, subject close.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13610
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13624] UTF-8 encoder performance regression in python3.3

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 Can you please provide your exact testing procedure?

Here you have.

$ cat bench.sh 
echo -n ASCII: 
./python -m timeit 'x=A*5' 'x.encode(utf-8)'
echo -n UCS-1: 
./python -m timeit 'x=\xe9*5' 'x.encode(utf-8)'
echo -n UCS-2: 
./python -m timeit 'x=\u20ac*5' 'x.encode(utf-8)'
echo -n UCS-4: 
./python -m timeit 'x=\U0010*5' 'x.encode(utf-8)'

Python 3.2:

ASCII: 1 loops, best of 3: 31.5 usec per loop
UCS-1: 1 loops, best of 3: 62.2 usec per loop
UCS-2: 1 loops, best of 3: 91.3 usec per loop
UCS-4: 1000 loops, best of 3: 267 usec per loop

Python 3.3:

ASCII: 10 loops, best of 3: 3.56 usec per loop
UCS-1: 1 loops, best of 3: 98.2 usec per loop
UCS-2: 1000 loops, best of 3: 201 usec per loop
UCS-4: 1 loops, best of 3: 168 usec per loop

Comparaison:

ASCII: Python 3.3 is 8.8x faster
UCS-1: Python 3.3 is 1.6x SLOWER
UCS-2: Python 3.3 is 2.2x SLOWER
UCS-4: Python 3.3 is 1.6x faster

iobench uses more realistic data.

 Standard iobench.py doesn't support testing for separate ASCII,
 UCS-1 and UCS-2 data, so you must have used some other tool.

According to Antoine, iobench is slower because of the UTF-8 encoder.

 hardware description

i7-2600 CPU @ 3.40GHz (8 cores) with 12 GB of RAM.

 I doubt that the _READ() macro really is the bottleneck

It is the only difference between Python 3.2 and 3.3. Or did I miss something? 
The body of the loop is very small, so each instruction is important.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13624] UTF-8 encoder performance regression in python3.3

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Oh, Antoine told me that I missed the -s command line argument to timeit:

$ cat bench.sh 
echo -n ASCII: 
./python -m timeit -s 'x=A*5' 'x.encode(utf-8)'
echo -n UCS-1: 
./python -m timeit -s 'x=\xe9*5' 'x.encode(utf-8)'
echo -n UCS-2: 
./python -m timeit -s 'x=\u20ac*5' 'x.encode(utf-8)'
echo -n UCS-4: 
./python -m timeit -s 'x=\U0010*5' 'x.encode(utf-8)'

Python 3.2:

ASCII: 1 loops, best of 3: 28.2 usec per loop
UCS-1: 1 loops, best of 3: 59.1 usec per loop
UCS-2: 1 loops, best of 3: 88.8 usec per loop
UCS-4: 1000 loops, best of 3: 254 usec per loop

Python 3.3:

ASCII: 100 loops, best of 3: 2.01 usec per loop
UCS-1: 1 loops, best of 3: 95.8 usec per loop
UCS-2: 1000 loops, best of 3: 201 usec per loop
UCS-4: 1 loops, best of 3: 151 usec per loop

The results look to be similar.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13624] UTF-8 encoder performance regression in python3.3

2011-12-17 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +flox

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13610] On Python parsing numbers.

2011-12-17 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

I'll close this then.

--
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13610
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13624] UTF-8 encoder performance regression in python3.3

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Python 3.2 (narrow):

ASCII: 1 loops, best of 3: 28.2 usec per loop
UCS-1: 1 loops, best of 3: 59.1 usec per loop
UCS-2: 1 loops, best of 3: 88.8 usec per loop
UCS-4: 1000 loops, best of 3: 254 usec per loop

Python 3.2 (wide):

ASCII: 1 loops, best of 3: 28.5 usec per loop
UCS-1: 1 loops, best of 3: 60.8 usec per loop
UCS-2: 1 loops, best of 3: 114 usec per loop
UCS-4: 1 loops, best of 3: 129 usec per loop

Python 3.3 (specialized UTF-8 encoder):

ASCII: 10 loops, best of 3: 2 usec per loop
UCS-1: 1 loops, best of 3: 45.4 usec per loop
UCS-2: 1 loops, best of 3: 96.4 usec per loop
UCS-4: 1 loops, best of 3: 140 usec per loop

Attached patch adds UTF-8 encoder for UCS1, UCS2 and UCS4.

--
keywords: +patch
Added file: http://bugs.python.org/file24005/utf8_encoder.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13624] UTF-8 encoder performance regression in python3.3

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 8x faster (!) for a string of 50.000 ASCII characters

Oooh, it's just faster because encoding ASCII to UTF-8 is now O(1). The ASCII 
data is shared with the UTF-8 data thanks to the PEP 393!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10951] gcc 4.6 warnings

2011-12-17 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset d7862e855274 by Victor Stinner in branch '3.2':
Issue #10951: Fix a compiler warning in timemodule.c
http://hg.python.org/cpython/rev/d7862e855274

New changeset 49b85dba251d by Victor Stinner in branch 'default':
Issue #10951: Fix compiler warnings in timemodule.c and unicodeobject.c
http://hg.python.org/cpython/rev/49b85dba251d

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10951
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2011-12-17 Thread Boris FELD

Boris FELD lothiral...@gmail.com added the comment:

The problem still exists in trunk with 3.2 and 3.3.

--
nosy: +Boris.FELD
versions: +Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13530] Docs for os.lseek neglect to mention what it returns

2011-12-17 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13530
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13530] Docs for os.lseek neglect to mention what it returns

2011-12-17 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 46c418d8a480 by Victor Stinner in branch '3.2':
Issue #13530: Document os.lseek() result
http://hg.python.org/cpython/rev/46c418d8a480

New changeset b05caa600c40 by Victor Stinner in branch 'default':
Issue #13530: Document os.lseek() result
http://hg.python.org/cpython/rev/b05caa600c40

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13530
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-17 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

Here's a patch which should fix this. However, I'm unable to test it.

--
keywords: +patch
Added file: http://bugs.python.org/file24006/pickle_overflow.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13530] Docs for os.lseek neglect to mention what it returns

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Thanks for the patch Jérémy.

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13530
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11231] bytes() constructor is not correctly documented

2011-12-17 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset beac7d6c7be4 by Victor Stinner in branch '3.2':
Issue #11231: Fix bytes and bytearray docstrings
http://hg.python.org/cpython/rev/beac7d6c7be4

New changeset dc670add1e28 by Victor Stinner in branch 'default':
Issue #11231: Fix bytes and bytearray docstrings
http://hg.python.org/cpython/rev/dc670add1e28

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11231
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-17 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I think there's a problem here:

+self-data = realloc(self-data, self-size * sizeof(PyObject *));
+if (self-data == NULL)
 goto nomemory;

If realloc() fails, the old data pointer is lost and therefore will never get 
free()ed.

Same for:

+self-buf = (char *)realloc(self-buf, self-buf_size);

Here:

-int *marks;
-s=self-marks_size+20;
-if (s = self-num_marks) s=self-num_marks + 1;
+size_t alloc;
+Py_ssize_t *marks;
+
+/* Use the size_t type to check for overflow. */
+alloc = ((size_t)self-num_marks  1) + 20;

It seems you are changing the overallocation algorithm (from additive to 
multiplicative). I'm not sure it should be in the scope of the patch, although 
multiplicative overallocation is generally better.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread Arnaud Calmettes

Arnaud Calmettes calmettes.arn...@gmail.com added the comment:

Hi,

Here is the patch I propose for this issue. This is my first attempt to 
contribute to Python, so please don't hit me too hard if I did something wrong. 
:)

When browsing the source code of complexobject.c, I also noticed that the 
return values of the _Py_c_quot and _Py_c_pow (which return zero in case of 
error) weren't documented at 

http://docs.python.org/dev/c-api/complex.html#_Py_c_quot

--
nosy: +arnaudc
Added file: http://bugs.python.org/file24007/patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-17 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

New version.

--
Added file: http://bugs.python.org/file24008/pickle_overflow-1.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

There's a typo in the patch: it's PyErr_Occurred (two r's), not PyErr_Occured.
Otherwise, looks good to me.

--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread Arnaud Calmettes

Arnaud Calmettes calmettes.arn...@gmail.com added the comment:

I fixed the typo and the markup.

--
Added file: http://bugs.python.org/file24009/patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 (bA*1000).find(bA): -70%

This one is a performance regression introduced by #12170. Attached patch 
checks object type before trying a conversion to size_t instead of catching an 
exception.

--
keywords: +patch
Added file: http://bugs.python.org/file24010/bytes_find.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10805] traceback.print_exception throws AttributeError when exception is None

2011-12-17 Thread Boris FELD

Boris FELD lothiral...@gmail.com added the comment:

I add a test to test_traceback.py for this bug. Bug is confirmed on python 3.2 
and python3.3. I use 2.x behavior as reference.

I don't know if we should add an assertion in traceback.print_exception or 
traceback._iter_chain, so I add the test for traceback.print_exception.

--
keywords: +patch
nosy: +Boris.FELD
Added file: 
http://bugs.python.org/file24011/new_traceback_test_print_traceback.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10805
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

bytes_find.patch only works for Python int, not object with the __index__ 
method. My new patch (bytes_find-2.patch) uses PyNumber_Check() instead of 
PyLong_Check() to be more generic. It fixes also a different issue: raise the 
same ValueError than bytes.find(-1) on overflow error.

--
Added file: http://bugs.python.org/file24012/bytes_find-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file24012/bytes_find-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Added file: http://bugs.python.org/file24013/bytes_find-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 75648db1b3f3 by Victor Stinner in branch 'default':
Issue #13623: Fix a performance regression introduced by issue #12170 in
http://hg.python.org/cpython/rev/75648db1b3f3

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12170] index() and count() methods of bytes and bytearray should accept byte ints

2011-12-17 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 75648db1b3f3 by Victor Stinner in branch 'default':
Issue #13623: Fix a performance regression introduced by issue #12170 in
http://hg.python.org/cpython/rev/75648db1b3f3

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12170
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12170] index() and count() methods of bytes and bytearray should accept byte ints

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

New changeset 75648db1b3f3 by Victor Stinner in branch 'default':
http://hg.python.org/cpython/rev/75648db1b3f3
Issue #13623: Fix a performance regression introduced by issue #12170 in 
bytes.find() and handle correctly OverflowError (raise the same ValueError than 
the error for -1).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12170
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 68cbf6551710 by Antoine Pitrou in branch '3.2':
Issue #13522: document error return values of some float and complex C API 
functions.
http://hg.python.org/cpython/rev/68cbf6551710

New changeset 1f096611baf4 by Antoine Pitrou in branch 'default':
Issue #13522: document error return values of some float and complex C API 
functions.
http://hg.python.org/cpython/rev/1f096611baf4

New changeset 059e4d752fbe by Antoine Pitrou in branch '2.7':
Issue #13522: document error return values of some float and complex C API 
functions.
http://hg.python.org/cpython/rev/059e4d752fbe

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13623] Bytes performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I checked stringbench: there is no more performance regression (difference of 
more than 20%).

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Committed now. Thank you for the patch!

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

_Py_c_pow() doc is wrong:

+   If :attr:`exp.imag` is not null, or :attr:`exp.real` is negative,
+   this method returns zero and sets :c:data:`errno` to :c:data:`EDOM`.

The function only fails if num=0 and exp.real  0 or if num=0 and exp.imag != 0.

--
nosy: +haypo
resolution: fixed - 
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 ...text.with.2000.lines...replace(\n,  ) (*10): -37.668161%

I also noticed a difference between Python 3.2 and 3.3, but Python 3.3 is 13% 
*faster* (and not slower). This benchmark is not really representative because 
stringbench only tests .replace() with ASCII. Replace requires to scan the 
result to check the next maximum character, except for ASCII. So expect a 
performance regression... except for ASCII.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread Arnaud Calmettes

Arnaud Calmettes calmettes.arn...@gmail.com added the comment:

Fixed.

--
Added file: http://bugs.python.org/file24014/diff_complex_rst

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset c802bfc8acfc by Victor Stinner in branch 'default':
Issue #13621: Optimize str.replace(char1, char2)
http://hg.python.org/cpython/rev/c802bfc8acfc

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13621] Unicode performance regression in python3.3 vs python3.2

2011-12-17 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 I also noticed a difference between Python 3.2 and 3.3,
 but Python 3.3 is 13% *faster* (and not slower).

Oops, I misused the timeit module, there is a regression.

 New changeset c802bfc8acfc by Victor Stinner in branch 'default':
 Issue #13621: Optimize str.replace(char1, char2)

./python -m timeit -s 'f=open(/tmp/README); t=f.read(); f.close(); 
t.encode(ascii)' 't.replace(\n,  )'

Python 3.2: 6.44 usec
Python 3.3 before: 11.6 usec
Python 3.3 after: 2.77 usec

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13621
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread Arnaud Calmettes

Arnaud Calmettes calmettes.arn...@gmail.com added the comment:

Previous patch was also wrong, sorry!

--
keywords: +patch
Added file: http://bugs.python.org/file24015/complex.rst-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 67a4e8fe650e by Victor Stinner in branch 'default':
Issue #13522: Fix _Py_co_pow() documentation
http://hg.python.org/cpython/rev/67a4e8fe650e

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-17 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13522
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13586] IDLE: Replace selected not working/consistent with find

2011-12-17 Thread Marco Scataglini

Marco Scataglini atlant...@gmx.com added the comment:

To check on 3.2 I installed a fresh Python 3.2.1.1 on Win7 x86 32bit and it has 
the same problem.
So this issues is valid on 2.7.2.1 and 3.2.1.1
I --dry-run Roger patch on both 2.7 and 3.2 with no errors or warnings messages 
and after patching it fixes the issue on both versions.

--
versions: +Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13586
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13586] IDLE: Replace selected not working/consistent with find

2011-12-17 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I am running 3.2.2 on 64-bit Win7Pro, which should not make a difference. So 
why did ^H work right for me yesterday and not for Marco today.

Retrying with fresh IDLEs I discovered the following: selections do not 
initially appear in the find part of a Replace box (^H). But after selecting 
and opening a Find box (^F) with something selected, the same text appears in 
Replace boxes regardless of the actual selection, even if there is no selection 
-- until another Find box is opened.

So I was fooled yesterday because I tried ^F first to see what the 'correct' 
behavior was and then did ^H with the same selection. And I did the same in 
both Shell and Edit windows. When testing, order matters ;-).

I discovered something else I am not sure is what we want. Clicking Find in a 
Replace box leaves the box open so one can Find again. Clicking Find in a Find 
box closes it. So you need ^F and Find to re-search.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13586
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >