Amaury Forgeot d'Arc added the comment:
Sorry, my patch corrected only sqlite3.Connection().
I join a new version, which also changes sqlite3.connect().
By the way, the test should test that the file is created with the
correct name. A call to os.stat() could be enough.
Added file:
Changes by Amaury Forgeot d'Arc:
Removed file: http://bugs.python.org/file9474/sqlite_connect.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2127
__
___
Python-bugs-list
Hirokazu Yamamoto added the comment:
I wrote simple patch to workaround this problem.
(avoid to reuse DocTestSuite)
# To my eyes, doctest.DocTestSuite(module=collections)
# and test_support.run_doctest(collections, verbose)
# are doing same test???
Added file:
Alexander Belopolsky added the comment:
The affected code is the only case I could find in stdlib where O
format was used to populate PyObject* variables. Although it appears to
be valid usage, the code presents an exception to the following note at
http://docs.python.org/dev/c-api/arg.html
New submission from Hirokazu Yamamoto:
Fixed memory leak in itertools.chain().
This fixes following refleak errors shown in issue2223.
test_deque test_heapq test_itertools test_list test_set test_userlist
--
components: Extension Modules
files: fix_leak.patch
keywords: patch
messages:
Alexander Belopolsky added the comment:
Good catch, Hirokazu!
The patch looks correct to me.
Works as advertised on Mac OS 10.4.
--
nosy: +belopolsky
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2231
__
Changes by Raymond Hettinger:
--
assignee: - rhettinger
nosy: +rhettinger
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2231
__
___
Python-bugs-list mailing list
New submission from Jason Tishler:
Makefile.pre.in contains extra slash before $(DESTDIR) in two locations
as in the following:
sharedinstall:
$(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
New submission from jason kirtland:
In 2.6a, seems like the __hash__ implementation and __eq__ must be
defined together, in the same class. See also #1549. Ensuring that a
__hash__ implementation isn't being pulled from a builtin type is
probably a sufficient check...?
class Base(object):
New submission from Henrique Romano:
The default value for mkpath's mode parameter is 0777 but it isn't used
at any place; attached is a patch that just pass the parameter to
os.mkdir call, this seems to fix the problem.
--
components: Library (Lib)
files:
Christian Heimes added the comment:
Side note:
I've removed the methods from Python 3.0 about half a year ago. Code
should use the tempfile module anyway. Does any of the Python 2.6 stdlib
code use an os.tmp* method?
--
nosy: +tiran
__
Tracker [EMAIL
New submission from Sylwester Warecki:
Hi!
An example below shows how differently local variables are treated in
case of simple variables and classes. In case of objects the variable
refers to global object, in case of simple number - it refers to a local.
Example 2 shows worse case scenario.
Benjamin Peterson added the comment:
According to grep, the only place where os.tmp* is referenced is in test_os.
--
nosy: +benjamin.peterson
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2232
__
Amaury Forgeot d'Arc added the comment:
This issue is similar to issue1549. Note that only new-style classes are
concerned.
I think the change was intentional. Guido, do you confirm?
However there should be some documentation about it, a NEWS entry or an
item in the porting to 2.6 section.
Raymond Hettinger added the comment:
Wouldn't you expect this sort of thing to break code? Does it meet the
criteria for backporting to 2.6?
--
nosy: +rhettinger
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2235
Guido van Rossum added the comment:
The py3k feature was intentional.
I'm not sure who did the backport (could've been me, long ago). I think
the backport should be replaced with a warning that is only issued when
-3 is given.
__
Tracker [EMAIL PROTECTED]
Changes by Raymond Hettinger:
--
priority: - high
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2235
__
___
Python-bugs-list mailing list
Unsubscribe:
Amaury Forgeot d'Arc added the comment:
... adding a line to end the code AFFECTS its beginning ...
Exactly. Please see
http://docs.python.org/dev/reference/executionmodel.html
If a name binding operation occurs anywhere within a code block, all
uses of the name within the block are treated
Raymond Hettinger added the comment:
Fixed in r61237.
--
resolution: - fixed
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2231
__
___
Jean Brouwers added the comment:
Attached are the improved hotspot files, rev 2. The changes are rather
drastic, in particular since hires time delta's may exceed 32-bit int.
These 3 files have been tested with Python 2.5.2 only and on 32-bit
Linux and MacOS X and on 64-bit Linux and Solaris
Amaury Forgeot d'Arc added the comment:
The attached patch reverts r59576 and the part of r59106 about the
tp_hash slot.
It also adds the py3k warning::
type defines __eq__ but not __hash__, and will not be hashable in 3.x
printed when calling hash() on such an object.
--
keywords:
Amaury Forgeot d'Arc added the comment:
I noticed that my patch uses Py_TYPE(self)-tp_hash, whereas normal
processing of slot_tp_hash() uses lookup_method(self,__hash__,hash_str).
I am almost sure that both expressions return the same value.
Is this correct? Py_TYPE(self)-tp_hash seems much
Guido van Rossum added the comment:
I noticed that my patch uses Py_TYPE(self)-tp_hash, whereas normal
processing of slot_tp_hash() uses lookup_method(self,__hash__,hash_str).
I am almost sure that both expressions return the same value.
Is this correct? Py_TYPE(self)-tp_hash seems much
Amaury Forgeot d'Arc added the comment:
Ah, I remember that it took me some time to understand the boundaries
between a slot and the corresponding special method.
Here is another version of the patch, which does not test tp_hash while
we are currently running the tp_hash function...
I also
New submission from Nathan Collins:
I have a file f1.py
$ cat f1.py
import os
(lambda **x:x)(**dict(y,y for y in ()))
and when I run it
$ python f1.py
Traceback (most recent call last):
File f1.py, line 1, in module
import os
TypeError: 'int' object is not iterable
Notice that the
Amaury Forgeot d'Arc added the comment:
Interestingly, in debug mode, the message XXX undetected error is
printed to stderr.
And this gives the solution: in ast.c, some calls did not check the
return status.
Committed revision 61240, will backport to 2.5.
Thanks for the report!
Thanks for the
Hirokazu Yamamoto added the comment:
I did more investigation.
Failure on second DocTestSuite run happens because
lib/doctest.py (2107) test.globs.clear()
is executed after first test runs.
I don't know if this is bug or not. Document in
doctest.py says test.globs will be untouched on
failure
27 matches
Mail list logo