[issue12020] Attribute error with flush on stdout,stderr

2011-05-06 Thread James Hutchison
New submission from James Hutchison : When upgrading from Python 3.1 to Python 3.2 I noticed that when my program closed it printed out a non-consequential AttributeError Exception. My program had a custom class that replaced stdout and stderr for use in a piped program (it flushed the buffer

[issue11072] Add MLSD command support to ftplib

2011-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 56bce38b274f by Giampaolo Rodola' in branch 'default': Issue #11072: added MLSD command (RFC-3659) support to ftplib. http://hg.python.org/cpython/rev/56bce38b274f -- nosy: +python-dev ___ Python tracker

[issue11072] Add MLSD command support to ftplib

2011-05-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- assignee: -> giampaolo.rodola components: +Library (Lib) resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> feature request ___ Python tracker __

[issue12013] file /usr/local/lib/python3.1/lib-dynload/_socket.so: symbol inet_aton: referenced symbol not found

2011-05-06 Thread Alex Lai
Alex Lai added the comment: Hi Eric, Thank you for the reply. I installed Python 3.1.2 pre-compiled by sunfreeware.com on one of our sparc servers. Would you please let me know what command I should run to test the installation? Regard, Alex -- ___

[issue11072] Add MLSD command support to ftplib

2011-05-06 Thread SilentGhost
SilentGhost added the comment: Has something prevent you from implementing suggestion provided in my review? -- ___ Python tracker ___ __

[issue11072] Add MLSD command support to ftplib

2011-05-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Which ones in particular? msg130474? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue11888] Add C99's log2() function to the math library

2011-05-06 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Victor. I suspect we're going to need to be a bit more careful, though: when the extra tests were added for math.log, it turned out that it had all sorts of strange special-case behaviour on various platforms. So I suspect that even on platforms tha

[issue12020] Attribute error with flush on stdout,stderr

2011-05-06 Thread R. David Murray
R. David Murray added the comment: Hmm. That error message is more than a bit misleading. What you need to do is add a flush method to your FlushFile class. Something changed between 3.1 and 3.2 that causes that message to be generated instead of suppressed. Not sure what it was. The sur

