[issue14656] Add a macro for unreachable code

2012-04-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14655] traceback module docs should show how to print/fomat an exception object

2012-04-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Why not reuse format_exception(exc)? in 2.7 you could write "raise type, value, traceback", or "raise value". I suggest that traceback.format_exception take the same route, and accept both (type, value, traceback) and (value). -- nosy: +amaury.fo

[issue14080] Sporadic test_imp failure

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Happened again on one of the Windows buildbots: http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/6436/steps/test/logs/stdio == FAIL: test_package___file__ (test.test_im

[issue14080] Sporadic test_imp failure

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some entries in sys.path_importer_cache are named _frozen_importlib.FileFinder, and others are named importlib._bootstrap.FileFinder. Isn't that a bit worrying? Two copies of importlib are loaded in memory? (and functioning independently?) -- __

[issue14656] Add a macro for unreachable code

2012-04-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: What's the specific warning that you want to eliminate? -- nosy: +loewis ___ Python tracker ___ __

[issue14656] Add a macro for unreachable code

2012-04-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2012/4/23 Martin v. Löwis : > > Martin v. Löwis added the comment: > > What's the specific warning that you want to eliminate? "control reaches end of non-void function without return" Basically, whenever you see "assert(0)" today. -- ___

[issue14657] Avoid two importlib copies

2012-04-23 Thread Antoine Pitrou
New submission from Antoine Pitrou : This patch avoids creating a second copy of importlib._bootstrap when a first one exists as _frozen_importlib. This isn't perfect as it mutates the module when importlib is imported for the first time, but I think it's better than the status quo. Also, impor

[issue14657] Avoid two importlib copies

2012-04-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file25328/unique_importlib.patch ___ Python tracker ___ ___ Python-bugs-list

[issue14657] Avoid two importlib copies

2012-04-23 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue14657] Avoid two importlib copies

2012-04-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file25329/unique_importlib.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue14656] Add a macro for unreachable code

2012-04-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: >> What's the specific warning that you want to eliminate? > > "control reaches end of non-void function without return" > > Basically, whenever you see "assert(0)" today. Sorry, what I meant is: what specific line (in what specific source file) is that warnin

