[issue11332] Increase logging/__init__.py coverage to 97%
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: OK, but acceptance tests do not need to not try to get higher test coverage. For instance, for testing disable() simply using it and making sure the outcome is as expected also works. I can understand wanting to avoid some low-level whitebox testing, but I don't think that precludes getting better coverage results. Well then, it sounds like we're on the same page. I'm not arguing against better coverage, just against the low-level whitebox testing elements of Oliver's patch. He did welcome comments, after all :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11332 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11344] Add height argument to os.path.dirname()
New submission from blokeley bloke...@gmail.com: It is a common need to find the grandparent or great-grandparent (etc.) of a given directory, which results in this: from os.path import dirname mydir = dirname(dirname(dirname(path))) Could a height parameter be added to os.path.dirname so it becomes: def dirname(path, height=1): Then we could have usage like: path = '/ggparent/gparent/parent/myfile.txt' from os.path import dirname dirname(path) /ggparent/gparent/parent dirname(path, 2) /ggparent/gparent dirname(path, 3) /ggparent Perhaps we should throw ValueErrors for invalid height values: dirname(path, 10) ValueError dirname(path, -1) ValueError Perhaps a height of 0 should do nothing: dirname(path, 0) /ggparent/gparent/parent/myfile.txt I can supply patches, unit tests and docs if you like. -- components: Library (Lib) messages: 129616 nosy: blokeley priority: normal severity: normal status: open title: Add height argument to os.path.dirname() type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7833] Bdist_wininst installers fail to load extensions built with Issue4120 patch
Christoph Gohlke cgoh...@uci.edu added the comment: Actually, PyQt4 was not a good example since it is not build using distutils. Pywin32 and wxPython extensions are the only ones on my system specifying a dependency on Common Controls or MFC. No dependencies other than CRT, MFC, and Common Controls are specified in any assemblies of over 1000 pyd and dll files in my Python27 directory. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10880] do_mkvalue and 'boolean'
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This test is wrong:: if (!PyBool_Check(test_var) test_var == Py_False) the second part is never executed. if (test_var != Py_False) is enough to test the return value. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10880 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10880] do_mkvalue and 'boolean'
Yuriy iro...@mail.ru added the comment: +test_var = Py_BuildValue(?, 0); +if (PyBool_Check(test_var) test_var == Py_True) { +PyErr_SetString(TestError, Failed to Create boolean); +return NULL; +} + +test_var = Py_BuildValue(?, 1); +if (PyBool_Check(test_var) test_var == Py_False) { +PyErr_SetString(TestError, Failed to Create boolean); +return NULL; +} -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10880 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11256] inspect.getcallargs raises TypeError on valid arguments
Daniel Urban urban.dani...@gmail.com added the comment: I found another case, when this is a problem: if there are no **kwargs, but there are some keyword-only arguments: def f(*, a, b): pass ... f(a=1, b=2) getcallargs(f, a=1, b=2) Traceback (most recent call last): ... TypeError: f() takes no arguments (2 given) The attached issue11256_3.diff patch also fixes this problem, and adds tests that would have detected this case. -- Added file: http://bugs.python.org/file20930/issue11256_3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10880] do_mkvalue and 'boolean'
Yuriy iro...@mail.ru added the comment: sorry ^_^ +test_var = Py_BuildValue(?, 0); +if (!PyBool_Check(test_var) || test_var == Py_True) { +PyErr_SetString(TestError, Failed to Create boolean); +return NULL; +} + +test_var = Py_BuildValue(?, 1); +if (!PyBool_Check(test_var) || test_var == Py_False) { +PyErr_SetString(TestError, Failed to Create boolean); +return NULL; +} -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10880 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11321] 9th import of module _pickle always crashes
Nick Coghlan ncogh...@gmail.com added the comment: I can definitely confirm that one: ~/devel/py3k$ gcc -I/usr/local/include/python3.3m -o issue11321 issue11321.c -L/usr/local/lib/python3.3 -lpython3.3m -lm -lpthread -ldl -lutil -rdynamic ~/devel/py3k$ ./issue11321 START Try import #0 ...SUCCESS Try import #1 ...SUCCESS Try import #2 ...SUCCESS Try import #3 ...SUCCESS Try import #4 ...SUCCESS Try import #5 ...SUCCESS Try import #6 ...SUCCESS Try import #7 ...SUCCESS Segmentation fault I can also confirm that it isn't a regression w.r.t 3.1: ~/devel/py3k$ gcc -I/usr/include/python3.1 -o issue11321 issue11321.c -L/usr/lib/python3.1 -lpython3.1 -lm -lpthread -ldl -lutil -rdynamic ~/devel/py3k$ ./issue11321 START Try import #0 ...SUCCESS Try import #1 ...SUCCESS Try import #2 ...SUCCESS Try import #3 ...SUCCESS Try import #4 ...SUCCESS Try import #5 ...SUCCESS Try import #6 ...SUCCESS Try import #7 ...SUCCESS Segmentation fault It *is*, however, a regression from the 2.x line (where, presumably, cPickle simply never got reinitialised) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11321] 9th import of module _pickle always crashes
Nick Coghlan ncogh...@gmail.com added the comment: I haven't worked out where the error is happening yet, but the 13 allocated static variables and the complete lack of a module cleanup function aren't going to be helping matters. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11321] 9th import of module _pickle always crashes
Nick Coghlan ncogh...@gmail.com added the comment: Here's a sample stack trace of it blowing up: Program received signal SIGSEGV, Segmentation fault. 0x00479404 in type_dealloc (type=0x76a82f20) at Objects/typeobject.c:2523 2523_PyObject_GC_UNTRACK(type); (gdb) bt #0 0x00479404 in type_dealloc (type=0x76a82f20) at Objects/typeobject.c:2523 #1 0x00465a2b in dict_dealloc (mp=0x8f61b0) at Objects/dictobject.c:1020 #2 0x004e43c8 in _PyImport_FixupExtensionUnicode (mod=0x77f68ef0, name=0x7fffcd40 _pickle, filename=0x77f12570) at Python/import.c:611 #3 0x004e7fcf in _PyImport_LoadDynamicModule (name=0x7fffcd40 _pickle, pathname=0x7fffbc70 /usr/local/lib/python3.3/lib-dynload/_pickle.cpython-33m.so, fp=value optimised out) at ./Python/importdl.c:85 #4 0x004e5f79 in import_submodule (mod=0x796b20, subname=0x7fffcd40 _pickle, fullname=0x7fffcd40 _pickle) at Python/import.c:2894 #5 0x004e61ef in load_next (mod=0x796b20, altmod=value optimised out, p_name=value optimised out, buf=0x7fffcd40 _pickle, p_buflen=0x7fffcd38) at Python/import.c:2706 #6 0x004e6931 in import_module_level (name=0x0, globals=0x922060, locals=value optimised out, fromlist=0x796b20, level=value optimised out) at Python/import.c:2422 #7 0x004e6e74 in PyImport_ImportModuleLevel (name=0x77e6c550 _pickle, globals=0x922060, locals=0x922060, fromlist=0x796b20, level=value optimised out) at Python/import.c:2474 #8 0x004c642b in builtin___import__ (self=value optimised out, args=value optimised out, kwds=value optimised out) at Python/bltinmodule.c:167 #9 0x0042c897 in PyObject_Call (func=0x77edf8c0, arg=0x8e79e0, kw=0xa2e79) at Objects/abstract.c:2149 #10 0x004c6c73 in PyEval_CallObjectWithKeywords (func=0x77edf8c0, arg=0x77e85ef0, kw=0xa2e79) at Python/ceval.c:3739 #11 0x004ca6de in PyEval_EvalFrameEx (f=0xae4490, throwflag=value optimised out) at Python/ceval.c:2316 #12 0x004cf343 in PyEval_EvalCodeEx (_co=0x77ea5690, globals=value optimised out, locals=value optimised out, args=0x0, argcount=value optimised out, kws=value optimised out, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3295 #13 0x004cf5db in PyEval_EvalCode (co=0x76a82f20, globals=0x8e79e0, locals=0xa2e79) at Python/ceval.c:761 #14 0x00419c7e in run_mod (command=value optimised out, flags=value optimised out) at Python/pythonrun.c:1769 #15 PyRun_StringFlags (command=value optimised out, flags=value optimised out) at Python/pythonrun.c:1703 #16 PyRun_SimpleStringFlags (command=value optimised out, flags=value optimised out) at Python/pythonrun.c:1276 #17 0x00415c41 in main () So _pickle itself doesn't seem to be dying, but it is eventually leaving things in a bad state so that the *next* time around, the import machinery blows up. Note that switching to a different module (e.g. _struct) eliminates the segfault. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11333] Add empty __slots__ to collections.abc abstract base classes
Nick Coghlan ncogh...@gmail.com added the comment: I like the idea, and it seems to work as expected (i.e. an empty __slots__ doesn't conflict with inheritance from a C defined type or a type with non-empty __slots__). However, __slots__ is one of the sections of the type machinery I'm least familiar with, so hopefully Guido will weigh in. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11321] 9th import of module _pickle always crashes
Andreas Stührk andy-pyt...@hammerhartes.de added the comment: It's because the _pickle module doesn't incref Pickler_Type and Unpickler_Type before calling `PyModule_AddObject()` (which steals a reference). The attached patch fixes the issue. -- keywords: +patch nosy: +Trundle Added file: http://bugs.python.org/file20931/issue11321.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11258] ctypes: Speed up find_library() on Linux by 500%
Jonas H. jo...@lophus.org added the comment: Humm. Would be great to have the `ldconfig -p` output of such a machine... I can't get ldconfig to recognize 64-bit libraries on my 32-bit machines, so I have no output to test against... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11258 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11329] PyEval_InitThreads() not safe before Py_Initialize()
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11329 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11329] PyEval_InitThreads() not safe before Py_Initialize()
STINNER Victor victor.stin...@haypocalc.com added the comment: Can you write a patch for the documentation? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11329 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11345] Fix a link in library/json docs
New submission from Jonas H. jo...@lophus.org: I guess this should be a link. -- assignee: docs@python components: Documentation files: fix-json-link.diff keywords: patch messages: 129629 nosy: docs@python, jonash priority: normal severity: normal status: open title: Fix a link in library/json docs versions: Python 3.3 Added file: http://bugs.python.org/file20932/fix-json-link.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11258] ctypes: Speed up find_library() on Linux by 500%
Antoine Pitrou pit...@free.fr added the comment: Here is an excerpt: libc.so.6 (libc6,x86-64, OS ABI: Linux 2.6.9) = /lib64/libc.so.6 libc.so.6 (libc6, OS ABI: Linux 2.6.9) = /lib/libc.so.6 The OS ABI thing is not always there: libdrm.so.2 (libc6,x86-64) = /usr/lib64/libdrm.so.2 libdrm.so.2 (libc6) = /usr/lib/libdrm.so.2 As you see, there are two of them with the same name but in a different path. If you return the absolute path, there is a 50% possibility that you are returning the wrong one ;) There seem to be two key differences between the original implementation and yours: - the orig impl matches the abi_type at the beginning of the parentheses, yours simply ignores the abi_type (that should have caught my eye, but that regex looked so much like magic that I didn't try to make sense of it :-)) - the orig impl returns the file name from the beginning of the matched line, yours returns the full path from the end of the line I guess it should be doable to retain the speed benefit while implementing a matching algorithm closer to the original one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11258 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11346] Generator object should be mentioned in gc module document
New submission from Atsuo Ishimoto ishim...@gembook.org: In the gc.garbage of the library ref of gc module, ... this list contains only objects with __del__() methods. This is not true, since gc.garbage will contain generator object with try-finally block. -- assignee: docs@python components: Documentation messages: 129631 nosy: docs@python, ishimoto priority: normal severity: normal status: open title: Generator object should be mentioned in gc module document ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper
Éric Araujo mer...@netwok.org added the comment: Does the attached patch fix the issue? -- assignee: tarek - eric.araujo components: +Distutils2 keywords: +patch nosy: +alexis versions: +3rd party, Python 2.7, Python 3.1, Python 3.3 Added file: http://bugs.python.org/file20933/distutils-files.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11314] Subprocess suffers 40% process creation overhead penalty
Charles-Francois Natali neolo...@free.fr added the comment: Aaron Sherman a...@ajs.com added the comment: That's why I asked for absolute numbers for the overhead difference. Did you not follow the link in my first post? I got pretty detailed, there. By the way, strace has a '-T' flag that can be used to measure the time spent in syscalls (but for a mmap/mremap/munmap it won't be significant). However, I do think that doing the performance testing before deprecating the previous interface would have been a good idea... Once again: subprocess.Popen is actually faster than os.pipe to create a subprocess. Just don't pass shell=True. Unless you're spawning shell scripts, but in that case subprocess' overhead is definitely not biggest problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11314 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11345] Fix a link in library/json docs
Benjamin Peterson benja...@python.org added the comment: r88668 -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11344] Add height argument to os.path.dirname()
R. David Murray rdmur...@bitdance.com added the comment: I'm -1 on this feature request. I think it is an unnecessary complication of the API, especially since dirname corresponds to the unix shell 'dirname' command, which doesn't have such a feature. If you need this feature in a particular application, it is easy to write a function to provide it. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11344] Add height argument to os.path.dirname()
Antoine Pitrou pit...@free.fr added the comment: Well, on the other hand, it *is* a common need. (and I don't think mimicking the shell is a design principle for Python) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4600] __class__ assignment: new-style? heap? == confusing
Changes by Daniel Stutzbach stutzb...@google.com: -- nosy: +stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper
Andreas Stührk andy-pyt...@hammerhartes.de added the comment: @Éric: You should probably strip the colour from your diff :-) -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4600] __class__ assignment: new-style? heap? == confusing
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file20933/distutils-files.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper
Changes by Éric Araujo mer...@netwok.org: Added file: http://bugs.python.org/file20934/distutils-files.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11258] ctypes: Speed up find_library() on Linux by 500%
Jonas H. jo...@lophus.org added the comment: the orig impl matches the abi_type at the beginning of the parentheses, yours simply ignores the abi_type (that should have caught my eye, but that regex looked so much like magic that I didn't try to make sense of it :-)) Same here. :) The version I attached seems to work for me. It's some kind of compromise -- basically it's the original regex but with the unneccessary, performance-decreasing cruft stripped away. btw, Jonas H. is perfectly fine - I don't care about being honored, I just want to `import uuid` without waiting forever. :-) -- Added file: http://bugs.python.org/file20935/faster-find-library1-py3k-with-escaped-name-try2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11258 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11282] 3.3 unittest document not kept consist with code
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11282 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11140] threading.Lock().release() raises _thread.error, not RuntimeError
Filip Gruszczyński grusz...@gmail.com added the comment: Test for releasing unacquired lock and aliasing exception. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file20936/11140.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11140 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11344] Add height argument to os.path.dirname()
R. David Murray rdmur...@bitdance.com added the comment: No, it isn't a design principle. My point was that unix hasn't found it useful to add a level option to the dirname API. I don't know that I personally have ever had occasion to peel off more than one directory level without also wanting to do something with the intermediate results, so perhaps I am not a good judge of how useful this would be. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11333] Add empty __slots__ to collections.abc abstract base classes
Guido van Rossum gu...@python.org added the comment: I think the idea is reasonable. (I haven't checked the patch.) -- assignee: gvanrossum - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4600] __class__ assignment: new-style? heap? == confusing
Jonas H. jo...@lophus.org added the comment: Here comes a patch, changing the behaviour to: ./python -q class C: ... pass ... (1).__class__ = 1 Traceback (most recent call last): File stdin, line 1, in module TypeError: __class__ must be set to a class defined by a class statement, not 'int' object (1).__class__ = object Traceback (most recent call last): File stdin, line 1, in module TypeError: class__ must be set to a class defined by a class statement, not 'object' (1).__class__ = C Traceback (most recent call last): File stdin, line 1, in module TypeError: __class__ assignment: only for instances of classes defined by class statements -- keywords: +patch nosy: +jonash Added file: http://bugs.python.org/file20937/4600.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9931] test_ttk_guionly hangs on XP5
Antoine Pitrou pit...@free.fr added the comment: Ok, great ! The hg builders are temporary - or, rather, the SVN builders will get removed once the transition is over. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10880] do_mkvalue and 'boolean'
Dj Gilcrease digitalx...@gmail.com added the comment: Correct the tests. They passed before but had a logic flaw that caused them to never test that the correct boolean value was being returned. -- Added file: http://bugs.python.org/file20938/issue10880_68064.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10880 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10880] do_mkvalue and 'boolean'
Changes by Dj Gilcrease digitalx...@gmail.com: Removed file: http://bugs.python.org/file20929/issue10880_rev68064.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10880 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4600] __class__ assignment: new-style? heap? == confusing
Benjamin Peterson benja...@python.org added the comment: This is not really accurate: class x(int): pass ... class y(object): pass ... x().__class__ = y Traceback (most recent call last): File stdin, line 1, in module TypeError: __class__ assignment: 'x' object layout differs from 'y' y().__class__ = x Traceback (most recent call last): File stdin, line 1, in module TypeError: __class__ assignment: 'y' object layout differs from 'x' -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: The patch turned out to be less trivial than I initially thought. The current algorithm checks for invalid continuation bytes in 4 places: 1) before the switch/case statement in Objects/unicodeobject.c when it checks if there are enough bytes in the string (e.g. if the current byte is a start byte of a 4-bytes sequence and there are only 2 more bytes in the string, the sequence is invalid); 2) in the case 2 of the switch, where it's checked if the second byte is a valid continuation byte; 3) in the case 3 of the switch, where it's checked if the second and third bytes are valid continuation bytes, including additional invalid cases for the second bytes; 3) in the case 4 of the switch, where it's checked if the second, third, and fourth bytes are valid continuation bytes, including additional invalid cases for the second bytes; The correct algorithm should determine the maximum valid subpart of the sequence determining the position of the first invalid continuation byte. Continuation bytes are all in range 80..BF except for the second byte of 3-bytes sequences that start with E0 or ED and second byte of 4-bytes sequences that start with F0 or F4 (3rd and 4th continuation bytes are always in range 80..BF). This means that the above 4 cases should be changed in this way: 1) if there aren't enough bytes left to complete the sequence check for valid continuation bytes considering the special cases for the second bytes (E0, ED, F0, F4) instead of using the naive algorithm that checks only for continuation bytes in range 80..BF; 2) the case 2 is fine as is, because the second byte is always in range 80..BF; 3) the case 3 should check (pseudocode): if (second_byte_is_not_valid) max_subpart_len = 1 else if (third_byte not in 80..BF) max_subpart_len = 2 else # the sequence is valid the second_byte_is_not_valid part should consider the two special cases for E0 and ED. 4) the case 4 should check (pseudocode): if (second_byte_is_not_valid) max_subpart_len = 1 else if (third_byte not in 80..BF) max_subpart_len = 2 else if (fourth_byte not in 80..BF) max_subpart_len = 3 else # the sequence is valid here the second_byte_is_not_valid part should consider the two special cases for F0 and E4. In order to avoid duplication of code I was thinking to add 2 macros (something like IS_VALID_3_SEQ_2ND_BYTE, IS_VALID_4_SEQ_2ND_BYTE) that will be used in the cases 1) and 3), and 1) and 4) respectively. The change shouldn't affect the decoding speed, but it will increase the lines of code and complexity of the function. Is this OK? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11332] Increase logging/__init__.py coverage to 97%
Oliver Drake obdrak...@gmail.com added the comment: Thanks for the comments and prompt response :) I think I misunderstood the nature and level of these unit tests. I will fix the specific issues you mentioned, and either cut or modify the less useful/too low level tests (e.g. disable). In general I will change my approach to be more high level. I will steer away from testing the implementation line by line, but I believe there should be unit tests that enforce the API that is published to the user - i.e. one unit test for every class, method and function, testing inputs, outputs, exception handling and general behavior. So if a developer changes the API or the general behavior of a function he/she should have to change the documentation and the appropriate unit test - or do we want to avoid this type of testing completely? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11332 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
New submission from Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: 1. libpython3.so has soname llibpython3.so due to needless l in -Wl,-hl$@. 2. libpython3.so is not linked against libpython$(LDVERSION).so when -Wl,--as-needed flag is used. -Wl,--as-needed flag is used by default in Gentoo due to major benefits. From `info ld`: `--as-needed' `--no-as-needed' This option affects ELF DT_NEEDED tags for dynamic libraries mentioned on the command line after the `--as-needed' option. Normally the linker will add a DT_NEEDED tag for each dynamic library mentioned on the command line, regardless of whether the library is actually needed or not. `--as-needed' causes a DT_NEEDED tag to only be emitted for a library that satisfies an undefined symbol reference from a regular object file or, if the library is not found in the DT_NEEDED lists of other libraries linked up to that point, an undefined symbol reference from another dynamic library. `--no-as-needed' restores the default behaviour. I'm attaching the patch. -- components: Build files: libpython3.so.patch keywords: patch messages: 129649 nosy: Arfrever, loewis priority: normal severity: normal status: open title: libpython3.so: Broken soname and linking versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20939/libpython3.so.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Changes by Georg Brandl ge...@python.org: -- assignee: - loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11332] Increase logging/__init__.py coverage to 97%
Brett Cannon br...@python.org added the comment: Testing the documented API is definitely wanted, Oliver. Any change in behaviour needs to be detected to ensure there is not backwards-compatibility regressions without it being intentional. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11332 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11340] test_distutils fails
Brett Cannon br...@python.org added the comment: Can you provide the test's failing report and traceback? -- nosy: +brett.cannon status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: Regardless of this patch, such a libpython3.so regular file cannot exist in Gentoo. Gentoo package manager disallows installation, when it detects file collisions. If I rename libpython3.so of Python 3.2 to libpython3-3.2.so and libpython3.so of Python 3.3 to libpython3-3.3.so, then ldconfig will create libpython3.so symlink pointing to potentially wrong target library. This problem can be avoided by removing soname from libpython3.so, so whole -Wl,-h${soname} could be removed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11340] test_distutils fails
Brett Cannon br...@python.org added the comment: My mistake; missed the attachment. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11348] test_os: test_set_get_priority() fails when high niceness is set
New submission from Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: $ nice -n20 python3.3 -m test.test_os ... test_set_get_priority (__main__.ProgramPriorityTests) ... FAIL == FAIL: test_set_get_priority (__main__.ProgramPriorityTests) -- Traceback (most recent call last): File /usr/lib64/python3.3/test/test_os.py, line 1280, in test_set_get_priority self.assertEqual(os.getpriority(os.PRIO_PROCESS, os.getpid()), base + 1) AssertionError: 19 != 20 -- components: Tests messages: 129654 nosy: Arfrever, giampaolo.rodola priority: normal severity: normal status: open title: test_os: test_set_get_priority() fails when high niceness is set versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11348] test_os: test_set_get_priority() fails when high niceness is set
Giampaolo Rodola' g.rod...@gmail.com added the comment: Of course the test fails: a process can't have a nice value higher than a certain limit, which I think can vary depending on the UNIX variant in use. The fix is not to use nice -n20. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This would be an important fix-up if we could find some way to implement it. The basic problem is that the class object is defined after the class definitions have been made, so the target of the Graph reference isn't known when the method definitions are being compiled. One approach to solving this problem is to use a deferred/resolved pattern (creating a valid reference to Graph that is visible during method compilation, but gets filled-in with the other methods afterwards). I haven't thought this through completely but think it could be done if we let the compiler write to the class dictionary (this is normally off-limits and protected by a dict_proxy). If we let the system punch a hole in the proxy, it is possible to resolve deferred class definitions. Here's a concept sketch: class Prepared(type): 'Preload the class with a reference to itself' @classmethod def __prepare__(mcl, name, bases): return {name: type(name, bases, {})} def __new__(mcl, name, bases, mapping): global deferred_class tmpcls = super().__new__(mcl, name, bases, mapping) deferred_class = mapping[name] deferred_class.__dict__.update(tmpcls.__dict__) # XXX need writeable dict_proxy return deferred_class class Graph(metaclass=Prepared): def reverse(self) - Graph: ... -- nosy: +arigo, rhettinger, stutzbach resolution: rejected - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- Removed message: http://bugs.python.org/msg129656 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This would be an important fix-up if we could find some way to implement it. The basic problem is that the class object is defined after the class definitions have been made, so the target of the Graph reference isn't known when the method definitions are being compiled. One approach to solving this problem is to use a deferred/resolved pattern (creating a valid reference to Graph that is visible during method compilation, but gets filled-in with the other methods afterwards). I haven't thought this through completely but think it could be done if we let the compiler write to the class dictionary (this is normally off-limits and protected by a dict_proxy). If we let the system punch a hole in the proxy, it is possible to resolve deferred class definitions. Here's a concept sketch: class Prepared(type): 'Preload the class with a reference to itself' @classmethod def __prepare__(mcl, name, bases): return {name: type(name, bases, {})} def __new__(mcl, name, bases, mapping): tmpcls = super().__new__(mcl, name, bases, mapping) deferred_class = mapping[name] deferred_class.__dict__.update(tmpcls.__dict__) # XXX need writeable dict_proxy return deferred_class class Graph(metaclass=Prepared): -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11348] test_os: test_set_get_priority() fails when high niceness is set
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: I actually wanted to use 'nice -n19 python3.3 -m test.test_os', which also fails. Test suite of Python can be run be a package manager, which automatically sets high niceness. If niceness is high, then maybe this test could try to decrease it instead of increasing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- Removed message: http://bugs.python.org/msg129657 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: class Prepared(type): 'Preload the class with a reference to itself' @classmethod def __prepare__(mcl, name, bases): return {name: type(name, bases, {})} def __new__(mcl, name, bases, mapping): tmpcls = super().__new__(mcl, name, bases, mapping) deferred_class = mapping[name] deferred_class.__dict__.update(tmpcls.__dict__) # XXX need writeable dict_proxy return deferred_class class Graph(metaclass=Prepared): def reverse(self) - Graph: ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- Removed message: http://bugs.python.org/msg129659 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This would be an important fix-up if we could find some way to implement it. The basic problem is that the class object is defined after the class definitions have been made, so the target of the Graph reference isn't known when the method definitions are being compiled. One approach to solving this problem is to use a deferred/resolved pattern (creating a valid reference to Graph that is visible during method compilation, but gets filled-in with the other methods afterwards). I haven't thought this through completely but think it could be done if we let the compiler write to the class dictionary (this is normally off-limits and protected by a dict_proxy). If we let the system punch a hole in the proxy, it is possible to resolve deferred class definitions. class Prepared(type): 'Preload the class with a reference to itself' @classmethod def __prepare__(mcl, name, bases): return {name: type(name, bases, {})} def __new__(mcl, name, bases, mapping): tmpcls = super().__new__(mcl, name, bases, mapping) deferred_class = mapping[name] deferred_class.__dict__.update(tmpcls.__dict__) # XXX need writeable dict_proxy return deferred_class class Graph(metaclass=Prepared): def reverse(self) - Graph: ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Changes by Armin Rigo ar...@users.sourceforge.net: -- nosy: -arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11348] test_os: test_set_get_priority() fails when high niceness is set
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11333] Add empty __slots__ to collections.abc abstract base classes
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: It looks like everyone is in favor of the change. I'll apply the patch after adding some comments and tests. -- assignee: ncoghlan - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10154] locale.normalize strips - from UTF-8, which fails on Mac
Boris FELD lothiral...@gmail.com added the comment: Bug confirmed on python2.5+ and python3.2-. If it works with the dash, is agree with the Marc-Andre solution. -- nosy: +Boris.FELD versions: +Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5979] strptime() gives inconsistent exceptions
Filip Gruszczyński grusz...@gmail.com added the comment: But this is exactly how strptime in C. Consider this: #include time.h #include stdio.h #include stdlib.h #include string.h int main(){ char buf[255]; struct tm tm; memset(tm, 0, sizeof(tm)); strptime(123, %m%d, tm); strftime(buf, sizeof(buf), %d %b %Y %H:%M, tm); printf(%s\n, buf); return 0; } This produces output: 03 Dec 1900 00:00 Shouldn't it stay consistent with how C function works? -- nosy: +gruszczy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5979 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11333] Add empty __slots__ to collections.abc abstract base classes
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Until and unless this gets fixed, perhaps we should document some sort of workaround. One possibility is attached. -- Added file: http://bugs.python.org/file20940/annotations_workaround.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11333] Add empty __slots__ to collections.abc abstract base classes
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- Removed message: http://bugs.python.org/msg129664 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11333] Add empty __slots__ to collections.abc abstract base classes
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: Removed file: http://bugs.python.org/file20940/annotations_workaround.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11339] annotation for class being defined
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Until and unless this gets fixed, perhaps we should document some sort of workaround. One possibility is attached. -- Added file: http://bugs.python.org/file20941/annotations_workaround.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8933] Invalid detection of metadata version
Filip Gruszczyński grusz...@gmail.com added the comment: Here is a simple patch, that sets metadata version in PKG-INFO to 1.1, if finds classifier or download_url parametres in setup. If it's any good, I'll try to write a test. If not, I'll be happy to get some advice on how to provide a better one. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file20942/8933.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8933 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8933] Invalid detection of metadata version
Éric Araujo mer...@netwok.org added the comment: Thanks for your help. Tests would be very much appreciated; we don’t strictly follow the test-before-code method, but in this case it’s the best method to make sure we comply with the PEP: I can review the test against the PEP, then check if the unpatched code fails, apply a patch and check that it works. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8933 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11346] Generator object should be mentioned in gc module document
Atsuo Ishimoto ishim...@gembook.org added the comment: Oh, Not only try-finally block, generators contains try-except or with block will be added to gc.garbage. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Does the patch for issue11321 fix this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9197 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11321] 9th import of module _pickle always crashes
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch looks good. It may also fix issue9197, which fails in a similar fashion -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper
LW cjejuni2...@yahoo.com added the comment: hi eric: thanks for the reply. here is what i'm getting from 'patch --dry-run' command: les@Liquid:~/Desktop$ patch -i ~/Desktop/distutils_files.diff -d ~/Downloads/Python-3.2/Lib/distutils --dry-run --backup patching file bdist_wininst.py Hunk #1 FAILED at 245. 1 out of 1 hunk FAILED -- saving rejects to file bdist_wininst.py.rej patching file bdist_rpm.py Hunk #1 FAILED at 511. 1 out of 1 hunk FAILED -- saving rejects to file bdist_rpm.py.rej patching file upload.py Hunk #1 FAILED at 124. 1 out of 1 hunk FAILED -- saving rejects to file upload.py.rej patching file sdist.py Hunk #1 FAILED at 294. Hunk #2 FAILED at 359. 2 out of 2 hunks FAILED -- saving rejects to file sdist.py.rej patching file sysconfig.py les@Liquid:~/Desktop$ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11275] Linking to gcc's gomp causes crash later.
Hoyt Koepke hoy...@gmail.com added the comment: Okay, finally got to test this on a system with python 2.7.1+ (development branch, r88606, and indeed, the same crash occurs. This one was compiled from scratch with gcc 4.5.2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11275 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper
Éric Araujo mer...@netwok.org added the comment: Can you test with a checkout of the py3k branch? http://docs.python.org/devguide/setup#checking-out-the-code -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11321] 9th import of module _pickle always crashes
Nick Coghlan ncogh...@gmail.com added the comment: While Andreas's patch does indeed prevent the crash, there is something more going on here. I modified his patch to print out the reference counts immediately after the new INCREF commands. With the INCREF commands commented out, it looks like this: ~/devel/py3k$ ./issue113213.3 START Try import #0 ...Initialising _pickle Pickler type references: 10 Unpickler type references: 8 Module initialised SUCCESS Try import #1 ...Initialising _pickle Pickler type references: 10 Unpickler type references: 8 Module initialised SUCCESS Try import #2 ...Initialising _pickle Pickler type references: 9 Unpickler type references: 7 Module initialised SUCCESS Try import #3 ...Initialising _pickle Pickler type references: 8 Unpickler type references: 6 Module initialised SUCCESS Try import #4 ...Initialising _pickle Pickler type references: 7 Unpickler type references: 5 Module initialised SUCCESS Try import #5 ...Initialising _pickle Pickler type references: 6 Unpickler type references: 4 Module initialised SUCCESS Try import #6 ...Initialising _pickle Pickler type references: 5 Unpickler type references: 3 Module initialised SUCCESS Try import #7 ...Initialising _pickle Pickler type references: 4 Unpickler type references: 2 Module initialised SUCCESS Try import #8 ...Initialising _pickle Pickler type references: 3 Unpickler type references: 1 Module initialised Segmentation fault Note that it does the right thing the first time Py_Finalize is called, but the reference counts start going down after that. When the INCREF is included, the count goes up initially and then levels out. So I believe the simple patch is just masking the problem instead of fixing it. The correct answer is to follow the documentation and implement the module finalisation protocol for _pickle (i.e. move all the static globals into the module struct and implement module traversal and finalisation functions). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11321] 9th import of module _pickle always crashes
Andreas Stührk andy-pyt...@hammerhartes.de added the comment: That initial increase you can see happens because the module's dict is copied in `_PyImport_FixupExtensionUnicode()`. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize
Nick Coghlan ncogh...@gmail.com added the comment: Merging this into issue11321 since that relates to the same underlying problem and includes a simpler test case. -- nosy: +ncoghlan resolution: - duplicate status: open - closed superseder: - 9th import of module _pickle always crashes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9197 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11349] _pickle should implement the module finalisation protocol
New submission from Nick Coghlan ncogh...@gmail.com: As discussed in issue11321, _pickle allocates a number of module level objects, but doesn't use the appropriate PEP 3121 mechanisms to manage their lifecycle. It should be updated to follow the relevant development guidelines in the documentation. -- components: Extension Modules messages: 129677 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: _pickle should implement the module finalisation protocol type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +barry, dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11349] _pickle should implement the module finalisation protocol
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11321] 9th import of module _pickle always crashes
Nick Coghlan ncogh...@gmail.com added the comment: Looking at the example of _struct.c, I'll withdraw my objection to the patch. The segfault is due to the attempt to destroy a statically allocated type object, and the only viable solution to that is to ensure the reference count never drops to 0, even during Py_Finalize. I also created issue11349 to cover the fact that _pickle really shouldn't be stashing things in static globals now that a better alternative is available. -- nosy: +loewis versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11349] _pickle should implement the module finalisation protocol
Benjamin Peterson benja...@python.org added the comment: Unfortunately proper module finalization is an invitation to more segfaults because modules can be finalized before objects in them are, resulting in segfaults when its attempted to access modules. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: [issue11283] incorrect pattern in the re module docs for conditional regex
On Tue, Feb 22, 2011 at 08:48:20AM +, wesley chun wrote: The fix is to add the end char '$' to the regex to get all 4 working: Better would be a regex for white-space '\s' which would achieve the same purpose plus it would satisfy the other requirement for using it with search and can do the search in-middle of the document too. ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper
LW cjejuni2...@yahoo.com added the comment: seemed no errors. end of check attach: U py3k Checked out revision 88674. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Martin v. Löwis mar...@v.loewis.de added the comment: Having the soname be libpython3 is the whole point of the library, it serves no other reason. It is intentional that there are file collisions with that file, and either the local admin or the distributor must make an explicit choice which libpython3 should be installed; it should be the one that corresponds to /usr/bin/python (if you install it into /usr/lib). As for file20939: it's GNU-ld-specific, so it likely breaks if the linker is not GNU ld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11347] libpython3.so: Broken soname and linking
Georg Brandl ge...@python.org added the comment: The -hl - -h part seems correct though. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11348] test_os: test_set_get_priority() fails when high niceness is set
Charles-Francois Natali neolo...@free.fr added the comment: If niceness is high, then maybe this test could try to decrease it instead of increasing. You must be root or have CAP_SYS_NICE to do that. -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com