[issue15436] __sizeof__ is not documented

2012-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue2898. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue15436] __sizeof__ is not documented

2012-07-23 Thread Eric Snow
Eric Snow added the comment: is __sizeof__ part of the language or just an implementation detail? -- nosy: +eric.snow ___ Python tracker ___

[issue12428] functools test coverage

2012-07-23 Thread Brian Thorne
Brian Thorne added the comment: Thanks Antoine, the __class__ attribute wasn't useful, I've removed that. Overriding the __setattr__ and __delattr__ gives consistent behaviour with the both versions - allowing the unittest reuse. Also I've changed thread back to _thread. Isn't more compatibi

[issue10399] AST Optimization: inlining of function calls

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

[issue15436] __sizeof__ is not documented

2012-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Could you possibly write a patch for 2.7, 3.2 and 3.3? No, not for documentation. -- ___ Python tracker ___ __

[issue15232] email.generator.Generator doesn't mangle "From " lines in MIME preamble

2012-07-23 Thread Petri Lehtinen
Petri Lehtinen added the comment: Thanks. The news entry should probably say 'From ' instead of 'From'. -- ___ Python tracker ___ ___

[issue11824] freeze.py broken due to ABI flags

2012-07-23 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15437] Merge Doc/ACKS and Misc/ACKS

2012-07-23 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching sample output of running the script. -- keywords: +patch Added file: http://bugs.python.org/file26494/issue-15437-sample-output.patch ___ Python tracker

[issue15437] Merge Doc/ACKS and Misc/ACKS

2012-07-23 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attached is a script that seems to do the job (except for the rst formatting, which can be added later. This was so that you can see by the diff what has changed). In the process of doing this, I found that Jeff McNeil is far out of order in Misc/ACKS, and

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2012-07-23 Thread Kevin Barry
Kevin Barry added the comment: I've attached a new example source file to demonstrate the fix. Compile the attached program with (*after* patching and installing Python): > gcc `python-config --cflags` working2.c -o working2 `python-config --ldflags` and run it with: > ./working2 xterm -S/0

[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2012-07-23 Thread Kevin Barry
Kevin Barry added the comment: Here is a patch that corrects the problem (quoted below and attached.) This only corrects the problem when 'PyOS_ReadlineFunctionPointer' is set, e.g. you must 'import readline', otherwise Python will defer to stdin/stdout with 'PyOS_StdioReadline'. The patch:

[issue15402] Correct __sizeof__ support for struct

2012-07-23 Thread Meador Inge
Meador Inge added the comment: On Mon, Jul 23, 2012 at 5:04 PM, Martin v. Löwis wrote: > The patch that Meador committed is incorrect: METH_NOARGS functions > still take a PyObject* args argument, which will be NULL. I'm puzzled, as > Serhiy's original patch was correct. I almost committed th

[issue15195] test_distutils fails when ARCHFLAGS is set on a Mac

2012-07-23 Thread Marc Abramowitz
Marc Abramowitz added the comment: I just verified -- the issue seems to be fixed for me on OS X 10.6.8 with revision 00db71b3c5bd. Thanks! -- ___ Python tracker ___ __

[issue11824] freeze.py broken due to ABI flags

2012-07-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Ping! -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue12428] functools test coverage

2012-07-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why does the pure Python version of partial have to be so complicated? I don't think the __class__, __setattr__ and __delattr__ are useful. As Raymond said, only the core, documented functionality needs to be preserved, not implementation details. Something e

[issue15437] Merge Doc/ACKS and Misc/ACKS

2012-07-23 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement ___ Python tracker ___ ___ Python-bugs-l

[issue15437] Merge Doc/ACKS and Misc/ACKS

2012-07-23 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue15436] __sizeof__ is not documented

2012-07-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Could you possibly write a patch for 2.7, 3.2 and 3.3? -- nosy: +jcea ___ Python tracker ___ ___ P

[issue15402] Correct __sizeof__ support for struct

2012-07-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: Also, I wonder why this loops over s_codes, instead of just looking at s_len+1. -- ___ Python tracker ___

[issue15437] Merge Doc/ACKS and Misc/ACKS

2012-07-23 Thread Éric Araujo
Éric Araujo added the comment: This was indeed proposed once or twice before; I can’t search my archive right now but I think I remember Georg saying that he was OK as long as the docs displayed Misc/ACKS. This means checking the rst syntax of Misc/ACKS and using the right include directive.

[issue15402] Correct __sizeof__ support for struct