[issue14657] Avoid two importlib copies

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch with tests. -- Added file: http://bugs.python.org/file25330/unique_importlib2.patch ___ Python tracker ___ __

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-23 Thread Albert Zeyer
New submission from Albert Zeyer : ``` class Foo1(dict): def __getattr__(self, key): return self[key] def __setattr__(self, key, value): self[key] = value class Foo2(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ o1 = Foo1() o1.x = 42 print(o1, o1.x) o2 =

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue14657] Avoid two importlib copies

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch also avoids calling _setup() a second time (which can be annoying since _setup() has a list.append() call somewhere). -- Added file: http://bugs.python.org/file25331/unique_importlib3.patch ___ Python trac

[issue14656] Add a macro for unreachable code

2012-04-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2012/4/23 Martin v. Löwis : > > Martin v. Löwis added the comment: > >>> What's the specific warning that you want to eliminate? >> >> "control reaches end of non-void function without return" >> >> Basically, whenever you see "assert(0)" today. > > Sorry, w

[issue14655] traceback module docs should show how to print/fomat an exception object

2012-04-23 Thread R. David Murray
R. David Murray added the comment: Sounds OK to me, though I am worried others will think that kind of variable signature (where the type of the first argument depends on the number of arguments passed) is bad. -- ___ Python tracker

[issue14656] Add a macro for unreachable code

2012-04-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Right, we currently avoid this problem by writing "assert(0)" for > example in lookdict_split in dictobject.c. What I'm saying is that > instead writing "assert(0)", we could use Py_UNREACHABLE. I don't understand. The assert(0) is not there to silence any c

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Changes by Chris Rebert : Added file: http://bugs.python.org/file25332/shutil_open.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue14657] Avoid two importlib copies

2012-04-23 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14657] Avoid two importlib copies

2012-04-23 Thread Brett Cannon
Brett Cannon added the comment: So why the mutation? Are you that worried someone is going to import importlib._bootstrap directly? This also costs in development complexity because not only do you have to run 'make' to get changes to be testable, but it also leads to difficult debugging sit

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I still get conflicts: $ patch -p0 < imaplib_Internaldate2tuple_dst_fix_python32.patch patching file Lib/imaplib.py Hunk #2 FAILED at 1312. Hunk #3 succeeded at 1347 (offset 8 lines). Hunk #4 FAILED at 1379. 2 out of 4 hunks FAILED -- saving rejects to

[issue8427] toplevel jumps to another location on the screen

2012-04-23 Thread Andrei Paraschivescu
Andrei Paraschivescu added the comment: "python jumpBug.py" creates two windows, "root" and "other". If the first thing you do is click on "other", then hit , the printed geometry string will show the position of the window "root". By contrast, if you first click on "root", then on "other", f

[issue14605] Make import machinery explicit

2012-04-23 Thread Brett Cannon
Brett Cannon added the comment: Updated patch for an explicit sys.path_hooks that simply tweaks the test_cmd_line_script tests to stop requiring an absolute path on the files and instead verifies that the relative paths are legit. It also adds warnings when None is found in sys.path_importer_

[issue14080] Sporadic test_imp failure

2012-04-23 Thread Brett Cannon
Brett Cannon added the comment: Issue #14657 is tracking the discussion of _frozen_importlib/importlib._bootstrap. -- ___ Python tracker ___ ___

[issue14657] Avoid two importlib copies

2012-04-23 Thread Brett Cannon
Brett Cannon added the comment: I should also mention that all of this becomes much less important once issue #14605 is finished because at that point sys.meta_path and sys.path_hooks will have _frozen_importlib objects and that will be what importlib works off of directly. But I still unders

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: It's a CPython bug. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue8427] toplevel jumps to another location on the screen

2012-04-23 Thread Ned Deily
Ned Deily added the comment: Thanks for supplying the test case. I can reproduce the incorrect behavior by using Python 2.7 and the Apple-supplied system Tcl/Tk 8.4 on OS X 10.4. But if a current ActiveState Tcl/Tk 8.4 is used with the same Python and OS X, the correct behavior is seen. The

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-23 Thread Joe Peterson
Joe Peterson added the comment: The one you tried is the old patch. Here are the two new patches. Use these: Python 2: issue10941_python2.diff Python 3: issue10941_python3.diff -- ___ Python tracker ___

[issue8427] toplevel jumps to another location on the screen

2012-04-23 Thread Andrei Paraschivescu
Andrei Paraschivescu added the comment: Ned, thanks for the quick response. I will give that a go. -- ___ Python tracker ___ ___ Pytho

[issue14605] Make import machinery explicit

2012-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: I put those explicit path checks in there deliberately. I really don't want to go back to having any __file__ attributes that are sensitive to sys.path changes. -- ___ Python tracker

[issue14605] Make import machinery explicit

2012-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: Oops: s/sensitive to sys.path changes/sensitive to current working directory changes/ -- ___ Python tracker ___

[issue14657] Avoid two importlib copies

2012-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: My preference would also be for _frozen_importlib._bootstrap to overwrite as much evidence of itself as it can with the "real" one. This would also mean that changes to importlib._bootstrap would actually take effect for user code almost immediately, *without*

[issue14657] Avoid two importlib copies

2012-04-23 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14369] make __closure__ writable

2012-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: Another use case for a writeable __closure__ attribute is to make it possible to manually break reference cycles: http://blog.ccpgames.com/kristjan/2012/04/23/reference-cycles-with-closures/ -- ___ Python tracker

[issue14655] traceback module docs should show how to print/fomat an exception object

2012-04-23 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14647] imp.reload() on a package leads to a segfault or a GC assertion failure

2012-04-23 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue13959] Re-implement parts of imp in pure Python

2012-04-23 Thread Eric Snow
Eric Snow added the comment: updated patch for magic number support in imp/importlib -- Added file: http://bugs.python.org/file25335/issue13959_magic.diff ___ Python tracker ___

[issue13959] Re-implement parts of imp in pure Python

2012-04-23 Thread Eric Snow
Eric Snow added the comment: updated patch for moving TAG to importlib/imp.py -- Added file: http://bugs.python.org/file25336/issue13959_tag.diff ___ Python tracker ___

[issue14659] HP multi-thread environment python core in PyObject_GC_UnTrack

2012-04-23 Thread frank
New submission from frank : #0 0x1dbaa480:0 in PyObject_GC_UnTrack () at Modules/gcmodule.c:1149 1149Modules/gcmodule.c: No such file or directory. in Modules/gcmodule.c (gdb) where #0 0x1dbaa480:0 in PyObject_GC_UnTrack () at Modules/gcmodule.c:1149 #1 0x1d

<    1   2