[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-06 Thread Jonas H.
Jonas H. added the comment: Shouldn't have used "decent" here, sorry. What I was trying to say is that there's no "reference-like" documentation for the list datatype (as for dict). There's more than enough quality documentation about lists but I think the way it's arranged can be improved.

[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Ben Wolfson
Ben Wolfson added the comment: My last examples were actually just attempting to figure out what triggered the unexpected behavior. I don't want to do expansion inside the field_name part! (I'll have a reply to your previous comment about use-cases shortly.) -- __

[issue11072] Add MLSD command support to ftplib

2011-05-06 Thread SilentGhost
SilentGhost added the comment: a review on rietveld http://bugs.python.org/review/11072/show which as I confirmed with you specifically at #python-dev you received a notification of. -- ___ Python tracker ___

[issue12020] Attribute error with flush on stdout,stderr

2011-05-06 Thread James Hutchison
James Hutchison added the comment: You are right, when I add: def flush(self): pass; the error goes away. When I have this: def flush(): pass; I get: Exception TypeError: 'flush() takes no arguments (1 given)' in <__main__.FlushFile object at 0x00C2AB70> ignored T

[issue11072] Add MLSD command support to ftplib

2011-05-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: In my view, aside from the documentation note they're all minor/styling-related changes but feel free to provide a patch if you want to and I'll commit it. -- ___ Python tracker

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for the patch. I'll apply this to 2.6svn for the 2.6.7rc1 release today. Feel free to apply this to 2.6hg and forward port it to the relevant releases. -- ___ Python tracker

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread David Coles
David Coles added the comment: After doing some more investigation it appears that Android's wchar_t support before android-9 is totally broken (see http://android.git.kernel.org/?p=platform/ndk.git;a=blob_plain;f=docs/STANDALONE-TOOLCHAIN.html;hb=HEAD). With android-9 you get 4 byte wchar_t

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Not applicable to 2.6 after all. -- priority: release blocker -> high ___ Python tracker ___ ___ P

[issue12021] mmap.read requires an argument

2011-05-06 Thread K Richard Pixley
New submission from K Richard Pixley : mmap.read requires a argument. Since most file-like objects do not, this breaks the file-like object illusion. mmap.read argument should be optional, presumably defaulting to the entire mmap'd area. -- messages: 135362 nosy: rich-noir priority:

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Possibly of more interest for Python is that it's no longer buildable > without wchar_t support. While unicodeobject is pretty good at > checking HAVE_WCHAR_H, a number of modules and even pythonrun.c > directly use wchar_t or functions like PyUnicode_FromWide

[issue12021] mmap.read requires an argument

2011-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sounds like a reasonable request, although I don't think it's a bug fix in itself (there are probably other places where mmap breaks the file-like expectation). -- nosy: +pitrou stage: -> needs patch type: behavior -> feature request versions: -Pyth

[issue12022] 'transaction' module-as-context-manager thwarted by Python 2.7.1

2011-05-06 Thread Daniel Holth
New submission from Daniel Holth : "How much do we care about special method lookup?" Python recently bypasses __getattr__ entirely when looking up context managers. http://mail.python.org/pipermail/python-dev/2009-May/089535.html Could this be the reason that ZODB's transaction module, which

[issue12021] mmap.read requires an argument

2011-05-06 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: David Coles wrote: > > David Coles added the comment: > > After doing some more investigation it appears that Android's wchar_t support > before android-9 is totally broken (see > http://android.git.kernel.org/?p=platform/ndk.git;a=blob_plain;f=docs/STA

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: >From the document you posted: """ As documented, the Android platform did not really support wchar_t until Android 2.3. What this means in practical terms is that: - If you target platform android-9 or higher, the size of wchar_t is 4 bytes, and mos

[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Ben Wolfson
Ben Wolfson added the comment: Here's my use case. I'm writing a python version of the ruby library HighLine for CLI interaction, to be called, uncreatively, PyLine. One of the moderately neat things about the library is that it allows for color information to be embedded in the strings one

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think what they mean is a better representation from an Android API, such as UChar32 from utils/AndroidUnicode.h. I agree that it's not worthwhile trying to port Python to those Android versions that have a single-byte wchar_t definition. David, I think

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread David Coles
David Coles added the comment: On Fri, May 6, 2011 at 1:31 PM, Marc-Andre Lemburg wrote: > wchar_t should be fairly portable these days. I think the main > problem is that we never assumed sizeof(wchar_t) == 1 to be a > possibility. On Windows, wchar_t was 16 bit and the glibc started > out wit

[issue11957] re.sub confusion between count and flags args

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I like the idea of an internal REflag class with __new__, __or__, and __repr__==__str__. Str(re.A|re.L) might print as "REflag: re.ASCII | re.IGNORE" If it is *not* an int subclass, any attempt to use or mix with an int would raise. I checked and the doc only

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread David Coles
David Coles added the comment: On Fri, May 6, 2011 at 2:24 PM, Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > > I think what they mean is a better representation from an Android API, such > as UChar32 from utils/AndroidUnicode.h. Ah. Sadly I don't think that's exposed in the

[issue11959] smtpd cannot be used without affecting global state

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I looked as the small patch to smptd.py. This strikes me a a reasonable use of dependency injection to make smptd more usable in testing, especially given that asyncx are have it. The only thing I do not understand fully is the redefinition of set_socket, pe

[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-05-06 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Please commit any patch before releases of Python 3.1.4 and 3.2.1. (3.2.1 rc1 is planned on 2011-05-14.) -- ___ Python tracker __

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: David Coles wrote: > >> I agree that it's not worthwhile trying to port Python to those Android >> versions that have a single-byte wchar_t definition. > > Yup. Will be using Android 2.3+. If I'm forced to use an earlier > version of Android I think it wo

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-05-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: Thanks for the tests; I'll review and commit them tomorrow morning. > Even if that means that there is no test which checksums an > entire superlarge mmap() region. Bear in mind that the test is only to be removed from 2.7; it will still be present in the 3.* br

[issue11963] Use real assert* for test_trigger_memory_error (test_parser)

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Unlike test.support, whose doc was recently expanded by a patch by Eli Bendersky, I see no mention of test.script helper in the test doc. [Do you think there should be?]. I was not aware of it. It might be newer than the 'old way'. I would have titled this '

[issue11959] smtpd cannot be used without affecting global state

2011-05-06 Thread Vinay Sajip
Vinay Sajip added the comment: It's create_socket which is being redefined, because the base class implementation https://bitbucket.org/mirror/cpython/src/5661480f7763/Lib/asyncore.py#cl-292 calls set_socket without passing a map. -- ___ Python tr

[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-06 Thread David Coles
David Coles added the comment: On Fri, May 6, 2011 at 3:17 PM, Marc-Andre Lemburg wrote: > Since you sound like you want to get Python running on Android, > are you aware of this project ? > >  http://code.google.com/p/android-scripting/ Yes. It's excellent. I've actually been using it as a po

[issue12023] non causal behavior

2011-05-06 Thread Rodrigo Ventura
New submission from Rodrigo Ventura : Consider these two functions: --- def nok(): a = None def f(): if a: a = 1 f() def ok(): a = None def f(): if a: b = 1 f() --- Function ok() executes fine, but function nok() trigger an excepti

[issue12023] non causal behavior

2011-05-06 Thread Ezio Melotti
Ezio Melotti added the comment: The reason is that in nok Python sees the assignment to a (a = 1) and determines that the 'a' variable is local to the scope of f, and since the assignment comes after the "if a:" and at that point 'a' has no value, an error is raised. In ok there's no assignme

[issue12023] non causal behavior

2011-05-06 Thread Ezio Melotti
Ezio Melotti added the comment: See also http://docs.python.org/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-value -- ___ Python tracker _

[issue12024] 2.6 svn and hg branches are out of sync

2011-05-06 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : Martin points out that the svn and hg branches for 2.6 are out of sync. I made the 2.6.7rc1 release from svn, without sync'ing them up. I have no time to do the sync right now, so for 2.6.7 final (or 2.6.7rc2?) the branches must be synchronized. Possibl

[issue11948] Tutorial/Modules - small fix to better clarify the modules search path

2011-05-06 Thread Sandro Tosi
Sandro Tosi added the comment: Here's attached the patch including Terry's suggestion (gaah, sorry for this late reply). -- Added file: http://bugs.python.org/file21913/issue11948-v2.patch ___ Python tracker

[issue11948] Tutorial/Modules - small fix to better clarify the modules search path

2011-05-06 Thread Ezio Melotti
Ezio Melotti added the comment: s/``sys.path``/:data:`sys.path`/ (or whatever turns that into a link). I also don't like the "Python programs that know what they're doing" bit. The list of places where the modules are searched could be a bullet list. -- nosy: +ezio.melotti

[issue11957] re.sub confusion between count and flags args

2011-05-06 Thread Matthew Barnett
Matthew Barnett added the comment: Something like "" may be more Pythonic. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue11968] wsgiref's wsgi application sample code does not work

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Takayuki is correct, the status and header strings should, it seems, be 'native strings', not bytes. The experimental proof is to run the current example code (I did so from IDLE editor window on WinXP) and then enter http://localhost:8000/ in a browser. Seve

[issue12022] 'transaction' module-as-context-manager thwarted by Python 2.7.1

2011-05-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes, that's why. I suggest you appeal to python-ideas about the new exception. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue6116] frame.f_locals keeps references to things for too long

2011-05-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: I tried making f_locals always a copy but it wreaks havoc with some code which expects changing it to "work", namely pdb. I resign myself to using weakrefs. -- ___ Python tracker

[issue11959] smtpd cannot be used without affecting global state

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: OK, passing self.sockmap=None to setsocket matches its current behavior, so your new code should not change any current smtpd users, while modifying asyncore.dispatcher.create_socket might possibly affect someone. -- _

[issue11957] re.sub confusion between count and flags args

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Agreed, if we go that route. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue11969] Can't launch Process on built-in static method

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Running on winxp with IDLE, I get the second traceback, all the same after the first line. Given "target is the callable object to be invoked by the run() method.", I would have expected this to work too. Problem is not builtins: class C: def f(s): print(

[issue11972] input does not strip a trailing newline correctly on Windows

2011-05-06 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue11969] Can't launch multiproccessing.Process on methods

2011-05-06 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed title: Can't launch Process on built-in static method -> Can't launch multiproccessing.Process on methods ___ Python tracker __

[issue11668] _multiprocessing.Connection.poll with timeout uses polling under Windows

2011-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: This doesn't seem to be so easy. WFMO (or WFSO) often seems to return successfully while there's no message to read on the pipe end. Here is a sample session (disturbing results): >>> a, b = connection.Pipe(True) >>> win32.WaitForMultipleObjects([a._handle],

[issue11933] newer() function in dep_util.py mixes up new vs. old files due stat.st_mtime vs stat[ST_MTIME]

2011-05-06 Thread John S. Gruber
John S. Gruber added the comment: As Éric suggested I opened issue 11993 a couple of days ago. -- ___ Python tracker ___ ___ Python-b

[issue11983] Inconsistent hash and comparison for code objects

2011-05-06 Thread Eugene Toder
Eugene Toder added the comment: I would propose changing implementation to match the comment. At a minimum, remove co_firstlineno comparison. As the last resort, at least change the comment. -- ___ Python tracker

[issue11980] zipfile.ZipFile.write should accept fp as argument

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: zipfile.ZipFile takes a file arg that can be a 'path to a file (a string) or a file-like object'. The .write() method takes a filename arg. I would think that the proposal should be what the title says, to expand that to a file arg, either a path or 'file', a

[issue11623] Distutils is reporting OSX 10.6 w/ XCode 4 as "universal"

2011-05-06 Thread James Tatum
Changes by James Tatum : -- nosy: +James.Tatum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1006238] cross compile patch

2011-05-06 Thread David Kern
Changes by David Kern : -- nosy: +David.Kern ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue3754] cross-compilation support for python build

2011-05-06 Thread David Kern
Changes by David Kern : -- nosy: +David.Kern ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12025] strangely missing separator in "resource" table

2011-05-06 Thread Jesús Cea Avión
New submission from Jesús Cea Avión : "resource" page in python docs is missing a separator between 6 and 7. Checking the RST source code, everything seems correct. But the fact is that a line is missing in the HTML output. Checking the HTML output code, it seems OK. Disabling CSS, I see the t

[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset a0147a1f1776 by R David Murray in branch '2.7': #11999: sync based on comparing mtimes, not mtime to system clock http://hg.python.org/cpython/rev/a0147a1f1776 New changeset 252451fef13f by R David Murray in branch '3.1': #11999: sync based on comp

[issue11999] sporadic failure in test_mailbox

2011-05-06 Thread R. David Murray
R. David Murray added the comment: Now we see if the buildbots agree with me that this is fixed. -- resolution: -> fixed stage: -> committed/rejected status: open -> pending title: sporadic failure in test_mailbox on FreeBSD -> sporadic failure in test_mailbox type: -> behavior vers

[issue12023] non causal behavior

2011-05-06 Thread Rodrigo Ventura
Rodrigo Ventura added the comment: Ezio, thank you for the explanation. Is it possible to access variable a in nok's scope from function f without using the global keyword in f? (so that variable a remains local to nok, rather than global to python) Rodrigo --

[issue12026] Support more of MSI api by exposing handles

2011-05-06 Thread Mark Mc Mahon
New submission from Mark Mc Mahon : Background: My main use case for msilib is for working with/editing existing MSI files and not creating MSI files. As such I find much of the MSI API that I need missing. While not difficult to re-create _msi.c with ctypes, I thought it might be good to use

[issue12025] strangely missing separator in "resource" table

2011-05-06 Thread Georg Brandl
Georg Brandl added the comment: Sorry, I can't see anything wrong here (with FF 4.0 too). Can you attach a screenshot? -- nosy: +georg.brandl ___ Python tracker ___ __

[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure

2011-05-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've attached a v2 of the patch which adresses Éric's comments. I haven't changed the CompileError handling though, that would change a test failure into a test error. IMHO test errors should only happend due to bugs in the test code. AddCleanup is neat tri

[issue11994] [2.7/gcc-4.4.3] Segfault under valgrind in string.split()

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: "Also, the segfault only occurs when python is compiled with optimizations and run under valgrind." This says to me that the segfault is not a Python issue. What change do you expect in the Python source code? If none, this issue should be closed. -- n

[issue12001] Extend json.dumps to handle N-triples strings

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that the json module should stick with the json definition. Adding other stuff would take it even further from simplejson. A conversion function, if short enough, could be posted on the cookbook. -- nosy: +terry.reedy resolution: -> rejected s

<    1   2