[issue19881] Fix bigmem pickle tests

2013-12-03 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: The bigmem tests for pickle are currently failing for protocol 4. The tests are broken because of an assumption rendered invalid by the frame header. Fixing the tests caught a legitimate bug in the save_bytes function of cpickle. -- assignee

[issue19881] Fix bigmem pickle tests

2013-12-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file32982/fix_bigmem_pickle_2.patch ___ Python tracker <http://bugs.python.org/issue19881> ___ ___

[issue19881] Fix bigmem pickle tests

2013-12-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file33001/fix_bigmem_pickle_3.patch ___ Python tracker <http://bugs.python.org/issue19881> ___ ___

[issue19881] Fix bigmem pickle tests

2013-12-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Could you provide a single patch with the implementation and the tests together? I will try to find some time this week to review this. -- assignee: docs@python -> alexandre.vassalotti priority: normal -> high stage: -> patch review

[issue19858] Make pickletools.optimize aware of the MEMOIZE opcode.

2013-12-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Ah, I almost forgot! I did implement the verification in pickletools.dis() for MEMOIZE: http://hg.python.org/cpython/file/2612ea573ff7/Lib/pickletools.py#l2420 -- ___ Python tracker <http://bugs.python.

[issue19900] improve pickle intro

2013-12-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Looks good to me! -- ___ Python tracker <http://bugs.python.org/issue19900> ___ ___ Python-bugs-list mailing list Unsub

[issue18015] python 2.7.5 fails to unpickle namedtuple pickled by 2.7.3 or 2.7.4

2013-12-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10701] Error pickling objects with mutating __getstate__

2013-12-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- title: Error pickling a dict -> Error pickling objects with mutating __getstate__ ___ Python tracker <http://bugs.python.org/issu

[issue18400] Minor increase to Pickle test coverage

2013-12-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: +alexandre.vassalotti stage: -> patch review type: -> enhancement ___ Python tracker <http://bugs.python.org/i

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-06 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I cleaned up the patch. I will submit it tonight if there is no major objections. -- Added file: http://bugs.python.org/file33019/pickle_python2_str_as_bytes.diff ___ Python tracker <http://bugs.python.

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I fixed up the last few review comments and submitted the patch. Thank you for the help! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python track

[issue6673] Uncaught comprehension SyntaxError eats up all memory

2013-12-07 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: -alexandre.vassalotti ___ Python tracker <http://bugs.python.org/issue6673> ___ ___ Python-bugs-list mailing list Unsub

[issue12290] __setstate__ is called for false values

2013-12-07 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python stage: -> patch review versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python t

[issue12290] __setstate__ is called for false values

2013-12-07 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- versions: +Python 2.7, Python 3.3 ___ Python tracker <http://bugs.python.org/issue12290> ___ ___ Python-bugs-list mailin

[issue13566] Array objects pickled in 3.x with protocol <=2 are unpickled incorrectly in 2.x

2013-12-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Adding a special type is not a bad idea. We have to keep the code for loading BINSTRING opcodes anyway, so we might as well use it. It could be helpful for unit-testing our Python 2 compatibility support for pickle. We should still fix array in 2.7 to

[issue11299] Allow deepcopying paused generators

2013-12-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The issue here is copy.deepcopy will raise an exception whenever it encounters a generator. We would like to do better here. Unfortunately, using itertools.tee is not a solution here because it does not preserve the type of the object

[issue21962] No timeout for asyncio.Event.wait() or asyncio.Condition.wait() ?

2014-07-11 Thread Alexandre JABORSKA
New submission from Alexandre JABORSKA: Hi, Nor asyncio.Event.wait() neither asyncio.Condition.wait() (or .wait_for()) has a timeout parameter, while threading.Event.wait() has one. A timeout can be specified for the whole task using asyncio.wait_for() but it's tricky. I guess as

[issue19972] Leak in pickle (?)

2013-12-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch is good. I am not sure if you need the freefunc cast though. The example in the PEP 3121 should updated if freefunc is actually required. I didn't define freefunc because of this ex

[issue20395] Extract generated clinic code in Modules/_pickle.c to separate file

2014-01-26 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: +1 from me as well for a separate file. -- ___ Python tracker <http://bugs.python.org/issue20395> ___ ___ Python-bug

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2014-01-28 Thread Alexandre Dias
Alexandre Dias added the comment: Could I get an update on this please? -- ___ Python tracker <http://bugs.python.org/issue18795> ___ ___ Python-bugs-list mailin

[issue20428] _Py_open does not work with O_CREAT

2014-01-28 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: The _Py_open function in Python/fileutils.c cannot be given correctly the flag O_CREAT. According to the POSIX spec, open(2) _must_ be given an additional mode argument when O_CREAT is used. _Py_open should be fixed to either to use a reasonable

[issue20428] _Py_open does not work with O_CREAT

