[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-31 Thread Florent Xicluna
Florent Xicluna added the comment: Small note: - the unit tests could use assertIsInstance(..., str), assertIsInstance(..., unicode) instead of the custom methods. - some "assertTrue" may be replaced by "assertEqual" -- ___ Python tracker

[issue7826] support caching for 2to3

2010-01-31 Thread Martin v . Löwis
Martin v. Löwis added the comment: If you meant to propose a patch that does caching, you should include the actual caching code in the patch. -- ___ Python tracker ___

[issue2454] sha and md5 fixer

2010-01-31 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- components: +2to3 (2.x to 3.0 conversion tool) ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-01-31 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7828] chr() and ord() documentation for wide characters

2010-01-31 Thread nudgenudge
New submission from nudgenudge : The documentation of chr() and ord() fails to mention that on narrow Unicode builds, chr(n) will return a surrogate pair (hence a 2-character string) for n>=65536 and that ord(s) will accept a 2-character string if it's a surrogate pair. Example: Python 3.1.1

[issue7823] multiplying a list of dictionaries

2010-01-31 Thread Andrew Hays
Andrew Hays added the comment: Ah, my apolgogies, I didn't realize that. I suppose I didn't look deeply enough into the situation. I just realized that it worked that way with dictionaries, but by the same right, x=[[]]*3 would create [[], [], []] and if I said x[0][0]=1 then it would only

[issue7827] recv_into() argument 1 must be pinned buffer, not bytearray

2010-01-31 Thread Brian Curtin
Changes by Brian Curtin : -- priority: -> normal stage: -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue7826] support caching for 2to3

2010-01-31 Thread Brian Curtin
Changes by Brian Curtin : -- keywords: +needs review priority: -> normal stage: -> test needed ___ Python tracker ___ ___ Python-bugs

[issue2454] sha and md5 fixer

2010-01-31 Thread Brian Curtin
Changes by Brian Curtin : -- components: -2to3 (2.x to 3.0 conversion tool) stage: -> patch review type: -> behavior ___ Python tracker ___

[issue7826] support caching for 2to3

2010-01-31 Thread Brian Harring
Brian Harring added the comment: @martin: Yeah... that's probably the better approach, although seperation of processes (in terms of setup.py triggering conversion) has some benefits. The reason I used process seperation and invocation of main was to protect my distutils extensions against h

[issue7827] recv_into() argument 1 must be pinned buffer, not bytearray

2010-01-31 Thread Martin v . Löwis
Martin v. Löwis added the comment: This is fixed in Python 3. I think it is (another) bug that it accepts array objects; it should reject them with the same error. OTOH, recv_into should use "w*". -- nosy: +loewis ___ Python tracker

[issue1943] improved allocation of PyUnicode objects

2010-01-31 Thread Brian Harring
Changes by Brian Harring : -- nosy: +ferringb ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue7827] recv_into() argument 1 must be pinned buffer, not bytearray

2010-01-31 Thread Andrew Dalke
New submission from Andrew Dalke : In Python 2.6 and Python 2.7a2+, I can't socket.recv_into(a byte array instance). I get a TypeError which complains about a "pinned buffer". I have only an inkling of what that means. Since an array.array("b") works there, and since it works in Python 3.1.1

[issue2454] sha and md5 fixer

2010-01-31 Thread Meador Inge
Meador Inge added the comment: Attached a patch that provides a (sha | md5) -> hashlib fixer, covering test cases, and updated documentation. -- keywords: +patch nosy: +minge Added file: http://bugs.python.org/file16079/issue-2454.patch ___ Python t

[issue7826] support caching for 2to3

2010-01-31 Thread Martin v . Löwis
Martin v. Löwis added the comment: Not sure what your use case is, but I always call the refactor method of my subclassed RefactoringTool, instead of calling main. See distutils.util.run_2to3 for an example (and distutils.command.build_py.build_py_2to3 for an application of that). --

[issue7826] support caching for 2to3

2010-01-31 Thread Brian Harring
Brian Harring added the comment: Attached is a derivative of http://pkgcore.org/trac/pkgcore/browser/ferringb/snakeoil-dev/snakeoil/caching_2to3.py As you can see in that function, some nastyness is required right now to slip it in w/out duplicating code (hence the first patch). Patch attach

[issue7824] assertion error in 2to3

2010-01-31 Thread Martin v . Löwis
Martin v. Löwis added the comment: Thanks for the report. This is now fixed in r77900. -- nosy: +loewis resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue7826] support caching for 2to3

