[issue13405] Add DTrace probes
Marc Abramowitz msabr...@gmail.com added the comment: With an hg checkout, I don't run into the `offsetof` problem - it fails when it gets to calling dtrace to generate Python/dtrace.o (again -G is the culprit). ``` $ hg clone https://hg.jcea.es/cpython-2011/ $ cd cpython-2011 $ hg update dtrace-issue13405_2.7 $ ./configure --prefix=/Users/marca/custom --enable-shared --with-dtrace ... $ make ... $ make if test dtrace != ; then \ dtrace -o Python/dtrace.o -64 \ -C -G -s ./Include/pydtrace.d \ Python/ceval.o Modules/gcmodule.o \ Objects/classobject.o Objects/typeobject.o; \ elsetouch Python/dtrace.o ; \ fi; dtrace: ignored option -- 64 Usage: dtrace [-aACeFHlqSvVwZ] [-arch i386|x86_64] [-b bufsz] [-c cmd] [-D name[=def]] [-I path] [-L path] [-o output] [-p pid] [-s script] [-U name] [-x opt[=val]] ... ``` -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14073] allow per-thread atexit()
Tarek Ziadé ziade.ta...@gmail.com added the comment: @grahamd : sometimes you don't own the code that contains the thread, so I think it's better to be able to shutdown properly all flavors of threads. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14073] allow per-thread atexit()
Graham Dumpleton graham.dumple...@gmail.com added the comment: Reality is that the way Python behaviour is defined/implemented means that it will wait for non daemonised threads to complete before exiting. Sounds like the original code is wrong in not setting it to be daemonised in the first place and should be reported as a bug in that code rather than fiddling with the interpreter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14073] allow per-thread atexit()
Tarek Ziadé ziade.ta...@gmail.com added the comment: Is there any good reason not to add this feature ? what would be the problem ? It does seem to be for the best, I don't see any drawbacks -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing
Georg Brandl ge...@python.org added the comment: It doesn't really matter if something was *meant* to be subclassed. If it can be in 3.x, and can't be in 3.x+1, that's a sort of backwards compatibility bug we want to avoid pretty strongly because it's gratuitous breakage. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14007 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14084] test_imp resource leak
New submission from Stefan Krah stefan-use...@bytereef.org: I tried to reproduce the failure from #14080 using this: ./python -m test -uall -v -F test_imp After around 500 iterations the test fails: == ERROR: test_find_module_encoding (test.test_imp.ImportTests) -- Traceback (most recent call last): File /home/stefan/pydev/cpython/Lib/test/test_imp.py, line 58, in test_find_module_encoding with imp.find_module('module_' + mod, self.test_path)[0] as fd: OSError: [Errno 24] Too many open files == ERROR: test_issue1267 (test.test_imp.ImportTests) -- Traceback (most recent call last): File /home/stefan/pydev/cpython/Lib/test/test_imp.py, line 70, in test_issue1267 self.test_path) OSError: [Errno 24] Too many open files == ERROR: test_issue3594 (test.test_imp.ImportTests) -- Traceback (most recent call last): File /home/stefan/pydev/cpython/Lib/test/test_imp.py, line 92, in test_issue3594 file, filename, info = imp.find_module(temp_mod_name) OSError: [Errno 24] Too many open files == ERROR: test_issue9319 (test.test_imp.ImportTests) -- Traceback (most recent call last): File /home/stefan/pydev/cpython/Lib/test/test_imp.py, line 182, in test_issue9319 imp.find_module, badsyntax_pep3120, [path]) File /home/stefan/pydev/cpython/Lib/unittest/case.py, line 571, in assertRaises return context.handle('assertRaises', callableObj, args, kwargs) File /home/stefan/pydev/cpython/Lib/unittest/case.py, line 135, in handle callable_obj(*args, **kwargs) OSError: [Errno 24] Too many open files -- components: Interpreter Core messages: 153935 nosy: brett.cannon, pitrou, skrah priority: normal severity: normal status: open title: test_imp resource leak type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14084 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14084] test_imp resource leak
Changes by Stefan Krah stefan-use...@bytereef.org: -- type: behavior - resource usage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14084 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14085] PyUnicode_WRITE: comparison is always true warnings
New submission from Stefan Krah stefan-use...@bytereef.org: The FreeBSD-9.0 bot shows a couple of warnings because some comparisons in PyUnicode_WRITE are always true: Objects/unicodeobject.c:2598: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:2598: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:2598: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:2671: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:2671: warning: comparison is always true due to limited range of data type [...] -- components: Interpreter Core messages: 153936 nosy: haypo, skrah priority: normal severity: normal status: open title: PyUnicode_WRITE: comparison is always true warnings type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5411] Add xz support to shutil
Nadeem Vawda nadeem.va...@gmail.com added the comment: So, do you agree that “not automated but not ugly” is better than “automated with ugly klutches”? Definitely. If we have to add special cases that are almost as long as the original code, the automation seems pointless. Note that there is a way to get fully automated support for tar formats: tarfile could expose, in addition to the list compression_formats, another structure with the descriptions (e.g. “gzip’ed tar file”) and file extensions (e.g. ['.gz', '.tgz'] —no, it’s not '.tar.gz', which is unfortunate, and could cause Lars to reject that idea). I’m just putting this here for reference, but my preference is still for the second idea I talk about in my precedent message. As much as it would be nice to have all of the information centralized in one place, I don't think this is practical - some of the data that would be stored in this structure really is specific to shutil, so I agree that your second option is better. I think we can restructure the code a bit to reduce the work involved in adding a new format, though. Maybe something like this: _ARCHIVE_FORMATS = {} _UNPACK_FORMATS = {} for name, tarname, progname, extensions, desc in [ (xz, xztar, xz, [.xz], xz'ed tar file), (bz2, bztar, bzip2, [.bz2], bzip2'ed tar file), (gz, gztar, gzip, [.gz, .tgz], gzip'ed tar file)]: if name in tarfile.compression_formats: _ARCHIVE_FORMATS[tarname] = _make_tarball, [(compress, progname)], desc _UNPACK_FORMATS[tarname] = extensions, _unpack_tarfile, [], desc By the way, is there any reason why you've used .gz instead of .tar.gz as the extension for gztar in your proposed change? The current version of shutil.py uses .tar.gz, but has .bz2 for bztar. Also, I notice that _make_tarball() will need to be updated to add the info for xz to the tar_compression and compress_ext dictionaries. It seems a bit ugly to duplicate this information when it's already present in the format dicts, so maybe it would be better to pass the file extension in directly instead? I assume that _make_tarball() is not part of shutil's public API. If we did this, there would be no need for a separate progname field in the initialization code I suggested above: for name, tarname, extensions, desc in [ (xz, xztar, [.xz], xz'ed tar file), (bz2, bztar, [.bz2], bzip2'ed tar file), (gz, gztar, [.gz, .tgz], gzip'ed tar file)]: if name in tarfile.compression_formats: _ARCHIVE_FORMATS[tarname] = _make_tarball, [(compress, name)], desc _UNPACK_FORMATS[tarname] = extensions, _unpack_tarfile, [], desc -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5411 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5411] Add xz support to shutil
Nadeem Vawda nadeem.va...@gmail.com added the comment: For the xztar format, you should also perhaps recognize the .txz extension - I've seen this used by FreeBSD. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5411 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14073] allow per-thread atexit()
Graham Dumpleton graham.dumple...@gmail.com added the comment: At the moment you have showed some code which is causing you problems and a vague idea. Until you show how that idea may work in practice it is a bit hard to judge whether what it does and how it does it is reasonable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14073] allow per-thread atexit()
Tarek Ziadé ziade.ta...@gmail.com added the comment: Mmm.. you did not say yet why you are against this feature, other than the lib *should not* use non-daemonized threads This sounds like the lib should not use feature X in Python because it will block everything And now we're proposing to remove the limitation and you are telling me I am vague and unreasonable. Let me try differently then. Consider this script to be a library I don't control. I need to call the .stop() function when my main application shuts down. I can't use signals because you forbid it in mod_wsgi How do I do, since asking the person to daemonize his thread is not an option ? I see several options: 1 - monkey patch the lib 2 - remove regular threads from Python, or making them always daemonized 3 - add an atexit() option in threads in Python 4 - use signals and drop the usage of mod_wsgi I think 3- is the cleanest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14086] str(KeyError(Foo)) Unexpected Result
New submission from David vencabot_tep...@hotmail.com: The __str__() method of the KeyError class seems to put quotes around the argument given to the class. This was causing bizarre, escaped quotation marks to appear in my code (where the result of str(e) is often passed as the argument of another Exception), and it took me a while to figure out where the problem lies, which says to me that the behavior is obscure and unexpected-enough to not be Python-like. I appreciate that the quotation marks are put around the erroneous key: my_dict = {foo: 1} my_dict[bar] Traceback (most recent call last): File stdin, line 1, in module KeyError: 'bar' The quotation marks should be added to the argument as or before being passed -- not when the KeyError is converted to a str. Consider the following example, where a server is informing the client of invalid input: def validate_parameters(parameters_dict): try: validate(parameters_dict[foo]) validate(parameters_dict[bar]) except KeyError as e: raise KeyError(Missing parameter {}..format(e)) def handle(parameters_dict): # Validate the parameters before we do anything with them. try: validate_parameters(parameters_dict) except Exception as e: send_to_client(ERR: {}.format(e)) In this example, the client receives a string that looks like this: \Missing parameter 'foo'.\ just because I wanted to re-raise a KeyError with a little bit of clarification. I've been doing this sort of re-raising a lot in this project and I don't see anything wrong with it, and I haven't had this kind of problem with any other Exception, which is why the bug took me a while to track down. Consider these snippets from the Python Tutorial: For convenience, the exception instance defines __str__() so the arguments can be printed directly without having to reference .args. If an exception has arguments, they are printed as the last part (‘detail’) of the message for unhandled exceptions. Clearly, KeyError.__str__() is not printing my arguments directly. Also, the 'detail' of an unhandled KeyError exception, because of this behavior, is also != to its argument. I believe that Python should preserve consistency by fixing this behavior. If the default KeyError arguments would look nicer with quotation marks, pass them with quotation marks, but maintain the sanctity and simplicity of Exception.__str__() as described in the tutorial. It makes more sense. PS: My current project involves a lot of validation not because I don't usually believe that it's easier to ask forgiveness, but because it's a scheduler for TV recordings, and, in that case, the client will want to know when there's a problem with their input BEFORE their recording of Survivor fails while they're at work and can't do anything about it. -- messages: 153941 nosy: vencabot_teppoo priority: normal severity: normal status: open title: str(KeyError(Foo)) Unexpected Result type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14056] Misc doc changes for tarfile
Lars Gustäbel l...@gustaebel.de added the comment: a) Good point, a case of sloppy naming. b) IMO a table is a tad too much. The amount of different compression methods is still quite small. My patch proposes a simpler approach. c) A link to shutil is very useful. BTW, thanks for the effort. -- Added file: http://bugs.python.org/file24598/lars-comment.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14056 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14073] allow per-thread atexit()
Graham Dumpleton graham.dumple...@gmail.com added the comment: I haven't said I am against it. All I have done so far is explain on the WEB-SIG how mod_wsgi works and how Python currently works and how one would normally handle this situation by having the thread be daemonised. As for the proposed solution, where is the code example showing how what you are suggesting is meant to work. Right now you are making people assume how that would work. Add an actual example here at least of how with the proposed feature your code would then look. For the benefit of those who might even implement what you want, which will not be me anyway as I am not involved in Python core development, you might also explain where you expect these special per thread atexit callbacks to be triggered within the current steps for shutting down the interpreter. That way it will be more obvious to those who come later as to what you are actually proposing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14085] PyUnicode_WRITE: comparison is always true warnings
STINNER Victor victor.stin...@gmail.com added the comment: Can you try to cast value to Py_UCS4 in assertions of PyUnicode_WRITE() macro? For example, replace assert(value = 0xff); by assert((Py_UCS4)value = 0xff); -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14073] allow per-thread atexit()
Tarek Ziadé ziade.ta...@gmail.com added the comment: Add an actual example here at least of how with the proposed feature your code would then look. That's the part I am not sure at all about in fact. I don't know at all the internals in the shutdown process in Python and I was hoping Antoine would give us a proposal here. I would suspect simply adding to the base thread class an .atexit() method that's called when atexit() is called, would do the trick since we'd be able to do things like: def atexit(self): ... do whatever cleanup needed... self.join() but I have no real experience in these internals. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14053] Make patchcheck work with MQ
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 179bc7557484 by Nadeem Vawda in branch '2.7': Issue #14053: Fix make patchcheck to work with MQ. http://hg.python.org/cpython/rev/179bc7557484 New changeset fc5de19c66e2 by Nadeem Vawda in branch '3.2': Issue #14053: Fix make patchcheck to work with MQ. http://hg.python.org/cpython/rev/fc5de19c66e2 New changeset 1bdca2bcba6d by Nadeem Vawda in branch 'default': Merge: #14053: Fix make patchcheck to work with MQ. http://hg.python.org/cpython/rev/1bdca2bcba6d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14053 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14073] allow per-thread atexit()
Graham Dumpleton graham.dumple...@gmail.com added the comment: Except that calling it at the time of current atexit callbacks wouldn't change the current behaviour. As quoted in WEB-SIG emails the sequence is: wait_for_thread_shutdown(); /* The interpreter is still entirely intact at this point, and the * exit funcs may be relying on that. In particular, if some thread * or exit func is still waiting to do an import, the import machinery * expects Py_IsInitialized() to return true. So don't say the * interpreter is uninitialized until after the exit funcs have run. * Note that Threading.py uses an exit func to do a join on all the * threads created thru it, so this also protects pending imports in * the threads created via Threading. */ call_py_exitfuncs(); So would need to be done prior to wait_for_thread_shutdown() or by that function before waiting on thread. The code in that function has: PyObject *threading = PyMapping_GetItemString(tstate-interp-modules, threading); ... result = PyObject_CallMethod(threading, _shutdown, ); So calls _shutdown() on the threading module. That function is aliased to _exitfunc() method of _MainThread. def _exitfunc(self): self._stop() t = _pickSomeNonDaemonThread() if t: if __debug__: self._note(%s: waiting for other threads, self) while t: t.join() t = _pickSomeNonDaemonThread() if __debug__: self._note(%s: exiting, self) self._delete() So can be done in here. The decision which would need to be made is whether you call atexit() on all threads before then trying to join() on any, or call atexit() only prior to the join() of the thread. Calling atexit() on all possibly sounds the better option but I am not sure, plus the code would need to deal with doing two passes like that which may not may not have implications. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14053] Make patchcheck work with MQ
Nadeem Vawda nadeem.va...@gmail.com added the comment: Committed. Thanks for the patch! I haven't added NEWS as I thing is easier for the person that applies the patch to simply write the line directly there instead of merging. Is that ok? Yes, that's fine; usually the NEWS entry is more or less the same as the commit message, so it makes sense to leave it to the committer. It also makes backporting easier - a diff against 3.3's NEWS file often won't apply cleanly to 3.2 or 2.7. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14053 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14079] Problems with recent test_subprocess changes
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Was it one of the buildbots that was failing? No, I was doing some testing with the pythonv branch and ran into this on a Mac running OS X 10.5.8 (Leopard). I'll re-test and close the issue if all is well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14079 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14086] str(KeyError(Foo)) Unexpected Result
Julian Berman julian+python@grayvines.com added the comment: Hey there. Check out #2651 -- nosy: +Julian ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14085] PyUnicode_WRITE: comparison is always true warnings
Stefan Krah stefan-use...@bytereef.org added the comment: Your suggestion eliminates many warnings, but not all. FreeBSD is still stuck with gcc-4.2, so perhaps this is a good compromise. Getting rid of the remaining warnings might require a more bloated solution. These are the remaining warnings: Objects/unicodeobject.c: In function 'PyUnicode_DecodeUTF16Stateful': Objects/unicodeobject.c:5474: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:5474: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:5475: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:5475: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:5477: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:5477: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:5478: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:5478: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c: In function 'PyUnicode_DecodeASCII': Objects/unicodeobject.c:6878: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:6878: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:6878: warning: comparison is always true due to limited range of data type -- keywords: +patch Added file: http://bugs.python.org/file24599/comparison-always-true.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14034] Add argparse howto
Éric Araujo mer...@netwok.org added the comment: You might want to coordinate with Issue 13850 a bit - they want a quick reference table before the first example (which would therefore mean before this howto which is replacing the first example). The howto discussed here would be a new file in Doc/howto, so no conflict. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13447] Add tests for some scripts in Tools/scripts
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13447] Add tests for some scripts in Tools/scripts
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13447] Add tests for some scripts in Tools/scripts
Éric Araujo mer...@netwok.org added the comment: I went for something even simpler: one new file Lib/test/test_tools.py. There is no need to have a file there and more files in Tools/tests, everything can go in test_tools (I’m not worried about file size, we already have a few thousand-liners test modules). I think it’s the simplest thing that works. My only concern is communication: how do we tell people working on a tool that they should write a test in test_tools? I’m not sure they would read Tools/README; maybe a note at the top of the Python files would work; a note in the devguide; sending an email to python-dev to tell about the new file + reminders when we see a new tool bug opened. -- keywords: +patch Added file: http://bugs.python.org/file24600/add-test_tools.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14012] Misc tarfile fixes
Lars Gustäbel l...@gustaebel.de added the comment: I updated your patch: - I removed the import as bit completely and changed all occurrences of _open() to builtins.open() which is more readable and explanatory. - I object to changing the error messages in the 3.2 branch due to backwards compatibility, although I left them in the patch for now. (I changed the style of %-formatting with a single item tuple in order to match the coding style of the rest of the module.) - I inlined the shutil.copyfileobj() method to remove the shutil import. -- Added file: http://bugs.python.org/file24601/tarfile-misc-bugs-3.2-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14012 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14085] PyUnicode_WRITE: comparison is always true warnings
Stefan Krah stefan-use...@bytereef.org added the comment: It looks like in the FreeBSD (patched?) gcc version -Wtype-limits is part of -Wall. I can reproduce the same warnings on Ubuntu with: ./configure --with-pydebug CFLAGS=-Wtype-limits So I'm not so sure anymore if this is worth a patch at all. I could also export CFLAGS=-Wno-type-limits on the bot. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14085 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14087] multiprocessing.Condition.wait_for missing
New submission from sbt shibt...@gmail.com: multiprocessing.Condition is missing a counterpart for the wait_for() method added to threading.Condition in Python 3.2. I will work on a patch. -- components: Library (Lib) messages: 153956 nosy: sbt priority: normal severity: normal status: open title: multiprocessing.Condition.wait_for missing type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14087 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2377] Replace __import__ w/ importlib.__import__
Brett Cannon br...@python.org added the comment: So refactoring the Python code into C code has been done, but it's crashing. =) As usual, manual memory management sucks. I also think that their is still too much C code as it makes the whole thing somewhat brittle to any refactoring of importlib. I am seriously thinking of tossing the C code I have written and writing in C only the bare minimum needed to get to the sys.modules check, and otherwise punting to importlib for everything else in a single call or two. So that would mean performing the sanity check on the arguments, calculating the absolute name of the module, grabbing the import lock, checking sys.modules, failing that going to importlib, and then figuring out what to return regardless of where the module came from thanks to fromlist. So about four functions calls. Compare that to the 8 I'm making now along with the need to muck with other things and you can see why starting from scratch where I only care about the sys.modules fast path starts to look mighty attractive. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14059] Implement multiprocessing.Barrier
sbt shibt...@gmail.com added the comment: Wouldn't it be simpler with a mp.Condition? Well, it is a fair bit shorter than the implementation in threading.py. But that is not a fair comparison because it does implement reset(). I was trying to avoid using shared memory/ctypes since multiprocessing.synchronize does not currently use them. However, I think it would be better (and much simpler) to just subclass threading.Barrier, making self._state and self._counter properties which delegate to RawValue objects. That gets rid of the differences in behaviour. I have this working, although I had to monkey patch multiprocessing.Condition to add a wait_for() method. See Issue 14087. Otherwise, this should be added to Lib/multiprocesing.synchronize.py, and the tests to test_multiprocessing. I will provide a patch later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14059 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14077] sporadic test_multiprocessing failure
Brett Cannon br...@python.org added the comment: 2012/2/21 Charles-François Natali rep...@bugs.python.org But in other VMs id() is simply a number that gets assigned to objects that is monotonically increasing. So it can be extremely deterministic if the object creation order is consistent. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Brett Cannon br...@python.org added the comment: I think the test is bogus. It would do better to either use str.endswith() or splitting off the various parts of __file__ to verify the filename is correct as is the directory. Otherwise it shouldn't matter if the directory is relative or absolute. -- assignee: - brett.cannon stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13041] argparse: terminal width is not detected properly
Zbyszek Szmek zbys...@in.waw.pl added the comment: OK, I guess that this could now be closed, since 13609 has been commited. (It is currently reopened, but the proposed tweaks wouldn't influence the usage in argparse, even if accepted). I'm attaching a patch which updates the tests to the new $COLUMNS logic. Previously, unsetting COLUMNS would fix the width on 80, now setting COLUMNS=80 is the proper way to do this. -- Added file: http://bugs.python.org/file24602/issue13041.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13041 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13041] argparse: terminal width is not detected properly
Changes by Zbyszek Szmek zbys...@in.waw.pl: Removed file: http://bugs.python.org/file23241/patch1.1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13041 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13041] argparse: terminal width is not detected properly
Changes by Zbyszek Szmek zbys...@in.waw.pl: Removed file: http://bugs.python.org/file23238/patch1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13041 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13041] argparse: terminal width is not detected properly
Changes by Zbyszek Szmek zbys...@in.waw.pl: Removed file: http://bugs.python.org/file24152/patch2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13041 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12806] argparse: Hybrid help text formatter
Zbyszek Szmek zbys...@in.waw.pl added the comment: I suppose here is where I should volunteer to update the patch file... @GraylinKim: do you still intend to work on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12806 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Antoine Pitrou pit...@free.fr added the comment: Otherwise it shouldn't matter if the directory is relative or absolute. That's not really the issue here, both are relative. I am still baffled at that failure, I don't see why would be chosen over . (which is inserted at the beginning of sys.path by the test). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13779] os.walk: bottom-up
Zbyszek Szmek zbys...@in.waw.pl added the comment: Maybe this could be closed? I'm attaching a small patch with a documentation clarification. (Adds In either case the list of subdirectories is retrieved before the tuples for the directory and its subdirectories are generated.). -- keywords: +patch Added file: http://bugs.python.org/file24603/issue13779.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12806] argparse: Hybrid help text formatter
Graylin Kim graylin@gmail.com added the comment: I'd be willing to at some point but I cannot see myself getting around to it in the near future. If someone else wants to offer an implementation that would be great. On Wed, Feb 22, 2012 at 10:42 AM, Zbyszek Szmek rep...@bugs.python.orgwrote: Zbyszek Szmek zbys...@in.waw.pl added the comment: I suppose here is where I should volunteer to update the patch file... @GraylinKim: do you still intend to work on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12806 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12806 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14084] test_imp resource leak
Antoine Pitrou pit...@free.fr added the comment: Both test_issue9319 and test_find_module_encoding seem to leak file descriptors. -- priority: normal - high stage: - needs patch versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14084 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14079] Problems with recent test_subprocess changes
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14079 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14034] Add argparse howto
Steven Bethard steven.beth...@gmail.com added the comment: Oh ok. Sounds good then! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Brett Cannon br...@python.org added the comment: Well, if you execute test_imp w/ importlib (-m importlib.test.regrtest test_imp) it still passes. So there is something very odd going on that probably relies on some other test doing something weird. And this might be hard to diagnose until the error triggers again to show the error arguments that are in the file now (the traceback below doesn't match what is in the default branch ATM). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4256] argparse: provide a simple way to get a programmatically useful list of options
Zbyszek Szmek zbys...@in.waw.pl added the comment: zsh completion is much more powerful. E.g. for gitSPlogSPTAB I see: completing head list-of-heads completing commit object name completing cached file abspath.c git-lost-found.sh README aclocal.m4 git-merge-octopus.shreflog-walk.c ... gitSPTAB completing alias diffab-- alias for 'diff --src-prefix=a/ --dst-prefix=b/' lol -- alias for 'log --graph --decorate --pretty=oneline --abbrev-commit' lola -- alias for 'log --graph --decorate --pretty=oneline --abbrev-commit --all' mergeu-- alias for 'merge --ff-only @{u}' completing main porcelain command add -- add file contents to index am-- apply patches from a mailbox ... The header parts ('completing commit object name', 'completing head', 'completing cached file') are in bold red. So different completions types are supported, and some help is provided, and completions are split in groups. Completion for options knows which short/long options go together: git log -TAB prints: ... --oneline -- shorthand for --pretty=oneline --abbrev-commit --ours-2 -- diff against our branch version --parents -- display parents of commit --patch -u -p -- generate diff in patch format ... fish (a friendly interactive shell which I don't use but which has some very cool features) prints something like a\%b (Branch) abspath.c (C source code, 4.2kB) abspath.o (Object code, 13kB) aclocal.m4 (M4 macro, 1.4kB) adres (File, 23B) advice.c (C source code, 2.4kB) advice.h (C header, 555B) I think that for --help-options to be usefull, it should list more information than is needed just for bash completion. At least: - options, with long and short options specified together - short help for options (or maybe all of the help) - option groups if such are used - metavar names This last part could be used by the completion script to customize completions for a specific program. E.g. the completion script could know that FILE means a file, and HOST means a host name. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14088] sys.executable generating canonical path
New submission from Antonio Ribeiro alvesjunior.anto...@gmail.com: Hi all, As it is my first time here, I'll try to explay step-by-step why I'm providing this path, and why I think that it is changing something that I believe that is not correct. First of all, I was trying to run one individual test, as the dev guide says: ./python -m test -v test_sys but, instead of run this test from the root directory of the project, I run it from ./Lib/test, so I did: ../../python -m test -v test_sys and it returned an error. The reason is that my sys.executable was not an abspath. When I went to see why it is different, I get this value to sys.executable: sys.executable - '/home/antonio/Projects/cpython/Lib/test/../../python' I'm not sure if I'm thinking write, but for me don't look nice to have this value as sys.executable, once the real path should be: '/home/antonio/Projects/cpython/python' So I'm providing a paatch that do exactly this. Hope you enjoy -- components: None files: canonical_path.diff keywords: patch messages: 153970 nosy: alvesjnr priority: normal severity: normal status: open title: sys.executable generating canonical path type: behavior Added file: http://bugs.python.org/file24604/canonical_path.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14079] Problems with recent test_subprocess changes
Ross Lagerwall rosslagerw...@gmail.com added the comment: Cool, thanks for reporting and debugging the issue :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14079 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13447] Add tests for some scripts in Tools/scripts
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14084] test_imp resource leak
Antoine Pitrou pit...@free.fr added the comment: Should be fixed now. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14084 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14084] test_imp resource leak
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset cbfd2bf80db0 by Antoine Pitrou in branch '3.2': Issue #14084: Fix a file descriptor leak when importing a module with a bad encoding. http://hg.python.org/cpython/rev/cbfd2bf80db0 New changeset fcd0a67e708e by Antoine Pitrou in branch 'default': Issue #14084: Fix a file descriptor leak when importing a module with a bad encoding. http://hg.python.org/cpython/rev/fcd0a67e708e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14084 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)
Changes by Anton Korobeynikov an...@korobeynikov.info: -- nosy: +Anton.Korobeynikov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13370] test_ctypes fails when building python with clang
Changes by Anton Korobeynikov an...@korobeynikov.info: -- nosy: +Anton.Korobeynikov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Marc Abramowitz msabr...@gmail.com added the comment: My understanding of DTrace is extremely shallow, but I think there is a major difference in how USDT probes are created between Solaris and OS X. Whereas on Solaris one generates object code using the -G option of dtrace and then links it in with the application, it seems that on OS X, the header file that dtrace -h spits out already has the magic assembler voodoo in it and thus you don't link with anything extra for DTrace. If that's true, then we probably need Makefile ifdef stuff to make it work. If someone can verify my theories, I might be inclined to take a stab at it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Barry A. Warsaw ba...@python.org added the comment: I have to amend my suggestion about sys.flags.hash_randomization. It needs to be non-zero even if $PYTHONHASHSEED is given instead of -R. Many other flags that also have envars work the same way, e.g. -O and $PYTHONOPTIMIZE. So hash_randomization has to work the same way. I'll still work on a patch for exposing the seed in sys. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Stefan Krah stefan-use...@bytereef.org added the comment: OK, on FreeBSD the failure occurs reliably when test_sqlite and test_imp are chained, perhaps because of the import failure of sqlite3: [stefan@freebsd-amd64 ~/hg/cpython]$ ./python -m test -uall test_sqlite test_imp [1/2] test_sqlite test_sqlite skipped -- No module named '_sqlite3' [2/2] test_imp test test_imp failed -- Traceback (most recent call last): File /usr/home/stefan/hg/cpython/Lib/test/test_imp.py, line 330, in test_package___file__ self.assertEqual(m.__file__, expected___file__, (m.__file__, m.__path__)) AssertionError: 'pep3147/__init__.py' != './pep3147/__init__.py' - pep3147/__init__.py + ./pep3147/__init__.py ? ++ : ('pep3147/__init__.py', ['pep3147']) 1 test failed: test_imp 1 test skipped: test_sqlite Those skips are all expected on freebsd9. [109902 refs] On Linux I cannot reproduce it under the same conditions: $ ./python -m test -uall test_sqlite test_imp [1/2] test_sqlite test_sqlite skipped -- No module named _sqlite3 [2/2] test_imp 1 test OK. 1 test skipped: test_sqlite Those skips are all expected on linux2. [94195 refs] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Antoine Pitrou pit...@free.fr added the comment: OK, on FreeBSD the failure occurs reliably when test_sqlite and test_imp are chained, perhaps because of the import failure of sqlite3: Mmh, funny, I can't trigger it here. Is there anything special in your sys.path? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13447] Add tests for some scripts in Tools/scripts
Francisco Martín Brugué franci...@email.de added the comment: My only concern is communication: how do we tell people working on a tool that they should write a test in test_tools? I’m not sure they would read Tools/README; maybe a note at the top of the Python files would work; a note in the devguide; sending an email to python-dev to tell about the new file + reminders when we see a new tool bug opened. Patch patchcheck to check ;-) if some file in Tool/** has been touched and give a message accordingly (that happens already for NEWS and ACKS) … -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14089] Patch to increase fractions lib test coverage
New submission from Oleg Plakhotnyuk oleg...@gmail.com: The last few missing bits to complete test coverage of 'fractions.py' library. ./python.exe -E -Wd -m test -v -T -D ../coverage/test_fractions test_fractions lines cov% module (path) 270 100% fractions (/Users/family/Documents/code/python/repo/Lib/fractions.py) -- components: Tests files: test_fractions.patch keywords: patch messages: 153979 nosy: Oleg.Plakhotnyuk, mark.dickinson, rhettinger priority: normal severity: normal status: open title: Patch to increase fractions lib test coverage type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file24605/test_fractions.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Barry A. Warsaw ba...@python.org added the comment: Never mind about sys.hash_seed. See my follow up in python-dev. I consider this issue is closed wrt the 2.6 branch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)
Michael Foord mich...@voidspace.org.uk added the comment: Note that apple have made gcc available, as part of command line tools for XCode, freely (free developer registration required though) from: https://developer.apple.com/downloads/ See: http://kennethreitz.com/xcode-gcc-and-homebrew.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Stefan Krah stefan-use...@bytereef.org added the comment: No, this is sys.path after sys.path.insert(0, os.curdir): ['.', '', '/usr/local/lib/python33.zip', '/usr/home/stefan/hg/cpython/Lib', '/usr/home/stefan/hg/cpython/Lib/plat-freebsd9', '/usr/home/stefan/hg/cpython/build/lib.freebsd-9.0-RELEASE-amd64-3.3-pydebug'] It is also possible to trigger the failure by adding this to the top of test_imp.py: try: importlib.import_module(_sqlite3) except ImportError: pass Then it's sufficient to run only test_imp (and not test_sqlite). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Brett Cannon br...@python.org added the comment: I can confirm the failure when an import fails prior to running test_imp (i.e. trying importing some non-existent module like Stefan did at the top of test_imp). Luckily importlib doesn't fail in this case. =) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14073] allow per-thread atexit()
Changes by Zvezdan Petkovic zvez...@computer.org: -- nosy: +zvezdan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14077] sporadic test_multiprocessing failure
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 27d31f0c4ad5 by Charles-François Natali in branch 'default': Issue #14077: importlib: Fix regression introduced by de6703671386. http://hg.python.org/cpython/rev/27d31f0c4ad5 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12702] shutil.copytree() should use os.lutimes() to copy the metadata of symlinks
Petri Lehtinen pe...@digip.org added the comment: Yeah. Seems that fixing #12715 automatically also fixed this, so closing as duplicate. -- resolution: - duplicate status: open - closed superseder: - Add symlink support to shutil functions ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14077] sporadic test_multiprocessing failure
Charles-François Natali neolo...@free.fr added the comment: I've committed the fix. As for improving the randomness of the temporary file name, I'm not against it (I'm just not convinced it's necessary). -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14090] Bus error on test_big_buffer() of test_zlib, buildbot AMD64 debian bigmem 3.x
New submission from STINNER Victor victor.stin...@gmail.com: [241/364/1] test_zlib Fatal Python error: Bus error Current thread 0x2b8f2240d260: File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/test_zlib.py, line 96 in test_big_buffer File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/case.py, line 385 in _executeTestPart File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/case.py, line 440 in run File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/case.py, line 492 in __call__ File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/suite.py, line 105 in run File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/suite.py, line 67 in __call__ File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/suite.py, line 105 in run File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/suite.py, line 67 in __call__ File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/runner.py, line 168 in run File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/support.py, line 1369 in _run_suite File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/support.py, line 1403 in run_unittest File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/test_zlib.py, line 666 in test_main File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/regrtest.py, line 1221 in runtest_inner File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/regrtest.py, line 907 in runtest File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/regrtest.py, line 710 in main File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/__main__.py, line 13 in module File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/runpy.py, line 73 in _run_code File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/runpy.py, line 160 in _run_module_as_main make: *** [buildbottest] Bus error http://www.python.org/dev/buildbot/all/builders/AMD64%20debian%20bigmem%203.x/builds/136/steps/test/logs/stdio -- messages: 153987 nosy: haypo, loewis, pitrou priority: normal severity: normal status: open title: Bus error on test_big_buffer() of test_zlib, buildbot AMD64 debian bigmem 3.x versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14090] Bus error on test_big_buffer() of test_zlib, buildbot AMD64 debian bigmem 3.x
Nadeem Vawda nadeem.va...@gmail.com added the comment: This was already reported as issue 13873. -- nosy: +nadeem.vawda resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - SIGBUS in test_zlib on Debian bigmem buildbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13873] SIGBUS in test_zlib on Debian bigmem buildbot
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +haypo, loewis, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13873] SIGBUS in test_zlib on Debian bigmem buildbot
STINNER Victor victor.stin...@gmail.com added the comment: The same test found a bug in Mac OS X kernel: issue #11277. I'm unable to reproduce the crash on Fedora 16 (with 12 GB of RAM). It may depend on zlib version or the kernel version. I'm running Linux 3.2.6-3.fc16.x86_64 with zlib 1.2.5-6.fc16. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13873] SIGBUS in test_zlib on Debian bigmem buildbot
STINNER Victor victor.stin...@gmail.com added the comment: A recent crash: [241/364/1] test_zlib Fatal Python error: Bus error Current thread 0x2b8f2240d260: File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/test_zlib.py, line 96 in test_big_buffer File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/case.py, line 385 in _executeTestPart File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/case.py, line 440 in run File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/case.py, line 492 in __call__ File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/suite.py, line 105 in run File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/suite.py, line 67 in __call__ File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/suite.py, line 105 in run File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/suite.py, line 67 in __call__ File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/unittest/runner.py, line 168 in run File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/support.py, line 1369 in _run_suite File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/support.py, line 1403 in run_unittest File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/test_zlib.py, line 666 in test_main File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/regrtest.py, line 1221 in runtest_inner File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/regrtest.py, line 907 in runtest File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/regrtest.py, line 710 in main File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/test/__main__.py, line 13 in module File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/runpy.py, line 73 in _run_code File /var/tmpfs/martin.vonloewis/3.x.loewis-parallel2/build/Lib/runpy.py, line 160 in _run_module_as_main make: *** [buildbottest] Bus error http://www.python.org/dev/buildbot/all/builders/AMD64%20debian%20bigmem%203.x/builds/136/steps/test/logs/stdio -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13873] SIGBUS in test_big_buffer() of test_zlib on Debian bigmem buildbot
Changes by STINNER Victor victor.stin...@gmail.com: -- title: SIGBUS in test_zlib on Debian bigmem buildbot - SIGBUS in test_big_buffer() of test_zlib on Debian bigmem buildbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14090] Bus error on test_big_buffer() of test_zlib, buildbot AMD64 debian bigmem 3.x
STINNER Victor victor.stin...@gmail.com added the comment: This was already reported as issue 13873. I searched the issue but I failed to find it because you forgot to mention the test name (test_big_buffer) :-p -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Antoine Pitrou pit...@free.fr added the comment: I can confirm the failure when an import fails prior to running test_imp (i.e. trying importing some non-existent module like Stefan did at the top of test_imp). Luckily importlib doesn't fail in this case. =) I can't reproduce :( Can either of you two try to debut it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14089] Patch to increase fractions lib test coverage
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14089 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14088] sys.executable generating canonical path
Antoine Pitrou pit...@free.fr added the comment: This is unfortunately wrong since it will fail in the face of symlinks. (if foo is a symlink to another directory, then foo/../bar is not the same thing as bar) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14091] python subprocess hangs if script called from another directory
New submission from Massimo Paladin massimo.pala...@gmail.com: Here is the behavior I am getting only on Python 2.7.2 in a Fedora 16: $ cat /tmp/example.py from subprocess import Popen,PIPE args = whatever program.split() p = Popen(args) If I run the program with: $ cd /tmp/; python example.py I get following as expected Traceback (most recent call last): File example.py, line 7, in module p = Popen(args) File /usr/lib64/python2.7/subprocess.py, line 679, in __init__ errread, errwrite) File /usr/lib64/python2.7/subprocess.py, line 1228, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Instead if I run the program with: $ cd ~; python /tmp/example.py It hangs until I stop it with ctrl-c On the same machine python 3.2.1 works fine. On a mac with python 2.7.1 works fine. On a rhel5 with python 2.4 works fine too. -- components: None messages: 153994 nosy: Massimo.Paladin priority: normal severity: normal status: open title: python subprocess hangs if script called from another directory type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14091] python subprocess hangs if script called from another directory
STINNER Victor victor.stin...@gmail.com added the comment: I'm unable to reproduce the problem on Fedora 16 with Python 2.7.2. It hangs until I stop it with ctrl-c Do you get an exception after hiting CTRL+c? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14091] python subprocess hangs if script called from another directory
Massimo Paladin massimo.pala...@gmail.com added the comment: Yes, the expected one: ^CTraceback (most recent call last): File /tmp/example.py, line 7, in module p = Popen(args) File /usr/lib64/python2.7/subprocess.py, line 679, in __init__ errread, errwrite) File /usr/lib64/python2.7/subprocess.py, line 1228, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14091] python subprocess hangs if script called from another directory
Massimo Paladin massimo.pala...@gmail.com added the comment: The line which is mentioned in the exception for the file example.py is 7 because I have something commented out which I didn't past in the text before. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14091] python subprocess hangs if script called from another directory
STINNER Victor victor.stin...@gmail.com added the comment: Could you try to collect more information with gdb? cd ~; gdb -args python /tmp/example.py (gdb) run python hangs CTRL+c (gdb) where the expected output -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2377] Replace __import__ w/ importlib.__import__
Nick Coghlan ncogh...@gmail.com added the comment: Makes sense to me (your new proposal sounds pretty close to the sketch I posted on the mailing list). It's really only the performance of in-function imports that concerned me and those are almost always going to get hits in sys.modules. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14019] Unify tests for str.format and string.Formatter
Francisco Martín Brugué franci...@email.de added the comment: I have some questions about this: 1) In Lib/test/string_tests.py it says: “Common tests shared by test_str, test_unicode, test_userstring and test_string” but a) I cannot find test_str b) string is imported and only some constants ascii_letters and digits are used c) In test_join there is a comment “see the test in test.test_string.StringTest.test_join” Is that obsolete? (I cannot find StringTest in the test_string test) 2) Is there more tests for the build in format (in test_buildin.BuiltinTest.test_format only the basic machinery is tested. I would expect something like in test_format.py somewhere 3) it is true that all tests for the build in 'format' should also pass in 'string.Formatter().format' Thanks in advance! francis -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14019 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14091] python subprocess hangs if script called from another directory
Massimo Paladin massimo.pala...@gmail.com added the comment: $ cd ~; gdb -args python /tmp/example.py GNU gdb (GDB) Fedora (7.3.50.20110722-10.fc16) Copyright (C) 2011 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 x86_64-redhat-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/bin/python...(no debugging symbols found)...done. Missing separate debuginfos, use: debuginfo-install python-2.7.2-5.2.fc16.x86_64 (gdb) run Starting program: /usr/bin/python /tmp/example.py [Thread debugging using libthread_db enabled] Using host libthread_db library /lib64/libthread_db.so.1. Detaching after fork from child process 16202. ^C Program received signal SIGINT, Interrupt. 0x0039d3a0e8e0 in __connect_nocancel () from /lib64/libpthread.so.0 (gdb) where #0 0x0039d3a0e8e0 in __connect_nocancel () from /lib64/libpthread.so.0 #1 0x7095c678 in ?? () from /usr/lib64/python2.7/lib-dynload/_socketmodule.so #2 0x7095d524 in ?? () from /usr/lib64/python2.7/lib-dynload/_socketmodule.so #3 0x0039d6ae00bd in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0 #4 0x0039d6ae15a5 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.7.so.1.0 #5 0x0039d6a6dc2c in ?? () from /usr/lib64/libpython2.7.so.1.0 #6 0x0039d6a49193 in PyObject_Call () from /usr/lib64/libpython2.7.so.1.0 #7 0x70755597 in ?? () from /usr/lib64/python2.7/lib-dynload/_functoolsmodule.so #8 0x0039d6a49193 in PyObject_Call () from /usr/lib64/libpython2.7.so.1.0 #9 0x0039d6ade795 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0 #10 0x0039d6ae0580 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0 #11 0x0039d6ae0580 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0 #12 0x0039d6ae15a5 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.7.so.1.0 #13 0x0039d6a6dc2c in ?? () from /usr/lib64/libpython2.7.so.1.0 #14 0x0039d6a49193 in PyObject_Call () from /usr/lib64/libpython2.7.so.1.0 #15 0x0039d6ada457 in PyEval_CallObjectWithKeywords () from /usr/lib64/libpython2.7.so.1.0 #16 0x0039d6afcdde in PyErr_PrintEx () from /usr/lib64/libpython2.7.so.1.0 #17 0x0039d6afd38e in PyRun_SimpleFileExFlags () from /usr/lib64/libpython2.7.so.1.0 #18 0x0039d6b0e745 in Py_Main () from /usr/lib64/libpython2.7.so.1.0 #19 0x0039d362169d in __libc_start_main () from /lib64/libc.so.6 #20 0x00400651 in _start () (gdb) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14019] Unify tests for str.format and string.Formatter
Nick Coghlan ncogh...@gmail.com added the comment: At least the first couple of those look like obsolete comments left over from the 2.x branch (we didn't do a mass renaming in the test suite, so many tests still live in their old locations). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14019 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Brett Cannon br...@python.org added the comment: I'd rather get importlib working fast enough that you are okay with bootstrapping it so we can delete the offending code. =) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)
Ned Deily n...@acm.org added the comment: Note that apple have made gcc available, as part of command line tools for XCode, freely (free developer registration required though) from: https://developer.apple.com/downloads See: http://kennethreitz.com/xcode-gcc-and-homebrew.html No. The new version of Xcode (Xcode 4.3, released last week) referred to in that post does *not* make gcc-4.2 available again. Like Xcode 4.2, it only includes clang and llvm-gcc; 4.3 includes updated versions of each of the two. gcc-4.2 was removed starting with 4.2 and there is no indication that Apple intends to re-instate it. Besides the compiler updates, Xoode 4.3 has been significantly repackaged, including the ability to download and install its components in smaller sub-packages, instead of the monolithic large downloads of recent past releases. However, Xcode 4.3 has moved the install location of components like the SDKs (which are used by Python universal builds) from /Developer to within the new Xcode application bundle (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer); this change will require additional changes to the Python build and Distutils/packaging infrastructure to support properly. For now, the easiest workaround when installing Xcode 4.3 and removing previous versions is to create a symlink from the app bundle Developer directory above to /Developer. I will be testing the new compiler versions shortly and working on more general support for 4.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Marc Abramowitz msabr...@gmail.com added the comment: I noticed that jcea already had some commented out stuff for OS X in his configure.in. I tried it out and stuff builds and works in a basic way, although it might not be fully functional. ``` ~/src/python-hg/cpython-2011$ hg diff configure.in diff -r b50130b35288 configure.in --- a/configure.in Wed Feb 22 02:15:47 2012 +0100 +++ b/configure.in Wed Feb 22 14:19:42 2012 -0800 @@ -2670,8 +2670,7 @@ DFLAGS=-32 fi -#if dtrace -G -o /dev/null Include/pydtrace.d 2/dev/null -if true +if dtrace -G -o /dev/null Include/pydtrace.d 2/dev/null then DTRACE_NM=SOLARIS AC_DEFINE(WITH_DTRACE, 1, ``` ``` ~/src/python-hg/cpython-2011$ ./configure --prefix=/Users/marca/custom --enable-shared --with-dtrace ... ~/src/python-hg/cpython-2011$ make ... ~/src/python-hg/cpython-2011$ DYLD_LIBRARY_PATH=. python2.7 Python 2.7.2+ (dtrace-issue13405_2.7:b50130b35288+, Feb 22 2012, 14:11:17) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)] on darwin Type help, copyright, credits or license for more information. import os os.getpid() 34764 # In another tab... $ sudo dtrace -l | grep python34764 124748 python34764 libpython2.7.dylibPyEval_EvalFrameExReal function-entry 124749 python34764 libpython2.7.dylibPyEval_EvalFrameExReal function-return 124750 python34764 libpython2.7.dylib collect gc-done 124751 python34764 libpython2.7.dylib collect gc-start 124752 python34764 libpython2.7.dylib subtype_dealloc instance-delete-done 124753 python34764 libpython2.7.dylib instance_dealloc instance-delete-done 124754 python34764 libpython2.7.dylib subtype_dealloc instance-delete-start 124755 python34764 libpython2.7.dylib instance_dealloc instance-delete-start 124756 python34764 libpython2.7.dylib PyType_GenericAlloc instance-new-done 124757 python34764 libpython2.7.dylibPyInstance_New instance-new-done 124758 python34764 libpython2.7.dylib PyType_GenericAlloc instance-new-start 124759 python34764 libpython2.7.dylibPyInstance_New instance-new-start 124760 python34764 libpython2.7.dylibPyEval_EvalFrameExReal line ``` So it builds and works at a basic level. However, I did see some weirdness as well: ``` $ sudo dtrace -n 'python34764::: { printf(%s (%s:%d), copyinstr(arg1), copyinstr(arg0), arg2) }' | grep test dtrace: description 'python34764::: ' matched 13 probes dtrace: error on enabled probe ID 4 (ID 124751: python34764:libpython2.7.dylib:collect:gc-start): invalid address (0x2) in action #2 at DIF offset 24 dtrace: error on enabled probe ID 3 (ID 124750: python34764:libpython2.7.dylib:collect:gc-done): invalid address (0xfffb) in action #1 at DIF offset 24 ``` and ``` ~/src/python-hg/cpython-2011$ sudo DYLD_LIBRARY_PATH=. dtrace -n 'python*::: { printf(%s (%s:%d), copyinstr(arg1), copyinstr(arg0), arg2) }' -c 'python2.7 /Users/marca/python/test.py' /dev/null dtrace: description 'python*::: ' matched 29 probes dtrace: pid 34907 has exited dtrace: error on enabled probe ID 20 (ID 126731: python34907:libpython2.7.dylib:collect:gc-start): invalid address (0x2) in action #2 at DIF offset 24 dtrace: error on enabled probe ID 19 (ID 126730: python34907:libpython2.7.dylib:collect:gc-done): invalid address (0xfffb) in action #1 at DIF offset 24 ``` On the other hand, some stuff appears to work sometimes: ``` ~/src/python-hg/cpython-2011$ sudo DYLD_LIBRARY_PATH=. dtrace -n 'python*:::function-entry { printf(%s (%s:%d), copyinstr(arg1), copyinstr(arg0), arg2) }' -c 'python2.7 /Users/marca/python/test.py' dtrace: description 'python*:::function-entry ' matched 9 probes Current working directory: /Users/marca/src/python-hg/cpython-2011 11 Current working directory: /Users/marca/src/python-hg/cpython-2011 11 Current working directory: /Users/marca/src/python-hg/cpython-2011 11 dtrace: pid 34953 has exited CPU IDFUNCTION:NAME 2 125639 PyEval_EvalFrameExReal:function-entry module (/Users/marca/python/test.py:1) 2 125639 PyEval_EvalFrameExReal:function-entry module (/Users/marca/python/marcsmath.py:1) 2 125639 PyEval_EvalFrameExReal:function-entry test_func (/Users/marca/python/test.py:4) 2 125639 PyEval_EvalFrameExReal:function-entry add (/Users/marca/python/marcsmath.py:1) 2 125639 PyEval_EvalFrameExReal:function-entry test_func (/Users/marca/python/test.py:4) 2 125639 PyEval_EvalFrameExReal:function-entry add (/Users/marca/python/marcsmath.py:1) 2 125639 PyEval_EvalFrameExReal:function-entry test_func (/Users/marca/python/test.py:4) 2 125639 PyEval_EvalFrameExReal:function-entry add (/Users/marca/python/marcsmath.py:1) 2 125639 PyEval_EvalFrameExReal:function-entry _remove
[issue14080] Sporadic test_imp failure
Stefan Krah stefan-use...@bytereef.org added the comment: Here's a minimal test case for now. It only fails if called as -m test: $ ./python Lib/test/test_dot.py # OK $ ./python Lib/test/regrtest.py test_dot # OK [1/1] test_dot Warning -- sys.path was modified by test_dot $ ./python -m test test_dot [1/1] test_dot Warning -- sys.path was modified by test_dot test test_dot crashed -- Traceback (most recent call last): File /home/stefan/pydev/cpython/Lib/test/regrtest.py, line 1214, in runtest_inner the_package = __import__(abstest, globals(), locals(), []) File /home/stefan/pydev/cpython/Lib/test/test_dot.py, line 20, in module assert m.__file__ == expected___file__ AssertionError 1 test failed: test_dot -- Added file: http://bugs.python.org/file24606/test_dot.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14091] python subprocess hangs if script called from another directory
STINNER Victor victor.stin...@gmail.com added the comment: (gdb) where #0 0x0039d3a0e8e0 in __connect_nocancel () from /lib64/libpthread.so.0 #1 0x7095c678 in ?? () from /usr/lib64/python2.7/lib-dynload/_socketmodule.so #2 0x7095d524 in ?? () from /usr/lib64/python2.7/lib-dynload/_socketmodule.so Hum, it's something related to network. Fedora uses its ABRT program to catch program failures. /usr/lib/python2.7/site-packages/abrt.pth contains import abrt_exception_handler which install a custom sys.excepthook. This hook writes a report and send it to the UNIX socket /var/run/abrt/abrt.socket. In your example, it looks like the abrt daemon is dead or at least doesn't not answer, and so the abrt client hangs on the connection to the UNIX socket. You may try to add a timeout to s.connect(/var/run + /abrt/abrt.socket) in write_dump() of the abrt_exception_handler module. You should also report the bug to Fedora because it's unrelated to Python (core). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14091] python subprocess hangs if script called from another directory
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14088] sys.executable generating canonical path
STINNER Victor victor.stin...@gmail.com added the comment: We can use realpath() if the function is available. Something similar is already done for sys.argv[0]. We should also use GetFullPathNameW() on Windows. -- nosy: +haypo Added file: http://bugs.python.org/file24607/sys_executable_realpath.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14088] sys.executable generating canonical path
STINNER Victor victor.stin...@gmail.com added the comment: See also the issue #13402. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14088] sys.executable generating canonical path
Antoine Pitrou pit...@free.fr added the comment: We can use realpath() if the function is available. Something similar is already done for sys.argv[0]. We should also use GetFullPathNameW() on Windows. GetFullPathName() is an abspath() equivalent. For realpath() you want GetFinalPathNameByHandle(), aka. _nt.getfinalpathname(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14080] Sporadic test_imp failure
Stefan Krah stefan-use...@bytereef.org added the comment: Antoine, what is your gcc version? The test case I posted fails with Debian/gcc-4.3.2 and Ubuntu/gcc-4.4.3. The two affected buildbots have gcc-4.2.x. But the test case passes on Fedora/gcc-4.6. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14088] sys.executable generating canonical path
STINNER Victor victor.stin...@gmail.com added the comment: GetFullPathName() is an abspath() equivalent. For realpath() you want GetFinalPathNameByHandle(), aka. _nt.getfinalpathname(). Ah? ntpath.realpath() uses nt._getfullpathname(). Is it a bug in ntpath? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14092] __name__ inconsistently applied in class definition
New submission from Lex Berezhny eukre...@gmail.com: The following behavior doesn't make sense, especially since it works correctly for other special attributes: class F: __name__ = Foo F.__name__ 'F' F().__name__ 'Foo' F.__name__ = 'Foo' F.__name__ 'Foo' Works fine for __module__ and others: class F: __module__ = mod F.__module__ 'mod' F class mod.F at 0x0212B360 -- components: Interpreter Core messages: 154013 nosy: eukreign priority: normal severity: normal status: open title: __name__ inconsistently applied in class definition type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14092 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14093] Mercurial version information not appearing in Windows builds
New submission from Vinay Sajip vinay_sa...@yahoo.co.uk: Currently, the Mercurial revision information is not appearing in Windows builds - they always appear to be default. This appears to be because the relevant information is not passed to getbuildinfo.c. The attached patch rectifies this, making the assumption that hg will always be accessible on the path. The basic method is to call hg id -bit and then pass the branch, tag and revision information when compiling getbuildinfo.c. If hg is not in the path, no Mercurial information is added (i.e. the current behaviour). -- components: Build, Windows files: build-info-diff.diff keywords: patch messages: 154014 nosy: loewis, vinay.sajip priority: normal severity: normal stage: patch review status: open title: Mercurial version information not appearing in Windows builds type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file24608/build-info-diff.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14093 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com