[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's *clearly* not a duplicate. While #15319 is fixed, this issue remains - so it can't possibly be a duplicate. -- nosy: +loewis resolution: duplicate -> superseder: IDLE - readline, isatty, and input broken ->

[issue15319] IDLE - readline, isatty, and input broken

2012-07-10 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue15319] IDLE - readline, isatty, and input broken

2012-07-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 42424c1f605c by Martin v. Löwis in branch '2.7': Issue #15319: Revert wrapping of sys.stdin. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/42424c1f605c -- ___ Python tracker

[issue15302] Use argparse instead of getopt in test.regrtest

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is a patch that creates some unit tests for the existing getopt argument parsing code. In response to the comments, I'm thinking of a less invasive approach that involves wrapping argparse's parse_args() to return getopt-like output (and in particular,

[issue15319] IDLE - readline, isatty, and input broken

2012-07-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset b90482742ee0 by Martin v. Löwis in branch '3.2': Issue #15319: Revert wrapping of sys.stdin. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/b90482742ee0 -- nosy: +python-dev ___ Python track

[issue15319] IDLE - readline, isatty, and input broken

2012-07-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think the issue is grossly underspecified. The title of the issue is "sys.stdin is broken" which says nothing about the way in which it is broken. Taking Roger's literal description, and his msg165191, the complaint is that input() no longer works, as does

[issue15319] IDLE - sys.stdin is broken.

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: PyShell.py's PyShell object has the readline method, at line 1080 in the most recent code. It's meant for use with and without a subprocess. (See also Issue14254) The IDLEfork project long ago created the subprocess and the RPC plumbing for the subprocess inter

[issue15319] IDLE - sys.stdin is broken.

2012-07-10 Thread Ramchandra Apte
Changes by Ramchandra Apte : -- nosy: +ramchandra.apte ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue14797] Deprecate imp.find_module()/load_module()

2012-07-10 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15323] Provide target name in output message when Mock.assert_called_once_with fails

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: I have a minor suggestion. I would suggest-- + msg = ("Expected %s to be called once. Called %s times." % +(repr(self._mock_name) or 'mock', self.call_count)) so that one can distinguish between self._mock_name not being defined and self._mock_name b

[issue15314] Use importlib instead of pkgutil in runpy

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

[issue15272] pkgutil.find_loader accepts invalid module names

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

[issue15230] runpy.run_path doesn't set __package__ correctly

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

[issue15323] Provide target name in output message when Mock.assert_called_once_with fails

2012-07-10 Thread Brian Jones
New submission from Brian Jones : In Python 3.3.0b1, if the number of calls to a mock is, say, zero, and you call assert_called_once_with() on that mock, it will throw an exception which says "Expected to be called once. Called 0 times." This is nice, but it would be nicer if the output messag

[issue15319] IDLE - sys.stdin is broken.

2012-07-10 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: IDLE - input() is broken. -> IDLE - sys.stdin is broken. ___ Python tracker ___ ___ Python-bugs-

[issue15319] IDLE - input() is broken.

2012-07-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ah, sys.stdin.readline() works. So the object being proxied has readline (and write and writelines) but not read and readlines. I presume the proxy is in the user process and the actual stdin/out/err objects are in the idle process, interacting with the scree

