Changes by Alexandre Vassalotti :
--
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Confirmed. On Windows, the out-of-range value triggers a debugging
assertion in the CRT library.
--
components: +Extension Modules, Windows -None
nosy: +alexandre.vassalotti
priority: -> normal
stage: -> needs patch
versions: +Pyth
Alexandre Vassalotti added the comment:
Here is a patch for backporting set literals to the trunk.
--
keywords: +patch
nosy: +alexandre.vassalotti
stage: -> patch review
Added file: http://bugs.python.org/file14650/backport_set_literal.d
Alexandre Vassalotti added the comment:
Committed in r74316.
Thanks!
--
nosy: +alexandre.vassalotti
resolution: -> accepted
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
I think we should keep the repr() of sets as is to avoid breaking any
code. And yes, I plan to port set comprehensions along with dict
comprehension.
--
___
Python tracker
<http://bugs.python.org/issue2
Alexandre Vassalotti added the comment:
I have refreshed Thomas's patch to reflect recent updates to dictviews.
I also added the documentation for dictviews.
--
nosy: +alexandre.vassalotti
stage: -> patch review
Added file: http://bugs.python.org/file14651/backport_dictvi
Alexandre Vassalotti added the comment:
Here is a patch for 2to3 to support the translation of code using dictviews.
--
Added file: http://bugs.python.org/file14652/2to3_fixer_dictviews.diff
___
Python tracker
<http://bugs.python.org/issue1
Alexandre Vassalotti added the comment:
Here is a patch to backport dict and set comprehensions to the trunk.
The patch preserves the Python 3.x's syntax and semantics of the
feature. Although this makes dict and set comprehensions is inconsistent
with list comprehension, I believe th
Changes by Alexandre Vassalotti :
--
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> Backport set and dict comprehensions
___
Python tracker
<http://bugs.pytho
Changes by Alexandre Vassalotti :
--
dependencies: +Backport set literals
___
Python tracker
<http://bugs.python.org/issue2333>
___
___
Python-bugs-list mailin
Alexandre Vassalotti added the comment:
Brett, could you provide an example of "an exception bound to a variable"?
--
nosy: +alexandre.vassalotti
priority: critical -> normal
stage: -> test needed
___
Python tracker
<htt
Changes by Alexandre Vassalotti :
--
nosy: +alexandre.vassalotti
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue1745>
___
___
Python-
Alexandre Vassalotti added the comment:
You need to apply the set literal patch I posted in issue2335 first.
--
___
Python tracker
<http://bugs.python.org/issue2
New submission from Alexandre Vassalotti :
The documentation for PyBytes_FromObject states:
.. cfunction:: PyObject* PyBytes_FromObject(PyObject *o)
Return the bytes representation of object *o* that implements
the buffer protocol.
However, there exists a special-case for integer object
Alexandre Vassalotti added the comment:
Oh, in case you wonder, the added PyUnicode_Check(x) check is to force
PyBytes_FromObject to raise an error when given an empty unicode string
(I will this as a comment in my patch).
--
___
Python tracker
New submission from Alexandre Vassalotti :
Optimize PyBytes_FromObject by adding special-cases for list and tuple
objects and by using _PyObject_LengthHint() instead of an arbitrary
value for the size of the initial buffer.
[Without the patch]
./python -m timeit -s "x = list(range(256))&qu
Alexandre Vassalotti added the comment:
I went ahead and coded a new API for converting long integers to byte
arrays and vice-versa. My patch adds two new methods to the long type:
.as_bytes() and .frombytes(). The patch itself is well-documented; but
nevertheless, here's some exa
Alexandre Vassalotti added the comment:
Not a bug.
The list comprehension in your chunker:
while True:
target.send([ (yield) for i in range(chunk_size) ])
is equivalent to the following generator in Python 3:
while True:
def g():
for i in range(chunk_size
Alexandre Vassalotti added the comment:
Here's a new patch incorporating the suggestions I received on python-ideas.
Notable changes are:
- The name of the methods have been changed to int.tobytes() and
int.frombytes().
- The tri-state `little_endian' argument has been
Alexandre Vassalotti added the comment:
The patch looks good to me.
--
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue6551>
___
_
Alexandre Vassalotti added the comment:
Here's an updated patch.
- Renamed tobytes() to to_bytes() and frombytes() to from_bytes().
- Moved the changes to pickle to a different patch.
- Made the NULL-checks more consistent with the rest of long's code.
- Fixed the type check of t
Alexandre Vassalotti added the comment:
Last august, I worked on integrating Collin's optimization work into
py3k in a local Mercurial branch. So, I can champion these changes into
py3k, if Collin is unavailable.
And if Collin allows me, I would like to merge the other pickle
optimiza
Alexandre Vassalotti added the comment:
But, that change was undone already, no? In fact, it is you, Georg, that
reverted my mess in r63493. ;-)
--
nosy: +alexandre.vassalotti
___
Python tracker
<http://bugs.python.org/issue7
Alexandre Vassalotti added the comment:
Yes. But, I would remove the ugly copy_reg_str variable from cPickle as
the patch.
--
Added file: http://bugs.python.org/file15377/remove_copyreg_str.diff
___
Python tracker
<http://bugs.python.org/issue7
Alexandre Vassalotti added the comment:
We just need make __getnewargs__ return bytes, instead of a unicode
string. So this is a single character fix.
I think we should reuse the ByteArraySubclass test case in test_bytes.py
to test for this bug. Incidentally, the reduce method of bytearray
New submission from Alexandre Vassalotti :
I get the following test failure on the release26-maint branch:
./python Lib/test/test_cpickle.py
[...]
==
ERROR: test_issue2702 (__main__.cPickleDeepRecursive
Alexandre Vassalotti added the comment:
Thanks you!
Committed in r76499 and backported to 2.6 in r76500.
--
resolution: -> accepted
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bug
Changes by Alexandre Vassalotti :
--
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> fileinput, StringIO, and cStringIO do not support the with
protocol
___
Python tracker
<http://
Alexandre Vassalotti added the comment:
Indeed. Jack Diederich added support for pickling partial functions in
r70931.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bug
Alexandre Vassalotti added the comment:
Mark Dickinson wrote:
> Is there still a need for a separate C function for creating a zero-
> initialized bytes object from a Py_ssize_t or a Python integer?
What C function are you referring to?
> And this check doesn't cover other,
Alexandre Vassalotti added the comment:
If there are no objections, I will commit this patch later this week.
--
___
Python tracker
<http://bugs.python.org/issue2
Alexandre Vassalotti added the comment:
If there are no objections, I will commit this patch later this week
after issue #2335.
--
___
Python tracker
<http://bugs.python.org/issue2
Alexandre Vassalotti added the comment:
Can someone review the patches? I would like to commit this later this week.
--
___
Python tracker
<http://bugs.python.org/issue1
Alexandre Vassalotti added the comment:
It looks like that crash is caused by some bug in the implementation of
PyUnicode_FromFormat(). I rewrote my patch to avoid it and added some
additional unit tests.
--
Added file: http://bugs.python.org/file15705/backport_dictviews-2.diff
New submission from Alexandre Vassalotti :
It seems PyUnicode_FromFormatV wrongly assumes that the return value of
PyObject_Str and PyObject_Repr is a unicode object. It looks like the
%S and %R feature was backported from 3.x without updating the code for 2.x.
PyObject
Changes by Alexandre Vassalotti :
--
resolution: -> duplicate
status: open -> closed
superseder: -> PyUnicode_FromFormat broken and not documented for 2.x
___
Python tracker
<http://bugs.python.o
Changes by Alexandre Vassalotti :
--
stage: test needed -> committed/rejected
___
Python tracker
<http://bugs.python.org/issue7608>
___
___
Python-bugs-list mai
Alexandre Vassalotti added the comment:
The tests were missing in my last patch. So, here's a new one.
--
Added file: http://bugs.python.org/file15706/backport_dictviews-3.diff
___
Python tracker
<http://bugs.python.org/i
Alexandre Vassalotti added the comment:
Committed in r77174. Thank you for reviewing!
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Committed in r77394. Thank you for the good reviews!
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexandre Vassalotti added the comment:
Committed in r77398.
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
It been a long week, but this patch is now committed as r77400.
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bug
Alexandre Vassalotti added the comment:
Committed in r77422.
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Any comment about the code I posted?
--
___
Python tracker
<http://bugs.python.org/issue2919>
___
___
Python-bugs-list m
Alexandre Vassalotti added the comment:
Committed in r77428. Thanks for your comments!
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Changes by Alexandre Vassalotti :
--
nosy: +alexandre.vassalotti
___
Python tracker
<http://bugs.python.org/issue6710>
___
___
Python-bugs-list mailing list
Unsub
Alexandre Vassalotti added the comment:
Committed in r77437. Thanks!
--
___
Python tracker
<http://bugs.python.org/issue7382>
___
___
Python-bugs-list mailin
Changes by Alexandre Vassalotti :
--
resolution: -> accepted
stage: test needed -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
The motivation behind the restriction was to prevent the tp_doc member
to get truncated. Since tp_doc is a C string, it cannot contains embeded
null bytes.
However, it seems tp_doc is not used at all for heap types. So, I don't
mind liftin
Alexandre Vassalotti added the comment:
Here is a patch that removes the restriction.
--
keywords: +patch
priority: -> normal
stage: -> patch review
type: compile error -> behavior
Added file:
http://bugs.python.org/file13213/remove_null_restriction_on_clas
Changes by Alexandre Vassalotti :
Added file:
http://bugs.python.org/file13214/remove_null_restriction_on_classdoc.diff
___
Python tracker
<http://bugs.python.org/issue5
Changes by Alexandre Vassalotti :
Removed file:
http://bugs.python.org/file13213/remove_null_restriction_on_classdoc.diff
___
Python tracker
<http://bugs.python.org/issue5
Alexandre Vassalotti added the comment:
Overall, the patch looks good. I haven't reviewed the patch thoroughly
yet, but there is a few things I am not sure about. First, why do you
bother supporting 2.4 (i.e. with a copy of run_with_locale) in a patch
aimed at 2.7?
In test_many_puts_and
Alexandre Vassalotti added the comment:
I ported the patch to py3k. In addition, I added a special-case when the
dict contains only one item; you probably want this special-case in the
trunk version as well.
--
nosy: +alexandre.vassalotti
Added file: http://bugs.python.org/file13593
Alexandre Vassalotti added the comment:
Oops, I forgot to add the comment on top of batch_dict_exact in the
patch. Here is a better patch.
--
Added file: http://bugs.python.org/file13594/pickle_batch_dict_exact_py3k-2.diff
___
Python tracker
<h
Alexandre Vassalotti added the comment:
Here's a patch for py3k. I also added a special-case for 1-item lists.
--
nosy: +alexandre.vassalotti
Added file: http://bugs.python.org/file13595/pickle_batch_list_exact_py3k.diff
___
Python tracker
Changes by Alexandre Vassalotti :
--
versions: +Python 3.1
___
Python tracker
<http://bugs.python.org/issue5671>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexandre Vassalotti added the comment:
Oops again, I just remarked that the comment for batch_dict_exact refers
to batch_dict as being above, but I copied batch_dict_exact before
batch_dict. Here's a good patch (hopefully) that puts batch_dict_exact
at the right place.
--
key
Changes by Alexandre Vassalotti :
Removed file: http://bugs.python.org/file13593/pickle_batch_dict_exact_py3k.diff
___
Python tracker
<http://bugs.python.org/issue5
Changes by Alexandre Vassalotti :
Removed file:
http://bugs.python.org/file13594/pickle_batch_dict_exact_py3k-2.diff
___
Python tracker
<http://bugs.python.org/issue5
Alexandre Vassalotti added the comment:
This is not a typo. cStringIO.StringIO is a factory function that
returns either a cStringO object (for writing) or cStringI (for
reading). If this behavior causes a problem to you, then consider using
StringIO.StringIO.
Alternatively, you could upgrade
Alexandre Vassalotti added the comment:
Ah, I just remembered the smart way I had devised some time ago to
handle this issue without changing the constructor of array.array. The
trick would be to add a __reduce__ method to array.array. This method
would return a special constructor function
Alexandre Vassalotti added the comment:
Would it would be sufficient to add a function in the pickletools
capable of converting old Python 2 pickles to the new format in Python
3? Alternatively, we could add a compatibility Unpickler class that
would override the find_class method to do the
Alexandre Vassalotti added the comment:
Silly me, I had changed the PyDict_Size call in outer loop for Py_SIZE
and this is of course totally wrong. Here's a good patch (I am pretty
sure now! ;-) I ran the whole test suite and I saw no failures.
Collin, you can go ahead and commit both pa
Alexandre Vassalotti added the comment:
Sigh... silly me again. There is some other junk in my last patch.
--
Added file: http://bugs.python.org/file13598/pickle_batch_dict_exact_py3k-5.diff
___
Python tracker
<http://bugs.python.org/issue5
Changes by Alexandre Vassalotti :
Removed file:
http://bugs.python.org/file13596/pickle_batch_dict_exact_py3k-3.diff
___
Python tracker
<http://bugs.python.org/issue5
Changes by Alexandre Vassalotti :
Removed file:
http://bugs.python.org/file13597/pickle_batch_dict_exact_py3k-4.diff
___
Python tracker
<http://bugs.python.org/issue5
New submission from Alexandre Vassalotti :
Here is a patch that moves the source files of the _io module (and
closely related modules) into subdirectory of Modules. The new file
hierarchy proposed is the following:
Modules/
_io/
_iomodule.h
_iomodule.c
iobase.c
Changes by Alexandre Vassalotti :
Added file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff
___
Python tracker
<http://bugs.python.org/issue5682>
___
___
Alexandre Vassalotti added the comment:
Antoine, you're too quick. :-)
By the way, the patch is fairly large due to the renaming. So, here's
quick-and-dirty summary of the important changes.
PCbuild/pythoncore.vcproj: Renamed the paths and added a tag
for the _io directory.
Alexandre Vassalotti added the comment:
Antoine wrote:
> - in Makefile.pre.in, it seems the IO_OBJS definition might need updating
I updated the patch to also fix IO_OBJS. Also, I added stringio.c to
IO_OBJS.
> Please note, when committing, it would be good to use "svn mv"
Changes by Alexandre Vassalotti :
Removed file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff
___
Python tracker
<http://bugs.python.org/issue5
Changes by Alexandre Vassalotti :
Removed file: http://bugs.python.org/file13604/move-iomodule-in-subdir-2.diff
___
Python tracker
<http://bugs.python.org/issue5
Alexandre Vassalotti added the comment:
Have you tested PCbuild changes? As, this is the part I am the most
unsure about.
--
___
Python tracker
<http://bugs.python.org/issue5
Alexandre Vassalotti added the comment:
Thanks! Here is the updated patch.
--
Added file: http://bugs.python.org/file13607/move-iomodule-in-subdir-4.diff
___
Python tracker
<http://bugs.python.org/issue5
Alexandre Vassalotti added the comment:
Committed in r71185.
Thanks Antoine for the review!
--
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexandre Vassalotti added the comment:
I have the following tests leaking on my Linux build of py3k:
test_structmembers leaked [102, 102, 102] references, sum=306
test_structmembers leaked [102, 102, 102] references, sum=306
test_structmembers leaked [102, 102, 102, 102] references, sum=408
Alexandre Vassalotti added the comment:
Dismiss my last comment. These are the tests actually leaking for my build:
test_docxmlrpc leaked [85, -6, 0, 39] references, sum=118
test_httpservers leaked [-195, 195, 0, 64] references, sum=64
test_os leaked [23, -23, 0, 23] references, sum=23
Alexandre Vassalotti added the comment:
Victor, Unpickler shouldn't raise an error if the given file object does
support seek(); it should gracefully fall back to using only read() and
readline(). Also, I think you could get a greater performance
improvement by using peek() and avo
Changes by Alexandre Vassalotti :
--
nosy: -alexandre.vassalotti
___
Python tracker
<http://bugs.python.org/issue4753>
___
___
Python-bugs-list mailing list
Unsub
Alexandre Vassalotti added the comment:
> I wouldn't mind a protocol 3 that does <128 ascii only. If only because
> debugging base64'd zlib'd protocol-2 data is not particularly convenient.
Is there any reason that prevent you to debug your pickle using pick
Alexandre Vassalotti 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 4.3.3] on l
Alexandre Vassalotti added the comment:
> Should this issue go under a new ticket?
Yes, it would be preferable as the issue is probably not specific to
io.StringIO. Also, make sure that you include the result of this test-case:
open("testnl.txt", "wb").write("foo\r
Alexandre Vassalotti added the comment:
SHORT_BINBYTES needs to be corrected as well; pickletools lists it as
part of protocol 0 instead of protocol 3.
I doubt backporting this patch to 2.6 will cause any trouble. So, you
can go forward with this
Alexandre Vassalotti added the comment:
Looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue5794>
___
___
Python-bugs-list mailing list
Unsub
Alexandre Vassalotti added the comment:
Checked this out more throughly and I came to the conclusion this cannot
be fixed without a considerable amount of work.
The problem is pickle adds an Node instance stub in the next_nodes set
before its attributes are ready. Since the stub doesn't
New submission from Alexandre Vassalotti :
PyDescrObject make use of the some undefined behavior noted in PEP 3123
for PyObject in Python 2.x. Although fixing this requires breaking
backward-compatibility, this shouldn't be much a problem since
PyDescrObject is only used directly by P
Alexandre Vassalotti added the comment:
If I understood correctly, #3675 is about making pickle data generated
by Python 3 readable by Python 2. However, this issue is about
compatibility in the other direction—i.e., making Python 2 pickles
readable by Python 3, which is easier.
I have a patch
Alexandre Vassalotti added the comment:
The updated documentation for pickle for Python 3 describes the
requirement that persistent IDs should be alphanumeric strings when
protocol 0 is used.
http://docs.python.org/3.0/library/pickle.html#persistence-of-external-objects
Closing as fixed
Alexandre Vassalotti added the comment:
Patch committed in r73195.
--
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexandre Vassalotti added the comment:
Here is an updated patch based on Antoine's latest patch.
Summary of changes:
* Updated docstrings of Pickler and Unpickler in the pickle module.
* Fixed pickle._Pickler to consider fix_imports only for protocol < 3
* Made module name rema
Alexandre Vassalotti added the comment:
Superseded by issue #6137.
--
resolution: -> duplicate
status: open -> closed
superseder: -> Make pickle generated by Python 3.x compatible with 2.x and
vice-versa.
___
Python track
Alexandre Vassalotti added the comment:
Oops. Here is a new patch with _compat_pickle.py.
--
Added file: http://bugs.python.org/file14186/compat_pickle7.diff
___
Python tracker
<http://bugs.python.org/issue6
Alexandre Vassalotti added the comment:
Can you check if the patch in issue #5645 fix the bug?
--
nosy: +alexandre.vassalotti
___
Python tracker
<http://bugs.python.org/issue6
New submission from Alexandre Vassalotti :
Here is a patch to add pickling support to io.BytesIO and io.StringIO.
Although they are non-trivial, the additions were made with a fair
amount of care (and love!) and thus I believe they could be included in
3.1.
Furthermore, the improved test-suite
Alexandre Vassalotti added the comment:
The patch looks alright. I don't like the documentation for
PyUnicode_FromFormatV, however. Here's my attempt to document it:
.. cfunction:: PyObject* PyUnicode_FromFormatV(const char *format,
va_list vargs)
Equivalent to the funct
New submission from Alexandre Vassalotti :
The included patch makes type checking of the arguments of StringIO
consistent between pyio and io.
>>> import io
>>> io.StringIO(b"hello")
Traceback (most recent call last):
...
ValueError: initial_value mu
New submission from Alexandre Vassalotti :
io.StringIO does not clear its reference to its attributes dictionary
when deleted. This causes a leak when io.StringIO has attributes.
>>> def leak():
...for _ in range(100):
... f = io.StringIO()
... f.foo = 1
...
[3
Alexandre Vassalotti added the comment:
I split the bug fixes in the patch into two separate issues. It looks
like pickling support for io.StringIO and io.BytesIO will have to wait
for 3.2.
--
dependencies: +Better type checking for the arguments of io.StringIO
Added file: http
Alexandre Vassalotti added the comment:
Closing as the feature is documented in the section "The __newobj__
unpickling function" of PEP 307.
--
assignee: georg.brandl ->
resolution: -> invalid
status: open -> closed
___
Py
401 - 500 of 602 matches
Mail list logo