[issue8404] Set operations don't work for dictionary views

2010-04-17 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: Removed file: http://bugs.python.org/file16927/fix_dictviews_as_number.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8404

[issue8404] Set operations don't work for dictionary views

2010-04-14 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue8404] Set operations don't work for dictionary views

2010-04-14 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- keywords: +patch Added file: http://bugs.python.org/file16927/fix_dictviews_as_number.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8404

[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6

2010-02-13 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6

2010-02-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list

[issue1023290] Conversion of longs to bytes and vice-versa.

2010-02-13 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue2333] Backport set and dict comprehensions

2010-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r77422. -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2333

[issue2919] Merge profile/cProfile in 3.0

2010-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Any comment about the code I posted? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2919

[issue1967] Backport dictviews to 2.7

2010-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r77428. Thanks for your comments! -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue6710] hotshot stats load causes TypeError when multiple files are loaded

2010-01-11 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- nosy: +alexandre.vassalotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6710

[issue7382] bytes.__getnewargs__ is broken; copy.copy() therefore doesn't work on bytes, and bytes subclasses can't be pickled by default

2010-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r77437. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7382

[issue7382] bytes.__getnewargs__ is broken; copy.copy() therefore doesn't work on bytes, and bytes subclasses can't be pickled by default

2010-01-11 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- resolution: - accepted stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7382

[issue1023290] Conversion of longs to bytes and vice-versa.

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r77394. Thank you for the good reviews! -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue6688] Optimize PyBytes_FromObject.

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r77398. -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6688

[issue2335] Backport set literals

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep

[issue1967] Backport dictviews to 2.7

2009-12-30 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue7608] PyUnicode_FromFormatV handles %R and %S incorrectly.

2009-12-30 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: 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

[issue7608] PyUnicode_FromFormatV handles %R and %S incorrectly.

2009-12-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- resolution: - duplicate status: open - closed superseder: - PyUnicode_FromFormat broken and not documented for 2.x ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7608

[issue7608] PyUnicode_FromFormatV handles %R and %S incorrectly.

2009-12-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- stage: test needed - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7608

[issue1967] Backport dictviews to 2.7

2009-12-30 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep...@bugs.python.org http

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-12-30 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r77174. Thank you for reviewing! -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue1398] Can't pickle partial functions

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Indeed. Jack Diederich added support for pickling partial functions in r70931. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue2335] Backport set literals

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: If there are no objections, I will commit this patch later this week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2335

[issue2333] Backport set and dict comprehensions

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: If there are no objections, I will commit this patch later this week after issue #2335. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2333

[issue1967] Backport dictviews to 2.7

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Can someone review the patches? I would like to commit this later this week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1967

[issue7426] StringIO and with statement

2009-12-04 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - fileinput, StringIO, and cStringIO do not support the with protocol ___ Python tracker rep

[issue7392] cPickle test failure on release26-maint branch

2009-11-24 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: I get the following test failure on the release26-maint branch: ./python Lib/test/test_cpickle.py [...] == ERROR: test_issue2702 (__main__.cPickleDeepRecursive

[issue7128] cPickle looking for non-existent package copyreg

2009-11-24 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep

[issue7128] cPickle looking for non-existent package copyreg

2009-11-21 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep

[issue5683] Speed up cPickle's pickling generally

2009-11-20 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue7128] cPickle looking for non-existent package copyreg

2009-11-20 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep...@bugs.python.org http

[issue1023290] Conversion of longs to bytes and vice-versa.

2009-11-14 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6551] test_codecs fails when ran after test_zipimport and test_mailbox.

2009-11-12 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: The patch looks good to me. -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6551

[issue1023290] Conversion of longs to bytes and vice-versa.

2009-08-17 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-08-11 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: 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

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-08-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6688] Optimize PyBytes_FromObject.

2009-08-11 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: 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

[issue1023290] proposed struct module format code addition

2009-08-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue2333] Backport set and dict comprehensions

2009-08-06 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: You need to apply the set literal patch I posted in issue2335 first. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2333

[issue2333] Backport set and dict comprehensions

2009-08-05 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue2334] Backport set comprehensions

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - Backport set and dict comprehensions ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue2333] Backport set and dict comprehensions

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- dependencies: +Backport set literals ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2333

[issue2345] Using an exception variable outside an 'except' clause should raise a Py3K warning

2009-08-05 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep

[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- nosy: +alexandre.vassalotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745

[issue2335] Backport set literals

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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.diff

[issue5449] bug fix to prevent io.BytesIO from accepting arbitrary keyword arguments

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r74316. Thanks! -- nosy: +alexandre.vassalotti resolution: - accepted stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue2335] Backport set literals

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep

[issue1967] Backport dictviews to 2.7

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue1967] Backport dictviews to 2.7

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep

[issue6042] Document and slightly simplify lnotab tracing

2009-07-30 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: The patch was merged to 3.x in r74132. -- assignee: jyasskin - nosy: +alexandre.vassalotti resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue6607] asctime causing python to crash

2009-07-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6607

[issue6608] asctime causing python to crash

2009-07-30 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6551] test_codecs fails when ran after test_zipimport and test_mailbox.