2014-01-28 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > What is the current behaviour? I don't think the behaviour is defined. At least, I know it causes recent GCC/glibc combination to throw a compilation error when _FORTIFY_SOURCE is defined: http://www.eglibc.org/cgi-bin/viewvc.cgi/trunk

[issue20841] asyncio.StreamReader.readline() lack lines limit optional parameter

2014-03-03 Thread Alexandre JABORSKA
New submission from Alexandre JABORSKA: This prevent using StreamReader as a normal file object in some circumstances (like http header parsing) -- components: Library (Lib) messages: 212624 nosy: ajaborsk priority: normal severity: normal status: open title

[issue20841] asyncio.StreamReader.readline() lack lines limit optional parameter

2014-03-03 Thread Alexandre JABORSKA
Alexandre JABORSKA added the comment: Hum... It seems to me that the StreamReader() limit parameter is for buffer size while the io.BytesIO.readline() "n" parameter is for maximum number of lines to be retreived, I guess. And since the StreamReader().readline() does not accept

[issue20841] asyncio.StreamReader.readline() lack lines limit optional parameter

2014-03-03 Thread Alexandre JABORSKA
Alexandre JABORSKA added the comment: Well, You're right, I'm confused, and I cannot use the http.client.parse_headers(). I made a workaround by reading all lines in a BytesIO and parse this one. Anyway, if it not possible to use a file like object with the asyncio module,

[issue20889] asyncio.docs : asyncio.Condition acquire/release/locked method undocumented

2014-03-10 Thread Alexandre JABORSKA
New submission from Alexandre JABORSKA: While the asyncio.Condition.acquire(), release() an locked() methods work as expected (on the underlying Lock), they are not mentioned in the documentation. -- assignee: docs@python components: Documentation messages: 213117 nosy: ajaborsk, docs

[issue6410] Dictionaries should support __add__

2009-07-04 Thread Alexandre Vassalotti
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

[issue6410] Dictionaries should support __add__

2009-07-04 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue6410> ___ ___ Python-bugs-list mailing list Un

[issue6151] Make PyDescr_COMMON conform to standard C

2009-07-04 Thread Alexandre Vassalotti
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

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

2009-07-04 Thread Alexandre Vassalotti
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

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

2009-07-04 Thread Alexandre Vassalotti
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

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

2009-07-04 Thread Alexandre Vassalotti
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

[issue2356] fixer for sys.exitfunc -> atexit

2009-07-05 Thread Alexandre Vassalotti
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

[issue2389] Array pickling exposes internal memory representation of elements

2009-07-05 Thread Alexandre Vassalotti
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

[issue2389] Array pickling exposes internal memory representation of elements

2009-07-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file11096/fix_array_pickling.patch ___ Python tracker <http://bugs.python.org/issue2389> ___ ___

[issue6429] 2to3: fix_future conflicts with fix_print

2009-07-06 Thread Alexandre Vassalotti
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

[issue6151] Make PyDescr_COMMON conform to standard C

2009-07-06 Thread Alexandre Vassalotti
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 _

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

2009-07-06 Thread Alexandre Vassalotti
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

[issue2389] Array pickling exposes internal memory representation of elements

2009-07-06 Thread Alexandre Vassalotti
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

[issue5885] uuid.uuid1() is too slow

2009-07-06 Thread Alexandre Vassalotti
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

[issue2919] Merge profile/cProfile in 3.0

2009-07-06 Thread Alexandre Vassalotti
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

[issue2919] Merge profile/cProfile in 3.0

2009-07-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file14376/lsprof.py ___ Python tracker <http://bugs.python.org/issue2919> ___ ___ Python-bugs-list m

[issue6477] Pickling of NoneType raises PicklingError

2009-07-15 Thread Alexandre Vassalotti
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

[issue2389] Array pickling exposes internal memory representation of elements

2009-07-15 Thread Alexandre Vassalotti
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/

[issue6477] Pickling of NoneType raises PicklingError

2009-07-17 Thread Alexandre Vassalotti
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"

[issue6242] Fix reference leak in io.StringIO

2009-07-21 Thread Alexandre Vassalotti
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

[issue6360] Simplify string decoding in xmlrpc.client.

2009-07-21 Thread Alexandre Vassalotti
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

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

2009-07-21 Thread Alexandre Vassalotti
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

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

2009-07-21 Thread Alexandre Vassalotti
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

[issue6151] Make PyDescr_COMMON conform to standard C

2009-07-21 Thread Alexandre Vassalotti
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

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

2009-07-21 Thread Alexandre Vassalotti
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

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

2009-07-21 Thread Alexandre Vassalotti
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

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

2009-07-22 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file14549/testcase3.py ___ Python tracker <http://bugs.python.org/issue6551> ___ ___ Python-bug

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

2009-07-22 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file14550/testcase4.py ___ Python tracker <http://bugs.python.org/issue6551> ___ ___ Python-bug

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

