[issue1182143] making builtin exceptions more informative

2009-11-05 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: rhettinger - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1182143 ___

[issue7224] One obvious way to do interning

2009-11-05 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The basic problem here is that the one obvious way to some people (including me and Martin v. Löwis) is to use a dictionary. Further, there is the problem of conflating types in a user's mind -- right now, dictionaries are

[issue1294959] Problems with /usr/lib64 builds.

2009-11-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: If I understand correctly, using lib32 or lib64 is a kludge. Debian and Ubuntu want to come up with a better way to do this: http://wiki.debian.org/ReleaseGoals/MultiArch https://wiki.ubuntu.com/MultiarchSpec Kind regards. -- nosy:

[issue7265] IDLE not working

2009-11-05 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Closing as resolved, then. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7265 ___

[issue7212] Retrieve an arbitrary element from a set without removing it

2009-11-05 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I don't want to pollute python-dev with more hopeless ideas, but I wonder if itertools could grow an efficient C-implemented def first(collection): return next(iter(collection)) On the other hand, it probably belongs

[issue7212] Retrieve an arbitrary element from a set without removing it

2009-11-05 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: After a long discussion on python-dev, this proposal is rejected in favor of adding documentation notes on the ways to non-destructively retrieve an arbitrary item from a set or frozenset. Here is an except from the end of

[issue7224] One obvious way to do interning

2009-11-05 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Nov 5, 2009 at 2:16 PM, Raymond Hettinger rep...@bugs.python.org wrote: Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The basic problem here is that the one obvious way to some people

[issue7224] One obvious way to do interning

2009-11-05 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: That is a false optimization. Regular python code is full of look-ups (even set.add has a getattr(s, 'add') lookup just to find the add-method; every call to a built-in typically goes through multiple lookups). Also, the

[issue7224] One obvious way to do interning

2009-11-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I agree with Raymond here. This use case isn't special enough, or the performance of the current one way to do it bad enough to warrant changing set. I recommend closing this issue. -- nosy: +eric.smith

[issue7224] One obvious way to do interning

2009-11-05 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Nov 5, 2009 at 3:23 PM, Raymond Hettinger rep...@bugs.python.org wrote: .. Martin has already rejected a similar proposal for similar reasons. Please drop this one. Sure. In fact I've never proposed to apply

[issue7224] One obvious way to do interning

2009-11-05 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Thank you. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7224 ___

[issue7266] test_lib2to3 failure under Windows

2009-11-05 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I think we need someone with access to windows to propose a patch. -- assignee: benjamin.peterson - components: +Windows ___ Python tracker rep...@bugs.python.org

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
New submission from flashk fla...@gmail.com: I recently ran 2to3 on some of my scripts and noticed a change in behavior. I had a script that used the built-in execfile function. After the conversion, it was changed to manually open the file and read the contents into the exec function. Now I

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Could you attach the files separately or paste them into the bug? zip files are hard to work with. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
Changes by flashk fla...@gmail.com: Added file: http://bugs.python.org/file15268/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7268 ___ ___

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
Changes by flashk fla...@gmail.com: Added file: http://bugs.python.org/file15269/execfile_example.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7268 ___

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
Changes by flashk fla...@gmail.com: Added file: http://bugs.python.org/file15270/execfile_example_converted.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7268 ___

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
flashk fla...@gmail.com added the comment: I just attached the files individually. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7268 ___ ___

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: test.py is invalid Python 3 syntax. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7268

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
flashk fla...@gmail.com added the comment: I'm running this code under 2.6, so the print statement should not be the issue. I've attached a new version of test.py that simply performs a variable assignment and I still get the syntax error on both 2.6 and 3.1 with the exec function. Also, the

[issue3001] RLock's are SLOW

2009-11-05 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - pitrou components: -Interpreter Core stage: patch review - needs patch versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3001

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: This is because you have DOS newlines which the Python compiler cannot handle. In 2.x, open(test.py, r) does not translate newlines. In 3.x, it does. -- ___ Python tracker

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
flashk fla...@gmail.com added the comment: Ok, I converted test.py to use Unix style newlines and still get the syntax error on both 2.6 and 3.1. I'm confused as to why execfile works on the file but reading the contents and passing it to exec behaves differently under 2.6. Sorry if I'm just

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2009/11/5 flashk rep...@bugs.python.org: flashk fla...@gmail.com added the comment: Ok, I converted test.py to use Unix style newlines and still get the syntax error on both 2.6 and 3.1. I'm confused as to why execfile works on the

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
flashk fla...@gmail.com added the comment: Ok, but why am I still getting a syntax error in both 2.6 and 3.1 on the file, even after converting the newlines? If I remove the trailing indentation then everything works properly on 2.6 and 3.1, even with DOS newlines. It just seems that exec

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2009/11/5 flashk rep...@bugs.python.org: flashk fla...@gmail.com added the comment: Ok, but why am I still getting a syntax error in both 2.6 and 3.1 on the file, even after converting the newlines? If I remove the trailing

[issue6462] bsddb3 intermittent test failures

2009-11-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The deadlock error is still there, so I'm leaving this open, but it is no longer causing buildbot instability. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6462

[issue6462] bsddb3 intermittent test failures

2009-11-05 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: -buildbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6462 ___ ___

[issue7266] test_lib2to3 failure under Windows

2009-11-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Benjamin disabled this test on windows so it is no longer causing the buildbot to fail. -- components: +Tests keywords: +easy -buildbot nosy: +r.david.murray priority: normal - low stage: - needs patch

[issue3892] bsddb: test01_basic_replication fails on Windows sometimes

2009-11-05 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: -buildbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3892 ___ ___

[issue6748] test_debuglevel from test_telnetlib.py fails

2009-11-05 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: +buildbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6748 ___ ___

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
flashk fla...@gmail.com added the comment: On Thu, Nov 5, 2009 at 5:48 PM, Benjamin Peterson rep...@bugs.python.orgwrote: Well, it works for me with the empty newline. Can you isolate the exact problem? For me, the exact problem seems to be that exec raises a SyntaxError if the code

[issue7175] unify pydistutils.cfg and distutils.cfg and use .local

2009-11-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: When ~/.local/lib was chosen for the user directory, the BaseDir Spec was given as prior example. Why not go the full way and follow the spec? The config file could be $XDG_CONFIG_HOME/python/distutils, with $XDG_CONFIG_HOME defaulting to

[issue7268] 2to3 execfile conversion changes behavior

2009-11-05 Thread flashk
flashk fla...@gmail.com added the comment: I noticed that calling exec('\t') raises a SyntaxError, so maybe this is the root of the problem. I manually added a newline character to the end of the file contents and it fixes the issue for me: exec(compile(open('test.py').read()+'\n', 'test.py',