[issue15476] Add code object to glossary

2012-09-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: That's fine by me. I guess what's more important to me is that code object have a central, linkable definition *somewhere* (and not necessarily that this somewhere be a glossary entry). That way references to code object in the docs can link to a definition

[issue15861] ttk.Treeview unmatched open brace in list

2012-09-05 Thread Ned Deily
Ned Deily added the comment: What behavior do you expect? By accident, I found your reply to this StackOverflow question. I take it from that that you think tkinter should be quoting curly braces found in strings. If that is what you mean, can you specify the set of characters that need to

[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-09-05 Thread Ned Deily
Ned Deily added the comment: The problem is a regression in the latest version of ActiveTcl 8.5 for OS X, specifically 8.5.12.1 (and I believe the previous version 8.5.12.0). It has nothing directly to do with Python or how you might build Python other than whether _tkinter.so dynamically

[issue15865] reflect bare star * in function signature documentation

2012-09-05 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +eric.araujo, georg.brandl stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15865 ___

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-05 Thread Alessandro Moura
Alessandro Moura added the comment: I just emailed my contributor's agreement. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15841 ___ ___

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: If sysconfig._generate_posix_vars() creates the build directory and pybuilddir.txt (instead of setup.py) then it could write _sysconfigdata.py in the correct place. Then setup.py would not have to mess with its own sys.path. One issue with having

[issue15861] ttk.Treeview unmatched open brace in list

2012-09-05 Thread Bryan Oakley
Bryan Oakley added the comment: What behavior do I expect? I expect it to not throw an error. I expect whatever string I give to be inserted into the widget unadulterated (ie: if I give the string foo { I expect to see foo { in the widget). Tkinter is effectively telling me you have a Tcl

[issue15861] ttk.Treeview unmatched open brace in list

2012-09-05 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15861 ___ ___

[issue14847] AttributeError: NoneType has no attribute 'utf_8_decode'

2012-09-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've removed the invocation of the wrapper code in our project, but the issue has not exhibited itself. This leads me to suspect a few possibilities of things that have changed since we had the issue in June: 1) Distribute was updated with its fix for this

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-05 Thread Lars Gustäbel
Lars Gustäbel added the comment: Could you provide some sample data and code? I see the problem, but I cannot quite reproduce the behaviour you describe. In all of my testcases tarfile either throws an exception or successfully reads the archive, but never silently stops. --

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Alternative patch. -- Added file: http://bugs.python.org/file27122/alt_sysconfigdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15298 ___

[issue15861] ttk.Treeview unmatched open brace in list

2012-09-05 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Bryan. Further, if the string is being interpreted as Tcl, then this strikes me as a possible injection attack vector (although I'll admit to not having looked at the code to see how the Tcl code is being used and/or interpreted). --

[issue15533] subprocess.Popen(cwd) documentation

2012-09-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is a proposed patch that attempts to minimize the chance of test breakage for Tru64. The patch follows Martin's recommendation on python-dev of being cautious by following existing code. -- Added file:

[issue15865] reflect bare star * in function signature documentation

2012-09-05 Thread Éric Araujo
Éric Araujo added the comment: So is the root problem that Sphinx does not handle keyword-only arguments? -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15865 ___

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Éric Araujo
Éric Araujo added the comment: I did not test the patch but it does not look bad. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15298 ___ ___

[issue15865] reflect bare star * in function signature documentation

2012-09-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: So is the root problem that Sphinx does not handle keyword-only arguments? I don't think so. Sphinx renders the * just fine. It's just that in some of the reST files, the * was left out. -- ___ Python tracker

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-09-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've closed the issue as 'wont fix' because llvm-gcc will miscompile 3.3 due to bugs in that compiler. CPython won't work around that compiler bug (if that's even possible). The workaround: use clang to compile (and on older OSX releases use a different

[issue15865] reflect bare star * in function signature documentation

2012-09-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: Actually, it looks like configparser is the *only* file with missing single *'s. :) However, I did find a few other typos in the process of checking those signatures in the other files. Patch attached. -- keywords: +patch Added file:

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Matthias Klose
Matthias Klose added the comment: looks ok, two issues are: builddir should have added +(-pydebug if hasattr(sys, gettotalrefcount) else ) the installation installs this to the lib-dynload directory, which maybe is not desired. -- ___ Python

[issue15865] reflect bare star * in function signature documentation

2012-09-05 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- keywords: +needs review stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15865 ___

[issue15861] ttk.Treeview unmatched open brace in list

2012-09-05 Thread Ned Deily
Ned Deily added the comment: I agree as well. The bigger question is, as Eric suggests, is this the only such case when mapping between Python and Tcl elements? Since Bryan is a well-known Tcl and Tkinter expert, his insights on that would be very useful. --

[issue15775] Add StopParser() to expat

2012-09-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Below is a sample script that shows that it's possible to stop parsing XML in the middle, without an explicit call to XML_StopParser(): raise StopParsing from any handler, and catch it around the Parse() call. This method covers the two proposed use

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: builddir should have added +(-pydebug if hasattr(sys, gettotalrefcount) else ) Oops, yes. the installation installs this to the lib-dynload directory, which maybe is not desired. The lines + -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py +

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Updated patch. -- Added file: http://bugs.python.org/file27125/alt_sysconfigdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15298 ___

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: Removed file: http://bugs.python.org/file27125/alt_sysconfigdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15298 ___

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Try again. -- Added file: http://bugs.python.org/file27126/alt_sysconfigdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15298 ___

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: Added file: http://bugs.python.org/file27127/alt_sysconfigdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15298 ___

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: Removed file: http://bugs.python.org/file27126/alt_sysconfigdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15298 ___

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: Removed file: http://bugs.python.org/file27122/alt_sysconfigdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15298 ___

[issue15842] Some SocketIO methods can succeed after close()

2012-09-05 Thread Alessandro Moura
Alessandro Moura added the comment: This patch fixes the problem, making those methods raise a ValueError exception after close. I also added one test case for this issue. -- keywords: +patch nosy: +eng793 Added file: http://bugs.python.org/file27128/socket.patch

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 524931e5aebf by Antoine Pitrou in branch '3.2': Issue #15841: The readable(), writable() and seekable() methods of BytesIO http://hg.python.org/cpython/rev/524931e5aebf New changeset fcf097cb5f6b by Antoine Pitrou in branch 'default': Issue #15841:

[issue15841] Some StringIO and BytesIO methods can succeed after close

2012-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I have now committed the patch. Thank you again! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15841

[issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs

2012-09-05 Thread Wim
New submission from Wim: Encoding a (well-formed) Unicode string containing a non-BMP character, using the xmlcharrefreplace error handler, will produce two XML entities for surrogate codepoints instead of one entity for the actual character. Here's a transcript (Python 2.7.3, x86_64): b

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-05 Thread Tom Lynn
Tom Lynn added the comment: See attached bad.tar. $ less bad.tar | cat drwxr-xr-x 0/0 0 2012-09-05 20:04 foo/ -rw-rw-r-- uname/gname 0 2012-09-05 20:04 foo/a $ python -c 'import tarfile; print(tarfile.open(bad.tar).getnames())' ['foo'] $ python -c 'import tarfile, patch;

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-05 Thread Tom Lynn
Tom Lynn added the comment: patch.py attached - what I'm using as a workaround at the moment. -- Added file: http://bugs.python.org/file27130/patch.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15858

[issue13992] Segfault in PyTrash_destroy_chain

2012-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a2ef447b80d by Antoine Pitrou in branch '2.7': Issue #13992: The trashcan mechanism is now thread-safe. This eliminates http://hg.python.org/cpython/rev/5a2ef447b80d -- nosy: +python-dev ___ Python

[issue13992] Segfault in PyTrash_destroy_chain

2012-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset e72cda3f40a2 by Antoine Pitrou in branch '3.2': Issue #13992: The trashcan mechanism is now thread-safe. This eliminates http://hg.python.org/cpython/rev/e72cda3f40a2 New changeset 6bcaba9e8df2 by Antoine Pitrou in branch 'default': Issue #13992:

[issue13992] Segfault in PyTrash_destroy_chain

2012-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Georg, I think this should go in 3.3.0, what do you think? -- resolution: - fixed stage: patch review - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992

[issue15535] Fix pickling efficiency of named tuples in 2.7.3

2012-09-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Adding def __getstate__(self): return None to the namedtuple template fixes the issue. Here is a patch with test. -- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file27131/namedtuple-pickle.diff

[issue13992] Segfault in PyTrash_destroy_chain

2012-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oops, forgot to make Georg nosy. Georg, I think this should go in 3.3.0, what do you think? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992

[issue13992] Segfault in PyTrash_destroy_chain

2012-09-05 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- Removed message: http://bugs.python.org/msg169891 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___

[issue13992] Segfault in PyTrash_destroy_chain

2012-09-05 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +benjamin.peterson priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-09-05 Thread STINNER Victor
STINNER Victor added the comment: I'm working on a AST optimizer for Python 2.6-3.3: https://bitbucket.org/haypo/astoptimizer It is implemented in Python and is able to optimize much more cases than the current bytecode peepholer. -- nosy: +haypo

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-09-05 Thread Nick Coghlan
Nick Coghlan added the comment: All of the optimisations that assume globals haven't been shadowed or rebound are invalid in the general case. E.g. print(1.5) and print(1.5) are valid for *our* print function, but we technically have no idea if they're equivalent in user code. In short, if

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-09-05 Thread STINNER Victor
STINNER Victor added the comment: All of the optimisations that assume globals haven't been shadowed or rebound are invalid in the general case. My main idea is that the developer of the application should be able to annotate functions and constants to declare them as optimizable (constant).

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-09-05 Thread STINNER Victor
STINNER Victor added the comment: Any stdlib AST optimiser would need to be substantially more conservative by default. FYI The test suite of Python 2.7 and 3.3 pass with astoptimizer... except some minor (?) failures: * test_math fails for the reason explained above * test_pdb: it looks

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-09-05 Thread Nick Coghlan
Nick Coghlan added the comment: No, you're assuming global program analysis and *that is not a valid assumption*. One of the key features of Python is that *monkeypatching works*. It's not encouraged, but it works. You simply cannot play games with name lookups like this without creating

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-09-05 Thread Nick Coghlan
Nick Coghlan added the comment: You also have to be very careful of the interface to tracing functions, such as profilers and coverage analysis tools. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11549

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-09-05 Thread Eugene Toder
Eugene Toder added the comment: Method calls on literals are always fair game, though (e.g. you could optimise a b c.split()) What about optimizations that do not change behavior, except for different error messages? E.g. we can change y = [1,2][x] to y = (1,2)[x] where the tuple is constant

[issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs

2012-09-05 Thread Julian Berman
New submission from Julian Berman: I find that the importlib documentation is a bit too low level. Import hooks are not that common, so requiring a bit of reading is OK with me, but I somewhat *understand* PEP 302, so I have a general idea of *what* I want to do and what kind of objects can

[issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs

2012-09-05 Thread Julian Berman
Changes by Julian Berman julian+python@grayvines.com: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15867 ___ ___

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-09-05 Thread Nick Coghlan
Nick Coghlan added the comment: The peephole optimiser already makes optimisations like that in a couple of places (e.g. set - frozenset): def f(x): ...if x in {1, 2}: pass ... f.__code__.co_consts (None, 1, 2, frozenset({1, 2})) It's name lookup semantics that are the real minefield.

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-09-05 Thread Eugene Toder
Eugene Toder added the comment: If I'm not missing something, changing x in [1,2] to x in (1,2) and x in {1,2} to x in frozenset([1,2]) does not change any error messages. Agreed that without dynamic compilation we can pretty much only track literals (including functions and lambdas) assigned

[issue2679] email.feedparser regex duplicate

2012-09-05 Thread moijes12
Changes by moijes12 moije...@gmail.com: -- nosy: +moijes12 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2679 ___ ___ Python-bugs-list mailing

[issue15744] missing tests for {RawIO,BufferedIO,TextIO}.writelines

2012-09-05 Thread Ahsan Nawroj
Changes by Ahsan Nawroj ahsan.naw...@gmail.com: -- nosy: +ainur0160 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15744 ___ ___ Python-bugs-list

[issue2679] email.feedparser regex duplicate

2012-09-05 Thread moijes12
Changes by moijes12 moije...@gmail.com: -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2679 ___ ___ Python-bugs-list

[issue2679] email.feedparser regex duplicate

2012-09-05 Thread moijes12
Changes by moijes12 moije...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file27132/2679.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2679 ___

[issue2679] email.feedparser regex duplicate

2012-09-05 Thread moijes12
moijes12 added the comment: Hi I've attached a patch. Its a simple one wherein NLCRE_crack = NLCRE_bol. I found this in Python 3.3.0b2+ and so I've added version 3.3. I executed ./python -m test after making the change and no failures were reported (340-OK, 30-Skip). Looking forward to your

[issue13896] Make shelf instances work with 'with' as context managers

2012-09-05 Thread Miguel Angel García
Changes by Miguel Angel García miguelangel.gar...@gmail.com: -- nosy: +Miguel.Angel.García ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13896 ___