[issue15880] os.path.split() and long UNC names

2012-09-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy nosy: +ezio.melotti stage: - test needed type: crash - behavior versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15880

[issue15887] urlencode should accept iterables of pairs

2012-09-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15887 ___ ___

[issue15888] ipaddress doctest examples have some errors

2012-09-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15888 ___

[issue15920] make howto/regex.rst doctests pass

2012-09-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15920 ___

[issue14570] Document json sort_keys parameter properly

2012-09-15 Thread Chris Rebert
Chris Rebert added the comment: Any reactions? The patch is pretty straightforward... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14570 ___

[issue14570] Document json sort_keys parameter properly

2012-09-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +petri.lehtinen stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14570 ___

[issue15945] memoryview + bytes fails

2012-09-15 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone: Python 3.3.0rc2+ (default:9def2209a839, Sep 10 2012, 08:44:51) [GCC 4.6.3] on linux Type help, copyright, credits or license for more information. memoryview(b'foo') + b'bar' Traceback (most recent call last): File stdin, line 1, in module TypeError:

[issue15945] memoryview + bytes fails

2012-09-15 Thread Stefan Krah
Stefan Krah added the comment: What is the expected outcome? memoryviews can't be resized, so this scenario isn't possible: bytearray([1,2,3]) + b'123' bytearray(b'\x01\x02\x03123') -- nosy: +skrah ___ Python tracker rep...@bugs.python.org

[issue15945] memoryview + bytes fails

2012-09-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just prepend the empty bytestring if you want to make sure the result is a bytes object: b'' + memoryview(b'foo') + b'bar' b'foobar' I think the following limitation may be more annoying, though: b''.join([memoryview(b'foo'), b'bar']) Traceback (most

[issue15946] Windows 8 x64 - IO-Error

2012-09-15 Thread Christian Mikula
New submission from Christian Mikula: OS Windows 8 Enterprise x64 clean installed. Python Version 2.6.6 and 2.7.3 both x64 installed. Problem is to delete one Directory and immediately after create one new with the same Name! !!! Code !!! import sys, platform, os, shutil TEST_PATH = /test

[issue15946] Windows 8 x64 - IO-Error

2012-09-15 Thread Christian Mikula
Changes by Christian Mikula christian.mik...@live.at: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15946 ___ ___

[issue15946] Windows 8 x64 - IO-Error

2012-09-15 Thread R. David Murray
R. David Murray added the comment: I believe this is a Windows...feature? We have lots of trouble with this ourselves in the test suite, if I understand correctly. -- nosy: +brian.curtin, r.david.murray, tim.golden ___ Python tracker

[issue15897] zipimport.c doesn't check return value of fseek()

2012-09-15 Thread Felipe Cruz
Felipe Cruz added the comment: I've updated the patch changing fseek_error goto block error return from PyErr_SetFromErrno to PyErr_Format(ZipImportError, can't read Zip file: %R, archive); (returning NULL after). -- Added file: http://bugs.python.org/file27194/issue15897_v1.patch

[issue15946] Windows 8 x64 - IO-Error

2012-09-15 Thread Christian Mikula
Christian Mikula added the comment: I also think that it is a windows feature! who should report this problem with microsoft? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15946 ___

[issue15947] Assigning new values to instance of pointer types does not check validity

2012-09-15 Thread Facundo Batista
New submission from Facundo Batista: In the doc it says: Assigning a new value to instances of the pointer types c_char_p, c_wchar_p, and c_void_p changes the memory location they point to, not the contents of the memory block [...]. s = Hello, World c_s = c_wchar_p(s) print(c_s)

[issue15897] zipimport.c doesn't check return value of fseek()

2012-09-15 Thread Christian Heimes
Christian Heimes added the comment: You can further compress the changes when you get rid of `rc` and check the return value inline, for example: if (fseek(...) == -1) { errorhandler; } -- ___ Python tracker rep...@bugs.python.org

[issue15526] test_startfile crash on Windows 7 AMD64

2012-09-15 Thread Jeremy Kloth
Jeremy Kloth added the comment: This test is still intermittently failing on the AMD64 Windows7 SP1 buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/630 Any chance the patch could be committed? -- ___ Python

[issue15948] Unchecked return value of I/O functions

