Marc-Andre Lemburg added the comment:
Your microbenchmark is biased towards your patched version. The
KEEPALIVE_SIZE_LIMIT will only cut in when you deallocate and then
reallocate Unicode objects. The free list used for Unicode objects is
also limited to 1024 objects - which isn't all that much.
Changes by Christian Heimes:
--
priority: - normal
type: - rfe
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1944
__
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Christian Heimes:
Document the C functions which were back ported from py3k in r60283.
--
components: Documentation
keywords: easy
messages: 61736
nosy: tiran
priority: normal
severity: normal
status: open
title: Document back ported C functions
type: rfe
versions:
Mark Dickinson added the comment:
I noticed that the ability to type Rational(2.3) has been added (and I
think this is a very useful addition). One minor nit: would it make
sense to have Rational(2.) and Rational(.3) also work? These strings
work for float() and Decimal(), and 2. and .3
Antoine Pitrou added the comment:
With KEEPALIVE_SIZE_LIMIT = 200, the pybench runtime is basically the
same as with my patched version. stringbench remains a bit faster though
(~8%).
You say that RAM size is cheaper than CPU power today, which is true but
misses one part of the picture: the
New submission from Israel Tsadok:
import re
re.search(r'a(b[^b]*b|[^c])*cxxx',
'abbcacacabbcabbcacabbcacac')
perl seems to handle this just fine.
(The original problem was trying to translate some html to text:
re.sub(r'p(?:[^]*|[^])*(.*?)/p', r'\1\n')
Marc-Andre Lemburg added the comment:
I don't really see the connection with #1629305.
An optimization that would be worth checking is hooking up the
Py_UNICODE pointer to interned Unicode objects if the contents match
(e.g. do a quick check based on the hash value and then a memcmp). That
Antoine Pitrou added the comment:
All of those proposals are much heavier to implement; they also make the
unicode type more complicated and difficult to maintain probably (while
turning it into a PyVarObject actually shortens the implementation a
bit). In any case, it's not something I want to
New submission from shore.cloud:
Exception exceptions.AttributeError: '_shutdown' in
module 'threading' from 'F:
\Python25\lib\threading.pyc' ignored
--
files: thread1.py
messages: 61742
nosy: Mr Shore
severity: normal
status: open
title: Exception exceptions.AttributeError '_shutdown'
Marc-Andre Lemburg added the comment:
Agreed, those optimizations do make the implementation more complicated.
It's also not clear whether they would really be worth it.
#1629305 only provided speedups for the case where you write s += 'abc'.
The usual idiom for this is to use a list and then
Georg Brandl added the comment:
Done in r60366, thanks!
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1867
__
___
Python-bugs-list mailing list
Unsubscribe:
Benjamin Peterson added the comment:
Today, I carefully looked through every change in my patching. I asked
myself Does this do the same things in the same order as the original?
and Could exceptions cause the code to function differently? They only
changes were when the block which used the
Christian Heimes added the comment:
Next time please set type, component and version
--
components: +Library (Lib)
nosy: +tiran
priority: - low
type: - behavior
versions: +Python 2.5
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1947
Antoine Pitrou added the comment:
I know it's not the place to discuss #1629305, but the join() solution
is not always faster. Why? Because 1) there's the list contruction and
method call overhead 2) ceval.c has some bytecode hackery to try and
make plain concatenations somewhat less slow.
As
New submission from safe alattar:
I need help opening the python gui (IDLE). On XP I had no issues. On
Vista nothing occurs when I try to open IDLE. If there is a solution to
this, please let me know in a user friendly manner (Im new to this!) Thanks.
--
messages: 61749
nosy:
shore.cloud added the comment:
I will,sorry
2008/1/28, Christian Heimes [EMAIL PROTECTED]:
Christian Heimes added the comment:
Next time please set type, component and version
--
components: +Library (Lib)
nosy: +tiran
priority: - low
type: - behavior
versions: +Python 2.5
New submission from Giampaolo Rodola':
Since I noticed that test_ntpath.py (unlike test_genericpath.py,
test_macpath.py and test_posixpath.py) does NOT use unittest for doing
tests I tried to rewrite it.
The patch in attachment does that leaving the original tests unchanged.
Tested successfully
Changes by Giampaolo Rodola':
Added file: http://bugs.python.org/file9302/test_ntpath.py
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1949
__
___
Python-bugs-list mailing
Changes by Giampaolo Rodola':
--
title: test_ntpath.py rewriting - test_ntpath.py converted to unittest
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1949
__
___
Christian Heimes added the comment:
The patch looks fine but I've no time to review it properly.
--
keywords: +easy, patch
nosy: +tiran
priority: - normal
resolution: - accepted
type: - rfe
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1949
New submission from Alexandre Vassalotti:
I have found a few instances of the following pattern in Py3k:
char buf[MAX];
len = PyUnicode_GET_SIZE(str);
if (len = MAX)
/* return error */
strcpy(buf, PyUnicode_AsString(str));
which could overflow if str contains non-ASCII
Changes by Alexandre Vassalotti:
--
title: Potential Overflow due to incorrect usage of PyUnicode_AsString. -
Potential overflows due to incorrect usage of PyUnicode_AsString.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1950
New submission from Giampaolo Rodola':
In attachment.
--
components: Tests
files: test_wave.diff
messages: 61754
nosy: giampaolo.rodola
severity: minor
status: open
title: test_wave.py converted to unittest
type: rfe
versions: Python 2.6
Added file:
Giampaolo Rodola' added the comment:
Sorry but I realized right now by reading Lib/test/readme.txt that the
test scripts are required to have a global test_main() function
defined hence the main() function I defined in my patch should be
renamed in test_main().
New submission from Giampaolo Rodola':
In attachment.
--
components: Tests
files: test_select.diff
messages: 61756
nosy: giampaolo.rodola
severity: minor
status: open
title: test_select.py converted to unittest
type: rfe
versions: Python 2.6
Added file:
Changes by Giampaolo Rodola':
Added file: http://bugs.python.org/file9306/test_select.py
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1952
__
___
Python-bugs-list mailing
Ismail Donmez added the comment:
Thanks for the through review! I will add -Wsign-compare and fix new
warnings.
Btw current state is with the patch -fwrapv is not needed and no
regressions.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1621
Neal Norwitz added the comment:
I just added -Wstrict-overflow to the code in sysmodule.c
(sys_getframe) and tried with gcc 4.2.1. It doesn't warn. I wonder
if 4.3 is more picky or warns when it shouldn't?
Unless if I changed the code so it doesn't work:
typedef struct {int ref;} PyObject;
Guido van Rossum added the comment:
Unfortunately I have no time to work on this myself, but in order to
make progress I recommend checking in things piecemeal so that the same
changes don't get reviewed over and over again. I propose that each
submit reference this bug (Partial fix for issue
Ismail Donmez added the comment:
To Neal,
Can you try with -Wstrict-overflow=3 , but yes I am using gcc 4.3 trunk.
To Guido,
I'll check _csv.c issue closely. Shall I create the new bug reports or
will reviewers will do so and CC me maybe?
__
Tracker [EMAIL
Neal Norwitz added the comment:
On Jan 27, 2008 6:45 PM, Ismail Donmez [EMAIL PROTECTED] wrote:
Can you try with -Wstrict-overflow=3 , but yes I am using gcc 4.3 trunk.
I just tried with =1, =2, =3, and no =. All the same result: no warning.
Ismail, thanks for going through all this
Guido van Rossum added the comment:
Don't create new bug reports!
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1621
__
___
Python-bugs-list mailing list
Unsubscribe:
Ismail Donmez added the comment:
_sre.c case is the most interesting one , compiler says :
./Modules/_sre.c:1002: warning: assuming signed overflow does not occur
when simplifying conditional to constant
./Modules/_sre.c:1069: warning: assuming signed overflow does not occur
when simplifying
Ismail Donmez added the comment:
For xmlparse.c compiler says :
Modules/expat/xmlparse.c:5337: warning: assuming signed overflow does
not occur when simplifying conditional to constant
Its impossible for j to overflow here due to name[i] check but I am not
sure what gcc is optimizing here.
Guido van Rossum added the comment:
for (i = 0; i strlen(field) ; i++) {
This looks inefficient. Why not
for (i = 0; field[i] != '\0'; i++) {
???
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1621
__
Ray Chason added the comment:
It seems that I, or whoever writes any future test_nntplib.py, would
have to understand how existing tests such as test_smtplib.py work. It
looks like that one is setting up some kind of miniature mail server and
accepting a connection on localhost -- neat trick,
safe alattar added the comment:
I made a search for the hidden folder 'idlerc' and got back no results : (
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1948
__
___
New submission from Christian Heimes:
The patch implements gc.compact_freelists() which calls PyInt and
PyFloat_CompactFreeList(). I've moved the code from the _Fini methods to
the _CompactFreeList() methods.
The patch also moves the clear type cache function to gc.clear_type_cache().
Ismail Donmez added the comment:
Hah strlen in a loop, a nice beginner mistake but its 5.30 AM here so
please excuse me, Guido your version of course is way better. But with
that version compiler issues
Modules/_csv.c:969: warning: assuming signed overflow does not occur when
simplifying
Changes by Christian Heimes:
--
keywords: +patch
priority: - normal
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1952
__
___
Python-bugs-list mailing list
40 matches
Mail list logo