[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-AS

[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.o

[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

[issue1817] module-cgi: handling GET and POST together

2008-02-23 Thread Alexandre Fiori
Alexandre Fiori added the comment: Here's the unit test for patched cgi module. There are three tests: one for HTML POST forms that are urlencoded, and two for multipart/form-data - with and without file upload. Added file: http://bugs.python.org/file9507/cgite

[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

[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 che

[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> __ __

[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

[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/patch

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9084/_bytesio.c __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9085/add-bytesio-setup.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9087/test_memoryio.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9088/remove-old-stringio-test.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9089/truncate-semantic-change.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9090/io-misc-fixes.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Yes, that was a leak. It should be fixed now. Merci Antoine! Added file: http://bugs.python.org/file9899/bytesio+misc-fixes-4.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-30 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oops, I forgot to include the unit tests, with "svn add", when I made the diff. Added file: http://bugs.python.org/file9904/bytesio+misc-fixes-5.patch __ Tracker <[EMAI

[issue1751] Fast BytesIO implementation + misc changes

2008-03-30 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: There is a small bug in the last patch I posted. The unit tests assumed (wrongly) that accelerator module for io.StringIO (i.e., _stringio) was present. Added file: http://bugs.python.org/file9905/bytesio+misc-fixes-6

[issue1751] Fast BytesIO implementation + misc changes

2008-03-30 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I think that check in write_bytes() is a guard to avoid resize_buffer() from truncating the string stored in the buffer. However, I am not sure if it is still necessary. I don't know why help() doesn't work on BytesI

[issue2572] 3.0 pickle docs -- what about old-style classes?

2008-04-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Python 3.0 shouldn't have any problem unpickling old-style classes. However, they will be unpickled as new-style classes. Therefore, there might be a few corner-cases that might cause some problems. For example, if an old-

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

2008-04-12 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I revised the patch with respect to Alexander's comments. In summary, here is what I changed from the previous patch: - Removed the unnecessary "fixes" to Objects/structseq.c and Modules/timemodule.

[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Here's an updated patch. Added file: http://bugs.python.org/file10023/bytesio+misc-fixes-7.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oops, I forgot again to "svn add" the new files. Added file: http://bugs.python.org/file10024/bytesio+misc-fixes-8.patch __ Tracker <[EMAIL PROTECTED]> <http://

[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10023/bytesio+misc-fixes-7.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-04-14 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Hi Guido, The patch changes a minor things to io.py to allow io.BytesIO to pass my test suite, so you may want to check it out. Other than that, I think the review is going fine. __ Tracker &

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

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: So, any comment on the latest patch? If everything is all right, I would like to commit the patch to py3k. __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1338] pickling bytes?

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Guido fixed this issue in r61467. Closing. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue558238] Pickling bound methods

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Personally, I don't see how adding this feature would create a security hole (or more properly said, grow the giant hole that are the GLOBAL and REDUCE opcodes). I don't see either why this should be included in the

[issue558238] Pickling bound methods

2008-04-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- status: open -> pending Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue558238> ___

[issue1637926] Empty class 'Object'

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: This has almost no-chance to get included in the standard library. Also, Python 2.6 will include ``namedtuple`` (see http://docs.python.org/dev/library/collections.html#collections.namedtuple), which provides similar functi

[issue2480] pickling of large recursive structures fails

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Bob Kline wrote: > I just ran into this behavior with an attempt to pickle a dom tree > for an XML document whose nesting level never got deeper than nine > child nodes, and indeed it crashed the interpreter. Pickling

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

2008-05-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Alexander Belopolsky wrote: > The patch looks good. Just a question: I thought the strings returned > by PyUnicode_AsStringAndSize are 0-terminated, while your patch at > several places attempts to explicitly 0-terminate

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

2008-05-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Marc-Andre Lemburg wrote: [SNIP] > The above cast needs to be (Py_ssize_t). size_t is an unsigned length type. Actually, the cast is right (even though it is not strictly necessary). It just the patch that is confusing. He

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

2008-05-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Committed to r62667. Thank you all for your comments! -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue2523] binary buffered reading is quadratic

2008-05-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- nosy: +alexandre.vassalotti __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2523> __ __

[issue1751] Fast BytesIO implementation + misc changes

2008-05-06 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Patch committed in r62778. Antoine wrote: > Also, I stand by the suggestion I made about the resizing logic, but it > shouldn't be a showstopper either. We can improve that later. I made your suggested change to t

[issue2523] binary buffered reading is quadratic

2008-05-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I see that the code is still using the immutable bytes object for its buffer (which forces Python to create a new buffer every time its modified). Also, I think it worthwhile to check if using a pre-allocated bytearray objec

[issue2788] ignore file for Mercurial

2008-05-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I have a slightly different .hgignore for my personal mercurial branch. Although, I don't really like the idea of polluting the main subversion repository with the ignore files of other VCS. -- nosy: +alexandre.vassa

[issue2807] Remove the API PyUnicode_AsString()

2008-05-09 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti <[EMAIL PROTECTED]>: Marc-Andre Lemburg noted: BTW: The API PyUnicode_AsString() is pretty useless by itself - there's no way to access the size information of the returned string without again going to the Unicode object. I&#

[issue2807] Remove the API PyUnicode_AsString()

2008-05-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Honestly, I am not sure if removing PyUnicode_AsString() is a good idea. There is many cases where the size of the returned string is not needed. Furthermore, this would be a rather major backward-incompatible change to be include

[issue2807] Remove the API PyUnicode_AsString()

2008-05-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oops, it seems Marc-André has already opened an issue about this. Closing as duplicate. -- resolution: -> duplicate status: open -> closed superseder: -> Remove PyUnicode_AsString(), rework PyUnicode_AsStrin

[issue2799] Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar()

2008-05-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Honestly, I am not sure if removing PyUnicode_AsString() is a good idea. There is many cases where the size of the returned string is not needed. Furthermore, this would be a rather major backward-incompatible change to be include

[issue2295] cPickle corner case - docs or bug?

2008-05-09 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- nosy: +alexandre.vassalotti __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2295> __ __

[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-10-16 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oops. I must have been quite tired when I submitted that. Here's the patch for the fix and the test case. -- keywords: +patch Added file: http://bugs.python.org/file11814/issue36

[issue4149] Py_BuildValue and "y" format unit

2008-10-19 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre <[EMAIL PROTECTED]>: Hello! 'y' format unit in Py_BuildValue undocumented. However it's described in PyArg_ParseTuple. -- assignee: georg.brandl components: Documentation messages: 74989 nosy: exe, georg.brandl severity

[issue3816] __newobj__ pickle feature is not documented

2008-10-29 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Could explain me how this feature could be used, other than for providing the efficient and backward-compatible pickling mechanism for new-style classes? -- nosy: +alexandre.vass

[issue3816] __newobj__ pickle feature is not documented

2008-10-29 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: > Without the __reduce__ method the information in __dict__ and > the class would be lost. Are you sure about that? Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 >

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-30 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Thank you, Amaury, for fixing this. However, you forgot to also patch the Python implementation of pickle, which makes the following test fail: =

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-31 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Iterators only need to provide a __next__() method. So, you don't have to check __iter__. Other than that, the patch looks good. ___ Python tracker <[EMAIL PROTECTED]> <ht

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-31 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Hirokazu Yamamoto wrote > Hmm, but python document says, > (http://docs.python.org/library/stdtypes.html#typeiter) > > >The iterator objects themselves are required to support the > >following two metho

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-31 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Amaury Forgeot d'Arc wrote: > Regarding the consistency between python and C, I don't think it is > necessary to be so strict. If the python version can allow a weaker > version of the "iterator"

[issue4374] Pickle tests fail w/o _pickle extension

2008-11-21 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I think the best way to fix this is to add sanity checks similar to the ones in _pickle. The checks are obviously useless in pickle.py, but I think it is simpler than to try to skip tests, and it gives a nicer error message to

[issue4504] Doc/includes out of date

2008-12-03 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre <[EMAIL PROTECTED]>: Hello! Doc/includes/noddy.c and all other uses Py_InitModule3 which is removed from py3k. noddy2.c doesn't compile("noddy2.c:16: error: ‘Noddy’ has no member named ‘ob_type’"). -- assignee: ge

[issue4505] ob_size not removed from docs

2008-12-03 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre <[EMAIL PROTECTED]>: Hello! In http://docs.python.org/dev/3.0/extending/newtypes.html we see ob_size in object definition. But if we are look on PyTypeObject in ./Include/object.h we will find that there no ob_size defined. So we must remov

[issue4535] Build / Test Py3K failed on Ubuntu 8.10

2008-12-05 Thread Kandalintsev Alexandre
Kandalintsev Alexandre <[EMAIL PROTECTED]> added the comment: My results on ubuntu 8.10 x86(with debug features enabled) on Python 3.1a0 (py3k:67586, Dec 5 2008, 19:39:50): 298 tests OK. 23 tests skipped: test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecm

[issue4576] "Defining new types" little outdated

2008-12-07 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre <[EMAIL PROTECTED]>: Hello! It's need to little update "Defining new types" documentation section in py3.0 and py3.1: - self->ob_type->tp_free((PyObject*)self); + Py_TYPE(self)->tp_free((PyObject *)self); -- ass

[issue4535] Build / Test Py3K failed on Ubuntu 8.10

2008-12-07 Thread Kandalintsev Alexandre
Kandalintsev Alexandre <[EMAIL PROTECTED]> added the comment: Rob, could you repeat this test on trunk version of python? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

2008-12-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Sorry, I still cannot reproduce it. Could you attach your test file? Maybe it is some weird encoding bug. a...@helios:~$ 2to3 -f imports test.py --- test.py (original) +++ test.py (refactored) @@ -1,2 +1,2 @@ -import urlparse, cStringIO -import cStringIO

[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

2008-12-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Benjamin, your example fails for a different reason--i.e. the fixer for HTMLParser is missing. Sorry Lennart, I still cannot reproduce it. ___ Python tracker <http://bugs.python.org/issue4

[issue4664] Regression fix_imports does not refactor multiple imports correctly

2008-12-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I got it. It is a regression from a previous version of 2to3's fix_imports. I was able to reproduce your problem using the sandbox's 2to3. And to answer your question, I still running an older RC release of Python 3.0. That explains why

[issue4737] documentation and noddy*.c

2008-12-24 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre : Hello! 1) In http://docs.python.org/3.0/extending/extending.html we see: = Note that PyMODINIT_FUNC declares the function as void return type = But thats not true, it's defined as PyObject*. I think this is outdated in

[issue4730] cPickle corrupts high-unicode strings

2008-12-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Fixed in r67934. Backported to 2.6 in r67936. Thanks! -- nosy: +alexandre.vassalotti resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue4374] Pickle tests fail w/o _pickle extension

2008-12-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r67940. ___ Python tracker <http://bugs.python.org/issue4374> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4374] Pickle tests fail w/o _pickle extension

2008-12-27 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue4374> ___ ___ Python-bugs-

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: You may want to check out issue1408710 in which a similar patch was provided, but failed to deliver the desired results. I didn't get the advertised ~15% speed-up, but only 4% on my Intel Core2 laptop and 8% on my AMD Athlon64 X2 desktop. I attache

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file12513/intel-core2-mobile-pybench.txt ___ Python tracker <http://bugs.python.org/issue4

[issue4800] little inaccuracy in Py_ssize_t explanation

2009-01-01 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre : Documentation says that There’s no chance that the reference count can overflow; at least as many bits are used to hold the reference count as there are distinct memory locations in virtual memory (assuming sizeof(Py_ssize_t) >= siz

[issue4753] Faster opcode dispatch on gcc

2009-01-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Antoine Pitrou wrote: > [...] count the number of indirect jump instructions in ceval.c: > > grep -E "jmp[[:space:]]\*%" ceval.s > > There should be 85 to 90 of them, roughly. If there are many less, then > the compiler h

[issue4753] Faster opcode dispatch on gcc

2009-01-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file12522/amd-athlon64-x2-gcc-sunos-pybench.txt ___ Python tracker <http://bugs.python.org/issue4

[issue4753] Faster opcode dispatch on gcc

2009-01-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > Attached new patch for fixes suggested by Alexandre (rename > opcode_targets.c to opcode_targets.h, replace USE_THREADED_CODE with > USE_COMPUTED_GOTOS). You forgot to update your script to use the

[issue4753] Faster opcode dispatch on gcc

2009-01-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch make a huge difference on 64-bit Linux. I get a 20% speed-up and the lowest run time so far. That is quite impressive! At first glance, it seems the extra registers of the x86-64 architecture permit GCC to avoid spilling registers onto the

[issue4753] Faster opcode dispatch on gcc

2009-01-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: One more thing, the patch causes the following warnings to be emited by GCC when USE_COMPUTED_GOTOS is undefined. Python/ceval.c: In function ‘PyEval_EvalFrameEx’: Python/ceval.c:2420: warning: label ‘_make_function’ defined but not used Python/ceval.c

[issue4753] Faster opcode dispatch on gcc

2009-01-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Paolo wrote: > So, can you try dropping the switch altogether, using always computed > goto and seeing how does the resulting code get compiled? Removing the switch won't be possible unless we change the semantic EXTENDED_ARG. In addition,

[issue4753] Faster opcode dispatch on gcc

2009-01-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > Removing the switch won't be possible unless we change the semantic > EXTENDED_ARG. In addition, I doubt the improvement, if any, would worth > the increased complexity. Nevermind what I have said. I managed to remove switch pretty ea

[issue4753] Faster opcode dispatch on gcc

2009-01-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > I managed to remove switch pretty easily by moving opcode fetching > in the FAST_DISPATCH macro and abstracting the control flow of the > switch. Here is the diff against threadceval5.patch. Added file: http://bugs.python.org/file12584

[issue5077] 2to3 fixers for the removal of operator functions

2009-01-26 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : This is a 2to3 fixer for the removal of obsolete functions in r68962. -- components: 2to3 (2.x to 3.0 conversion tool) files: fix_operator.py messages: 80624 nosy: alexandre.vassalotti severity: normal stage: patch review status: open title

[issue5077] 2to3 fixers for the removal of operator functions

2009-01-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file12875/fix_operator.py ___ Python tracker <http://bugs.python.org/issue5077> ___ ___ Python-bug

[issue5077] 2to3 fixers for the removal of operator functions

2009-01-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file12874/fix_operator.py ___ Python tracker <http://bugs.python.org/issue5077> ___ ___ Python-bug

[issue5077] 2to3 fixer for the removal of operator functions

2009-01-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- title: 2to3 fixers for the removal of operator functions -> 2to3 fixer for the removal of operator functions ___ Python tracker <http://bugs.python.org/iss

[issue5084] unpickling does not intern attribute names

2009-01-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch for cPickle doesn't do the same thing as the pickle one. In the cPickle one, you are only interning slot attributes, which, I believe, is not what you intended. :-) -- assignee: -> alexandre.vassalotti nosy: +alexandre.va

[issue5084] unpickling does not intern attribute names

2009-01-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Oh, you are right. I was looking at py3k's version of pickle, which uses PyDict_Update instead of a while loop; that is why I got confused. ___ Python tracker <http://bugs.python.org/i

[issue5096] strange thing after call PyObject_CallMethod

2009-01-29 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre : When unhandled in python code exception occurs in PyObject_CallMethod frame_dealloc() (Objects/frameobject.c:422) not called. Even if I call PyErr_Print(). But if I call PyErr_Clear() then all okay. Documentation says that both this functions

[issue5096] strange thing after call PyObject_CallMethod

2009-01-29 Thread Kandalintsev Alexandre
Kandalintsev Alexandre added the comment: Thank you for your activity. This feature drank alot of my blood. Please document this or change behavior. PS Older python versions may be also affected so changing behavior may brake existing code :( ___ Python

[issue5097] asyncore.dispatcher_with_send undocumented

2009-01-29 Thread Kandalintsev Alexandre
New submission from Kandalintsev Alexandre : Hello! asyncore.dispatcher_with_send undocumented in all python versions -- assignee: georg.brandl components: Documentation messages: 80763 nosy: exe, georg.brandl severity: normal status: open title: asyncore.dispatcher_with_send

[issue5097] asyncore.dispatcher_with_send undocumented

2009-02-02 Thread Kandalintsev Alexandre
Kandalintsev Alexandre added the comment: Ok, I'll try :). I'll send it today or tomorrow. ___ Python tracker <http://bugs.python.org/issue5097> ___ ___ Python-b

[issue5097] asyncore.dispatcher_with_send undocumented

2009-02-02 Thread Kandalintsev Alexandre
Kandalintsev Alexandre added the comment: This is my explanation of dispatcher_with_send. As my english is far from perfect and I'm not expirienced writing documentation you need to review it and fix my mistakes. class asyncore.dispatcher_with_send This is class bas

[issue46977] tempfile.TemporaryDirectory fails removing dir in some edge cases related to symlinks

2022-03-10 Thread Alexandre Feblot
New submission from Alexandre Feblot : ```python #!/usr/bin/env python3 import os import tempfile def createUnremovableDir(workdir): print(workdir) os.mkdir(f'{workdir}/mydir') os.symlink('/bin/bash', f'{workdir}/mydir/mylink') # Symlink to a r

[issue46977] tempfile.TemporaryDirectory fails removing dir in some edge cases related to symlinks

2022-03-10 Thread Alexandre Feblot
Change by Alexandre Feblot : -- type: -> crash ___ Python tracker <https://bugs.python.org/issue46977> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38233] datetime.datetime.fromtimestamp have different behaviour on windows and mac

2019-09-20 Thread Alexandre Ouellet
New submission from Alexandre Ouellet : in a python console on a windows machine: import datetime d = datetime.datetime.fromtimestamp(0) d >datetime.datetime(1969, 12, 31, 19, 0) d.timestamp() >OSError: [Errno 22] Invalid argument on a macOS machine : d = datetime.datetime.fromtimest

[issue43944] Processes in Python 3.9 exiting with code 1 when It's created inside a ThreadPoolExecutor

2021-06-25 Thread Alexandre Sicard
Alexandre Sicard added the comment: Thank you very much for this report, Genaro. I encountered the same bug with a Process running in the context of a Django view. Downgrading to Python 3.8 also fixed the issue for me. Versions: python:3.9-alpine Docker image, running Python 3.9.5 and

[issue23041] csv needs more quoting rules

2021-06-28 Thread Alexandre Morignot
Alexandre Morignot added the comment: I have another use case. I want to import data into PostgreSQL using the COPY FROM command. This command can read a CSV input and it needs to distinguish empty string from null values. Could we reconsider this issue and the proposed solution

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-24 Thread Alexandre Vassalotti
Change by Alexandre Vassalotti : -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python

[issue27635] pickle documentation says that unpickling may not call __new__

2020-10-11 Thread Alexandre Vassalotti
Change by Alexandre Vassalotti : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue27635> ___ ___

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-23 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: We will need to bump the protocol number to add support for None, Ellipsis, and NotImplemented. Antoine, can you add this to PEP 3154? -- ___ Python tracker <http://bugs.python.org/issue13

[issue37694] Crash when calling zipimport.zipimporter.__new__().()

2019-07-27 Thread Alexandre Hamelin
New submission from Alexandre Hamelin : Found a crash with zipimport.zipimporter. Might or might not be related to Issue31723 which I've found searching the issues afterwards. import zipimport zipimport.zipimporter.__new__(zipimport.zipimporter).find_module('') Pyt

[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2019-01-24 Thread Alexandre Défossez
Alexandre Défossez added the comment: Also impacted. A fix I found is to add `watcher.attach_loop(self)` just after `with events.get_child_watcher() as watcher:` in `_make_subprocess_transport` in `asyncio/unix_events.py`. -- nosy: +adfz

[issue31852] Crashes with lines of the form "async \"

2017-10-23 Thread Alexandre Hamelin
New submission from Alexandre Hamelin : Hi. Python 3.6.2 crashes when interpreting lines with the text "async \" (future keyword 'async' and ending with a backslash). Tested in a docker environment (debian jessie). (see github.com/0xquad/docker-python36 if needed) Exa

[issue31852] Crashes with lines of the form "async \"

2017-10-30 Thread Alexandre Hamelin
Alexandre Hamelin added the comment: Awesome work, thanks to you! Would it also be the case for 'await' ? -- ___ Python tracker <https://bugs.python.o

[issue34185] Lib/test/test_bdb.py failed when ran as a script

2018-07-28 Thread Alexandre Hajjar
Change by Alexandre Hajjar : -- keywords: +patch pull_requests: +8054 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34185> ___ _

<    1   2   3   4   5   6   7   >