2012-09-15 Thread Christian Heimes
New submission from Christian Heimes: Python's C code contains more than 30 lines that don't check the return value of I/O functions like fseek(). A missing check can hide issues like a failing NFS connection. I've created an (incomplete) list of missing checks with find and grep. $ find

[issue14570] Document json sort_keys parameter properly

2012-09-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: I would recommend making the added and modified lines not exceed 79 characters in both files. Also, for the .rst file, you can use slashes to break lines as shown in the following example:

[issue14570] Document json sort_keys parameter properly

2012-09-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: Also, while not strictly necessary, it is more customary and convenient to provide a single patch file for all files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14570

[issue15946] Windows 8 x64 - IO-Error

2012-09-15 Thread Brian Curtin
Brian Curtin added the comment: I'm not sure Microsoft is going to change anything about this - it has done this for a long time, if not forever. We recently had #15496 receive changes, and #7443 is in the same area and has more details and some patches, so I'd suggest taking up the

[issue15949] docs.python.org not getting updated

2012-09-15 Thread Chris Jerdonek
New submission from Chris Jerdonek: docs.python.org doesn't seem to be getting updated anymore. For example, this revision from Tuesday, Sept 11 is not reflected: http://hg.python.org/cpython/rev/c8d60d0c736b -- assignee: docs@python components: Documentation messages: 170525 nosy:

[issue15897] zipimport.c doesn't check return value of fseek()

2012-09-15 Thread Felipe Cruz
Felipe Cruz added the comment: v4 - inline fseek return code check - as Christian suggested -- Added file: http://bugs.python.org/file27195/issue15897_v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15897

[issue15933] flaky test in test_datetime

2012-09-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: I also notice that there is an unnecessary call to time.sleep(0.1) whenever the loop exhausts. This adds .1 seconds to the test run for every call to test_today() on, for example, platforms that never get the same value twice (according to the code comment).

