Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
-1 on this patch. Reversed has a very low overhead. Readability if
more important. The current code is self-evidently correct but the
patched code is less obviously so.
--
___
Francesco Sechi francesco.se...@iet.unipi.it added the comment:
All right, now I understand, thanks. But I think that, for internal
class coherence, it is necessary not to modify toxml method, but the
'setAttribute' one, because this is the source of the problem.
--
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
FWIW, the inefficiency is only in the loop setup, the time to call
reversed() and __reversed__(). The inner loop runs at the same speed
because xrange provides a __reversed__ iterator.
Please do not go through the standard
Kuang-che Wu k...@csie.org added the comment:
ocrean-city's patch applied cleanly with trunk and it works for me.
Could anybody review and commit? I could help if any refinement required.
--
nosy: +kcwu
___
Python tracker rep...@bugs.python.org
Robert Collins robe...@robertcollins.net added the comment:
Well, I think its relatively uncommon to be doing such a loop with a
static buffer anyway - often you'll instead be reading from disk or a
network stream; if we could make those cases simpler and avoid copying
that would be great.
Ralph Corderoy ralph-pythonb...@inputplus.co.uk added the comment:
Does that mean it's policy not to correct documentation for non-latest
versions? Fair enough. But perhaps
http://www.python.org/doc/2.5.2/lib/about.html should be changed to
reflect that, and likewise on other non-latest
New submission from Senthil orsent...@gmail.com:
Help on built-in module marshal:
NAME
marshal
FILE
(built-in)
MODULE DOCS
http://docs.python.org/library/marshal
FUNCTIONS
dump(...)
dumps(...)
load(...)
loads(...)
DATA
version = 2
--
New submission from Michael Foord mich...@voidspace.org.uk:
This patch adds a verbosity keyword argument to unittest.main - so you
can do:
if __name__ == '__main__':
unittest.main(verbosity=2)
It also has a minor fix allowing you to specify test modules / classes
from the command
Antoine Pitrou pit...@free.fr added the comment:
It would be nice to have a test for the command line functionality but
I'm not sure it's easy.
In Misc/NEWS, please add the issue number as in other entries.
Other than that, looks fine.
--
keywords: -needs review
nosy: +pitrou
priority:
Michael Foord mich...@voidspace.org.uk added the comment:
I didn't add the issue number because I created the patch prior to
creating the issue. Will add when I commit. Would like permission to
commit this from an interested core developer.
--
___
New submission from johannes raggam raggam...@adm.at:
when declaring a abstract base class with an abstract property or method
and subclassing from dict, the class is instantiable (instanceable?).
import abc
class A(object):
... __metaclass__ = abc.ABCMeta
... @abc.abstractproperty
Antoine Pitrou pit...@free.fr added the comment:
2. The current WeakSet implementation returns True if a WeakSet is
compared to any Iterable which contains the same set of objects:
Sounds bad. It should probably be fixed.
--
___
Python tracker
Robert Schuppenies robert.schuppen...@gmail.com added the comment:
Sounds right to me. Here is another patch plus tests.
Going through the other tests, I adapted two more tests to actually test
WeakSet. Also, I found the following one and think it is a copypaste
from test_set which is not
Changes by Robert Schuppenies robert.schuppen...@gmail.com:
Removed file: http://bugs.python.org/file13955/_weakrefset.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5964
___
Antoine Pitrou pit...@free.fr added the comment:
Going through the other tests, I adapted two more tests to actually test
WeakSet. Also, I found the following one and think it is a copypaste
from test_set which is not useful for test_weakset. Should it be removed
(as currently done in the
Christopher Altona calto...@gmail.com added the comment:
I found that if I go into the Windows Task Manager and end (somtimes
both of) the Python processes, the program will run properly the next
time I open it.
Hope this helps.
--
nosy: +ChrisAltona
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The first patch will introduce regressions for strings that cannot be
decoded with the filesystem encoding. It is necessary to provide a
fallback to the CreateProcessA function.
I'd prefer the python-only patch, except for the sys=sys
Mark Dickinson dicki...@gmail.com added the comment:
Fixed in r72564 (trunk), r72565 (py3k). The trailing whitespace bugfix
was backported in r72566 (2.6) and r72567 (3.0), but those versions still
use locale-aware isspace and islower.
As a semi-accidental by-product, the fix also changes
New submission from Jonathan jonathan.cervi...@gmail.com:
[...@jaydee Development]$ cat is-strftime-broken.py
#!/usr/bin/env python
import subprocess
import time
date_process = subprocess.Popen(
(date, +%x), stdout=subprocess.PIPE)
from_date_command = date_process.communicate()[0].rstrip()
Michael Foord mich...@voidspace.org.uk added the comment:
Committed in revision 72570.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5995
___
R. David Murray rdmur...@bitdance.com added the comment:
Please read
http://docs.python.org/library/locale.html
specifically the docs for 'setlocale'. Before you call setlocale,
python's locale is 'C', just like for any C program before it calls
setlocale.
Python 2.6.2 (r262:71600, May 2
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5945
___
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5982
___
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: georg.brandl - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5953
___
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: georg.brandl - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3292
___
Jonathan Hayward jonathan.hayw...@pobox.com added the comment:
Constantine Sapuntzakis wrote:
import ssl
# Work around python bug #5328
def SSLSocket_makefile_fixed(self, mode='r', bufsize=-1):
from socket import _fileobject
self._makefile_refs += 1
return _fileobject(self,
Francesco Sechi francesco.se...@iet.unipi.it added the comment:
A solution for this issue could be to replace the setAttribute method as
follow:
- d[value] = d[nodeValue] = value
+ d[value] = d[nodeValue] = value.replace('\n',' ')
NOTE: I didn't do a patch, because I don't know which python
New submission from Floris Bruynooghe floris.bruynoo...@gmail.com:
I think it would allow for more pythonic code if the threading.Event and
multiprocessing.Event classes had the __bool__ special attribute. This
would allow doing if e: ... instead of if e.is_set():
This could be backported
New submission from Sridhar Ratnakumar sridh...@activestate.com:
cc +DD64 -Ae -D_REENTRANT +Z -c -DNDEBUG -O -I. -IInclude -I./Include
-DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c
Error 419: ./Modules/python.c, line 34 # 'mbstate_t' is used as a
type, but has not been defined as a
Changes by Francesco Sechi francesco.se...@iet.unipi.it:
Removed file: http://bugs.python.org/file13837/test_toxml.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5752
___
Changes by Francesco Sechi francesco.se...@iet.unipi.it:
Added file: http://bugs.python.org/file13960/test_toxml.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5752
___
New submission from Sridhar Ratnakumar sridh...@activestate.com:
cc_r -qlanglvl=ansi -c -DNDEBUG -O -I. -IInclude -I./Include
-DPy_BUILD_CORE -o Python/symtable.o Python/symtable.c
Python/symtable.c, line 767.50: 1506-068 (S) Operation between types
struct _object* and int is not allowed.
Francesco Sechi francesco.se...@iet.unipi.it added the comment:
I have uploaded a test script that shows that, without my patch, the
methods setAttribute and parseString work differently; adding my patch,
the behaviour is symmetric.
--
___
Python
New submission from Michael Foord mich...@voidspace.org.uk:
Attached is a patch that implements test discovery for unittest.
It includes command line argument handling (awkward manual handling but
works fine...), so that it can be invoked through:
python -m unittest discover
python -m
Michael Foord mich...@voidspace.org.uk added the comment:
Hehe - I wasn't actually doing that, just replacing the use of the
obsolete functions.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5846
Changes by R. David Murray rdmur...@bitdance.com:
--
dependencies: +test_urlllib2_localnet DigestAuthHandler leaks nonces
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5596
___
Changes by R. David Murray rdmur...@bitdance.com:
--
title: test_urlllib2_localnet DigestAuthHandler leaks nonces -
test_urllib2_localnet DigestAuthHandler leaks nonces
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6002
Jonathan jonathan.cervi...@gmail.com added the comment:
Works perfectly now, thank you and sorry for the inaccurate report.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5997
___
Floris Bruynooghe floris.bruynoo...@gmail.com added the comment:
The updated patch inserts the single $ when needed. I've checked this
on compiling python, stdlib extension modules and custom extension
modules and this gives the correct results in all cases.
--
Added file:
Greg Couch gr...@cgl.ucsf.edu added the comment:
I like the C patch better. It only tries to decode non-unicode objects
with the filesystem (mbcs) encoding. This fits in with Python 3.0
perfectly where all strings are unicode. In 2.5, strings are assumed to
be in the mbcs encoding, to match
Daniel Diniz aja...@gmail.com added the comment:
Thanks, Marcin!
Same bug seems to apply to py3k, ported patches attached.
--
stage: - patch review
versions: +Python 3.1
Added file: http://bugs.python.org/file13964/return_socket.diff
___
Python
Jason R. Coombs jar...@jaraco.com added the comment:
Although this was fixed for 3.1, it appears not to be fixed for Python
2.6 or 2.7.
PS C:\Users\jaraco python
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)] on win32
Type help, copyright, credits or license for
R. David Murray rdmur...@bitdance.com added the comment:
Patch attached for trunk based on 2.6.2 docs. I only included what felt
like the essential parts of the module description.
--
assignee: georg.brandl - r.david.murray
keywords: +patch
nosy: +r.david.murray
stage: - patch review
R. David Murray rdmur...@bitdance.com added the comment:
Fixed in r72572, r72573, r72574, and r72575.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Senthil orsent...@gmail.com added the comment:
David, should the marshal.version be explained as it is present in the docs?
marshal.version
Indicates the format that the module uses. Version 0 is the
historical format, version 1 (added in Python 2.4) shares interned
strings and version 2
Alexandre Vassalotti alexan...@peadrop.com added the comment:
The bug shouldn't affect 2.6 and 2.7 unless you backported the now
obsolete _stringio module from 3.0.
I tested 2.6 and 2.7 and as expected I didn't see the bug:
Python 2.6.2+ (release26-maint:72576, May 11 2009, 23:16:48)
[GCC
Daniel Diniz aja...@gmail.com added the comment:
Francesco,
Your patch still doesn't allow one to add a multiline attribute values
as Tomalak describes:
The catch: This leads to an actual data loss if I *wanted* to store
newline characters in an attribute -- unless the newline characters are
Changes by Daniel Diniz aja...@gmail.com:
--
priority: - normal
stage: test needed - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5752
___
Kuang-che Wu k...@csie.org added the comment:
There is slight difference between C and python patch.
C version: convert mbcs argument to unicode
py version: convert unicode argument to mbcs
Actually, python version patch may not work if the string is unicode and
cannot encoded by mbcs. For
Changes by Daniel Diniz aja...@gmail.com:
--
nosy: +eric.smith
priority: - normal
stage: - patch review
versions: +Python 2.7, Python 3.2 -Python 2.1.1, Python 2.1.2, Python 2.2,
Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5,
Python 2.6, Python 3.0
Daniel Diniz aja...@gmail.com added the comment:
Renaud,
Here's your patch with a test case against trunk.
--
stage: test needed - patch review
Added file: http://bugs.python.org/file13967/noisy_get_payload.diff
___
Python tracker
51 matches
Mail list logo