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:
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 :
--
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:
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
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
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:
Committed in r77437. Thanks!
--
___
Python tracker
<http://bugs.python.org/issue7382>
___
___
Python-bugs-list mailin
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 r77428. Thanks for your comments!
--
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 r77422.
--
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 r77398.
--
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 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:
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
Changes by Alexandre Vassalotti :
--
stage: test needed -> committed/rejected
___
Python tracker
<http://bugs.python.org/issue7608>
___
___
Python-bugs-list mai
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
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
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
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:
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:
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:
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:
Indeed. Jack Diederich added support for pickling partial functions in
r70931.
--
resolution: -> fixed
stage: -> 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:
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
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:
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
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:
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:
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:
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:
The patch looks good to me.
--
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue6551>
___
_
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:
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:
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
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:
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 :
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:
You need to apply the set literal patch I posted in issue2335 first.
--
___
Python tracker
<http://bugs.python.org/issue2
Changes by Alexandre Vassalotti :
--
nosy: +alexandre.vassalotti
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue1745>
___
___
Python-
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 :
--
dependencies: +Backport set literals
___
Python tracker
<http://bugs.python.org/issue2333>
___
___
Python-bugs-list mailin
Changes by Alexandre Vassalotti :
--
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
superseder: -> Backport set and dict comprehensions
___
Python tracker
<http://bugs.pytho
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
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:
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:
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:
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:
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:
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
Changes by Alexandre Vassalotti :
--
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
The patch was merged to 3.x in r74132.
--
assignee: jyasskin ->
nosy: +alexandre.vassalotti
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python.o
Changes by Alexandre Vassalotti :
Added file: http://bugs.python.org/file14548/testcase2.py
___
Python tracker
<http://bugs.python.org/issue6551>
___
___
Python-bug
New submission from Alexandre Vassalotti :
For some yet unknown reason, test_codecs fails when it is run after
test_zipimport and subsequently test_mailbox:
./python Lib/test/regrtest.py -w test_zipimport test_mailbox test_codecs
[SNIP
Changes by Alexandre Vassalotti :
Added file: http://bugs.python.org/file14547/testcase1.py
___
Python tracker
<http://bugs.python.org/issue6551>
___
___
Python-bug
Changes by Alexandre Vassalotti :
Added file: http://bugs.python.org/file14550/testcase4.py
___
Python tracker
<http://bugs.python.org/issue6551>
___
___
Python-bug
Changes by Alexandre Vassalotti :
Added file: http://bugs.python.org/file14549/testcase3.py
___
Python tracker
<http://bugs.python.org/issue6551>
___
___
Python-bug
Alexandre Vassalotti added the comment:
Closing as I don't see any other bugs in this issue to fix.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyt
Alexandre Vassalotti added the comment:
Oh, nice catch. That patch looks fine. However, I would probably add a
comment why the fstat checks are required.
--
nosy: +alexandre.vassalotti
___
Python tracker
<http://bugs.python.org/issue6
Alexandre Vassalotti added the comment:
Committed in r74159 (branches/py3k).
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Committed in r74158 (branches/py3k).
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Committed in r74157 (branches/py3k).
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Patch committed in r74156 (branches/py3k).
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Patch committed in r74155 (branches/py3k).
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
I agree with Nick.
And if you really want to, you could hack a Pickler subclass to support
NoneType:
import io
import pickle
class XPickler(pickle.Pickler):
def persistent_id(self, obj):
if obj is type(None):
return "NoneType"
Alexandre Vassalotti added the comment:
Committed fix for 3.x in r74013 and for 2.x in r74014.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexandre Vassalotti added the comment:
I don't see why you want to pickle NoneType. Do you have a proper
use-case for this, or are you just playing around with pickle?
--
nosy: +alexandre.vassalotti
priority: -> low
___
Python tracke
Changes by Alexandre Vassalotti :
Removed file: http://bugs.python.org/file14376/lsprof.py
___
Python tracker
<http://bugs.python.org/issue2919>
___
___
Python-bugs-list m
Alexandre Vassalotti added the comment:
Here's an updated version of my lsprof.py module. I fixed a few bugs,
includes the awful reference leak that was present in the previous
version (i.e., the profiler code was keeping a reference to every frame
executed).
I consider the lsprof.py
Alexandre Vassalotti added the comment:
Can you provide a patch?
--
nosy: +alexandre.vassalotti
priority: -> low
stage: -> needs patch
versions: +Python 3.2 -Python 2.4, Python 2.5, Python 2.6, Python 3.0, Python
3.1
___
Python tracker
Alexandre Vassalotti added the comment:
I know believe that arrays should be pickled as a list of values on
Python 2.x. Doing otherwise makes it impossible to unpickle arrays
coming from Python 2.x using Python 3.x, since pickle on Python 3
decodes all the strings from 2.x to Unicode.
However
New submission from Alexandre Vassalotti :
It looks like either array's 'w' support got lost in a merge, or the
documentation is just wrong.
>>> import array
>>> array.array('w', "hello")
Traceback (most recent call last):
File "&quo
Alexandre Vassalotti added the comment:
> I'm not sure what the "new patch" is since you haven't uploaded it
Oh silly me. Here's the new patch.
--
Added file: http://bugs.python.org/file14459/strict-aliasing-pydescr-2.diff
_
New submission from Alexandre Vassalotti :
Running 2to3 with the default options on the following code:
from __future__ import print_function
x,y = 1,2
print(x, y)
produces the following diff:
--- future_print.py (original)
+++ future_print.py (refactored)
@@ -1,5 +1,5 @@
-from
Changes by Alexandre Vassalotti :
Removed file: http://bugs.python.org/file11096/fix_array_pickling.patch
___
Python tracker
<http://bugs.python.org/issue2389>
___
___
Alexandre Vassalotti added the comment:
I would like to commit my patch later this week. So if you see any issue
with the patch, please speak up.
--
___
Python tracker
<http://bugs.python.org/issue2
Alexandre Vassalotti added the comment:
Here is an attempt to add a Py3K warning when sys.exitfunc is modified.
--
nosy: +alexandre.vassalotti
Added file: http://bugs.python.org/file14453/sys_exitfunc_warning.diff
___
Python tracker
<h
Alexandre Vassalotti added the comment:
Committed in r73856.
--
nosy: +alexandre.vassalotti
resolution: -> accepted
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexandre Vassalotti added the comment:
Fixed the array bug in r73850. Is there any bug left to fixed that were
reported in this issue?
--
nosy: +alexandre.vassalotti
___
Python tracker
<http://bugs.python.org/issue4
Alexandre Vassalotti added the comment:
Committed the warning patch in r73846 (with a minor correction in
r73847), the 2to3 fixer in r73849.
Thanks!
--
assignee: collinwinter ->
nosy: +alexandre.vassalotti
resolution: -> accepted
stage: -> committed/rejected
status: open
Alexandre Vassalotti added the comment:
New patch with the superfluous macros stripped out. However, I still
like my original patch better, since it is a bit more consistent.
Anyway, is anyone opposed to this change?
--
___
Python tracker
<h
Changes by Alexandre Vassalotti :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue6410>
___
___
Python-bugs-list mailing list
Un
Alexandre Vassalotti added the comment:
Tim Gordon wrote:
> __add__ is non-commutative for lists, tuples, strings etc. - perhaps
> non-commutative wasn't quite what you were looking for :p.
Yeah, I was not clear in my explanation.
The thing is for lists, tuples, string and ot
Alexandre Vassalotti added the comment:
I am against adding __add__ to dict, since merging dictionaries is not a
commutative operation.
If a short syntax is desired for merging dictionaries, the just define a
function. For example:
def merge_dicts(*args):
result = {}
for x in args
Alexandre Vassalotti added the comment:
Could you elaborate on what is problem exactly? Please include any error
message you are getting. Also, what operating system are you using?
--
nosy: +alexandre.vassalotti
stage: -> test needed
___
Pyt
Changes by Alexandre Vassalotti :
--
nosy: +alexandre.vassalotti
___
Python tracker
<http://bugs.python.org/issue6395>
___
___
Python-bugs-list mailing list
Unsub
Changes by Alexandre Vassalotti :
--
___
Python tracker
<http://bugs.python.org/issue558238>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Alexandre Vassalotti added the comment:
This has been fixed in 2.6 and 3.x.
Closing.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexandre Vassalotti added the comment:
I am leaving this issue open for now.
I reconsidered whether we should add pickle support for methods and I
now think it would probably be a good idea. For example, the
multiprocessing module would benefit from a having built-in support for
method
Changes by Alexandre Vassalotti :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue1761028>
___
___
Python-bugs-list mailing list
Un
Alexandre Vassalotti added the comment:
Oops, I forgot to update my client in my last message. The sample trace
run should make more sense now.
#!/usr/bin/python3.2
# xmlclient.py
import xmlrpc.client
server_proxy = xmlrpc.client.ServerProxy("http://localhost:8000&quo
Alexandre Vassalotti added the comment:
I didn't test the changes extensively. I ran the test suite and the
changes seemed to be correct.
It is a bit difficult to provide a test case, since the patch shouldn't
change how the code currently behave. Nevertheless, here is a simp
New submission from Alexandre Vassalotti :
Here's an example of the behaviour:
import io
def test(buf):
textio = io.TextIOWrapper(buf)
buf = io.BytesIO()
test(buf)
print(buf.closed) # This prints True currently
The problem here is TextIOWrapper closes its buffer when de
Alexandre Vassalotti added the comment:
I am closing this issue in favour of #3119, since Aaron's patch is
cleaner and slightly faster.
Thank you Daniel for the idea!
--
dependencies: -pickle.py is limited by python's call stack
resolution: -> duplicate
status: o
New submission from Alexandre Vassalotti :
The following patch tries to improve how xmlrpc.client handles strings.
In particular, it simplifies the decoding of strings by keeping them as
unicode str.
--
files: simplify_xmlrpc_string_decoding.diff
keywords: patch
messages: 89801
nosy
Alexandre Vassalotti added the comment:
That seems easy to fix by adding a dummy __reduce__ method to file. My
only worry is this could break file subclasses which may have ad-hoc
mechanisms implemented for pickling files.
--
keywords: +patch
nosy: +alexandre.vassalotti
stage
201 - 300 of 602 matches
Mail list logo