Gregory P. Smith [EMAIL PROTECTED] added the comment:
better patch with tests attached, no explicit int conversion is done.
i also wrapped the use of the fd returned by open with a try: finally:
to avoid any chance of a leak and renamed the bytes variable to bs to
match whats in py3k and avoid
Changes by Gregory P. Smith [EMAIL PROTECTED]:
--
keywords: +patch
Added file: http://bugs.python.org/file11282/cookielib.diff
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3704
___
Changes by Laszlo (Laca) Peter [EMAIL PROTECTED]:
--
nosy: +laca
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3014
___
___
Python-bugs-list mailing
Gregory P. Smith [EMAIL PROTECTED] added the comment:
attached is a patch with the suggested fix along with a unit test.
--
assignee: - gregory.p.smith
keywords: +needs review
nosy: +gregory.p.smith
priority: - normal
Added file:
Gregory P. Smith [EMAIL PROTECTED] added the comment:
given where we are in the release process at the moment I doubt this can
go into 2.6/3.0. Bring it up on python-dev if you have compelling
reasons why it should.
Otherwise, looks good for trunk 2.7/3.1 immediately after the releases
are
Gregory P. Smith [EMAIL PROTECTED] added the comment:
looks good to me
--
nosy: +gregory.p.smith
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3703
___
Georg Brandl [EMAIL PROTECTED] added the comment:
OK, I changed that and committed r66051.
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3706
___
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
Another small remark; #ifdef is better then #ifndef
Simply because it easier to get Be positive than Don't be negative.
Yes; but here, the symbol (HAVE_BROKEN_MBSTOWC) has a negative meaning.
I tried to put the optimistic (=not
New submission from Gabriel Genellina [EMAIL PROTECTED]:
The Extending and Embedding document still says, in section Building
C and C++ Extensions on Windows:
http://docs.python.org/dev/extending/windows.html#a-cookbook-approach
that a C extension may be called spam.dll or spam_d.dll
Since
Antoine Pitrou [EMAIL PROTECTED] added the comment:
The title of your bug report might be misleading. Is the problem that
errno is misinterpreted in the error message, or that there is an error
message at all?
--
nosy: +pitrou
priority: - normal
versions: +Python 2.7 -Python 2.4
Georg Brandl [EMAIL PROTECTED] added the comment:
Thanks, fixed in r66053.
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3711
___
Antoine Pitrou [EMAIL PROTECTED] added the comment:
The explicit int() conversion looked saner to me, rather than passing a
float argument to read().
By the way, is there a reason this code still uses os.open rather than
the builtin io.open?
--
nosy: +pitrou
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
- the test_site leaked [88, 88] is the same as problem as issue3667.
- test_unicodes leaks in PyUnicode_AsEncodedString (attached patch), and
also with:
str(memoryview(b'character buffers are decoded to unicode'), 'utf-8')
I tried
Antoine Pitrou [EMAIL PROTECTED] added the comment:
str(memoryview(b'character buffers are decoded to unicode'), 'utf-8')
I tried another patch, but I'm not sure: I get lost between all these
buffers... a Py_DECREF(self-view.obj) in memory_releasebuf() seems to work.
Could you open a
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Yes; but here, the symbol (HAVE_BROKEN_MBSTOWC) has a negative meaning.
I tried to put the optimistic (=not broken) case first.
However, if this makes the code more difficult to read, I'll change it.
You could change HAVE_BROKEN_MBSTOWC for
New submission from Amaury Forgeot d'Arc [EMAIL PROTECTED]:
Two problems with memoryview:
- The buffer interface of memoryview leaks a reference:
str(memoryview(b'text'), 'utf-8')
- memoryview does not implement tp_traverse and tp_clear, so reference
cycle cannot be collected, as with:
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
issue3712 tracks the memoryview issues.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3660
___
___
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Here is a patch. I feel a bit unsafe with the intended semantics of
getting a buffer on a memoryview object, but it fixes the leak.
--
components: +Interpreter Core
keywords: +needs review, patch
nosy: +pitrou, teoliphant
type: -
Antoine Pitrou [EMAIL PROTECTED] added the comment:
(I forgot to say, the patch is for the first problem only)
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3712
___
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
the leaks in test_pickle and test_pickletools are corrected by the
attached patch.
Added file: http://bugs.python.org/file11288/pickle-leak.patch
___
Python tracker [EMAIL PROTECTED]
STINNER Victor [EMAIL PROTECTED] added the comment:
Python 2.5 has the same problem (at least, on Linux). rmtree(unicode
directory name) fails if the directory contains invalid unicode
string. Backtrace:
---
File shutil.py, line 163, in rmtree
fullname = os.path.join(path, name)
File
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
The fix is actually simple: _PyImport_FindExtension() used to return a
borrowed reference, the strong reference being stored in the
PyImport_GetModuleDict() dictionary. All paths should behave the same.
See attached patch.
(for unit
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Here is an aggregate patch addressing both problems. Please review.
Added file: http://bugs.python.org/file11290/memleak2.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3712
New submission from Andy [EMAIL PROTECTED]:
Checked out the PY3K branch and built. Received a warning
about characters after #ifdef ignored from Objects/stringlib/find.h
the line in question is:
#ifdef STRINGLIB_WANT_CONTAINS_OBJ !defined(FROM_BYTEARRAY)
Which is likely to mean that it will
Andy [EMAIL PROTECTED] added the comment:
patch for issue attached.
gcc -v = gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
tests:
./runtests.sh =
0 BAD
297 GOOD
27 SKIPPED
324 total
--
keywords: +patch
Added file: http://bugs.python.org/file11291/issue3713.patch
New submission from Dmitry Vasiliev [EMAIL PROTECTED]:
The following commands fail badly:
from nntplib import NNTP
s = NNTP(free-text.usenetserver.com)
Traceback (most recent call last):
File stdin, line 1, in module
File /py3k/Lib/nntplib.py, line 116, in __init__
self.welcome =
Dmitry Vasiliev [EMAIL PROTECTED] added the comment:
I've attached the patch which adds encoding parameter to the NNTP class.
--
keywords: +patch
Added file: http://bugs.python.org/file11292/nntplib.patch
___
Python tracker [EMAIL PROTECTED]
johansen [EMAIL PROTECTED] added the comment:
The problem is present in Python 2.4.4, the version that we're using
here. I'm not familiar with the versions keyword that's used here, but
that's the version for which I'm reporting this bug.
To be clear, the problem is that when file_dealloc()
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Selon johansen [EMAIL PROTECTED]:
The problem is present in Python 2.4.4, the version that we're using
here. I'm not familiar with the versions keyword that's used here, but
that's the version for which I'm reporting this bug.
The only
Daniel Diniz [EMAIL PROTECTED] added the comment:
Hagen,
does this simple patch (against 2.6) solve it for you?
Index: Lib/pickle.py
===
--- Lib/pickle.py (revision 66050)
+++ Lib/pickle.py (working copy)
@@ -1121,6
Hagen Fürstenau [EMAIL PROTECTED] added the comment:
Well, Python = 2.5 still wouldn't be able to unpickle those built in
objects.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3675
___
johansen [EMAIL PROTECTED] added the comment:
As I said before:
check_and_flush calls ferror(3C) and then fflush(3C) on the FILE
stream associated with the file object. There's just one problem
here. If it finds an error that was previously encountered on the
file stream, there's no
New submission from Erick Tryzelaar [EMAIL PROTECTED]:
Hello,
I noticed that doing pydoc3.0 hashlib was throwing this exception:
Traceback (most recent call last):
File /opt/local/bin/pydoc3.0, line 5, in module
pydoc.cli()
File
Daniel Diniz [EMAIL PROTECTED] added the comment:
FWIW, there's a mapping of 2.6:3.0 modules in lib2to3:
from lib2to3.fixes.fix_imports import MAPPING
The attached patch uses that for a quick and dirty way of loading 3.0
pickles in 2.6.
--
keywords: +patch
Added file:
Daniel Diniz [EMAIL PROTECTED] added the comment:
ISTM that this release blocker can be solved by changing
xml.sax.xmlreader.py line 122 from:
while buffer != :
to
while buffer != b:
--
nosy: +ajaksu2
___
Python tracker [EMAIL
Changes by Jesús Cea Avión [EMAIL PROTECTED]:
--
nosy: +jcea
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3680
___
___
Python-bugs-list mailing list
Christian Heimes [EMAIL PROTECTED] added the comment:
I've a better idea:
while buffer:
It's faster and works for both empty bytes and str.
The patch fixes the issue and re-enables three unit tests.
--
keywords: +needs review, patch
Added file:
Simon Cross [EMAIL PROTECTED] added the comment:
I've just checked that the patch still applies cleanly to 2.6 and it
does and the tests still passes. It looks like the patch has already
been applied to 3.0 but without the test. The test part of the part
applies cleanly to 3.0 too.
--
New submission from Alex7564 [EMAIL PROTECTED]:
Note that if the attribute is found through the normal mechanism,
__getattr__() is not called.
...because otherwise __setattr__() would have no way to access other
attributes of the instance.
I think it should be __getattr__() instead of
Alex7564 [EMAIL PROTECTED] added the comment:
Note that if the attribute is found through the normal mechanism,
__getattr__() is not called.
because otherwise __setattr__() would have no way to access other
attributes of the instance.
I think it's __getattr__() instead of __setattr__()
Gregory P. Smith [EMAIL PROTECTED] added the comment:
if i did
n = int(n)
that would change the API to allow bytes/unicode to be passed in which
is not something i want. i don't even like that it allows floats.
by not doing the int conversion at all, a DeprecationWarning is raised
by the
Alex7564 [EMAIL PROTECTED] added the comment:
I was talking about Python Reference Manual
(http://docs.python.org/ref/attribute-access.html)
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3716
___
Daniel Diniz [EMAIL PROTECTED] added the comment:
Gregory,
IMHO your patch is better in all aspects.
Regarding my patch, the API wouldn't change at all, as the source reads:
while len(bytes) int(n):
bytes += read(_urandomfd, n - len(bytes))
So n - len(bytes) restricts the
Ben Cottrell [EMAIL PROTECTED] added the comment:
I like this patch, too! I think it's a much cleaner way of implementing
the thread._local type. However, when I test it, I have problems with
subclasses of thread._local; using the class itself seems to work.
I've attached a test program that
New submission from Erick Tryzelaar [EMAIL PROTECTED]:
The docs still reference Py_InitModule*, which was removed in r64107.
Also, Demo/embed/demo.c still use Py_InitModule, and thus doesn't
compile.
--
assignee: georg.brandl
components: Documentation
messages: 72111
nosy: erickt,
Christian Heimes [EMAIL PROTECTED] added the comment:
Good catch, Ben!
The generic setattr/getattr functions don't work as expected when the
base class doesn't provide a __dict__. They are setting the attributes
in the subclass' __dict__ instead of the thread local dict.
My patch fixes the
Erick Tryzelaar [EMAIL PROTECTED] added the comment:
On Thu, Aug 28, 2008 at 1:48 PM, Erick Tryzelaar [EMAIL PROTECTED] wrote:
New submission from Erick Tryzelaar [EMAIL PROTECTED]:
The docs still reference Py_InitModule*, which was removed in r64107.
Also, Demo/embed/demo.c still use
Nick Coghlan [EMAIL PROTECTED] added the comment:
Reopening - still need to fix the Python level docs for hash() and
__hash__().
--
resolution: fixed -
status: closed - open
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2235
Ben Cottrell [EMAIL PROTECTED] added the comment:
Christian,
Your patch works for me -- thanks!!
I made a slight modification to your patch to allow del to work,
and have attached my modified version.
I agree that allowing subclassing makes thread._local harder to get
right than it would
New submission from Roumen Petrov [EMAIL PROTECTED]:
A) The reason to propose this patch following paragraph
from README:
2) To set sys.platform to something sensible, pass the
following environment variable to the configure script:
Changes by Antoine Pitrou [EMAIL PROTECTED]:
--
nosy: -pitrou
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3014
___
___
Python-bugs-list mailing list
Antoine Pitrou [EMAIL PROTECTED] added the comment:
Le jeudi 28 août 2008 à 19:30 +, Gregory P. Smith a écrit :
if i did
n = int(n)
that would change the API to allow bytes/unicode to be passed in which
is not something i want.
Ok, I hadn't thought about that. You convinced me.
New submission from jfdp [EMAIL PROTECTED]:
If you install python in a location which has a space
or shell character in the path then platform.platform()
will generate an error and/or fail to get all platform
information.
For example
$ pwd
/disk0/tmp/foobar(2)/python2.4/bin
$ ./python
Python
New submission from Gideon Smeding [EMAIL PROTECTED]:
The attached example crashes python. The crash is caused by an evil
iterator that removes its own next function.
--
files: baditerator.py
messages: 72119
nosy: gideon
severity: normal
status: open
title: segfault in for loop with
54 matches
Mail list logo