2009-07-22 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file14547/testcase1.py ___ Python tracker <http://bugs.python.org/issue6551> ___ ___ Python-bug

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

2009-07-22 Thread Alexandre Vassalotti
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

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

2009-07-22 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file14548/testcase2.py ___ Python tracker <http://bugs.python.org/issue6551> ___ ___ Python-bug

[issue6042] Document and slightly simplify lnotab tracing

2009-07-30 Thread Alexandre Vassalotti
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

[issue6607] asctime causing python to crash

2009-07-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue6608] asctime causing python to crash

2009-07-30 Thread Alexandre Vassalotti
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

[issue2335] Backport set literals

2009-08-04 Thread Alexandre Vassalotti
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

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

2009-08-04 Thread Alexandre Vassalotti
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

[issue2335] Backport set literals

2009-08-04 Thread Alexandre Vassalotti
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

[issue1967] Backport dictviews to 2.7

2009-08-04 Thread Alexandre Vassalotti
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

[issue1967] Backport dictviews to 2.7

2009-08-04 Thread Alexandre Vassalotti
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

[issue2333] Backport set and dict comprehensions

2009-08-05 Thread Alexandre Vassalotti
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

[issue2334] Backport set comprehensions

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Backport set and dict comprehensions ___ Python tracker <http://bugs.pytho

[issue2333] Backport set and dict comprehensions

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- dependencies: +Backport set literals ___ Python tracker <http://bugs.python.org/issue2333> ___ ___ Python-bugs-list mailin

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

2009-08-05 Thread Alexandre Vassalotti
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

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

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: +alexandre.vassalotti stage: -> patch review ___ Python tracker <http://bugs.python.org/issue1745> ___ ___ Python-

[issue2333] Backport set and dict comprehensions

2009-08-06 Thread Alexandre Vassalotti
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

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

2009-08-11 Thread Alexandre Vassalotti
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

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

2009-08-11 Thread Alexandre Vassalotti
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

[issue6688] Optimize PyBytes_FromObject.

2009-08-11 Thread Alexandre Vassalotti
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

[issue1023290] proposed struct module format code addition

2009-08-11 Thread Alexandre Vassalotti
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

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

2009-08-11 Thread Alexandre Vassalotti
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

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

2009-08-17 Thread Alexandre Vassalotti
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

[issue6969] configparser

2009-09-22 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre : Hello! Seems configparser is broken in recent versions of py3k. Please also check older versions of python. $ python3 ./cfgexample.py Traceback (most recent call last): File "./cfgexample.py", line 9, in config.write(configfi

[issue5097] asyncore.dispatcher_with_send undocumented

2009-10-02 Thread Kandalintsev Alexandre
Kandalintsev Alexandre added the comment: Please don't keep this bug open :( -- ___ Python tracker <http://bugs.python.org/issue5097> ___ ___ Python-bugs-l

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

2009-11-12 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch looks good to me. -- resolution: -> accepted ___ Python tracker <http://bugs.python.org/issue6551> ___ _

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

2009-11-14 Thread Alexandre Vassalotti
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

[issue5683] Speed up cPickle's pickling generally

2009-11-20 Thread Alexandre Vassalotti
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

[issue7128] cPickle looking for non-existent package copyreg

2009-11-20 Thread Alexandre Vassalotti
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

[issue7128] cPickle looking for non-existent package copyreg

2009-11-21 Thread Alexandre Vassalotti
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

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

2009-11-24 Thread Alexandre Vassalotti
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

[issue7392] cPickle test failure on release26-maint branch

2009-11-24 Thread Alexandre Vassalotti
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

[issue7128] cPickle looking for non-existent package copyreg

2009-11-24 Thread Alexandre Vassalotti
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

[issue7426] StringIO and with statement

2009-12-04 Thread Alexandre Vassalotti
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://

[issue1398] Can't pickle partial functions

2009-12-11 Thread Alexandre Vassalotti
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

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

2009-12-11 Thread Alexandre Vassalotti
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,

[issue2335] Backport set literals

2009-12-11 Thread Alexandre Vassalotti
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

[issue2333] Backport set and dict comprehensions

2009-12-11 Thread Alexandre Vassalotti
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

[issue1967] Backport dictviews to 2.7

2009-12-11 Thread Alexandre Vassalotti
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

[issue1967] Backport dictviews to 2.7

2009-12-30 Thread Alexandre Vassalotti
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

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

2009-12-30 Thread Alexandre Vassalotti
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

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

2009-12-30 Thread Alexandre Vassalotti
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

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

2009-12-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- stage: test needed -> committed/rejected ___ Python tracker <http://bugs.python.org/issue7608> ___ ___ Python-bugs-list mai

[issue1967] Backport dictviews to 2.7

2009-12-30 Thread Alexandre Vassalotti
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

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

2009-12-30 Thread Alexandre Vassalotti
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

<    1   2   3   4   5   6   7   >