[issue15300] test directory doubly-nested running tests with -j/--multiprocess

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks for your feedback, Antoine, and for causing me to rethink the patch. This patch is drastically simpler. Incidentally, I found a reason for this issue in issue 15322. regrtest calculates the "build" folder relative to sysconfig.get_config_var('srcdir'

[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread Carl Nobile
Carl Nobile added the comment: André, As I said I'm not sure if I am fixing the same thing that this bug was originally posted for. However, after looking at my code I realized that I just did a quick work around for my situation and it shouldn't be put into any python release. This issue is t

[issue15322] sysconfig.get_config_var('srcdir') returns unexpected value

2012-07-10 Thread Chris Jerdonek
New submission from Chris Jerdonek : sysconfig.get_config_var('srcdir') seems to return the current working directory rather than a directory related to the source directory. For example (starting from the repository root)-- $ mkdir foo $ cd foo $ ../python.exe Python 3.3.0b1 (default:5d43154

[issue15319] IDLE - input() is broken.

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: > Same difference for readlines and writelines. I wonder how input works if it > does not call sys.stdin.read() > Eventually IDLE makes a call to PyShell's readline. -- ___ Python tracker

[issue15319] IDLE - input() is broken.

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: Including issue15318 where stdin is writable. The proper solution to that issue and this one are likely the same. -- ___ Python tracker ___ _

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Roger Serwy
Changes by Roger Serwy : -- superseder: -> IDLE - input() is broken. ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: I agree. I'll close it. -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: To me, this is part of #15319. sys.stdin is broken in being writable but not readable. Unwrapping is just the first, trivial step to fixing it. So I think we should close this in favor of the other. -- ___ Python t

[issue15319] IDLE - input() is broken.

2012-07-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that the _RPCFile wrapping of the stdin proxy should be undone unless and until there is a positive reason for it -- it solves a problem -- and it is better tested. But reversion does not solve pre-existing problems. As noted by Roger, sys.stdin write

[issue15321] bdist_wininst installers may terminate with "close failed in file object destructor:\nsys.excepthook is missing\nlost sys.stderr"

2012-07-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue15321] bdist_wininst installers may terminate with "close failed in file object destructor:\nsys.excepthook is missing\nlost sys.stderr"

2012-07-10 Thread Mark Hammond
New submission from Mark Hammond : Note the error message in the title is only for Python 2.x - Python 3.x shows an empty string instead, but otherwise seems identical. This was first brought to my attention via http://sourceforge.net/tracker/?func=detail&aid=352&group_id=78018&atid=551954

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: I've succeeded in building an extension for Python 3.3 (at least, on Windows XP, 32-bit; haven't tried any 64-bit), by the hack of copying libmsvcr100.a from a recent MinGW release (20120426) into an older MinGW release (20101030). I haven't looked at MinGW re

[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread Senthil Kumaran
Senthil Kumaran added the comment: The patch seems good. I apologize that this has been sitting stale for a long time. Since this is a new feature, I am not sure if putting to 3.3 might be a good idea. This is a feature for httplib, so it may not make it to 2.7.x, but can make it to 3.4. ---

[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

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

[issue12641] Remove -mno-cygwin from distutils

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: It would be great if this could be sorted out in time for Python 3.3. Otherwise I don't think we'll be able to use MinGW to build extensions in Windows. Unless there is a version of MinGW which supports the -mno-cygwin option, as well as libmsvcr100.

[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread André Cruz
André Cruz added the comment: Carl: that would be great. Do you use it regularly? Any other problems? Python devs: can anyone confirm me what still needs to be done so that this patch can be considered for merging into trunk? Thanks. -- ___ Python

[issue15309] buffer/memoryview slice assignment uses only memcpy

2012-07-10 Thread Stefan Krah
Stefan Krah added the comment: I see nothing wrong in memory_ass_sub(). In 2.7: if (destbuf + bytelen < srcbuf || srcbuf + bytelen < destbuf) /* No overlapping */ memcpy(destbuf, srcbuf, bytelen); else memmove(destbuf, srcbuf, bytelen); Other versions use simil

[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread Carl Nobile
Carl Nobile added the comment: Yes, exactly. I was not the one who posted the original bug report, but I found it when I ran into the same problem. I was not exactly sure if the original poster had the same issues as I had. I do know that my fix to the code eliminated some code making the code a

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-07-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch is rather ugly, I think. You should arrange for sysconfigdata to be generated directly at the right place instead (not sure how, perhaps it should be done from setup.py). Also, there's no need for this to be a release blocker. -- priority:

[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread André Cruz
André Cruz added the comment: As far as I can see, the patch does add some documentation changes. What exactly is missing? As for the bug, if I understood correctly, what you are saying is that when "ignore_continue" is True, and the server sends a 100 Continue response, the code will contin

[issue15319] IDLE - input() is broken.

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: I like Serhiy's patch. It works for me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue15320] thread-safety issue in regrtest.main()

2012-07-10 Thread Chris Jerdonek
New submission from Chris Jerdonek : My understanding is that generators are not thread-safe. For example, see http://stackoverflow.com/a/1131458/262819 However, regrtest.main() seems to access a generator from multiple threads when run in multiprocess mode: def work(): # A worker thread

[issue15319] IDLE - input() is broken.

2012-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a simpler solution of this issue. -- nosy: +storchaka type: -> behavior Added file: http://bugs.python.org/file26346/idle_stdin_no_rpcfile.patch ___ Python tracker ___

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-07-10 Thread Matthias Klose
Matthias Klose added the comment: proposed patch, tested with configure, build and install -- keywords: +needs review, patch Added file: http://bugs.python.org/file26345/sysconfigdata.diff ___ Python tracker _

[issue15302] Use argparse instead of getopt in test.regrtest

2012-07-10 Thread R. David Murray
R. David Murray added the comment: As mentioned, the first step is to create some tests that can validate the current behavior, so that changes don't break things. This is a non-trivial task. I know from experience with a similar refactoring that even seemingly simple changes can have unexp

[issue4832] idle filename extension

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: I tried issue4832_rev2.patch on Ubuntu 11.04 with Tk 8.5 and it still behaves as Terry described. -- ___ Python tracker ___ __

[issue15319] IDLE - input() is broken.

2012-07-10 Thread Roger Serwy
New submission from Roger Serwy : Per Martin's request in msg165197, this issue has been separated from Issue13532. The newly introduced _RPCFile object in run.py (422242dbce30) inherits from io.TextIOBase which has "readline" as one of its methods. As a result, IDLE's internal call readline

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: Folks: one issue at a time - pretty pretty please. This issue was "In IDLE, sys.stdout and sys.stderr can write any pickleable object". Will anybody dispute that this issue is fixed? Roger: please create a new issue for input being broken now. Your patch "s

[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread Carl Nobile
Carl Nobile added the comment: I was told some time ago that it was documentation changes. And, if I remember correctly CONTINUE (100) was not ignored, it was actually broken. Data was being read from stdin when a CONTINUE was received and this should never happen based on RFC 2616, because ther

[issue1346874] httplib simply ignores CONTINUE

2012-07-10 Thread André Cruz
André Cruz added the comment: Can anyone confirm what is missing for this patch to be committed? Is it just test and documentation changes or is something wrong with the code changes as well? -- nosy: +edevil ___ Python tracker

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> sys.stdin.readable() False >>> sys.stdout.writable() False I think the issue is far from a solution. -- ___ Python tracker ___ _

[issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: Issue13532 has an applied patch (422242dbce30) for the subprocess that makes the stdout, stderr, and stdin inherit from io.TextIOBase. This includes the "errors" attribute, albeit set to ''. The fix does not apply when running IDLE without a subprocess, so the .

[issue15289] Adding __getitem__ as a class method doesn't work as expected

2012-07-10 Thread samwyse
samwyse added the comment: Thanks, Eric. Based on what you said, I was able to get the desired behavior by creating a metaclass. -- Added file: http://bugs.python.org/file26343/Issue15289.py ___ Python tracker _

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: Running "input" from IDLE now raises an error. Attached is a fix to _RPCFile to allow readline (and isatty) to function properly. -- priority: normal -> high resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file26342/stdin_f

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Roger Serwy
New submission from Roger Serwy : This is a follow-up to issue13532 which fixed problems with IDLE's sys.stdout and sys.stderr implementation. Presently, sys.stdin has a write method, but does not raise "io.UnsupportedOperation: not writable" when passed a string. Instead, it writes to the ID

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: sys.stdin has a write method, but it should raise "io.UnsupportedOperation: not writable" when passed a string. It looks like IDLE has allowed writes to stdin even before Martin's patch. I'll open a separate issue for this case. -- _

[issue15111] Wrong ImportError message with importlib

2012-07-10 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue15111] Wrong ImportError message with importlib

2012-07-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc18a2a66d16 by Brett Cannon in branch 'default': Issue #15111: When a module was imported using a 'from import' http://hg.python.org/cpython/rev/dc18a2a66d16 -- nosy: +python-dev ___ Python tracker

[issue15314] Use importlib instead of pkgutil in runpy

2012-07-10 Thread Brett Cannon
Brett Cannon added the comment: Ooh, first "customer" of importlib.find_loader()! Obviously if the API doesn't work for you let me know since it's a 3.3 addition and can be tweaked to meet your needs. -- nosy: +brett.cannon ___ Python tracker

[issue15111] Wrong ImportError message with importlib

2012-07-10 Thread Brett Cannon
Brett Cannon added the comment: That "cannot import name" message seems to only come from Python/ceval.c:import_from() which raises that exception when an AttributeError is raised by an 'import from' statement (I think). This happens when an 'import from' asks for a name on the package/module

[issue15300] test directory doubly-nested running tests with -j/--multiprocess

2012-07-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't really like the "pre-parsed option" hack. Can't we think of something simpler? For example, why would the child be involved, rather than simply the parent setting the right cwd? Also, I don't think there's any point in _OPTION_CWD_PARENT_DIR. Just har

[issue12641] Remove -mno-cygwin from distutils

2012-07-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: The 64-bit compiler is actually called x86_64-w64-mingw32-gcc. -- ___ Python tracker ___ ___ Pyth

[issue15267] tempfile.TemporaryFile and httplib incompatibility

2012-07-10 Thread Tim Golden
Tim Golden added the comment: I can confirm that this isn't a problem for 3.x. No-one's listed in the experts list for the httplib module but Senthil appears to be the de factor maintainer so I've added him to the call for his opinion. My feeling would be to do the simplest thing possible and

[issue12641] Remove -mno-cygwin from distutils

2012-07-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: I just installed the cygwin gcc4 package; this gives me gcc 4.5.3. In this version, -mno-cygwin is still recognized, and gives this error message: gcc: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler. So it seems that removing the

[issue12641] Remove -mno-cygwin from distutils

2012-07-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: I have gcc 3.4.4 in my cygwin installation, and it still needs the -mno-cygwin option, else the resulting binary will link with cygwin1.dll (which is undesired). -- ___ Python tracker

[issue15309] buffer/memoryview slice assignment uses only memcpy

2012-07-10 Thread Stefan Krah
Stefan Krah added the comment: Could you please state the Python version and line numbers in memoryobject.c? -- ___ Python tracker ___ __

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'm not a Cygwin user myself, so it would be good if you could figure this out somehow. Feel free to ask on Cygwin lists how this is supposed to work. Our requirement is that the resulting pyd needs to link with msvcr100.dll. It may well be that *no* version

[issue12641] Remove -mno-cygwin from distutils

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: I've come across this issue when trying to build extensions for Python 3.3 on Windows, needing a recent enough MinGW to provide a library for msvcr100. See issue #15315. -- nosy: +cmcqueen1975 ___ Python tracker

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: It sounds as though the option '-mno-cygwin' is related to issue #12641. Does that mean I need to find a version of MinGW that is old enough to support the option '-mno-cygwin', but new enough to include a library for msvcr100? --

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: I downloaded the latest MinGW, and now it tells me: ... c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python33\include -IC:\Python33\PC -c python3/src/_cobs_ext.c -o bui ld\temp.win32-3.3\Release\python3\src\_cobs_ext.o cc1.exe: error: unrecognized comma

[issue15111] Wrong ImportError message with importlib

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

[issue15316] runpy swallows ImportError information with relative imports

2012-07-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Looks very similar to issue15111. -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> Wrong ImportError message with importlib ___ Python tracker

[issue15315] Can't build Python extension with mingw32 on Windows

2012-07-10 Thread Craig McQueen
Craig McQueen added the comment: That's definitely an improvement. It gets further, but on my PC, the compile fails: ... c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: cannot find -lmsvcr100 collect2: ld returned 1 exit status error: command 'gcc' failed with exit statu

[issue15302] Use argparse instead of getopt in test.regrtest

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: By the way, issue 15300 has a related patch that is ready to review today. Assuming that one is okay, it would make sense to commit first because it overlaps with the changes I'll be doing here. Issue 15305 is another related issue (also overlapping) that is

[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2012-07-10 Thread Tomi Pieviläinen
Tomi Pieviläinen added the comment: Also PatternGrammar3.2.3.final.0.pickle is missing the read permissions. -- ___ Python tracker ___ __

[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2012-07-10 Thread Tomi Pieviläinen
New submission from Tomi Pieviläinen : /usr/local/lib/python3.2/lib2to3/Grammar3.2.3.final.0.pickle is readable only by root after installing with make install from the source package. This makes at least installing distribute fail, and thus makes virtualenv, tox etc. unusable. -- com

[issue15310] urllib: Support for multiple WWW-Authenticate headers and/or multiple challenges per header

2012-07-10 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue15311] Developer Guide doesn't get updated once a day

2012-07-10 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue15311] Developer Guide doesn't get updated once a day

2012-07-10 Thread Chris Jerdonek
Chris Jerdonek added the comment: Patch attached. I also added a note about building the Dev Guide documentation. Unlike the main Python documentation, `make html` for the Dev Guide doesn't seem to install Sphinx automatically. -- keywords: +patch Added file: http://bugs.python.org/