[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-09-15 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: Added file: http://bugs.python.org/file27196/subprocess.rst-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14616 ___

[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-09-15 Thread Chris Rebert
Chris Rebert added the comment: Updated patches to mention pipes.quote(). -- Added file: http://bugs.python.org/file27197/subprocess.rst-3.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14616

[issue1521051] Allow passing DocTestRunner and DocTestCase in doctest

2012-09-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: I think this would be useful as well. For example, it would let one more easily get finer-grained test result data (e.g. to the level of doctest examples rather than just the TestCase level). Without this, I needed to monkey patch. The previously attached

[issue15887] urlencode should accept iterables of pairs

2012-09-15 Thread Thomas Lee
Thomas Lee added the comment: Working on a patch for this. Should be ready for review shortly. -- nosy: +thomaslee ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15887 ___

[issue15933] flaky test in test_datetime

2012-09-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here are the 6 cases where it always exhausts on my system: test_today (test.datetimetester.TestSubclassDateTime_Pure) test_today (test.datetimetester.TestDateTimeTZ_Pure) test_today (test.datetimetester.TestDateTime_Pure) test_today

[issue15419] distutils: build should use a version-specific build directory

2012-09-15 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Changing of name of subdirectory would break e.g. shell scripts, which set PYTHONPATH=build/lib when calling Python scripts, so this change rather should not be made in micro releases. -- ___

[issue15933] flaky test in test_datetime

2012-09-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: I think we can avoid unnecessary sleeps if we only loop again if the final assert fails (i.e. by including the or condition with the time delta allowance inside the loop and not just outside). -- ___ Python tracker

[issue15526] test_startfile crash on Windows 7 AMD64

2012-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset bc5c5b79b7e1 by Antoine Pitrou in branch '3.2': Issue #15526: try to fix test_startfile's inability to clean up after itself in time. http://hg.python.org/cpython/rev/bc5c5b79b7e1 New changeset 1704deb7e6d7 by Antoine Pitrou in branch 'default':

[issue15526] test_startfile crash on Windows 7 AMD64

2012-09-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, hopefully there'll no more be failures now. -- resolution: - fixed stage: - committed/rejected versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15526

[issue15887] urlencode should accept iterables of pairs

2012-09-15 Thread Thomas Lee
Thomas Lee added the comment: Patch attached. Terry, you'll notice I wrap the main part of the urlencode function in a big try/except block to catch TypeErrors ValueErrors. I'm a bit concerned that doing this may misreport the true underlying error in the event we screw up values/types in a

[issue15933] flaky test in test_datetime

2012-09-15 Thread Ezio Melotti
Ezio Melotti added the comment: The comment before the check states 4 possible reasons for this failure: 1. It recently became midnight, between the today() and the time() calls. 2. The platform time() has such fine resolution that we'll never get the same value twice. 3. The platform

[issue15933] flaky test in test_datetime

2012-09-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: if today == todayagain: -break +return # test passed Might it make more sense to do the passing time-delta check inside the loop (at the above location), and then raise an exception at the end if the loop exhausts? I think

[issue15933] flaky test in test_datetime

2012-09-15 Thread Ezio Melotti
Ezio Melotti added the comment: That won't always work for case 1 (when theclass is e.g. 'date') and for case 4 (even if it's unlikely). Technically 2 loops should be enough, but without the sleep I don't think it matters much if it does 1 or 3 loops. --

[issue15948] Unchecked return value of I/O functions

2012-09-15 Thread Felipe Cruz
Felipe Cruz added the comment: I can submit patches.. Is there any problem to send 1 patch per module? -- nosy: +felipecruz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15948 ___

[issue15948] Unchecked return value of I/O functions

2012-09-15 Thread Ezio Melotti
Ezio Melotti added the comment: I think that's OK. -- nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15948 ___

[issue12075] python3.2 memory leak when reloading class with attributes

2012-09-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12075 ___ ___

[issue1052827] filelist.findall should not fail on dangling symlinks

2012-09-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1052827 ___

[issue15606] re.VERBOSE whitespace behavior not completely documented

2012-09-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15606 ___ ___

[issue12321] documentation of ElementTree.find

2012-09-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12321 ___ ___ Python-bugs-list

[issue11664] Add patch method to unittest.TestCase

2012-09-15 Thread Julian Berman
Julian Berman added the comment: It's kind of unfortunate that `mock.patch` is called `mock.patch`. I was thinking about this a bit more yesterday, and `mock.patch.object` is the one that I think would be most appropriate to put on `TestCase`, and the best name for it is probably `patch`, but

[issue15744] missing tests for {RawIO,BufferedIO,TextIO}.writelines

2012-09-15 Thread Felipe Cruz
Felipe Cruz added the comment: Add tests for {RawIO,BufferedIO,TextIO}.writelines() -- keywords: +patch nosy: +felipecruz Added file: http://bugs.python.org/file27200/issue15744_v1.patch ___ Python tracker rep...@bugs.python.org

[issue15933] flaky test in test_datetime

2012-09-15 Thread Chris Jerdonek
Chris Jerdonek added the comment: That won't always work for case 1 (when theclass is e.g. 'date') and for case 4 (even if it's unlikely). Can you explain what you mean by this? It seems the timedelta allowance would be equally valid and serve the same purpose no matter what case or

[issue11454] email.message import time

2012-09-15 Thread Ezio Melotti
Ezio Melotti added the comment: I tried to remove a few unused regex and inline some of the others (the re module has its own caching anyway and they don't seem to be documented), but it didn't get so much faster (see attached patch). I then put the second list of email imports of the

[issue11454] email.message import time

2012-09-15 Thread R. David Murray
R. David Murray added the comment: It detects whether a string contains any characters have been surrogate escaped by the surrogate escape handler. I disliked using it, but I didn't know of any better way to do that detection. It's on my long list of things to come back to eventually and

[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2012-09-15 Thread Thomas Lee
Thomas Lee added the comment: Patch against hg tip attached. -- keywords: +patch nosy: +thomaslee Added file: http://bugs.python.org/file27202/issue-15893-01.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15893

[issue15949] docs.python.org not getting updated

2012-09-15 Thread Ezio Melotti
Ezio Melotti added the comment: http://docs.python.org/dev/py3k/reference/datamodel.html says Last updated on Sep 11, 2012. -- nosy: +ezio.melotti, georg.brandl type: - behavior ___ Python tracker rep...@bugs.python.org

[issue11454] email.message import time

2012-09-15 Thread Ezio Melotti
Ezio Melotti added the comment: Given that high surrogates are U+D800..U+DBFF, and low ones are U+DC00..U+DFFF, '([^\ud800-\udbff]|\A)[\udc00-\udfff]([^\udc00-\udfff]|\Z)' means a low surrogates, preceded by either an high one or line beginning, and followed by another low one or line end.