Changes by Daniel Stutzbach :
--
dependencies: +Add traceback.print_full_exception()
nosy: +stutzbach
versions: +Python 3.3 -Python 3.2
___
Python tracker
<http://bugs.python.org/issue9
New submission from Daniel Stutzbach :
By the time _PyUnicode_Init is called and does the following:
/* Init the implementation */
free_list = NULL;
numfree = 0
Changes by Daniel Stutzbach :
--
keywords: +needs review, patch
Added file: http://bugs.python.org/file20999/unicode-leak.patch
___
Python tracker
<http://bugs.python.org/issue11
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue4806>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue7689>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
I think the patch isn't entirely correct. It uses PyIter_Check for detecting
the case when an *iterable* raises TypeError, but that function actually checks
for an *iterator*. The check on the tp_iter member mentioned by Amaury Forgeot
d'Arc prob
Daniel Urban added the comment:
I'm attaching an updated patch. Instead !PyIter_Check() this patch checks for
tp_iter == NULL && !PySequence_Check. If this condition is false,
PyObject_GetIter has a chance to succeed (and if it fails, we shouldn't mask
the exception).
Daniel Urban added the comment:
Apparently ast_error_finish calls PyTuple_GetItem with a value that is not a
tuple, but a SyntaxError instance (in Python/ast.c line 112). It seems that
ast_error_finish expects that PyErr_Fetch will return the exception value as a
tuple, and in some cases
Daniel Urban added the comment:
Here is a patch. I wasn't sure, where to put the test, so I put it in test_ast.
--
keywords: +patch
Added file: http://bugs.python.org/file21054/issue11441.patch
___
Python tracker
<http://bugs.python.org/is
Daniel Urban added the comment:
Okay, here is a new patch with the test in the correct place (I hope).
--
Added file: http://bugs.python.org/file21055/issue11441_2.patch
___
Python tracker
<http://bugs.python.org/issue11
Daniel Urban added the comment:
> Why is the exception normalized at the end? I suppose it's because
> when value is an exception instance, it's replaced by a tuple, but the
> original value has to be recreated at the end. So in some cases, the
> SyntaxError object is c
Daniel Urban added the comment:
> You could also call PyErr_NormalizeException at the beginning, and
> update the fields directly in the PySyntaxErrorObject structure. No
> need to deal with any tuple.
Sorry, but I don't really understand. If I call PyErr_NormalizeException at
Daniel Stutzbach added the comment:
For what it's worth, I believe this could be implemented easily by calling
_PyDict_HasOnlyStringKeys at the end of the class creation process.
--
nosy: +stutzbach
___
Python tracker
<http://bugs.py
Daniel Urban added the comment:
So, I see four possible solutions:
1. If we get a tuple, create the new tuple, normalize the exception, and store
it. If we get a SyntaxError instance, use its args, create the new tuple,
normalize, and store. (In this case a SyntaxError instance will be
Daniel Urban added the comment:
Err... sorry, I don't understand again:
If we get a tuple, create a new, store it without normalization. That's okay, I
understand.
If we get a SyntaxError instance, then take its args field, create the new
tuple. Then call PyErr_NormalizeException(
Daniel Urban added the comment:
> Can somebody propose a patch?
Yes, here it is. (I'm not sure if the test is in the correct file.)
--
keywords: +patch
nosy: +durban
Added file: http://bugs.python.org/file21072/issue11455.patch
___
Python
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11470>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11477>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Daniel Urban :
copy.copy cannot copy a class which have a metaclass other than type:
>>> import abc
>>> import copy
>>>
>>> class C(metaclass=abc.ABCMeta):
... pass
...
>>> copy.copy(C)
Traceback (most recent call last)
New submission from Daniel Urban :
In the copyreg documentation there is this sentence: "The copy module is likely
to use this in the future as well."
(http://docs.python.org/dev/py3k/library/copyreg) But the copy module already
uses the copyreg module.
--
assignee: d
Daniel Urban added the comment:
Attaching an updated patch for py3k.
> Not an expert, but the Python parts of your patch look good to me.
Me neither, but the C parts also look good to me. The tests fail without the
patch, succeed with it.
Note, that it is possible, that the copy module a
Changes by Daniel Stutzbach :
--
keywords: +needs review
nosy: +alexandre.vassalotti, stutzbach
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issu
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11549>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
stage: -> test needed
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issue11562>
___
___
Py
Daniel Urban added the comment:
The new entry in Misc/NEWS says: "Patch by Daniel Urban." But it wasn't me, who
made the patch, I just opened the issue.
--
___
Python tracker
<http://bugs.pyt
Daniel Urban added the comment:
The reason of this behaviour is that x += 1 basically is the same as x =
x.__iadd__(1). In the tuple case: t[1] = t[1].__iadd__([6]). The __iadd__
call mutates the list, then the tuple item assignment raises the TypeError.
See these examples:
>>&g
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11583>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11572>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
Updated the patch for mercurial.
--
Added file: http://bugs.python.org/file21281/issue11256_4.patch
___
Python tracker
<http://bugs.python.org/issue11
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11608>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11610>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
I looked at the patch (I didn't test it yet), my comments are on Rietveld.
--
___
Python tracker
<http://bugs.python.org/is
Daniel Urban added the comment:
I tried to test your patch, but the build dies with this error:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File ".../cpython/Lib/io.py", line 60, in
Aborted
I don't know wh
Daniel Urban added the comment:
inspect.cleandoc (which is also used by inspect.getdoc and pydoc.getdoc) seems
to do a similar thing. Maybe that could be used for this?
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue7
Daniel Urban added the comment:
Here is a patch for list. It modifies the following C API functions:
PyList_SetItem
PyList_Insert
PyList_Append
PyList_SetSlice
PyList_Sort
PyList_Reverse
_PyList_Extend
It also includes tests (with ctypes).
I plan to do next the same for dict, but first I
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11628>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11635>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
versions: +Python 3.3
___
Python tracker
<http://bugs.python.org/issue11640>
___
___
Python-bugs-list mailin
Daniel Urban added the comment:
> I would prefer an explicit PyExc_RuntimeWarning to not have to read the
> source of PyErr_WarnFormat() or its documentation.
The patch at issue11470 adds a new warning type, CompatibilityWarning. I think
probably that should be used he
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11660>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11664>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11640>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11674>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue5135>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
The problem seems to be that you're calling Decimal.from_float with a Decimal
instance, not a float. I'm not sure that should even work. The Decimal
constructor can create a decimal from an other decimal.
Your suggested solution probably would
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue887237>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
> not x == 2 can be theoretically optimized to x != 2, ...
I don't think it can:
>>> class X:
... def __eq__(self, other):
... return True
... def __ne__(self, other):
... return True
...
>>> x = X()
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue7796>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Stutzbach added the comment:
I'm confused by the patch (ed0259230611). The patch comment and the NEWS item
state "the returned socket is now always non-blocking" but the code change adds
"sock.setblocking(True)".
--
Daniel Goertzen added the comment:
I run into this problem when I start a Python app as a subprocess from Erlang
(open_port() function). The PYTHONIOENCODING fix works when I launch my py app
via pythonw.exe, but it does *not* work when I use the cx-freeze version of the
app.
I am using
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11707>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11707>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Goertzen added the comment:
It turns out that cx-freeze deliberately sets Py_IgnoreEnvironmentFlag to
ensure that the final executable is really an isolated, standalone executable
(ie, it can't be subverted by setting PYTHONPATH.) Therefore the
PYTHONIOENCODING work-around doe
Daniel Urban added the comment:
The attached test case currently fails. I'll try to make a patch soon.
> Perhaps __build_class__ (which I have not read) should either call
> type_new or a new function with the winner calculation factored out of
> type_new.
Yeah, that'
Daniel Urban added the comment:
What about this:
>>> class MyTestCase(TestCase):
... def test_foo(self):
... with self.assertRaises(SyntaxError) as cm:
... compile('asdf jkl', 'file.py', 'eval')
..
Daniel Urban added the comment:
The attached patch seems to correct this issue. It contains the test attached
yesterday, and it passes now.
I factored out the winner calculation from type_new to a new
_PyType_CalculateWinner function, and type_new calls this. I've put the
declarati
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11764>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11770>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11796>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11823>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Daniel Urban :
slice.indices behaves strangely with negative step and default stop values
(note that the doc says that it "computes information about the slice that the
slice object would describe if applied to a sequence of length items"):
>>> s = s
Daniel Urban added the comment:
I see. Thanks for the explanation. If indeed this is the expected behaviour (as
it seems), then I suggest clarifying the documentation. I think it would be
good to mention that the returned values are for range(), and not for creating
another slice object
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue6634>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Daniel Urban :
The attached crash.py script reliably crashes the 3.2 and 3.3 interpreter on my
machine. The script does a lot of range slicing.
I think there is a typo in compute_slice_indices() in rangeobject.c, in line
475. In line 474 there is an assign to tmp_stop, and
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11845>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11854>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
Now that the moratorium has already ended, I'll try again. I've updated the
patch.
It seems, that this idea has already came up in the past: Guido in msg70525
said: "I also think ranges should be introspectable, exposing their start, stop
Daniel Urban added the comment:
Thanks for the review!
I've updated my patch:
- renamed it to _PyType_CalculateMetaclass
- in __build_class__ call it even when a metaclass is declared
- added a test for this case (which fails with my previous patch)
However I noticed another problem
Daniel Urban added the comment:
Thanks, I've corrected my patch.
--
Added file: http://bugs.python.org/file21733/range_attrs_3.patch
___
Python tracker
<http://bugs.python.org/i
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11875>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Urban added the comment:
That may be, but with my latest patch, this works (func is a function):
class X(metaclass=func):
pass
But this blows up with a TypeError:
class X(object, metaclass=func):
pass
Is this the desired behaviour? Or should we disallow non-class metaclasses
Daniel Urban added the comment:
I'm attaching the updated patch. Changes:
- Special casing objects we can't do the metaclass computation for.
- Tests for these.
- Adding tests for the order of __new__ calls.
The special case isn't just checking if the object is a class, but in
Daniel Urban added the comment:
I've just realized, that my patch still breaks a case, that previously worked:
when the bases are not classes.
This works in 3.2, but not with my patch:
>>> class Foo: # not a subclass of type!
... def __new__(mcls, name='foo
Daniel Urban added the comment:
Okay, probably the check in my previous patch was too strict (sorry for the
noise). I'm attaching an updated patch again. Now the algorithm in
__build_class__ is this:
1. If an object is explicitly given with the metaclass keyword, that is the
&quo
Changes by Daniel Urban :
Removed file: http://bugs.python.org/file21755/issue11256_4.patch
___
Python tracker
<http://bugs.python.org/issue1294232>
___
___
Python-bug
Changes by Daniel Urban :
Added file: http://bugs.python.org/file21756/issue_1294232_4.patch
___
Python tracker
<http://bugs.python.org/issue1294232>
___
___
Python-bug
Daniel Urban added the comment:
This may be the same/similar as issue4806 (which has a patch).
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11924>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11945>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11949>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Holth added the comment:
from docs.python.org:
platform.python_implementation()
Returns a string identifying the Python implementation. Possible return
values are: ‘CPython’, ‘IronPython’, ‘Jython’.
New in version 2.6.
... and it seems pypy identifies itself as '
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11762>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue11967>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Evers added the comment:
To revive this issue, I tried to write a unit test to verify the behaviour.
Onfurtunately, the test doesn't work and I don't understand why. I hope,
someone here is more enlightend than me...
(files: server.py, client.py)
--
Added
Daniel Evers added the comment:
(client.py)
--
Added file: http://bugs.python.org/file21852/client.py
___
Python tracker
<http://bugs.python.org/issue8
Daniel Stutzbach added the comment:
I checked in a fix to 3.3 just before the transition to hg. I confess that
I've been procrastinating on getting hg set up properly, which is why I haven't
gotten to checking this in to 3.2.
Georg, if I get this in by Wednesday, will that be s
Daniel Evers added the comment:
Thanks for the tip. I added the unit test and uploaded my final patch (which
includes all changes).
Is it ok to remove the files I uploaded previously?
--
Added file: http://bugs.python.org/file21879/backlog0_complete.patch
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue11994>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Daniel Stutzbach added the comment:
Looking at this again, I agree with John. For BufferedIOBase, read() is
abstract while readinto() is concrete. That seems backward, and, indeed, it's
the opposite of RawIOBase, where readinto() is abstract and read() is concrete.
Unfortunately, this
New submission from Daniel Albeseder :
I know that the modulo operation for negative values is not well defined, but I
would at least expect that the result is the same no matter if you use ints,
floats or decimals. However Decimal seem to behave else than the builtin types.
Python 3.1.2
New submission from Daniel Holth :
"How much do we care about special method lookup?" Python recently bypasses
__getattr__ entirely when looking up context managers.
http://mail.python.org/pipermail/python-dev/2009-May/089535.html
Could this be the reason that ZODB's transactio
Daniel Holth added the comment:
Python should explain AttributeError in the same way when it's raised by the
interpreter. The with: statement below should raise the second AttributeError,
not the first.
import transaction
with transaction: pass
>>> AttributeError: __exit__
Daniel Holth added the comment:
Thank you Benjamin for following up on this issue
--
___
Python tracker
<http://bugs.python.org/issue12022>
___
___
Python-bug
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12022>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Urban :
--
nosy: +durban
___
Python tracker
<http://bugs.python.org/issue12029>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Evers :
Removed file: http://bugs.python.org/file17065/backlog0.diff
___
Python tracker
<http://bugs.python.org/issue8498>
___
___
Python-bugs-list m
Changes by Daniel Evers :
Removed file: http://bugs.python.org/file17066/backlog0_incl_doc.diff
___
Python tracker
<http://bugs.python.org/issue8498>
___
___
Python-bug
Changes by Daniel Evers :
Removed file: http://bugs.python.org/file17067/socket_listen.patch
___
Python tracker
<http://bugs.python.org/issue8498>
___
___
Python-bug
Changes by Daniel Evers :
Removed file: http://bugs.python.org/file21851/server.py
___
Python tracker
<http://bugs.python.org/issue8498>
___
___
Python-bugs-list mailin
301 - 400 of 3314 matches
Mail list logo