[issue3317] duplicate lines in zipfile.py
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Sorry, here is the patch -- keywords: +patch Added file: http://bugs.python.org/file10852/zipfile-removedups.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3317 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3317] duplicate lines in zipfile.py
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Since the use of from X import * is discouraged (and serious projects try to avoid it), the __all__ list is less and less meaningful. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3317 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3256] Multiprocessing docs are not 3.0-ready
Andrii V. Mishkovskyi [EMAIL PROTECTED] added the comment: OK, then ignore the previous email, I'll send you a new one, with updated questions. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3319] pystone.main(10) causes ZeroDivisionError
New submission from Michael Patrick O'Keefe [EMAIL PROTECTED]: The following call results in a ZeroDivisionError in python 2.5.2 and python 3.0 alpha 3 (I presume this is also an issue for Python 2.6 but I can't explicitly confirm): from test import pystone pystone.main(10) Traceback (most recent call last): File stdin, line 1, in module File /opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/test/pystone.py, line 61, in main benchtime, stones = pystones(loops) File /opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/test/pystone.py, line 68, in pystones return Proc0(loops) File /opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/test/pystone.py, line 131, in Proc0 return benchtime, (loops / benchtime) ZeroDivisionError: float division Note the patch I submitted checks if the benchtime is equal to 0.0 (which apparently happens on my Mac OS 10.5 PPC). If this is the case I arbitrarily set the benchtime to 1e-6. I'm not sure what the units of the benchtime variable is (seconds?). Anyhow, this fixes the issue but can someone review to confirm this is the correct behavior? Thanks! -Michael -- components: Library (Lib), Tests files: pystone_patch.txt messages: 69418 nosy: mokeefe severity: normal status: open title: pystone.main(10) causes ZeroDivisionError type: behavior versions: Python 2.5, Python 3.0 Added file: http://bugs.python.org/file10853/pystone_patch.txt ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3317] duplicate lines in zipfile.py
Alan McIntyre [EMAIL PROTECTED] added the comment: The patch seems to work just fine for me, all tests pass (including test_zipfile64) on an Intel Mac. I'd vote to go ahead and revert the magicXXX variables back to their original names--I'm sure Twisted isn't the only project out there that made use of them. If the magicXXX name change gets checked in along with the current patch I'll run the zip64 tests on Mac and Linux afterward, since they don't get run in the standard test run on the buildbots. I don't currently have a Windows machine to test with. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3317 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3319] pystone.main(10) causes ZeroDivisionError
Changes by Michael Patrick O'Keefe [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10853/pystone_patch.txt ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3319] pystone.main(10) causes ZeroDivisionError
Michael Patrick O'Keefe [EMAIL PROTECTED] added the comment: I'm resubmitting the patch -- I think this one's a little bit better than my first attempt. I only change the value of loops / benchtime -- keywords: +patch Added file: http://bugs.python.org/file10854/pystone.py.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3018] tkinter demos fixed
Changes by Georg Brandl [EMAIL PROTECTED]: -- assignee: - georg.brandl nosy: +georg.brandl ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3018 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1580] Use shorter float repr when possible
Mark Dickinson [EMAIL PROTECTED] added the comment: [Tim] If you think using 16 (when possible) will stop complaints, think again ;-) For example, ... Aha! But using *15* digits would be enough to eliminate all 1, 2, 3, 4, ..., 15 digit 'surprises', wouldn't it?! 16 digits doesn't quite work, essentially because 2**-53 is still a little larger than 10**-16, but 15 digits ought to be okay. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1580] Use shorter float repr when possible
Mark Dickinson [EMAIL PROTECTED] added the comment: Here's the 'proof' that 15 digits should be enough: Suppose that x is a positive (for simplicity) real number that's exactly representable as a decimal with = 15 digits. We'd like to know that '%.15g' % (nearest_float_to_x) recovers x. There are integers k and m such that 2**(k-1) = x = 2**k, and 10**(m-1) x = 10**m. (e.g. k = ceiling(log_2(x)), m = ceiling(log_10(x))) Let y be the closest floating-point number to x. Then |y-x| = 2**(k-54). Hence |y-x| = x*2**-53 x/2 * 10**-15 = 10**(m-15)/2. It follows that x is the closest 15-digit decimal to y, hence that applying '%.15g' to y should recover x exactly. The key step here is in the middle inequality, which uses the fact that 2**-52 10**-15. The above doesn't work for subnormals, but I'm guessing that people don't care too much about these. The argument above also depends on correct rounding, but there's actually sufficient leeway here (that is, 2**-52 is quite substantially smaller than 10**-15) that the whole thing would probably work even in the absence of correct rounding. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue874900] threading module can deadlock after fork
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Attached patch releases the _active_limbo_lock after a fork(). It is not a complete solution, since existing Thread objects don't correspond to anything, but it corrects a problem in test_multiprocessing. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file10855/fork-and-thread.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue874900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3088] test_multiprocessing hangs on OS X 10.5.3
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: I found that on my Debian64, running test_multiprocessing under gdb hangs even before the first test is started - somewhere in the installation of the Manager. And it appears that the problem is described in issue874900: threading module can deadlock after fork. I don't know if it's a good idea to mix fork and threads, but the patch I attached to issue874900 seems to correct the hang. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1276] LookupError: unknown encoding: X-MAC-JAPANESE
Changes by Michael Patrick O'Keefe [EMAIL PROTECTED]: -- nosy: +mokeefe ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1276 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue874900] threading module can deadlock after fork
Changes by Jesse Noller [EMAIL PROTECTED]: -- nosy: +jnoller ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue874900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3088] test_multiprocessing hangs on OS X 10.5.3
Jesse Noller [EMAIL PROTECTED] added the comment: Thanks Amaury - I've been working through the tests and identifying the problem children - I'll finish that up and then try re-running them with the 874900 patch. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3090] ARCHFLAGS parsing/concatenation in unixccompiler.py breaks when set to a string
Jesse Noller [EMAIL PROTECTED] added the comment: Does anyone have a problem with me committing this patch as-is? It's not a show stopper, but it's highly annoying. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2944] asyncore doesn't handle connection refused correctly
Alexander Shigin [EMAIL PROTECTED] added the comment: Here is a new patch against r64768 The new patch raise an exception if asynchronous connect fails. Added file: http://bugs.python.org/file10856/asyncore-connect-patch.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3320] various doc typos
New submission from DSM [EMAIL PROTECTED]: Boredom resulted in a handful of doc copyedits against 64789. One error I did note in the doc tree but didn't correct because it's in code: includes/mp_distributing.py contains the typo _logger.propogate = 0 which ISTM will leave the logger's propagate flag on. I can't imagine this has any real consequence but I've never used either module. -- assignee: georg.brandl components: Documentation files: typos1.diff keywords: patch messages: 69428 nosy: dsm001, georg.brandl severity: normal status: open title: various doc typos versions: Python 2.6 Added file: http://bugs.python.org/file10857/typos1.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1580] Use shorter float repr when possible
Mark Dickinson [EMAIL PROTECTED] added the comment: For what it's worth, I'm -0.1 (or should that be -0.10001?) on this change. It seems better to leave the problems caused by binary floating-point out in the open than try to partially hide them, and the proposed change just seems a little bit too 'magic'. The inconsistency in the following current behaviour *does* irk me slightly (but only slightly): 0.13 0.13 0.14 0.14001 But practical issues aside, my preference would be to go to the other extreme: fix this inconsistency by changing the first output to 0.13000 rather than changing the second output to 0.14. That is, have repr(float) *always* output 17 digits, possibly except when that float is *exactly* representable in 16 or fewer decimal digits (e.g. 3.5, 0.125, ...). All the zeros act as a subtle reminder that the stored value is not exactly 0.13. But I suspect this, too, isn't very practical. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Facundo Batista [EMAIL PROTECTED] added the comment: Senthil: patch is fine. Remember to provide not only a modification for docs, but also to the Misc/NEWS file. Thank you!! ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2275 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3088] test_multiprocessing hangs on OS X 10.5.3
Nick Coghlan [EMAIL PROTECTED] added the comment: I'm still seeing intermittent lockups on Ubuntu 7.10 - traceback on ctrl-C is similar to that posted by Ismail above. Since Jesse seems to be on top of this, I'll stick to using -x test_multiprocessing for the moment. -- nosy: +ncoghlan ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2944] asyncore doesn't handle connection refused correctly
Changes by Alexander Shigin [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10401/asyncore-connect-patch.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3313] dlopen() error with no error message from dlerror()
STINNER Victor [EMAIL PROTECTED] added the comment: As expected, the bug can be reproduced with ctypes.dlopen(). py_dl_open() function of Modules/_ctypes/callproc.c should be merged with Modules/dlmodule.c. Here use at least the attached patch for ctypes (same job than the other patch: use default string if dlerror() returns NULL). Added file: http://bugs.python.org/file10858/ctypes_dlopen.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3088] test_multiprocessing hangs on OS X 10.5.3
Nick Coghlan [EMAIL PROTECTED] added the comment: Bumping back to release blocker for beta 2 (Barry may choose to defer it again, but it should at least be on his radar). -- priority: critical - release blocker resolution: accepted - ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3088] test_multiprocessing hangs intermittently on POSIX platforms
Nick Coghlan [EMAIL PROTECTED] added the comment: Updated issue title to more accurately reflect scope of the problem. -- title: test_multiprocessing hangs on OS X 10.5.3 - test_multiprocessing hangs intermittently on POSIX platforms ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3088] test_multiprocessing hangs intermittently on POSIX platforms
Nick Coghlan [EMAIL PROTECTED] added the comment: I forgot to mention that I am seeing the intermittent hangs on the trunk (2.6). I haven't been testing it on Py3k. -- versions: +Python 2.6 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Nick Coghlan [EMAIL PROTECTED] added the comment: Fixed in 64791. Blocked from being merged to Py3k (since there is no longer a __unicode__ special method). For MAL: the PyInstance_Check included in the patch for the benefit of classic classes defined in Python code also covers all of the classic C extension classes which are not instances of object. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Changes by Nick Coghlan [EMAIL PROTECTED]: -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue874900] threading module can deadlock after fork
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: A slightly better patch, with tests. Added file: http://bugs.python.org/file10859/fork-and-thread2.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue874900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3262] re.split doesn't split with zero-width regex
Matthew Barnett [EMAIL PROTECTED] added the comment: There appear to be 2 opinions on this issue: 1. It's a bug, a corner case that got missed. 2. It's always been like this, so it's probably a design decision, although no-one can't point to where or when the decision was made... Looking at the code, I think it's a bug. Expected behaviour: if 'pattern' is a non-capturing regex, then re.split(pattern, text) == re.sub(pattern, MARKER, text).split(MARKER). ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3262 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue874900] threading module can deadlock after fork
Changes by Adam Olsen [EMAIL PROTECTED]: -- nosy: +Rhamphoryncus ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue874900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1758146] Crash in PyObject_Malloc
Adam Olsen [EMAIL PROTECTED] added the comment: Apparently modwsgi uses subinterpreters because some third-party packages aren't sufficiently thread-safe - modwsgi can't fix those packages, so subinterpreters are the next best thing. http://groups.google.com/group/modwsgi/browse_frm/thread/988bf560a1ae8147/2f97271930870989 This is a weak argument for language design. Subinterpreters should be deprecated, the problems with third-party packages found and fixed, and ultimately subinterpreters ripped out. If you wish to improve the situation, I suggest you help fix the problems in the third-party packages. For example, http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac implies trac is configured with environment variables - clearly not thread-safe. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1758146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1758146] Crash in PyObject_Malloc
Vaclav Slavik [EMAIL PROTECTED] added the comment: I'm sorry, did you actually read my comments? Once again, this has nothing to do with threads and everything to do with isolation of independent Python apps running in the same *process*. Hope it got through this time :-/ ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1758146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3167] math test fails on Solaris 10
Mark Dickinson [EMAIL PROTECTED] added the comment: I'm pretty much out of ideas here. Skip, if you have any time to figure out where the math.log call is going wrong, I'd appreciate it. On Jean's machine, the problem was that the call log(-inf) to the C library's log function was returning -inf instead of the expected nan. The actual function call takes place in math_1, in the line r = (*func)(x) (line 178 of Modules/mathmodule.c in the current trunk, r64812). A couple of printf calls would show the inputs and outputs to that function. Is /usr/bin/ccs/ld Sun's own linker? If so, why doesn't it accept the - xlibmieee option? (Or maybe it does, in which case the question is why isn't gcc passing that option to ld properly.) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3167 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1758146] Crash in PyObject_Malloc
Adam Olsen [EMAIL PROTECTED] added the comment: Ahh, I did miss that bit, but it doesn't really matter. Tell modwsgi to only use the main interpreter (PythonInterpreter main_interpreter), and if you want multiple modules of the same name put them in different packages. Any other problems (trac using env vars for configuration) should be fixed directly. (My previous comment about building your own import mechanism was overkill. Writing a package that uses relative imports is enough - in fact, that's what relative imports are for.) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1758146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3167] math test fails on Solaris 10
Mark Dickinson [EMAIL PROTECTED] added the comment: Some other possibilities to try. This page: http://www.redhat.com/docs/wp/solaris_port/x99.html seems to suggest that linking with -lieee, and possibly also adding the - ffast-math gcc option, might help. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3167 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1758146] Crash in PyObject_Malloc
Franco DiRosa [EMAIL PROTECTED] added the comment: I believe PyThreadState_Swap function in ceval.c has a bug as I stated earlier. However, I have not seen it included in the latest patches so now I wonder... The following line in PyThreadState_Swap... if (check check-interp == newts-interp check != newts) should read as follows... if (check check-interp != newts-interp check != newts) since this condition, if true, raises an error. Why should it raise an error if all the interpreters are equal across multiple thread states? If we have one interpreter with multiple thread states (i.e. multi- threaded application) this function will error when switching between the thread states within the same interpreter (in DEBUG compile mode only since this code is commented out otherwise). In the forums it describes the use of thread states to handle multiple python threads running simultaneously and not by using multiple interpreters but only one (the main interpreter). Also the interpreters have be equal because in the documentation for the GIL functions it says it doesn't support multiple interpreters. I think this is a typo/bug in the code. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1758146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1758146] Crash in PyObject_Malloc
Adam Olsen [EMAIL PROTECTED] added the comment: Franco, you need to look at the line above that check: PyThreadState *check = PyGILState_GetThisThreadState(); if (check check-interp == newts-interp check != newts) Py_FatalError(Invalid thread state for this thread); PyGILState_GetThisThreadState returns the original tstate *for that thread*. What it's asserting is that, if there's a second tstate *in that thread*, it must be in a different subinterpreter. It doesn't prevent your second and third tstate from sharing the same subinterpreter, but it probably should, as this check implies it's an invariant. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1758146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3321] _multiprocessing.Connection() doesn't check handle
New submission from STINNER Victor [EMAIL PROTECTED]: _multiprocessing.Connection() allows to use any positive (or nul) number has socket handle. If you use an invalid file descriptor, poll() method may crash (especially for big positive integer). Example: import _multiprocessing obj = _multiprocessing.Connection(44977608) obj.poll() Erreur de segmentation (core dumped) Fix: use fstat() to make sure that the handle is valid. Attached patch implements this feature. Another solution would be to reuse code from Modules/selectmodule.c. -- components: Library (Lib) files: _multiprocessing_connection.patch keywords: patch messages: 69446 nosy: haypo severity: normal status: open title: _multiprocessing.Connection() doesn't check handle versions: Python 2.6 Added file: http://bugs.python.org/file10860/_multiprocessing_connection.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3321] _multiprocessing.Connection() doesn't check handle
Changes by STINNER Victor [EMAIL PROTECTED]: -- type: - crash ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3322] bugs in scanstring_str() and scanstring_unicode() of _json module
New submission from STINNER Victor [EMAIL PROTECTED]: scanstring_str() and scanstring_unicode() functions don't end value whereas it can be outside input string range. A check like this is needed: if (end 0 || len = end) { PyErr_SetString(PyExc_ValueError, xxx); return NULL; } next is set to begin but few lines later (before first use of next), it's set to end: for (next = end; ...). In error message, eg. Invalid control character at (...), begin is used as character position but I think that the right position is in the variable end (or maybe next?). I'm unable to fix these functions because I don't understand the code. -- components: Library (Lib) messages: 69447 nosy: haypo severity: normal status: open title: bugs in scanstring_str() and scanstring_unicode() of _json module type: crash versions: Python 2.6 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3322 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3321] _multiprocessing.Connection() doesn't check handle
STINNER Victor [EMAIL PROTECTED] added the comment: Ooops, there is a typo in my last patch: it's struct stat statbuf; and not struct stat *statbuf;! Here is a new version of the patch. Added file: http://bugs.python.org/file10861/_multiprocessing_connection.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2887] bsddb3 needs to be ported to Python 3.0
Trent Nelson [EMAIL PROTECTED] added the comment: FWIW, I bumped the version of Berkeley DB being used on Windows from 4.4.20 to 4.7.25 in r64555 (trunk). I blocked this from being merged to py3k. This block should be removed once bsddb has been updated. -- nosy: +Trent.Nelson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2887 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3167] math test fails on Solaris 10
Skip Montanaro [EMAIL PROTECTED] added the comment: Here's a gdb session using r64812. gcc 4.2.2. ldd on math.so shows: % ldd build/lib.solaris-2.10-i86pc-2.6/math.so libm.so.2 = /lib/libm.so.2 libgcc_s.so.1 = /opt/app/nonc++/lib/libgcc_s.so.1 libc.so.1 = /lib/libc.so.1 % gdb ./python GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as i386-pc-solaris2.10... (gdb) b math_1 Function math_1 not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (math_1) pending. (gdb) r Starting program: /home/tuba/skipm/src/python-svn/trunk/build/python Python 2.6b1+ (trunk:64812M, Jul 8 2008, 20:43:40) [GCC 4.2.2] on sunos5 Type help, copyright, credits or license for more information. import math inf = float('inf') math.log(-inf) Breakpoint 1, math_1 (arg=0x81f1fbc, func=0x805e88c [EMAIL PROTECTED], can_overflow=0) at /home/tuba/skipm/src/python-svn/trunk/Modules/mathmodule.c:171 171 { (gdb) p func $1 = (double (*)(double)) 0x805e88c [EMAIL PROTECTED] (gdb) n 173 x = PyFloat_AsDouble(arg); (gdb) n 174 if (x == -1.0 PyErr_Occurred()) (gdb) x 0x0:Cannot access memory at address 0x0 (gdb) p x $2 = -inf (gdb) n 176 errno = 0; (gdb) n 178 r = (*func)(x); (gdb) n 180 if (Py_IS_NAN(r)) { (gdb) p r $3 = -inf Does this help? I don't know how to tell where [EMAIL PROTECTED] is resolved, but I suppose it probably comes from /lib/libm.so.2. It's got a date on my system of Jan 22 2005. Any idea how to tell if there's a Sun patch for it? As for the /usr/ccs/bin/ld thing, it doesn't look like we are using it, at least not directly. Adding the --verbose flag to the link line I get this output: % gcc --verbose -L/opt/app/nonc++/ncurses-5.6/lib - R/opt/app/nonc++/ncurses-5.6/lib -L/opt/app/nonc++/gdbm-1.8/lib - R/opt/app/nonc++/gdbm-1.8/lib -L/opt/app/nonc++/readline-4.3/lib - R/opt/app/nonc++/readline-4.3/lib -L/opt/app/nonc++/tcl-8.4/lib - R/opt/app/nonc++/tcl-8.4/lib -L/opt/app/nonc++/BerkleyDB-4.3/lib - R/opt/app/nonc++/BerkleyDB-4.3/lib -o python Modules/python.o libpython2.6.a -lresolv -lsocket -lnsl -lrt -ldl-lm Reading specs from /opt/app/g++lib6/gcc-4.2/lib/gcc/i386-pc- solaris2.10/4.2.2/specs Target: i386-pc-solaris2.10 Configured with: ../configure --prefix=/opt/app/g++lib6/gcc-4.2 -- enable-languages=c,c++,fortran,objc --disable-nls --with-included- gettext --with-gnu-as --with-as=/usr/sfw/bin/gas --with-target- tools=/usr/sfw/bin/ --with-gmp=/opt/app/nonc++/gmp-4.2 --with- mpfr=/opt/app/nonc++/mpfr-2.3 Thread model: posix gcc version 4.2.2 /opt/app/g++lib6/gcc-4.2/libexec/gcc/i386-pc-solaris2.10/4.2.2/collect2 -V -R/opt/app/nonc++/lib -R/opt/app/g++lib6/lib - R/opt/app/nonc++/ncurses-5.6/lib -R/opt/app/nonc++/gdbm-1.8/lib - R/opt/app/nonc++/readline-4.3/lib -R/opt/app/nonc++/tcl-8.4/lib - R/opt/app/nonc++/BerkleyDB-4.3/lib -Y P,/usr/ccs/lib:/usr/lib -Qy -o python /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/values-Xa.o /opt/app/g++lib6/gcc-4.2/lib/gcc/i386-pc-solaris2.10/4.2.2/crtbegin.o - L/opt/app/nonc++/ncurses-5.6/lib -L/opt/app/nonc++/gdbm-1.8/lib - L/opt/app/nonc++/readline-4.3/lib -L/opt/app/nonc++/tcl-8.4/lib - L/opt/app/nonc++/BerkleyDB-4.3/lib -L/opt/app/g++lib6/gcc- 4.2/lib/gcc/i386-pc-solaris2.10/4.2.2 -L/opt/app/g++lib6/gcc- 4.2/lib/gcc/i386-pc-solaris2.10/4.2.2/../../.. Modules/python.o libpython2.6.a -lresolv -lsocket -lnsl -lrt -ldl -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /opt/app/g++lib6/gcc-4.2/lib/gcc/i386-pc- solaris2.10/4.2.2/crtend.o /usr/lib/crtn.o ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.482 I don't see /usr/ccs/bin/ld mentioned. Skip ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3167 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3258] ctypes assertion failure in trunk
Kevin Watters [EMAIL PROTECTED] added the comment: From reading through PEP 3118 once I'm not entirely clear on the role stgdict-format is supposed to be taking here, but I did get comtypes to compile and run successfully by changing line 910 from stgdict-format = alloc_format_string(, itemdict-format); to stgdict-format = alloc_format_string(, itemdict-format ? itemdict- format : P); (Where P is just struct.pack's void pointer format string.) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3258 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3167] math test fails on Solaris 10
Skip Montanaro [EMAIL PROTECTED] added the comment: Regarding -lieee, I don't see an ieee library on my system. Regarding -ffast-math, while it changes the log function which is linked to, it doesn't appear to modify the result of math.log: % ldd build/lib.solaris-2.10-i86pc-2.6/math.so libm.so.2 = /lib/libm.so.2 libgcc_s.so.1 = /opt/app/nonc++/lib/libgcc_s.so.1 libc.so.1 = /lib/libc.so.1 % gdb ./python GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as i386-pc-solaris2.10... (gdb) b math_1 Function math_1 not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (math_1) pending. (gdb) r Starting program: /home/tuba/skipm/src/python-svn/trunk/build/python Python 2.6b1+ (trunk:64812M, Jul 8 2008, 21:40:26) [GCC 4.2.2] on sunos5 Type help, copyright, credits or license for more information. im import math inf = float('inf') math.log(-inf) Breakpoint 1, math_1 (arg=0x81f19bc, func=0xfee2d6a0 log, can_overflow=0) at /home/tuba/skipm/src/python-svn/trunk/Modules/mathmodule.c:171 171 { (gdb) func Undefined command: func. Try help. (gdb) p func $1 = (double (*)(double)) 0xfee2d6a0 log (gdb) n 173 x = PyFloat_AsDouble(arg); (gdb) n 174 if (x == -1.0 PyErr_Occurred()) (gdb) p x $2 = -inf (gdb) n 176 errno = 0; (gdb) n 178 r = (*func)(x); (gdb) n 186 else if (Py_IS_INFINITY(r)) { (gdb) p r $3 = -inf ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3167 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Changes by Senthil [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10849/issue2275-py26.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2275 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil [EMAIL PROTECTED] added the comment: Here is the final patch for Py26 and Py3k including the Docs and Misc/News. Thanks you, Senthil Added file: http://bugs.python.org/file10862/issue2275-py26.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2275 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Changes by Senthil [EMAIL PROTECTED]: -- versions: -Python 2.5 Added file: http://bugs.python.org/file10863/issue2275-py3k.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2275 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib2 header capitalization
Senthil [EMAIL PROTECTED] added the comment: I also removed the Python 2.5 from the Version, as I don't think these changes will be back ported. After the application of patch, this issue can be closed. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2275 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3300] urllib.quote and unquote - Unicode issues
Changes by Senthil [EMAIL PROTECTED]: -- nosy: +orsenthil ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3316] Proposal for fix_urllib
Changes by Senthil [EMAIL PROTECTED]: -- nosy: +orsenthil ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3316 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3167] math test fails on Solaris 10
Jean Brouwers [EMAIL PROTECTED] added the comment: The /lib/libm.so.* files on my Solaris 10 (Opteron) box are equally old: ll /lib/libm.so* lrwxrwxrwx 1 root root 9 Sep 7 2006 /lib/libm.so - libm.so.2* -rwxr-xr-x 1 root bin 13536 Jan 22 2005 /lib/libm.so.1 -rwxr-xr-x 1 root bin 337804 Jan 22 2005 /lib/libm.so.2 Also, this looks like a more recent patch for the Math libraries, under 3.2: http://developers.sun.com/sunstudio/downloads/express_readme.html Then thare are the Studio patches SUN recommended the other day: http://developers.sun.com/sunstudio/downloads/patches/ss11_patches.html If things change after I install those, I will certainly let you know. /Jean Brouwers ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3167 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3319] pystone.main(10) causes ZeroDivisionError
Changes by Michael Patrick O'Keefe [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10854/pystone.py.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3319] pystone.main(10) causes ZeroDivisionError
Michael Patrick O'Keefe [EMAIL PROTECTED] added the comment: After a more careful study of the documentation on how to make (proper) patches, I'm submitting the patches again. This patches against the 2.6 trunk and py3k branch (R64812). I compiled both 2.6 and py3k and confirmed that the ZeroDivisionError does not appear for both sets of code. -- versions: +Python 2.6 Added file: http://bugs.python.org/file10864/pystone_1_py3k.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3319] pystone.main(10) causes ZeroDivisionError
Changes by Michael Patrick O'Keefe [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10865/pystone_1_trunk.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3319] pystone.main(10) causes ZeroDivisionError
Changes by Michael Patrick O'Keefe [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10866/pystone_err.py ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1758146] Crash in PyObject_Malloc
Franco DiRosa [EMAIL PROTECTED] added the comment: Thanks Adam but I'm still confused because... There is a new rule in version 2.3.5. Which is one interpreter with many thread states are supported for the GIL functions. So this code breaks that rule since this if statement is checking if the interpreters are different for the current GIL state and the new ts which it can't be (i.e. unsupported). See this email that points to the python documentation for 2.3.5 regarding this new rule... http://mail.python.org/pipermail/python-dev/2005-May/053840.html Here is the extract of the email pertaining to this issue... The documentation (http://docs.python.org/api/threads.html) states Note that the PyGILState_*() functions assume there is only one global interpreter (created automatically by Py_Initialize()). Python still supports the creation of additional interpreters (using Py_NewInterpreter()), but mixing multiple interpreters and the PyGILState_*() API is unsupported. , so it looks like that using the PyGilState_XXX functions in the core threadmodule.c means the Py_NewInterpreter() call (i.e. multiple interpreters) is no longer supported when threads are involved. So regardless if we use the GIL functions or the lower level functions it all eventually boils down to this Swap function which has this condition that doesn't match what the documentation is stating. So which way is it? Can't have it both ways. It seems since 2.3.5 they don't want you to use multiple interpreters is my guess when threading is involved. - Franco - Original Message - From: Adam Olsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 08, 2008 6:25 PM Subject: [issue1758146] Crash in PyObject_Malloc Adam Olsen [EMAIL PROTECTED] added the comment: Franco, you need to look at the line above that check: PyThreadState *check = PyGILState_GetThisThreadState(); if (check check-interp == newts-interp check != newts) Py_FatalError(Invalid thread state for this thread); PyGILState_GetThisThreadState returns the original tstate *for that thread*. What it's asserting is that, if there's a second tstate *in that thread*, it must be in a different subinterpreter. It doesn't prevent your second and third tstate from sharing the same subinterpreter, but it probably should, as this check implies it's an invariant. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1758146 ___ ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1758146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1758146] Crash in PyObject_Malloc
Franco DiRosa [EMAIL PROTECTED] added the comment: Thanks Adam but I'm still confused because... There is a new rule in version 2.3.5. Which is one interpreter with many thread states are supported for the GIL functions. So this code breaks that rule since this if statement is checking if the interpreters are different for the current GIL state and the new ts which it can't be (i.e. unsupported). See this email that points to the python documentation for 2.3.5 regarding this new rule... http://mail.python.org/pipermail/python-dev/2005-May/053840.html Here is the extract of the email pertaining to this issue... The documentation (http://docs.python.org/api/threads.html) states Note that the PyGILState_*() functions assume there is only one global interpreter (created automatically by Py_Initialize()). Python still supports the creation of additional interpreters (using Py_NewInterpreter()), but mixing multiple interpreters and the PyGILState_*() API is unsupported. , so it looks like that using the PyGilState_XXX functions in the core threadmodule.c means the Py_NewInterpreter() call (i.e. multiple interpreters) is no longer supported when threads are involved. So regardless if we use the GIL functions or the lower level functions it all eventually boils down to this Swap function which has this condition that doesn't match what the documentation is stating. So which way is it? Can't have it both ways. It seems since 2.3.5 they don't want you to use multiple interpreters is my guess when threading is involved. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1758146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1758146] Crash in PyObject_Malloc
Adam Olsen [EMAIL PROTECTED] added the comment: It's only checking that the original tstate *for the current thread* and the new tstate have a different subinterpreter. A subinterpreter can have multiple tstates, so long as they're all in different threads. The documentation is referring specifically to the PyGILState_Ensure and PyGILState_Release functions. Calling these says I want a tstate, and I don't know if I had one already. The problem is that, with subinterpreters, you may not get a tstate with the subinterpreter you want. subinterpreter references saved in globals may lead to obscure crashes or other errors - some of these have been fixed over the years, but I doubt they all have. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1758146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com