2012-07-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: The patch that Meador committed is incorrect: METH_NOARGS functions still take a PyObject* args argument, which will be NULL. I'm puzzled, as Serhiy's original patch was correct. As for the tests, I really wish there were tests that tested for *actual* valu

[issue15437] Merge Doc/ACKS and Misc/ACKS

2012-07-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Georg, do you think this is ok for all 3 branches? -- nosy: +georg.brandl, pitrou versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker

[issue15437] Merge Doc/ACKS and Misc/ACKS

2012-07-23 Thread Chris Jerdonek
Chris Jerdonek added the comment: I would be happy to prepare a patch. I can upload a script to this issue that the committer can then run on the latest Misc/ACKS and Doc/ACKS.txt. The script would preserve the ordering of Misc/ACKS. It would iterate through the names in Doc/ACKS.txt and in

[issue15437] Merge Doc/ACKS and Misc/ACKS

2012-07-23 Thread Chris Jerdonek
New submission from Chris Jerdonek : This issue is to merge the Doc/ACKS and Misc/ACKS files as discussed here: http://mail.python.org/pipermail/python-dev/2012-July/121096.html -- assignee: docs@python components: Documentation keywords: easy messages: 166247 nosy: cjerdonek, docs@pyth

[issue15436] __sizeof__ is not documented

2012-07-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: __sizeof__ is not documeneted -> __sizeof__ is not documented ___ Python tracker ___ ___ Pytho

[issue12932] filecmp.dircmp does not allow non-shallow comparisons

2012-07-23 Thread Chris Jerdonek
Chris Jerdonek added the comment: Allowing dircmp() to accept a file comparison function is another option to consider that may address more needs going forward. shallow=False could be achieved by passing lambda a, b: filecmp.cmp(a, b, shallow=False). -- versions: +Python 3.4 -Python

[issue15436] __sizeof__ is not documeneted

2012-07-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : __sizeof__ is not mentioned on page Doc/reference/datamodel.rst together with other special methods. There is no __sizeof__ in index. -- assignee: docs@python components: Documentation messages: 166245 nosy: docs@python, storchaka priority: normal

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2012-07-23 Thread Steven Bethard
Steven Bethard added the comment: I've updated the patch for the current trunk. Should be ready to commit. -- Added file: http://bugs.python.org/file26490/Issue13249-4.patch ___ Python tracker

[issue9182] document “--” as a way to distinguish option w/ narg='+' from positional argument in argparse

2012-07-23 Thread Steven Bethard
Steven Bethard added the comment: Ok, here's what I think needs to go into the documentation here: (1) Add a separate section to the argparse docs about '--'. Give examples like the ones in this issue, and show how '--' can solve them (2) Cross-reference the section on '--' from nargs='?', na

[issue15408] os.fork/os.popen behaviour change between 2.7 and 3.2

2012-07-23 Thread Richard Oudkerk
Richard Oudkerk added the comment: A program which depends on the old behaviour would be broken on a non-refcounted implementation of Python, so I would be inclined to say "won't fix". However, I think the following patch would restore the old behaviour diff -r a970054a93fb Lib/os.py --- a/L

[issue15435] Strange behavior when AttributeError raise inside a property get function

2012-07-23 Thread R. David Murray
R. David Murray added the comment: AttributeError is how Python decides that __getattr__ should be called. I believe this is working as designed. -- nosy: +r.david.murray ___ Python tracker _

[issue15295] Document PEP 420 namespace packages

2012-07-23 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue11466] getpass.getpass doesn't close tty file

2012-07-23 Thread Anton Barkovsky
Anton Barkovsky added the comment: The issue is still there. I hope someone fixes it before the release. -- nosy: +anton.barkovsky ___ Python tracker ___ ___

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2012-07-23 Thread Steven Bethard
Steven Bethard added the comment: And I guess Issue 9182 is the right place for (1). -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue15434] __import__() problem in 3.3

2012-07-23 Thread Brett Cannon
Brett Cannon added the comment: The a/b case is legitimate in Python 3.3; namespace packages are delineated by not defining an __init__.py file. Closing as invalid. -- resolution: -> invalid status: open -> closed ___ Python tracker

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2012-07-23 Thread Steven Bethard
Steven Bethard added the comment: So Kotan's patch doesn't actually solve the original problem. Instead, it inserts the workaround into the help message of the parser. I think this is probably not the right fix. We should probably do two things: (1) Right now: create a documentation patch whi

[issue15433] argparse usage line is wrong

