[issue1032] Improve the hackish runtime_library_dirs support for gcc

2007-08-26 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: In distutils.unixccompiler, there is a hack to passing correctly the -R option to gcc (and a few other compilers). However, there is a small bug that causes gcc to not be detected correctly if the compiler name does not start with gcc (e.g., i486

[issue1032] Improve the hackish runtime_library_dirs support for gcc

2007-08-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1032 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options

[issue1029] py3k: io.StringIO.getvalue() returns \r\n

2007-08-26 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: As far as I know, StringIO should not do any string transformations. From PEP-3116 New I/O, last paragraph of the section Text I/O: Another implementation, StringIO, creates a file-like TextIO implementation without an underlying Buffered I/O object

[issue1029] py3k: io.StringIO.getvalue() returns \r\n

2007-08-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: That's why the current behaviour is not correct: When I write('\n'), getvalue() currently returns '\r\n'. Oh, I missed your example in your initial message. So yes, I agree that StringIO shouldn't translate newlines like that. I attached a patch

[issue1032] Improve the hackish runtime_library_dirs support for gcc

2007-08-28 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch is incorrect since find returns -1 on failure. Oops, that is right. I attached the corrected patch. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1032 __Index: Lib

[issue11299] Allow deepcopying and pickling paused generators

2011-02-25 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Although, I would really like to see support of pickling generators. It is not really possible in CPython. This is recurrent request. I even wrote a small article about it. http://peadrop.com/blog/2009/12/29/why-you-cannot-pickle

[issue11299] Allow deepcopying and pickling paused generators

2011-02-26 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: The value of the instruction pointer depends on the byte-code. So it's not portable either. But, the bigger issue is the fact generator objects do not have names we can refer to, unlike top-level functions and classes which pickle

[issue1247] PEP 3137 patch (repr, names, parser)

2007-10-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I am not sure how the parser work, so I can't comment if your change to it is correct. It would probably a better idea to keep it for later, when the semantic differences between str8 and bytes objects will be resolved. I think changing b'' to buffer(b

[issue1247] PEP 3137 patch (repr, names, parser)

2007-10-08 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1247 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options

[issue1247] PEP 3137 patch (repr, names, parser)

2007-10-08 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1247 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-10 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: This patch removes the buffer API from PyUnicode, as specified by PEP 3137. All the unit tests passes. However, I believe there is a few function calls to PyArg API that could become problematic if they are given a PyUnicode object: % egrep -R

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I found a few problems in your patch. In PyCode_New() the type check for the filename argument is incorrect: --- Objects/codeobject.c(revision 58412) +++ Objects/codeobject.c(working copy) @@ -59,7 +59,7 @@ freevars == NULL

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1272 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Guido wrote: Why copy the default encoding before mangling it? With a little extra care you will only have to copy it once. Also, consider not mangling at all, but assuming the encoding comes in a canonical form -- several other functions assume

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: There was a problem with one of the call of PyArg_ParseTuple in the OS/2 version of listdir() in the posix module. I also clarified the error message of the 't' format unit. __ Tracker [EMAIL PROTECTED] http

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Guido wrote: I figured out the problem -- it came from marshalled old code objects. If you throw away all .pyc files the problem goes away. You can also get rid of the similar checks for the 'name' argument -- this should just be a PyUnicode too

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Remove the PyString type check on 'filename' and 'name' in PyCode_New. Oops. I removed one of the ! the checks by mistake. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1272

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r58455. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1260 __ ___ Python-bugs-list mailing list Unsubscribe: http

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Christian wrote: Alexandre's mangle loop doesn't do the same job as mine. Chars like _ and - aren't removed from the encoding name and the if clauses don't catch for example UTF-8 or ISO-8859-1 only UTF8 or ISO8859-1. That isn't true. My mangler does

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I have a question for Alexandre related to frozen.c -- why is there a mode line with an encoding involved in freezing hello.py? For some reason which I don't know about, freeze.py tries to read all the modules accessible from sys.path: # collect

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I thought of another way to implement PyUnicode_DecodeFSDefault. If Py_FileSystemDefaultEncoding is set, decode with the codecs module, otherwise use UTF-8 + replace. This works because when Py_FileSystemDefaultEncoding is initialized at the end

[issue1280] PEP 3137: Make PyString's indexing and iteration return integers

2007-10-15 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: Here a preliminary patch to make PyString return integers on indexing and iteration. There is still quite a few XXX in the patch, that I would like to fix. However, the good thing is all tests passes. -- components: Interpreter Core files

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-15 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- nosy: +alexandre.vassalotti __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1278 __ ___ Python-bugs-list mailing list Unsubscribe

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-15 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I wrote in msg56419: It is not perfect, since the extra function calls in the codecs module causes test_profile and test_doctest to fail. How this was resolved? __ Tracker [EMAIL PROTECTED] http://bugs.python.org

[issue1286] fileinput, StringIO, and cStringIO do not support the with protocol

2007-10-21 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Do you have a use-case for this? In Py3k, I don't think adding support for the 'with' statement to StringIO makes any sense, since the close() method does nothing. -- nosy: +alexandre.vassalotti __ Tracker [EMAIL

[issue1302] Fixes for profile/cprofile

2007-10-25 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I still don't understand why you are using (sizeof lower) - 2 It is simply to avoid duplicating the constant (a.k.a. the Don't Repeat Yourself (DRY) rule). and what lower[(sizeof lower) - 2] returns. Is it the memory address of lower[17

[issue1302] Fixes for profile/cprofile

2007-10-25 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Personally, I used like to subtract pointer, ((lower - l + 1) (sizeof lower)) to get the bound. Doh. I got it backward. It's (l - lower + 1), not (lower - l + 1). But now, I find Guido's trick more cute (and less error-prone). At least, I got

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: On 11/7/07, Guido van Rossum [EMAIL PROTECTED] wrote: On 11/7/07, Christian Heimes [EMAIL PROTECTED] wrote: Christian Heimes added the comment: By the way what happened to the SoC project related to Python's new IO subsystem? IIRC somebody

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: On 11/7/07, Guido van Rossum wrote: Cool. How hard do you think it would be to extend your work on StringIO into a translation of TextIOWrapper into C? Well, StringIO and TextIOWrapper are quite different. The only part that I could reuse, from StringIO

[issue1338] pickling bytes?

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please assign this to me. I am planning to fix this, along a few other bugs, with my new revision of the pickle protocol. -- nosy: +alexandre.vassalotti __ Tracker [EMAIL PROTECTED] http://bugs.python.org

[issue892902] problem with pickling newstyle class instances

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please assign this bug to me. Note that neither cPickle or pickle is able to load the stream generated by cPickle correctly: g = group(None) subitem(g) g[0].parent is g True gp = cPickle.loads(cPickle.dumps(g)) gp[0].parent is gp

[issue939395] cPickle.Pickler: in list mode, no way to set protocol

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please mark this bug as Won't Fix. As Tim said, the list-based interface of cPickle is unsupported and pending removal. Please use the pickle.dumps and pickle.loads functions if you want string interface to pickle. -- nosy: +alexandre.vassalotti

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

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please assign this bug to me. This certainly doesn't look easy to fix. I will look into it, but I can promise that I can fix it. -- nosy: +alexandre.vassalotti type: - behavior versions: +Python 2.6, Python 3.0

[issue1338] pickling bytes?

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thank you, Georg! __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1338 __ ___ Python-bugs-list mailing list Unsubscribe: http

[issue892902] problem with pickling newstyle class instances

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: - alexandre.vassalotti Tracker [EMAIL PROTECTED] http://bugs.python.org/issue892902 ___ Python-bugs-list mailing list

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

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: - alexandre.vassalotti _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1761028 _ ___ Python-bugs-list mailing list

[issue1536] pickle's documentation is severely outdated

2007-12-01 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: The current documentation for the pickle module (and related modules) is outdated and should be updated. For example, the section Pickling and unpickling extension types [1] is not only confusing, but outright wrong. For Python 2.6, the documentation

[issue956303] Update pickle docs to describe format of persistent IDs

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: This should be fixed along issue1536. -- assignee: - alexandre.vassalotti dependencies: +pickle's documentation is severely outdated nosy: +alexandre.vassalotti Tracker [EMAIL PROTECTED] http

[issue655802] cPickle not always same as pickle

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: This should be fixed along with issue1536. I am assigning this to me, instead of Fred Drake. (Is that okay with you, Fred?) -- assignee: fdrake - alexandre.vassalotti dependencies: +pickle's documentation is severely outdated nosy

[issue1536] pickle's documentation is severely outdated

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: [I just realized that dependencies in the tracker should go the other way around.] -- dependencies: +Update pickle docs to describe format of persistent IDs, cPickle not always same as pickle __ Tracker [EMAIL

[issue655802] cPickle not always same as pickle

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- dependencies: -pickle's documentation is severely outdated Tracker [EMAIL PROTECTED] http://bugs.python.org/issue655802 ___ Python

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here a patch that adds support for any iterable (or sequence) of integers to bytearray.extend(). -- assignee: - alexandre.vassalotti keywords: +patch nosy: +alexandre.vassalotti resolution: accepted - Added file: http://bugs.python.org/file8847

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Made 2 minor enhancements to the patch: + Added the proper type-cast to PyMem_Realloc call. + Changed (len 1) to (len 1) + 1, just to be sure that the buffer doesn't overflow if __length_hint__ return 0 or 1 erroneously. Added file: http

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: There is a reference leak in my previous patches. So, I updated (again) the patch. There is still another possible leak if the PyMem_Realloc return NULL (i.e., the system is out of memory), but I don't think it worth fixing. Added file: http

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here yet another revision of the patch. This one makes bytearray.extend() try to determine the length of its argument a bit more aggressively -- i.e., also uses PyObject_Length(). Added file: http://bugs.python.org/file8856/byte_extend-4.patch

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Done. Is there any other issue with the patch? Added file: http://bugs.python.org/file8857/byte_extend-5.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1283 __Index: Objects

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: First, I would like to say thank you both for spending your time trying to do a contribution to Python. However, I believe the current behavior of cmd.py is correct. The module documentation states clearly that End of file on input is processed

[issue1005] Patches to rename Queue module to queue

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thank you, Paul, for the patches. I reviewed the patches and improved them. Here the list of changes: - Added unit test for the import fixers. - Renamed Lib/Queue.py to Lib/queue.py. - Updated Tools/webchecker/wsgui.py. - Updated

[issue1005] Patches to rename Queue module to queue

2007-12-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file8868/queue-rename-misc.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1005 __ ___ Python-bugs-list

[issue1005] Patches to rename Queue module to queue

2007-12-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: collinwinter - brett.cannon nosy: -collinwinter __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1005 __ ___ Python-bugs

[issue1005] Patches to rename Queue module to queue

2007-12-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: brett.cannon - collinwinter nosy: +collinwinter Added file: http://bugs.python.org/file8866/queue-rename-documentation.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1005

[issue1214] Timeout in CGIXMLRPCRequestHandler under IIS

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Looks good to me. I updated the patch to use .get() with a default value instead of a if-statement with .has_key(). -- nosy: +alexandre.vassalotti priority: - normal Added file: http://bugs.python.org/file8869/check-content-length.patch

[issue1553] An errornous __length_hint__ can make list() raise a SystemError

2007-12-03 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: If an iterator with a __length_hint__ method that returns a negative integer is passed to list(), a SystemError is raised. class A: ... def __iter__(self): ... return self ... def __length_hint__(self): ... return -1 ... list

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thank you Gregory for the review! Committed to r59314. -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1283

[issue1553] An errornous __length_hint__ can make list() raise a SystemError

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Fixed for Py3k in r59316. Should this gets backported? -- status: open - __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1553

[issue614555] Rewrite _reduce and _reconstructor in C

2007-12-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- nosy: +alexandre.vassalotti Tracker [EMAIL PROTECTED] http://bugs.python.org/issue614555 ___ Python-bugs-list mailing list

[issue1266570] PEP 349: allow str() to return unicode

2007-12-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The PEP has been deferred and the patch is out of date. So, is this change still wanted? -- nosy: +alexandre.vassalotti resolution: - out of date _ Tracker [EMAIL PROTECTED] http://bugs.python.org

[issue1530] doctest should return error if not all tests passed

2007-12-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r59411. Thanks! -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1530

[issue1530] doctest should return error if not all tests passed

2007-12-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Looks good to me. Here's slightly modified patch ready to be committed. -- keywords: +patch nosy: +alexandre.vassalotti priority: - low Added file: http://bugs.python.org/file8893/doctest.patch __ Tracker [EMAIL

[issue1573] Improper use of the keyword-only syntax makes the parser crash

2007-12-08 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- versions: +Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1573 __ ___ Python-bugs-list mailing list Unsubscribe: http

[issue1573] Improper use of the keyword-only syntax makes the parser crash

2007-12-08 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: I found that the parser fails to handle correctly the (incorrect) case where the single-star (*), used for delimiting keyword-only arguments, is immediately followed by a **keywords parameter: def f(*, **kw): ... pass ... python: Python/ast.c:652

[issue1573] Improper use of the keyword-only syntax makes the parser crash

2007-12-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Amaury is right. def f(*, **kw): pass should raise a SyntaxError. The keyword-only delimiter is useless since the **kw parameter already only accepts keywords. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1573

[issue1596] Broken pipes should be handled better in 2.x

2007-12-11 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: I think Python 2.x should mimic, or improve on, the behavior of Py3k for handling broken pipes. That is: 1. Don't print the message close failed: [Errno 32] Broken pipe, from filemodule.c; since this is impossible to override from Python. 2. Check

[issue1313119] urlparse caches parses regardless of encoding

2007-12-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Fixed in r59480. -- nosy: +alexandre.vassalotti resolution: - fixed status: open - closed _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1313119

[issue1621] Python should compile with -Wstrict-overflow when using gcc

2007-12-16 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I compiled Python using gcc 4.3.0 with the -Wstrict-overflow, and that's the only warning I got: Objects/doubledigits.c: In function ‘_PyFloat_Digits’: Objects/doubledigits.c:313: error: assuming signed overflow does not occur when assuming that (X + c

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: Finally, here is my C implementation of BytesIO. The code is well tested and include the proper unit tests. The only remaining issues are: - The behavior of the close() method. - The failure of test_profile and test_cProfile. Currently, I have

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9085/add-bytesio-setup.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __ ___ Python-bugs-list

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __ ___ Python

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9087/test_memoryio.py __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __ ___ Python-bugs-list

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9088/remove-old-stringio-test.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __ ___ Python

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9089/truncate-semantic-change.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __ ___ Python

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- nosy: +brett.cannon __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __ ___ Python-bugs-list mailing list Unsubscribe: http

[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: So, here's one big patch. I have updated the behavior of close(), so that The profile tests often fail when io.py changes because they happen to depend on golden output which includes line numbers of code in io.py that happens to be traced during

[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: [grrr, I eat my words] So, here's one big patch. I have updated the behavior of close(), so that ... it matches the behavior of 2.x. As a side-effect, this make __next__ raises a ValueError, instead of StopIteration. ... when the file is closed

[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1753 __ ___ Python-bugs-list mailing list Unsubscribe: http

[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Removed file: http://bugs.python.org/file9096/bytesio+misc-fixes.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751 __ ___ Python-bugs

[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I got a patch that also fixes the profiler tests. That was easy after all. :-) Added file: http://bugs.python.org/file9099/bytesio+misc-fixes-2.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1751

[issue1621] Do not assume signed integer overflow behavior

2008-01-10 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Hm. I don't get any warning, related to the overflow issue, neither with -Wstrict-overflow=3, nor -Wstrict-overflow=5. Are the cPickle warnings already fixed? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1621

[issue1286] fileinput, StringIO, and cStringIO do not support the with protocol

2008-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: FYI, StringIO and BytesIO, in Python 3K, already support the context management protocol. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1286

[issue1950] Potential Overflow due to incorrect usage of PyUnicode_AsString.

2008-01-27 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: I have found a few instances of the following pattern in Py3k: char buf[MAX]; len = PyUnicode_GET_SIZE(str); if (len = MAX) /* return error */ strcpy(buf, PyUnicode_AsString(str)); which could overflow if str contains non-ASCII

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-01-27 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- title: Potential Overflow due to incorrect usage of PyUnicode_AsString. - Potential overflows due to incorrect usage of PyUnicode_AsString. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1950

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2008-02-04 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- nosy: +alexandre.vassalotti _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1692335 _ ___ Python-bugs-list mailing list

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-03-09 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Thanks for the review! Your description of the patch is a bit misleading. As far as I can tell only the first chunk (Python/import.c changes) addresses a potential buffer overflow. Yes, you are right. It seems only the bug

[issue2298] Patch for string without null bytes check in getargs.c

2008-03-17 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Yes, that sounds like a good idea. Although I haven't reviewed this patch yet, I find the naming of the `ustr` variable confusing -- e.g. is it a bytes object or a unicode object? (It seems to be bytes). Anyway, I will check this out

[issue2307] Decide what to do with bytes/str when transferring pickles between 2.6 and 3.0

2008-03-17 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti [EMAIL PROTECTED]: -- nosy: +alexandre.vassalotti __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2307 __ ___ Python-bugs-list mailing

[issue1751] Fast BytesIO implementation + misc changes

2008-03-18 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Here is a patch against the latest trunk (r61578) that includes the accelerator module of io.BytesIO with its test suite. The patch also changes the behavior of the truncate method to imply a seek(). Please review! Added file: http

[issue2281] Enhanced cPython profiler with high-resolution timer

2008-03-21 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: I don't think this should be added to 2.5. Only bugfixes are admissible to the backporting process (see PEP 6). Finally, could you post the diff of your changes as described at http://www.python.org/dev/patches/. Thanks

[issue6608] asctime does not check its input

2010-06-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: How about checking the preconditions before calling asctime()? If the check fails, then we can raise an exception without crashing. -- ___ Python tracker rep...@bugs.python.org http

[issue9094] Make python-m pickletools do something useful

2010-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Good idea! You can remove the doctest behavior. I don't think it is useful. But if you remove it, make sure you add an usage message when no argument is given. -- ___ Python tracker rep

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: The code for import_module_implementations seems a bit fragile. Prefixing the module name with an underscore might not always yield the name of the optimized implementation. An explicit dictionary to map the Python and C

[issue655802] cPickle not always same as pickle

2010-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: It's a documentation enhancement request. The updated documentation in Python 3 for pickle added most of the requested details. -- resolution: - fixed status: open - closed ___ Python

[issue1536] pickle's documentation is severely outdated

2010-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: The new documentation for pickle in Python 3 fixes this. I still believe we should outline the differences between pickle.py and cPickle. But at this point, it's unlikely I will put the time to do it. Feel free to open a new issue

[issue5180] 3.1 cannot unpickle 2.7-created pickle

2010-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Thank you for the nice investigative work! I will try my best to review this patch by next week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5180

[issue3385] cPickle to pickle conversion in py3k missing methods

2010-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Do I understand correctly that the issue is that python Pickler class has dispatch attribute but C Pickler does not? Yes. The add_dispatch_check-0.patch patch does not seem to add class attribute, it adds an instance attribute

[issue8943] Bug in InteractiveConsole

2010-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: One easy fix for this would be to make InteractiveConsole use the string __main__ instead of __console__. But other than that, I don't think we can fix this within pickle. -- ___ Python

[issue9120] Reduce pickle size for an empty set

2010-06-30 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: This begs a question, however: why not use regular python bytecode in pickles? Unlike pickle protocols, the bytecode is not required to be compatible across Python versions. Furthermore, Python bytecode is designed has a general

[issue9104] test_exceptions does not test pickling with pickle.py

2010-06-30 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: It works for pickle/_pickle and heapq/_heapq, but won't work for io/_io/_pyio. You can make the dictionary values as lists for the 'blocked' argument for import_fresh_module(). That would work. And, can you add documentation

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

2010-07-06 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Now, that 2.7 is out we won't able to commit this anymore. It is sad to abandon a good patch like this. -- resolution: - wont fix stage: patch review - committed/rejected status: open - closed

[issue2570] backport 3.0-style \u/\U processing in raw strings when unicode_literals is imported from __future__

2010-07-06 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Closing this since Python 2.7 is out now. -- nosy: +alexandre.vassalotti resolution: - wont fix stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep

[issue2570] backport 3.0-style \u/\U processing in raw strings when unicode_literals is imported from __future__

2010-07-06 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Actually, you are right. This could be added as bug fix. -- resolution: wont fix - stage: committed/rejected - needs patch status: closed - open ___ Python tracker rep...@bugs.python.org

  1   2   3   4   5   6   >