2010-01-31 Thread Brian Harring
New submission from Brian Harring : Bit like unittest, right now it's rather hard to extend 2to3 for caching support (and other outputs) w/out duplicating the main function. Attached is a patch that allows the refactoring tool class to be passed in- at the very least, this patch is enough to r

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-31 Thread Florent Xicluna
Changes by Florent Xicluna : Added file: http://bugs.python.org/file16076/issue7092_py3k_warnings_noargs_v2.diff ___ Python tracker ___ ___ Py

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-31 Thread Florent Xicluna
Changes by Florent Xicluna : Added file: http://bugs.python.org/file16075/issue7092_py3k_warnings_args_v2.diff ___ Python tracker ___ ___ Pyth

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-31 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16050/issue7092_py3k_warnings_args.diff ___ Python tracker ___ ___ Python

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-31 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16051/issue7092_py3k_warnings_noargs.diff ___ Python tracker ___ ___ Pyt

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-31 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16047/issue7092_Wd_warnings.diff ___ Python tracker ___ ___ Python-bugs-l

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2010-01-31 Thread STINNER Victor
STINNER Victor added the comment: ghaering> I will soon push updates to the version in Python core. What do you mean by "soon"? -- ___ Python tracker ___ ___

[issue7544] Fatal error on thread creation in low memory condition

2010-01-31 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file15888/thread_prealloc_pystate-3.patch ___ Python tracker ___ ___ Python-bu

[issue7544] Fatal error on thread creation in low memory condition

2010-01-31 Thread STINNER Victor
STINNER Victor added the comment: > PyThreadState_Prealloc and PyThreadState_Init should (...) be prefixed with > an underscore (...) done > _PyThreadState_New should be static (...) so something like "new_threadstate" done > the last change ("Py_InitializeEx() calls _PyGILState_Init() befo

[issue7825] test_threadsignals leaks references

2010-01-31 Thread STINNER Victor
New submission from STINNER Victor : test_threadsignals leaks references. I'm unable to understand where. Maybe somewhere around Py_AddPendingCall()? - $ ./python Lib/test/regrtest.py -R 3:2: test_threadsignals test_threadsignals beginning 5 repetitions 12345 . test_threadsignals lea

[issue6939] shadows around the io truncate() semantics

2010-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in py3k (r77895, r77896) and 3.1 (r77897). Thank you Pascal! -- resolution: accepted -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue7824] assertion error in 2to3

2010-01-31 Thread Brian Harring
New submission from Brian Harring : Under py3.1, translation of the attached file works fine- under py3.2, goes boom however. Nothing custom in use here in terms of 2to3- there is some compatibility code in use w/in the module but that's not affecting the translator in my testing. assertion e

[issue7819] sys.call_tracing(): check arguments type

2010-01-31 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed stage: commit review -> committed/rejected ___ Python tracker ___ ___ Python-bugs-

[issue7819] sys.call_tracing(): check arguments type

2010-01-31 Thread STINNER Victor
STINNER Victor added the comment: > This very fix was already done in py3k with issue3661. Oh! My patch is *very* close to this one. I just choosed 10 instead of 2 in the unit test :-) (and I added a test to check a valid argument, py3k doesn't check it). > Patch is OK, please apply. Done:

[issue6939] shadows around the io truncate() semantics

2010-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your patch lacked a fix for test_largefile (I think it is skipped under Windows). I added this and committed it in r77890. Will port to py3k. -- resolution: -> accepted versions: -Python 2.7 ___ Python tracker

[issue7819] sys.call_tracing(): check arguments type

2010-01-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This very fix was already done in py3k with issue3661. Unfortunately it was decided at the time that 2.6 is not affected... Patch is OK, please apply. -- nosy: +amaury.forgeotdarc stage: -> commit review ___ P

[issue7820] parser: restores all bytes in the right order if check_bom() fails

2010-01-31 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16068/parser_restore_bom-2.patch ___ Python tracker ___ ___ Python-bugs-li

[issue7820] parser: restores all bytes in the right order if check_bom() fails

2010-01-31 Thread STINNER Victor
STINNER Victor added the comment: > I think the test should be in test_pep263. Right! I always hesitate when adding a new test. -- Added file: http://bugs.python.org/file16072/parser_restore_bom-3.patch ___ Python tracker

[issue7823] multiplying a list of dictionaries

2010-01-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is because multiply the list produces a reference to the same object 3 times. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker

[issue7823] multiplying a list of dictionaries

2010-01-31 Thread Andrew Hays
New submission from Andrew Hays : [{}]*3 should produce a list of dictionaries that are 3 length long, which it does. However, one would expect that if you assign something to the keyword 'abc' in the first dicitonary (e.g., x[0]['abc'] = 'def') that the other dictionaries would remain blank

[issue7818] Improve set().test_c_api(): don't expect a set("abc"), modify the content

2010-01-31 Thread STINNER Victor
STINNER Victor added the comment: > The method was supposed to be for internal use only I found this bug by fuzzing. > it may be worthwhile to build-out the test to accept many different possible > inputs (...) Yeah, but I just want to avoid an assertion error :-) -- __

[issue7821] Command line option -U not documented

2010-01-31 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't think changing anything is necessary here. Having the option listed gives the curious a chance to discover a piece of Python history :-) -- ___ Python tracker ___

[issue7671] test_popen fails if path contains special char like ";"

2010-01-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: These patches cause the Windows buildbot to fail. -- priority: -> normal ___ Python tracker ___

