[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-27 Thread Vinay Sajip
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

[issue11344] Add height argument to os.path.dirname()

2011-02-27 Thread blokeley
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

[issue7833] Bdist_wininst installers fail to load extensions built with Issue4120 patch

2011-02-27 Thread Christoph Gohlke
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

[issue10880] do_mkvalue and 'boolean'

2011-02-27 Thread Amaury Forgeot d'Arc
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

[issue10880] do_mkvalue and 'boolean'

2011-02-27 Thread Yuriy
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

[issue11256] inspect.getcallargs raises TypeError on valid arguments

2011-02-27 Thread Daniel Urban
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:

[issue10880] do_mkvalue and 'boolean'

2011-02-27 Thread Yuriy
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

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
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

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
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

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
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

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Nick Coghlan
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

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Andreas Stührk
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

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-27 Thread Jonas H.
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

[issue11329] PyEval_InitThreads() not safe before Py_Initialize()

2011-02-27 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11329 ___ ___

[issue11329] PyEval_InitThreads() not safe before Py_Initialize()

2011-02-27 Thread STINNER Victor
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 ___

[issue11345] Fix a link in library/json docs

2011-02-27 Thread Jonas H.
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

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-27 Thread Antoine Pitrou
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) =

[issue11346] Generator object should be mentioned in gc module document

2011-02-27 Thread Atsuo Ishimoto
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:

[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper

2011-02-27 Thread Éric Araujo
É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:

[issue11314] Subprocess suffers 40% process creation overhead penalty

2011-02-27 Thread Charles-Francois Natali
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

[issue11345] Fix a link in library/json docs

2011-02-27 Thread Benjamin Peterson
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 ___

[issue11344] Add height argument to os.path.dirname()

2011-02-27 Thread R. David Murray
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

[issue11344] Add height argument to os.path.dirname()

2011-02-27 Thread Antoine Pitrou
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

[issue4600] __class__ assignment: new-style? heap? == confusing

2011-02-27 Thread Daniel Stutzbach
Changes by Daniel Stutzbach stutzb...@google.com: -- nosy: +stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4600 ___ ___ Python-bugs-list

[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper

2011-02-27 Thread Andreas Stührk
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

[issue4600] __class__ assignment: new-style? heap? == confusing

2011-02-27 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4600 ___ ___

[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper

2011-02-27 Thread Éric Araujo
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 ___

[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper

2011-02-27 Thread Éric Araujo
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 ___

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-27 Thread Jonas H.
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

[issue11282] 3.3 unittest document not kept consist with code

2011-02-27 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11282 ___

[issue11140] threading.Lock().release() raises _thread.error, not RuntimeError

2011-02-27 Thread Filip Gruszczyński
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

[issue11344] Add height argument to os.path.dirname()

2011-02-27 Thread R. David Murray
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

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Guido van Rossum
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

[issue4600] __class__ assignment: new-style? heap? == confusing

2011-02-27 Thread Jonas H.
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

[issue9931] test_ttk_guionly hangs on XP5

2011-02-27 Thread Antoine Pitrou
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

[issue10880] do_mkvalue and 'boolean'

2011-02-27 Thread Dj Gilcrease
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

[issue10880] do_mkvalue and 'boolean'

2011-02-27 Thread Dj Gilcrease
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 ___

[issue4600] __class__ assignment: new-style? heap? == confusing

2011-02-27 Thread Benjamin Peterson
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'

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2011-02-27 Thread Ezio Melotti
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

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-27 Thread Oliver Drake
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

[issue11347] libpython3.so: Broken soname and linking

2011-02-27 Thread Arfrever Frehtes Taifersar Arahesis
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

[issue11347] libpython3.so: Broken soname and linking

2011-02-27 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-27 Thread Brett Cannon
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. -- ___

[issue11340] test_distutils fails

2011-02-27 Thread Brett Cannon
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

[issue11347] libpython3.so: Broken soname and linking

2011-02-27 Thread Arfrever Frehtes Taifersar Arahesis
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

[issue11340] test_distutils fails

2011-02-27 Thread Brett Cannon
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 ___

[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread Arfrever Frehtes Taifersar Arahesis
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

[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread Giampaolo Rodola'
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. -- ___

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
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

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
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 ___

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
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

[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread Arfrever Frehtes Taifersar Arahesis
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

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
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 ___

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
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):

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
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 ___

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
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

[issue11339] annotation for class being defined

2011-02-27 Thread Armin Rigo
Changes by Armin Rigo ar...@users.sourceforge.net: -- nosy: -arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list

[issue11339] annotation for class being defined

2011-02-27 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11339 ___ ___ Python-bugs-list

[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11348 ___ ___

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
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

[issue10154] locale.normalize strips - from UTF-8, which fails on Mac

2011-02-27 Thread Boris FELD
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

[issue5979] strptime() gives inconsistent exceptions

2011-02-27 Thread Filip Gruszczyński
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,

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
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

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
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 ___

[issue11333] Add empty __slots__ to collections.abc abstract base classes

2011-02-27 Thread Raymond Hettinger
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 ___

[issue11339] annotation for class being defined

2011-02-27 Thread Raymond Hettinger
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

[issue8933] Invalid detection of metadata version

2011-02-27 Thread Filip Gruszczyński
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

[issue8933] Invalid detection of metadata version

2011-02-27 Thread Éric Araujo
É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

[issue11346] Generator object should be mentioned in gc module document

2011-02-27 Thread Atsuo Ishimoto
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

[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-02-27 Thread Amaury Forgeot d'Arc
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 ___

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Amaury Forgeot d'Arc
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

[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper

2011-02-27 Thread LW
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

[issue11275] Linking to gcc's gomp causes crash later.

2011-02-27 Thread Hoyt Koepke
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

[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper

2011-02-27 Thread Éric Araujo
É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

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
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

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Andreas Stührk
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

[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-02-27 Thread Nick Coghlan
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

[issue11349] _pickle should implement the module finalisation protocol

2011-02-27 Thread Nick Coghlan
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

[issue11347] libpython3.so: Broken soname and linking

2011-02-27 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +barry, dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11347 ___ ___ Python-bugs-list

[issue11349] _pickle should implement the module finalisation protocol

2011-02-27 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11349 ___ ___

[issue11321] 9th import of module _pickle always crashes

2011-02-27 Thread Nick Coghlan
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

[issue11349] _pickle should implement the module finalisation protocol

2011-02-27 Thread Benjamin Peterson
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

Re: [issue11283] incorrect pattern in the re module docs for conditional regex

2011-02-27 Thread Senthil Kumaran
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

[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper

2011-02-27 Thread LW
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 ___

[issue11347] libpython3.so: Broken soname and linking

2011-02-27 Thread Martin v . Löwis
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

[issue11347] libpython3.so: Broken soname and linking

2011-02-27 Thread Georg Brandl
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 ___

[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-27 Thread Charles-Francois Natali
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