2012-07-23 Thread Steven Bethard
Changes by Steven Bethard : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue15433] argparse usage line is wrong

2012-07-23 Thread Steven Bethard
Changes by Steven Bethard : -- resolution: -> duplicate superseder: -> argparse optionals with nargs='+' can't be followed by positionals ___ Python tracker ___ __

[issue15402] Correct __sizeof__ support for struct

2012-07-23 Thread Meador Inge
Meador Inge added the comment: Hi Jesús, I replied to python-dev, but the Doc/ACKS.txt changes aren't necessary and I was OK with the way Serhiy submitted the tests. -- ___ Python tracker ___

[issue15417] Add support for csh and fish in venv activation scripts

2012-07-23 Thread Vinay Sajip
Vinay Sajip added the comment: > inherit from `venv.EnvBuilder` and override `setup_scripts` method > pointing to new directory with desired activators as `path` parameter > for `self.install_scripts(...)`. Yes, that's it. A third party tool would potentially do more than just custom scripts,

[issue15435] Strange behavior when AttributeError raise inside a property get function

2012-07-23 Thread Cédric Krier
New submission from Cédric Krier : When a AttributeError is raised inside the get function of a property and if the class has a __getattr__ method defined then this method is called. It is strange behavior because when looking at the traceback it looks like Python doesn't find the property. --

[issue15417] Add support for csh and fish in venv activation scripts

2012-07-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: 1. I agree with you about exclusion from 3.3. 2. Hmm. Good question. For now virtualenv has support for cmd.exe, csh, fish, bash/zsh and PowerShell. I propose to add csh and fish to venv too. If later somebody will push request for adding yet another shell su

[issue15402] Correct __sizeof__ support for struct

2012-07-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset b1d85a44f149 by Jesus Cea in branch '2.7': Better test for Issue #15402: Add a __sizeof__ method to struct.Struct http://hg.python.org/cpython/rev/b1d85a44f149 New changeset 1911e192af0d by Jesus Cea in branch '3.2': Better test for Issue #15402: A

[issue15402] Correct __sizeof__ support for struct

2012-07-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: We collide mid-air, Meador. I was just checking-in this :-). I have changed the tests to actually verify the changes :-). Also added to "Doc/ACKS.txt". Could I suggest you to take care of issue #15424 too?. -- resolution: fixed -> stage: committed/r

[issue15434] __import__() problem in 3.3

2012-07-23 Thread Stefan Krah
Stefan Krah added the comment: Argh. __init__.py was missing in the top directory. For some reason Python 3.2 does not throw the error. Also, 3.3 does not raise in the case of the a/b directory structure: $ tree a a `-- b |-- __init__.py `-- xyz.py $ ~/usr/bin/python3.3 a/b/__init__.py

[issue15424] __sizeof__ of array should include size of items

2012-07-23 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +meador.inge versions: +Python 3.2 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list maili

[issue15417] Add support for csh and fish in venv activation scripts

2012-07-23 Thread Vinay Sajip
Vinay Sajip added the comment: I have no objection in principle to supporting additional shells, but do have the following comments/questions: 1. Georg feels that this is a new feature he doesn't want to add to 3.3. IMO we have to respect his judgement as RM, no matter how trivial the change

[issue15433] argparse usage line is wrong

2012-07-23 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +cjerdonek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue15402] Correct __sizeof__ support for struct

2012-07-23 Thread Meador Inge
Meador Inge added the comment: Thanks for the patch Serhiy! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue15402] Correct __sizeof__ support for struct

2012-07-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset dbe7f39ff341 by Meador Inge in branch '2.7': Issue #15402: Add a __sizeof__ method to struct.Struct. http://hg.python.org/cpython/rev/dbe7f39ff341 New changeset 3e7b517e1b68 by Meador Inge in branch '3.2': Issue #15402: Add a __sizeof__ method to s

[issue15434] __import__() problem in 3.3

2012-07-23 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +cjerdonek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue15402] Correct __sizeof__ support for struct

2012-07-23 Thread Meador Inge
Meador Inge added the comment: OK, I will commit this sometime today. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue15434] __import__() problem in 3.3

2012-07-23 Thread Brett Cannon
Brett Cannon added the comment: It might be a runpy thing as Nick has been tweaking that lately to deal with pkgutil issues. And this is of course ignoring the fact that __import__ should never be called directly over importlib.import_module(). -- nosy: +ncoghlan ___

[issue15434] __import__() problem in 3.3