[issue7671] test_popen fails if path contains special char like ";"

2010-01-31 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue7671] test_popen fails if path contains special char like ";"

2010-01-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: These patches cause the Windows buildbot to fail. -- ___ Python tracker ___ ___ Python-bugs-list

[issue7822] 2to3 does not convert output lines in doctests

2010-01-31 Thread Éric Araujo
Éric Araujo added the comment: > to know that it is a Python expression that needs to be converted. Oh, of course. I have made two assumptions here: output lines are not always the repr of a Python object, and the repr is not always a valid Python expression. I’ll have to subclass build_2to3

[issue7820] parser: restores all bytes in the right order if check_bom() fails

2010-01-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think the test should be in test_pep263. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7822] 2to3 does not convert output lines in doctests

2010-01-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: The output line can be anything, so it's impossible for 2to3 to know that it is a Python expression that needs to be converted. -- nosy: +benjamin.peterson resolution: -> wont fix status: open -> closed ___ Pyth

[issue7822] 2to3 does not convert output lines in doctests

2010-01-31 Thread Éric Araujo
New submission from Éric Araujo : Howdy I think there is a bug with 2to3’s doctest conversion: $ echo ">>> u'éric'" > test $ echo "u'éric'" >> test $ 2to3 -d test -f unicode --- test (original) +++ test (refactored) @@ -1,3 +1,3 @@ ->>> u'éric' +>>> 'éric' u'éric' RefactoringTool: Files that

[issue5616] Distutils 2to3 support doesn't have the doctest_only flag.

2010-01-31 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +Merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue3020] doctest should have lib2to3 integration

2010-01-31 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +Merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch should come with a test. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue7328] pydoc doesn't work from the command line

2010-01-31 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +Merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue7817] Pythonw.exe fails to start

2010-01-31 Thread Georg Brandl
Changes by Georg Brandl : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7749] pydoc error - "No module named tempfile"

2010-01-31 Thread Georg Brandl
Changes by Georg Brandl : -- resolution: -> duplicate status: open -> closed superseder: -> pydoc doesn't work from the command line ___ Python tracker ___ _

[issue7817] Pythonw.exe fails to start

2010-01-31 Thread Dan
Dan <10equa...@gmail.com> added the comment: Well now I feel really dumb. I was under the impression that pythonw.exe was a GUI version of python.exe, which I though was console-only since up until now I had only tried running it from the command prompt. Problem solved, thanks for your help.

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-01-31 Thread Stefan Krah
Stefan Krah added the comment: Bug or not, this can be handled since fread sets EBADF on Windows. -- keywords: +patch Added file: http://bugs.python.org/file16071/fileread-errno.patch ___ Python tracker ___

[issue4709] Mingw-w64 and python on windows x64

2010-01-31 Thread Martin v . Löwis
Martin v. Löwis added the comment: I have now tried reproducing the problem, and still failed to. I downloaded, from http://sourceforge.net/projects/mingw-w64/files/, the distribution mingw-w32-bin_i686-mingw_20100123_sezero.zip. With this, I get c:\cygwin\mingw64\bin\gcc.exe -mno-cygwin -sh

[issue5664] 2to3 wont convert Cookie.Cookie properly

2010-01-31 Thread Meador Inge
Meador Inge added the comment: There is already a fixer for this in 'Lib/lib2to3/fixes/fix_imports.py'. It was merged to the trunk in r64286. -- nosy: +minge ___ Python tracker ___

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

2010-01-31 Thread Meador Inge
Meador Inge added the comment: Attached an updated patch with: (1) The two review issues fixed. (2) Merged the functionality of the initial patch into the existing fixer in 'Lib/lib2to3/fixes/fix_operator.py' + a little refactoring. (3) Added matching test cases. (4) Updated

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-01-31 Thread Stefan Krah
Stefan Krah added the comment: I wonder if this is technically a bug. The stream is not opened for reading and yet you do an fread. I quickly glanced through the C-Standard and I did not find an _explicit_ paragraph that this is undefined behavior, but personally I'd expect it to be. Regarding

[issue7733] asyncore docs reference is unclear

2010-01-31 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: Yeah, I'll get to it. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-01-31 Thread Stefan Behnel
Stefan Behnel added the comment: I'll add a couple of comments about the relevant parts of the code that appears to trigger the crash. The code runs through the parse tree and applies transformations to it. 1) For node matching, we use a dispatcher (in Visitor.py) that looks up methods for n

[issue7821] Command line option -U not documented

2010-01-31 Thread Steven D'Aprano
Steven D'Aprano added the comment: If the switch is intentionally not documented, perhaps it should be removed from here: http://docs.python.org/using/cmdline.html#command-line where it is listed but not explained anywhere. As it stands now, the *existence* of the switch is documented, but n

[issue7821] Command line option -U not documented

2010-01-31 Thread Martin v . Löwis
Martin v. Löwis added the comment: This switch is intentionally not documented. -- nosy: +loewis resolution: -> wont fix status: open -> closed ___ Python tracker ___ __