[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I think non-determinism is more then os.urandom can deliver. As far as I know the OS still does deterministic calculations, though they are maybe less obvious. Maybe call it safer, OS dependent? -- nosy: +chuck

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: Maybe os.urandom is more random than the module random in the sense that it is harder to figure out what comes next, but still deterministic. The readings from the hardware are random and you usually don't know them, yet what comes out

[issue5395] array.fromfile not checking I/O errors

2009-10-06 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: Maybe you could create a file without read permission (000) and try to read from it. I just checked. If I don't have read permissions, I am not able to open the file. When I open a file and change permissions afterwards, I can read

[issue7069] inspect.isabstract to return boolean values only

2009-10-06 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: The patch works, as this is what is implicitly happening anyway if you use the function. There seem to be no tests for this function, so there is nothing to break. I guess this is the right time to get some tests. Gabriel, would you like

[issue5395] array.fromfile not checking I/O errors

2009-10-06 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: Thanks Aduardo! (I could have sworn I tried that.) I changed the test to reading from a file in 'wb' mode, which raised a EOFError before and now raises IOErrors. -- Added file: http://bugs.python.org/file15055/array_ioerror.patch

[issue7069] inspect.isabstract to return boolean values only

2009-10-06 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I changed the patch so it does not introduce new dependencies and fails before the patch of isabstract(). -- Added file: http://bugs.python.org/file15064/inspect.diff ___ Python tracker rep

[issue5395] array.fromfile not checking I/O errors

2009-10-05 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: 12) I removed the try/except around the import. I have no clue if os might be unavailable. Maybe leave out handling that until we see that breaking. I added the try/except because I saw that in other tests in the same file when importing gc

[issue7042] test_signal fails on os x 10.6

2009-10-05 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I updated the checkout of the 26 branch, and the test runs fine now. I have no clue about virtual time as well. If this is about passing time, there should be better ways (than those which break if your computer gets faster

[issue7038] test_curses fails on os x 10.6

2009-10-05 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I am not able to reproduce my own report :) I'm sure I installed the 2.6.3 release, opened Terminal.app, checked `which python` and ran `python -m test.regrtest -uall`. I remember that I saw a crash report when I came back and some failed

[issue7063] Memory errors in array.array

2009-10-05 Thread Jan Hosang
New submission from Jan Hosang jan.hos...@gmail.com: While I was backporting the new buffer API to 2.7 I noticed some issues in array_ass_slice() in Modules/arraymodule.c in the python 3k branch. 1) Manual memory reallocation had been replaced by calls to array_resize. But I think when

[issue7042] test_signal fails on os x 10.6

2009-10-05 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I think a timing out while loop explains much better what is happening. I mean we are trying to keep the cpu busy for 0.9 seconds (if I understand the definition of virtual time correctly) and not do 1 increments (which might be done

[issue7063] Memory errors in array.array

2009-10-05 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: The mp_ass_subscript function looks fine in contrast to array_ass_slice(). So if array_ass_slice() is not accessible from the outside and is only called with NULL as replacement parameter from the inside, I won't be able to cause trouble

[issue5395] array.fromfile not checking I/O errors

2009-10-04 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: Ezio, I moved the test to a separate method. Also I couldn't find something to close the file if I don't care about errors. I thought an assertRises would be wrong, as I am not debugging files here, so I added a function to call a callable I

[issue7042] test_signal fails on os x 10.6

2009-10-03 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: This is a 64 bit machine and the test failed for the checkout of the python26-maint branch. I just configured and made it without any flags. (Does that produce a 64 bit build?) -- ___ Python

[issue7042] test_signal fails on os x 10.6

2009-10-03 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: $ ./python.exe -c 'import sys; print sys.maxint' 9223372036854775807 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7042

[issue7037] test_asynchat fails on os x 10.6

2009-10-02 Thread Jan Hosang
New submission from Jan Hosang jan.hos...@gmail.com: Loads of outputs like test_string_producer (test.test_asynchat.TestAsynchat_WithPoll) ... error: uncaptured python exception, closing channel test.test_asynchat.echo_client at 0x3ca670 (class 'socket.error':[Errno 9] Bad file descriptor

[issue7038] test_curses fails on os x 10.6

2009-10-02 Thread Jan Hosang
New submission from Jan Hosang jan.hos...@gmail.com: test_curses test test_curses crashed -- class '_curses.error': endwin() returned ERR Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/test/re grtest.py, line 549, in runtest_inner

[issue7039] test_distutils fails on os x 10.6

2009-10-02 Thread Jan Hosang
New submission from Jan Hosang jan.hos...@gmail.com: FAIL: test_get_python_inc (distutils.tests.test_sysconfig.SysconfigTestCase) -- Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/2.6

[issue7040] test_smtplib fails on os x 10.6

2009-10-02 Thread Jan Hosang
New submission from Jan Hosang jan.hos...@gmail.com: Output like: testAUTH_PLAIN (test.test_smtplib.SMTPSimTests) ... error: uncaptured python exception, closing channel test.test_smtplib.SimSMTPChannel 127.0.0.1:54223 at 0x728468 (class 'socket.error':[Errno 9] Bad file descriptor [/Library

[issue7041] test_macostools fails on os x 10.6

2009-10-02 Thread Jan Hosang
New submission from Jan Hosang jan.hos...@gmail.com: test_macostools test_copy (test.test_macostools.TestMacostools) ... ERROR test_mkalias (test.test_macostools.TestMacostools) ... ERROR test_mkalias_relative (test.test_macostools.TestMacostools) ... ERROR test_touched

[issue7042] test_signal fails on os x 10.6

2009-10-02 Thread Jan Hosang
New submission from Jan Hosang jan.hos...@gmail.com: == FAIL: test_itimer_virtual (test.test_signal.ItimerTest) -- Traceback (most recent call last): File

[issue5395] array.fromfile not checking I/O errors

2009-09-24 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I attached a path for raising IOErrors in fromfile. I also added a testcase which failed before. The test opens a file and closes the file with os.close(fd) without telling the file object, so fromfile doesn't notice it's reading from a file

[issue6071] no longer possible to hash arrays

2009-09-21 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I tried to implement the new buffer API, but as soon as I add bf_getbuffer/bf_releasebuffer to PyBufferProcs writing an array to a file breaks: f.write(a) TypeError: must be contiguous buffer, not array.array I searched through the file

[issue6839] zipfile can't extract file

2009-09-19 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I added a patch to replace back slashes by forward slashes in three places, only one if them actually relevant to the errors in the attached .zip file. I kept the exception for mismatching filenames, but if you think it is appropriate