2012-07-23 Thread Stefan Krah
Stefan Krah added the comment: This is not a distutils issue. I want to know why this does not throw an exception ... python3.2 distutils/command/__init__.py ... while this raises ImportError: ~/usr/bin/python3.3 distutils/command/__init__.py For the path structure please see my previous

[issue14578] importlib doesn't check Windows registry for paths

2012-07-23 Thread Brett Cannon
Brett Cannon added the comment: I just wanted to say that Amaury's proof-of-concept looks right (although what is returned by the registry isn't a "fullname" but a file path so I would at least change that variable name and you wouldn't append this mat path finder but instead insert it before

[issue15433] argparse usage line is wrong

2012-07-23 Thread Anton Barkovsky
Changes by Anton Barkovsky : -- nosy: +anton.barkovsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue15434] __import__() problem in 3.3

2012-07-23 Thread Éric Araujo
Éric Araujo added the comment: Could you explain what is it you’re trying to achieve? -- ___ Python tracker ___ ___ Python-bugs-list

[issue15434] __import__() problem in 3.3

2012-07-23 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue15431] Cannot build importlib.h on Windows

2012-07-23 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue15424] __sizeof__ of array should include size of items

2012-07-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: With the precedent of issue #15402, I think that 2.7 and 3.2 should be fine. -- nosy: +jcea ___ Python tracker ___ ___

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

2012-07-23 Thread Jeremy Hylton
Changes by Jeremy Hylton : -- nosy: +Jeremy.Hylton ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue4713] Installing sgmlop causes xmlrpclib error

2012-07-23 Thread Bertrand Croq
Bertrand Croq added the comment: This bug still present in Python 2.7, the proposed patch works. -- nosy: +bcroq ___ Python tracker ___ __

[issue15434] __import__() problem in 3.3

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

[issue15434] __import__() problem in 3.3

2012-07-23 Thread Stefan Krah
Stefan Krah added the comment: It looks like distutils/command from the stdlib is searched first despite the fact that the first path entry is '/home/stefan/tmp'. If distutils/command is replaced with a/b, the import works: $ pwd /home/stefan/tmp $ $ ls a/b/ __init__.py xyz.py $ ls distutils

[issue15434] __import__() problem in 3.3

2012-07-23 Thread Stefan Krah
New submission from Stefan Krah : Using b127046831e2, I'm experiencing an import problem during the NumPy build. I've reduced it to this scenario, which works in 3.2 but not in 3.3. Note that in NumPy's setup.py, the equivalent of /home/stefan/tmp is the first entry in sys.path. I'm not sure if

[issue15433] argparse usage line is wrong

2012-07-23 Thread Reinis Ivanovs
New submission from Reinis Ivanovs : I set a positional argument and an optional argument that accepts a list: > parser = argparse.ArgumentParser() > parser.add_argument('foo') > parser.add_argument('-bar', nargs='*') The usage line I get from --help is this: > $ example.py --help > usage: exa

[issue7578] Behavior of operations on a closed file object is not documented correctly

2012-07-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed. -- resolution: -> out of date stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue15408] os.fork/os.popen behaviour change between 2.7 and 3.2

2012-07-23 Thread Walter Dörwald
Walter Dörwald added the comment: So is this simply a documentation issue, or can we close the bug as "won't fix"? -- ___ Python tracker ___

[issue15432] gzip.py: mtime argument only since python 2.7

2012-07-23 Thread Geir Ove Myhr
New submission from Geir Ove Myhr : In the gzip documentation (http://docs.python.org/library/gzip.html) a note should be added that the mtime option was added in Python 2.7. The patch which adds the option (http://svn.python.org/view?view=revision&revision=68319) is not included in Python 2

[issue13837] test_shutil fails with symlinks enabled under Windows

2012-07-23 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Error in test_move_dangling_symlink is fixed by #9949 -- ___ Python tracker ___ ___ Python-bugs-lis

[issue15408] os.fork/os.popen behaviour change between 2.7 and 3.2

2012-07-23 Thread Richard Oudkerk
Richard Oudkerk added the comment: In Python 2.x, when the file object returned by popen() is garbage collected the process is automatically waited on, collecting the pid of the process. In Python 3.x a wrapper object is used whose close method wait on the pid. This close method is *not* inv

[issue5819] Add PYTHONPREFIXES environment variable

2012-07-23 Thread Christopher Dunn
Christopher Dunn added the comment: I agree. venv solves this problem and more. -- ___ Python tracker ___ ___ Python-bugs-list mailing