[issue18764] The pdb print command prints repr instead of str in python3

2013-09-23 Thread Connor Osborn
Connor Osborn added the comment: In 2.7 there is no documented command *print, the docs are explicit on this (it's just the built in statement). However, 3.4 treats print like a feature of 2.7. Is this to maintain backwards compatibility? I would suggest preserving the original direction of th

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2013-09-23 Thread Gregory P. Smith
New submission from Gregory P. Smith: If you are 1) using zipimport 2) zipimport.c has cached the zip file's central index during an import. 3) the .zip file is modified or replaced while the process is running 4) you try to import something new from that .zip file. you're gonna have a bad time

[issue11176] give more meaningful argument names in argparse documentation

2013-09-23 Thread Westley Martínez
Westley Martínez added the comment: I've skimmed through the patches. Good job kids. This is much better than it was before. No more of that silly command-line calculator or the foobar nonsense that sounds drier than the POSIX standard. Is there anything else that needs to be done? ---

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Nick Coghlan
Nick Coghlan added the comment: Suppress the traceback, avoid printing the exception repr and instead display something more like "Broken pipe: receiving end of stdout closed prior to interpreter shutdown" -- ___ Python tracker

[issue19078] Allow reversed(memoryview), like memoryview

2013-09-23 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, with the 3.3 changes, I think we should continue down the multi-dimensional array path. I suggest we run with whatever NumPy uses for ndarray, which I believe is "number of items in the first dimension". -- title: Allow reversed(memoryview), like memo

[issue19079] chameleon benchmark fails on 3.4

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I guess version ranges could be feasible. Perhaps with benchmark-skipping decorators? -- ___ Python tracker ___ ___

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > My specific suggestion was aimed at 3.4 - I think reporting the failure to > flush stdout on stderr is the right thing to do (since data may have been > lost and people can suppress it by closing stdout early, including in an > atexit handler), but I also think

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Nick Coghlan
Nick Coghlan added the comment: My specific suggestion was aimed at 3.4 - I think reporting the failure to flush stdout on stderr is the right thing to do (since data may have been lost and people can suppress it by closing stdout early, including in an atexit handler), but I also think it's wort

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 23, 2013, at 06:33 PM, Giampaolo Rodola' wrote: >Barry can you paste the traceback caused by the race condition? What's not >clear to me is when (what line) it occurs. One solution might be to send a >"NOOP" command (self.client.sendcmd('noop')) in orde

[issue18682] [PATCH] remove bogus codepath from pprint._safe_repr

2013-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: To made some sense in Python 3 context we should remove the check for the locale module and replace repr() by ascii(). -- ___ Python tracker

[issue19078] Allow reversed(memoryview), like memoryview[::-1]

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: So the dilemma with len() was: does it return the number of bytes, or the number of items? Given the new memoryview semantics, I'd say it should return the number of items. -- nosy: +ncoghlan, skrah ___ Python track

[issue19080] Enrich SyntaxError with additional information

2013-09-23 Thread alon horev
New submission from alon horev: Some context for this feature request: I'm using the wonderful ast module for a library that translates python code to MongoDB queries (https://github.com/alonho/pql). I also did the same for SQL queries using sqlalchemy as a part of another project (https://git

[issue4366] cannot find -lpythonX.X when building Python on FreeBSD with --enable-shared

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Koobs, have you signed a contributor's agreement? See http://www.python.org/psf/contrib/ -- ___ Python tracker ___ __

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch, lacking tests. How important it is to fix this in 2.7 I'm not sure. People are certainly used to the quirk now, and it's generally harmless. -- keywords: +patch Added file: http://bugs.python.org/file31853/flush_stdout_at_shutdown.patch

[issue19028] tkinter.tkapp.merge() fails on non-strings

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue19028] tkinter.tkapp.merge() fails on non-strings

2013-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c1c67d980bb by Serhiy Storchaka in branch '3.3': Issue #19028: Fixed tkinter.Tkapp.merge() for non-string arguments. http://hg.python.org/cpython/rev/5c1c67d980bb -- nosy: +python-dev ___ Python tracker

[issue13824] argparse.FileType opens a file and never closes it

2013-09-23 Thread paul j3
paul j3 added the comment: In this patch I implement a FileContext class. It differs from FileType in 2 key areas: - it returns a 'partial(open, filename, ...)' - it wraps '-' (stdin/out) in a dummy context protecting the file from closure. The resulting argument is meant to be used as: w

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, actually, the real issue is that sys.stderr is gone by the time we try to print the exception (which explains the "lost sys.stderr" message). -- ___ Python tracker ___

[issue19079] chameleon benchmark fails on 3.4

2013-09-23 Thread Brett Cannon
Brett Cannon added the comment: I guess either we introduce compatible version ranges or drop Chameleon from 3.x compatibility and then add a new version of Chameleon if/when they update for Python 3.4 support. -- ___ Python tracker

[issue19034] More useful repr for Tcl_Obj

2013-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset ece634a69ba8 by Serhiy Storchaka in branch 'default': Issue #19034: repr() for tkinter.Tcl_Obj now exposes string reperesentation. http://hg.python.org/cpython/rev/ece634a69ba8 -- nosy: +python-dev ___ Py

