Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
I ran into a few problems while trying to fix this issue. First, does
someone know how to add class attributes on extension types? It sounds
like I will need either some tp_dict hacking or a Pickler subclass.
Second, which meth
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
I agree that this a bug. However, the liberal functools.partial
constructor makes it hard to pickle partial instances correctly.
Ideally, we would add the __getnewargs__ special method and be done with
it. But, this won't w
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Sorry, I can't. I would love to get this done, but I am just too busy
this week (and next week doesn't look any better). Furthermore, the
amount of work that the profile/cProfile merge will require is quite
considera
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Yeah, the old Pickler and Unpickler classes are available by design (to
allow testing both implementation). You could subclass _Pickler as a
temporary fix for this issue.
___
Python tracker &
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Benjamin is right. site.py imports the io module before _bytesio and
_stringio are available for import. Thus the python version of BytesIO
and StringIO is always used. There is an old thread about the issue at
http://mail.pyth
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Oh, that's nasty. Recalling __init__ with bad arguments breaks the
internal invariants as it clears the Pickler's content before parsing
the arguments. I suspect that Unpickler is vulnerable too.
Adding a NULL check
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Unpickler looks safe as Unpickler_load() checks if Unpickler was
properly initialized. And only Pickler_dump is vulnerable right now (new
methods, if any, exposed for issue3385 will have to take into account
this vulnera
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Look good to me, and python-dev accepted the patch. So, go ahead and
commit it.
--
assignee: -> benjamin.peterson
resolution: -> accepted
___
Python tracker <[EMAIL PR
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Could you use PyDict_GetItemWithError() to avoid this?
--
nosy: +alexandre.vassalotti
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
--
nosy: +alexandre.vassalotti
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
I will try to time next weekend to fix this (and other pickle blockers).
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3664>
___
___
Python-bugs-list mailin
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
I will try to find time next weekend to fix this (and other pickle
blockers).
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Here's the fix. The added check in Pickler_dump should prevent any
segfaults due to __init__() errors.
I also added the check proposed by Christian as a safe-guard in case a
core developer adds a new method that doesn
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
I agree with Antoine, protocols <= 2 should remain compatible with
Python 2.x or be deprecated. Keeping compatibility will require a hack,
in addition to the proposed patch, in Pickler.save_global to map Python
3's modul
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Have you verified the numbers? They don't look right to me.
The problem is the 2nd argument of cProfile's constructor has a
different semantic meaning than the one for profile.py. For profile.py,
it is used to set the &
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Unassigning myself as I don't have the time to fix this properly.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
--
assignee: alexandre.vassalotti ->
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.py
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
The patch looks good to me.
You may want to fix the refleak in the PyList_Append() calls (I counted
4) too:
if (PyList_Append(chunks, chunk)) {
goto bail;
}
should be:
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
The solution is to add a read buffer to Unpickler (Pickler already has a
write buffer, so that why it is unaffected). I believe this would
mitigate much of the (quite large) Python function call overhead.
cPickle has a performanc
Alexandre Vassalotti added the comment:
Mark Dickinson added the comment:
> (1) should the 'signed' parameter remain keyword-only in 2.7?
We should keep it as a keyword-only argument. Also, issue #1745 might bring
keyword-only arguments to 2.7.
> (2) When specifying the byt
Changes by Alexandre Vassalotti :
--
___
Python tracker
<http://bugs.python.org/issue1745>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Alexandre Vassalotti added the comment:
Mark Dickinson added the comment:
> (1) should the 'signed' parameter remain keyword-only in 2.7?
We should keep it as a keyword-only argument. Also, issue #1745 might bring
keyword-only arguments to 2.7.
> (2) When specifying the byt
Alexandre Vassalotti added the comment:
It is a bug.
First, the dictviews_as_number is broken; the field for classic division was
removed in 3.x, so everything is shifted by one. I included a patch to fix this.
Unfortunately, this isn't enough to fix the issue. There seems to be some
o
Changes by Alexandre Vassalotti :
--
keywords: +patch
Added file: http://bugs.python.org/file16927/fix_dictviews_as_number.diff
___
Python tracker
<http://bugs.python.org/issue8
Alexandre Vassalotti added the comment:
I found the issue. The view types didn't have Py_TPFLAGS_CHECKTYPES set, so the
types were using the old-style binary operators.
Here's a patch that fixes the issue. Please review.
--
Added file: http://bugs.python.org
Changes by Alexandre Vassalotti :
Removed file: http://bugs.python.org/file16927/fix_dictviews_as_number.diff
___
Python tracker
<http://bugs.python.org/issue8
Alexandre Vassalotti added the comment:
Committed in r80749 and r80751 (for py3k).
Thank you!
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Please assign this to me.
I am planning to fix this, along a few other bugs, with my new revision
of the pickle protocol.
--
nosy: +alexandre.vassalotti
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.p
Alexandre Vassalotti added the comment:
Please assign this bug to me.
Note that neither cPickle or pickle is able to load the stream generated
by cPickle correctly:
>>> g = group(None)
>>> subitem(g)
>>> g[0].parent is g
True
>>> gp = cPickle
Alexandre Vassalotti added the comment:
Please mark this bug as Won't Fix.
As Tim said, the list-based interface of cPickle is unsupported and
pending removal. Please use the pickle.dumps and pickle.loads functions
if you want string interface to pickle.
--
nosy: +alexandre.vassa
Alexandre Vassalotti added the comment:
Please assign this bug to me.
This certainly doesn't look easy to fix. I will look into it, but I can
promise that I can fix it.
--
nosy: +alexandre.vassalotti
type: -> behavior
versions: +Python 2.6, Py
Alexandre Vassalotti added the comment:
Thank you, Georg!
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1338>
__
___
Python-bugs-list mailing list
Unsubs
Changes by Alexandre Vassalotti:
--
assignee: -> alexandre.vassalotti
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue892902>
___
Python-bu
Changes by Alexandre Vassalotti:
--
assignee: -> alexandre.vassalotti
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1761028>
_
___
Python-bu
New submission from Alexandre Vassalotti:
The current documentation for the pickle module (and related modules) is
outdated and should be updated. For example, the section "Pickling and
unpickling extension types" [1] is not only confusing, but outright
wrong. For Python 2.6, the doc
Alexandre Vassalotti added the comment:
This should be fixed along issue1536.
--
assignee: -> alexandre.vassalotti
dependencies: +pickle's documentation is severely outdated
nosy: +alexandre.vassalotti
Tracker <[EMAIL PROTEC
Alexandre Vassalotti added the comment:
This should be fixed along with issue1536.
I am assigning this to me, instead of Fred Drake. (Is that okay with
you, Fred?)
--
assignee: fdrake -> alexandre.vassalotti
dependencies: +pickle's documentation is severely outda
Alexandre Vassalotti added the comment:
[I just realized that dependencies in the tracker should go the other
way around.]
--
dependencies: +Update pickle docs to describe format of persistent IDs, cPickle
not always same as pickle
__
Tracker <[EM
Changes by Alexandre Vassalotti:
--
dependencies: -pickle's documentation is severely outdated
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
Changes by Alexandre Vassalotti:
--
dependencies: -pickle's documentation is severely outdated
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Here a patch that adds support for any iterable (or sequence) of
integers to bytearray.extend().
--
assignee: -> alexandre.vassalotti
keywords: +patch
nosy: +alexandre.vassalotti
resolution: accepted ->
Added file: http://bugs.pyth
Alexandre Vassalotti added the comment:
Made 2 minor enhancements to the patch:
+ Added the proper type-cast to PyMem_Realloc call.
+ Changed (len >> 1) to (len >> 1) + 1, just to be sure that the
buffer doesn't overflow if __length_hint__ return 0 or 1 erroneously.
Alexandre Vassalotti added the comment:
There is a reference leak in my previous patches. So, I updated (again)
the patch. There is still another possible leak if the PyMem_Realloc
return NULL (i.e., the system is out of memory), but I don't think it
worth fixing.
Added file:
Alexandre Vassalotti added the comment:
Here yet another revision of the patch. This one makes
bytearray.extend() try to determine the length of its argument a bit
more aggressively -- i.e., also uses PyObject_Length().
Added file: http://bugs.python.org/file8856/byte_extend-4.patch
Alexandre Vassalotti added the comment:
Done. Is there any other issue with the patch?
Added file: http://bugs.python.org/file8857/byte_extend-5.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1283>
___
Alexandre Vassalotti added the comment:
First, I would like to say thank you both for spending your time trying
to do a contribution to Python.
However, I believe the current behavior of cmd.py is correct. The module
documentation states clearly that "End of file on input is processed a
Alexandre Vassalotti added the comment:
Thank you, Paul, for the patches.
I reviewed the patches and improved them. Here the list of changes:
- Added unit test for the import fixers.
- Renamed Lib/Queue.py to Lib/queue.py.
- Updated Tools/webchecker/wsgui.py.
- Updated the
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file8868/queue-rename-misc.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1005>
__
___
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file8867/queue-rename-lib-and-tests.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Changes by Alexandre Vassalotti:
--
assignee: collinwinter -> brett.cannon
nosy: -collinwinter
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1005>
__
___
Changes by Alexandre Vassalotti:
--
assignee: brett.cannon -> collinwinter
nosy: +collinwinter
Added file: http://bugs.python.org/file8866/queue-rename-documentation.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Looks good to me. I updated the patch to use .get() with a default value
instead of a if-statement with .has_key().
--
nosy: +alexandre.vassalotti
priority: -> normal
Added file: http://bugs.python.org/file8869/check-content-length.pa
New submission from Alexandre Vassalotti:
If an iterator with a __length_hint__ method that returns a negative
integer is passed to list(), a SystemError is raised.
>>> class A:
... def __iter__(self):
... return self
... def __length_hint__(self):
...
Alexandre Vassalotti added the comment:
Thank you Gregory for the review!
Committed to r59314.
--
resolution: -> accepted
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Alexandre Vassalotti added the comment:
Fixed for Py3k in r59316.
Should this gets backported?
--
status: open ->
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
Changes by Alexandre Vassalotti:
--
status: -> open
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1553>
__
___
Python-bugs-list mailing list
Uns
Changes by Alexandre Vassalotti:
--
nosy: +alexandre.vassalotti
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue614555>
___
Python-bugs-list
Alexandre Vassalotti added the comment:
The PEP has been deferred and the patch is out of date. So, is this
change still wanted?
--
nosy: +alexandre.vassalotti
resolution: -> out of date
_
Tracker <[EMAIL PROTECTED]>
<http://bug
Alexandre Vassalotti added the comment:
Committed in r59411. Thanks!
--
resolution: -> accepted
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Alexandre Vassalotti added the comment:
Looks good to me. Here's slightly modified patch ready to be committed.
--
keywords: +patch
nosy: +alexandre.vassalotti
priority: -> low
Added file: http://bugs.python.org/file8893/doctest.patch
__
Tracker
Changes by Alexandre Vassalotti:
--
versions: +Python 3.0
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1573>
__
___
Python-bugs-list mailing list
New submission from Alexandre Vassalotti:
I found that the parser fails to handle correctly the (incorrect) case
where the single-star (*), used for delimiting keyword-only arguments,
is immediately followed by a **keywords parameter:
>>> def f(*, **kw):
... pass
...
python: Python/
Alexandre Vassalotti added the comment:
Amaury is right. "def f(*, **kw): pass" should raise a SyntaxError. The
keyword-only delimiter is useless since the **kw parameter already only
accepts keywords.
__
Tracker <[EMAIL PROTECTED]>
<htt
New submission from Alexandre Vassalotti:
I think Python 2.x should mimic, or improve on, the behavior of Py3k for
handling broken pipes. That is:
1. Don't print the message "close failed: [Errno 32] Broken pipe",
from filemodule.c; since this is impossible to override from Pyt
Alexandre Vassalotti added the comment:
Fixed in r59480.
--
nosy: +alexandre.vassalotti
resolution: -> fixed
status: open -> closed
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
Changes by Alexandre Vassalotti:
--
resolution: accepted ->
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1333>
__
___
Python-bugs-list mailing li
Alexandre Vassalotti added the comment:
I compiled Python using gcc 4.3.0 with the -Wstrict-overflow, and that's
the only warning I got:
Objects/doubledigits.c: In function ‘_PyFloat_Digits’:
Objects/doubledigits.c:313: error: assuming signed overflow does not
occur when assuming that (
New submission from Alexandre Vassalotti:
Finally, here is my C implementation of BytesIO. The code is well tested
and include the proper unit tests. The only remaining issues are:
- The behavior of the close() method.
- The failure of test_profile and test_cProfile.
Currently, I have no
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9085/add-bytesio-setup.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1751>
__
___
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1751>
__
__
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9087/test_memoryio.py
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1751>
__
___
Pyth
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9088/remove-old-stringio-test.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9089/truncate-semantic-change.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9090/io-misc-fixes.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1751>
__
___
Pyth
Changes by Alexandre Vassalotti:
--
nosy: +brett.cannon
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1751>
__
___
Python-bugs-list mailing list
Unsubs
Alexandre Vassalotti added the comment:
So, here's one big patch. I have updated the behavior of close(), so that
> The profile tests often fail when io.py changes because they happen to
> depend on "golden output" which includes line numbers of code in io.py
> that hap
Alexandre Vassalotti added the comment:
[grrr, I eat my words]
> So, here's one big patch. I have updated the behavior of close(), so that
... it matches the behavior of 2.x.
> As a side-effect, this make __next__ raises a
ValueError, instead of StopIteration.
... when the fil
Alexandre Vassalotti added the comment:
Committed fix in r59832. Thanks!
P.S. Guido, what this comment, in write(), is about?
# XXX What if we were just reading?
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Changes by Alexandre Vassalotti:
--
resolution: -> fixed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1753>
__
___
Python-bugs-list mailing li
Changes by Alexandre Vassalotti:
--
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1753>
__
___
Python-bugs-list mailing li
Changes by Alexandre Vassalotti:
Removed file: http://bugs.python.org/file9096/bytesio+misc-fixes.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1751>
__
__
Alexandre Vassalotti added the comment:
I got a patch that also fixes the profiler tests. That was easy after
all. :-)
Added file: http://bugs.python.org/file9099/bytesio+misc-fixes-2.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Alexandre Vassalotti added the comment:
Hm. I don't get any warning, related to the overflow issue, neither with
-Wstrict-overflow=3, nor -Wstrict-overflow=5. Are the cPickle warnings
already fixed?
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python
Alexandre Vassalotti added the comment:
FYI, StringIO and BytesIO, in Python 3K, already support the context
management protocol.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
New submission from Alexandre Vassalotti:
I was wandering whether the pointer returned by PyUnicode_AsString needs
to be freed after usage (It turned it doesn't since the result is
cached). However, I found out that there isn't any documentation on
docs.python.org about the PyUnicod
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-AS
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.o
Changes by Alexandre Vassalotti:
--
nosy: +alexandre.vassalotti
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1692335>
_
___
Python-bugs-list
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Thanks for the review!
> Your description of the patch is a bit misleading. As far as I can
> tell only the first chunk (Python/import.c changes) addresses a
> potential buffer overflow.
Yes, you are right. It seems
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Yes, that sounds like a good idea. Although I haven't reviewed this
patch yet, I find the naming of the `ustr` variable confusing -- e.g. is
it a bytes object or a unicode object? (It seems to be bytes). Anyway, I
will che
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
--
nosy: +alexandre.vassalotti
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2307>
__
__
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
Here is a patch against the latest trunk (r61578) that includes the
accelerator module of io.BytesIO with its test suite. The patch also
changes the behavior of the truncate method to imply a seek(). Please
review!
Added file
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment:
I don't think this should be added to 2.5. Only bugfixes are admissible
to the backporting process (see PEP 6).
Finally, could you post the diff of your changes as described at
http://www.python.org/dev/patch
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file9084/_bytesio.c
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file9085/add-bytesio-setup.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file9087/test_memoryio.py
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file9088/remove-old-stringio-test.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file9089/truncate-semantic-change.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
101 - 200 of 602 matches
Mail list logo