2009-07-23 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: Added file: http://bugs.python.org/file14549/testcase3.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6551

[issue6551] test_codecs fails when ran after test_zipimport and test_mailbox.

2009-07-23 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: Added file: http://bugs.python.org/file14550/testcase4.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6551

[issue6551] test_codecs fails when ran after test_zipimport and test_mailbox.

2009-07-23 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: Added file: http://bugs.python.org/file14547/testcase1.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6551

[issue6551] test_codecs fails when ran after test_zipimport and test_mailbox.

2009-07-23 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: 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

[issue6551] test_codecs fails when ran after test_zipimport and test_mailbox.

2009-07-23 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: Added file: http://bugs.python.org/file14548/testcase2.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6551

[issue6242] Fix reference leak in io.StringIO

2009-07-21 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Patch committed in r74155 (branches/py3k). -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue6360] Simplify string decoding in xmlrpc.client.

2009-07-21 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Patch committed in r74156 (branches/py3k). -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue6241] Better type checking for the arguments of io.StringIO

2009-07-21 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r74157 (branches/py3k). -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue6218] Make io.BytesIO and io.StringIO picklable.

2009-07-21 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r74158 (branches/py3k). -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue6151] Make PyDescr_COMMON conform to standard C

2009-07-21 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r74159 (branches/py3k). -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue6542] test_os TestInvalidFD.test_closerange causes test_pipes hang in certain circumstances on linux

2009-07-21 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep...@bugs.python.org

[issue4509] bugs in array.array with exports (buffer protocol)

2009-07-21 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep...@bugs.python.org

[issue6477] Pickling of NoneType raises PicklingError

2009-07-17 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6477] Pickling of NoneType raises PicklingError

2009-07-15 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue2389] Array pickling exposes internal memory representation of elements

2009-07-15 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed fix for 3.x in r74013 and for 2.x in r74014. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2389

[issue6429] 2to3: fix_future conflicts with fix_print

2009-07-06 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: 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

[issue6151] Make PyDescr_COMMON conform to standard C

2009-07-06 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6430] array.array falsely advertises support for 'w' in documentation

2009-07-06 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: 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 stdin, line 1, in module ValueError: bad typecode

[issue2389] Array pickling exposes internal memory representation of elements

2009-07-06 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue5885] uuid.uuid1() is too slow

2009-07-06 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue2919] Merge profile/cProfile in 3.0

2009-07-06 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue2919] Merge profile/cProfile in 3.0

2009-07-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: Removed file: http://bugs.python.org/file14376/lsprof.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2919

[issue4005] pydoc in web server mode tails at initial request

2009-07-05 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Committed in r73856. -- nosy: +alexandre.vassalotti resolution: - accepted stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue2356] fixer for sys.exitfunc - atexit

2009-07-05 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue2389] Array pickling exposes internal memory representation of elements

2009-07-05 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep...@bugs.python.org http://bugs.python.org/issue2389

[issue2389] Array pickling exposes internal memory representation of elements

2009-07-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: Removed file: http://bugs.python.org/file11096/fix_array_pickling.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2389

[issue6410] Dictionaries should support __add__

2009-07-04 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6410] Dictionaries should support __add__

2009-07-04 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6410 ___ ___ Python

[issue6151] Make PyDescr_COMMON conform to standard C

2009-07-04 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue2370] operator.{isCallable,sequenceIncludes} needs a fixer

2009-07-04 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue4509] bugs in array.array with exports (buffer protocol)

2009-07-04 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep...@bugs.python.org http

[issue6411] 3.1 not functional

2009-07-03 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6410] Dictionaries should support __add__

2009-07-03 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6395] Add Pickle Support to the codecs Module

2009-07-02 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- nosy: +alexandre.vassalotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6395

[issue6360] Simplify string decoding in xmlrpc.client.

2009-06-29 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6360] Simplify string decoding in xmlrpc.client.

2009-06-29 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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;) print

[issue1761028] pickle - cannot unpickle circular deps with custom __hash__

2009-06-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1761028

[issue558238] Pickling bound methods

2009-06-29 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue1214] Timeout in CGIXMLRPCRequestHandler under IIS

2009-06-29 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: This has been fixed in 2.6 and 3.x. Closing. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1214

[issue558238] Pickling bound methods

2009-06-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue558238 ___ ___ Python-bugs-list mailing

[issue2919] Merge profile/cProfile in 3.0

2009-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Yesterday, I ported the _lsprof module to Python as an experiment. I still have a few issues to iron out, but the core of the functionality is there. I am not sure yet how this experiment will fit in the profile/cProfile merge. I

[issue2919] Merge profile/cProfile in 3.0

2009-06-28 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: Added file: http://bugs.python.org/file14377/pyprofile.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2919

[issue1474680] pickling files works with protocol=2.

2009-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6360] Simplify string decoding in xmlrpc.client.

2009-06-28 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: 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

[issue2480] eliminate recursion in pickling

2009-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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

[issue6361] I/O object wrappers shouldn't close their underlying file when deleted.

2009-06-28 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti alexan...@peadrop.com: 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

<    1   2   3   4   5   6   >