[issue18996] unittest: more helpful truncating long strings

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue19034] More useful repr for Tcl_Obj

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18996] unittest: more helpful truncating long strings

2013-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5bb83faa8818 by Serhiy Storchaka in branch 'default': Issue #18996: TestCase.assertEqual() now more cleverly shorten differing http://hg.python.org/cpython/rev/5bb83faa8818 -- nosy: +python-dev ___ Python

[issue19078] Allow reversed(memoryview), like memoryview[::-1]

2013-09-23 Thread Claudiu.Popa
New submission from Claudiu.Popa: Hello. The following seems a little weird: Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32 >>> m = memoryview(b'123') >>> list(m[::-1]) [51, 50, 49] >>> list(reversed(m)) Traceback (most recent call last): File "

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2013-09-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED, _WTERMSIG=os.WTERMSIG, _WIFEXITED=os.WIFEXITED, -_WEXITSTATUS=os.WEXITSTATUS): +_WEXITSTATUS=os.WEXITSTATUS, _SubprocessError=SubprocessError):

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure I understand Nick's suggestion. As far as I can tell, the issue is to detect that write() (really fwrite() in 2.x) failed and output the error. -- ___ Python tracker

[issue19079] chameleon benchmark fails on 3.4

2013-09-23 Thread Antoine Pitrou
New submission from Antoine Pitrou: Not sure what to do about this, but it seems the bundled Chameleon lib doesn't work on 3.4: RuntimeError: Benchmark died: Traceback (most recent call last): File "./performance/bm_chameleon.py", line 38, in util.run_benchmark(options, options.num_runs,

[issue19064] can't run py3 benchmarks

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Now done. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue19064] can't run py3 benchmarks

2013-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 88b6ef9aa9e9 by Antoine Pitrou in branch 'default': Issue #19064: let perf.py decide which library path is required for which interpreter http://hg.python.org/benchmarks/rev/88b6ef9aa9e9 -- nosy: +python-dev ___

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Barry can you paste the traceback caused by the race condition? What's not clear to me is when (what line) it occurs. One solution might be to send a "NOOP" command (self.client.sendcmd('noop')) in order to synchronize client and server. -- ___

[issue17400] ipaddress should make it easy to identify rfc6598 addresses

2013-09-23 Thread pmoody
pmoody added the comment: ok, here's an is_global/is_private patch using the iana special registry for ipv4 and ipv6. -- keywords: +patch Added file: http://bugs.python.org/file31851/issue.17400.patch ___ Python tracker

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 23, 2013, at 03:36 PM, Serhiy Storchaka wrote: >What about time.sleep(0.1)? I usually don't like introducing sleeps to fix race conditions, but if that's the only option for landing this patch, maybe we'll have to hold our noses and do it. --

[issue19078] Allow reversed(memoryview), like memoryview[::-1]

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +josiahcarlson, stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about time.sleep(0.1)? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue19077] More robust TemporaryDirectory cleanup

2013-09-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch solves the problem with TemporaryDirectory cleanup. If shutil.rmtree() failed because module globals are set to None, TemporaryDirectory now uses own rmtree implementation which does not depends from globals. The patch also fixes other m

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2013-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. It fixes also other issues with globals nullification (similar to issue19021). -- Added file: http://bugs.python.org/file31849/subprocess_del.patch ___ Python tracker

[issue19040] Problems with overriding Enum.__new__

2013-09-23 Thread Eli Bendersky
Eli Bendersky added the comment: On Sun, Sep 22, 2013 at 9:04 PM, Ethan Furman wrote: > > Ethan Furman added the comment: > > Yup, just trying to add some explanation on how it currently works. > > Drekin, I'm sure you've already figured this out, but for those who may > read this in the future:

[issue17777] Unrecognized string literal escape sequences give SyntaxErrors

2013-09-23 Thread Mark Egan-Fuller
Mark Egan-Fuller added the comment: Python correctly throws a unicode error here, directing the user towards the fact that this is an issue specifically with the unicode escaping. >>> "\u" File "", line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1:

[issue1185124] pydoc doesn't find all module doc strings

2013-09-23 Thread STINNER Victor
STINNER Victor added the comment: +except: +pass ... +except TypeError: +return None I don't understand these try/except. First, "except: pass" must never be used, only catch specific exceptions (ex: AttributeError). Can you explain why you expect a TypeError?

[issue19040] Problems with overriding Enum.__new__

2013-09-23 Thread Drekin
Drekin added the comment: Yes, I've done it similarily using a class method. Thank you for help. -- ___ Python tracker ___ ___ Python-

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Nick Coghlan
Nick Coghlan added the comment: It seems this can be triggered easily with echo, since that appears to reliably close stdin on startup (Discovered via http://stackoverflow.com/questions/16314321). Compare (using a recent trunk build, although I see the same behaviour with the system 3.3 insta

[issue13404] Add support for system.methodSignature() to XMLRPC Server

2013-09-23 Thread Vajrasky Kok
Vajrasky Kok added the comment: > How do you infer the data types for the parameters? I don't think we can, unless we force them to use function annotation. If they don't use that feature, then we say the signature is not supported. The problem is getting deeper if we are talking about return