[issue17204] argparser's subparsers.add_parser() should accept an ArgumentParser

2013-04-18 Thread paul j3

paul j3 added the comment:

The 'subparsers' object has a _parser_class attribute that is normally set to 
the class of the parent parser.  In the attached file I create a

class CustomParser(argparse.ArgumentParser)

that makes a parser instance which copies all of the attributes of prototype 
parser.

proto1 = argparse.ArgumentParser(prog='SUBPROG1')
proto1.add_argument('--foo')
subparsers._parser_class = CustomParser
sub1 = subparsers.add_parser('cmd1', proto=proto1, help='parser based on 
proto1')

'sub1' is a functional copy of 'proto1'.  I think this does what you want 
without changing the argparse code.  There probably is a way of defining 
CustomParser (maybe its '__new__' method) so 'sub1' is actually 'proto1'.  But 
the copy approach appears to work just fine.

--
nosy: +paul.j3
Added file: http://bugs.python.org/file29916/issue17204.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17204
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17532] IDLE: Always include Options menu on MacOSX

2013-04-18 Thread Guilherme Simões

Guilherme Simões added the comment:

Hi Roger,

I just signed the contributor agreement. Unfortunately, I can't test on older 
MacOS versions, but I also think it should work.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17532
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17786] Crash in test_ctypes.test_callbacks() on AMD64 NetBSD 5.1.2 [SB] 3.x

2013-04-18 Thread STINNER Victor

New submission from STINNER Victor:

Fatal Python error: Segmentation fault

Current thread 0x:
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/ctypes/test/test_as_parameter.py,
 line 87 in test_callbacks
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/case.py,
 line 496 in run
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/case.py,
 line 535 in __call__
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py,
 line 105 in run
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py,
 line 67 in __call__
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py,
 line 105 in run
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py,
 line 67 in __call__
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py,
 line 105 in run
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py,
 line 67 in __call__
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/runner.py,
 line 168 in run
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/support.py,
 line 1557 in _run_suite
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/support.py,
 line 1591 in run_unittest
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py,
 line 1286 in lambda
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py,
 line 1287 in runtest_inner
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py,
 line 999 in runtest
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py,
 line 797 in main
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py,
 line 1572 in main_in_temp_cwd
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/__main__.py,
 line 3 in module
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/runpy.py, 
line 73 in _run_code
  File 
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/runpy.py, 
line 160 in _run_module_as_main
[1]   Segmentation fault  ./python ./Tools...

The crash occurs since the build 
http://buildbot.python.org/all/builders/AMD64%20NetBSD%205.1.2%20%5BSB%5D%203.x/builds/891/.

The build was triggered because of the new changeset 
ae5c4a9118b8a3f490f77f2084d46163ca229aef, but I don't see a link between this 
changeset and ctypes. I may be another change in the toolchain, a system 
upgrade, or sometimes like that.

It looks like the crash is specific to Python 3.4.

--
components: Extension Modules
messages: 187228
nosy: ezio.melotti, haypo, pitrou, trent
priority: normal
severity: normal
status: open
title: Crash in test_ctypes.test_callbacks() on AMD64 NetBSD 5.1.2 [SB] 3.x
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17786
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17413] format_exception() breaks on exception tuples from trace function

2013-04-18 Thread ingrid

ingrid added the comment:

Thank you, r.david.murray. I have updated the patch with your suggestions 
included.

--
Added file: http://bugs.python.org/file29917/issue17413.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17413
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-18 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

In addition, we could bring back the switch dispatch based on the first letter 
of the type name. It does seem to speed up things as well but as much as the 
type cache optimization.

--
nosy: +pitrou, serhiy.storchaka
title: Optimize pickling function lookups in hot loops. - Optimize pickling 
function dispatch in hot loops.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17787
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Eric Wieser

New submission from Eric Wieser:

It would be nice if there was a `with` expression. Such that instead of:

with open(...) as f:
result = foo(f)

One could write:

result = foo(f) with open(...) as f

This would be particularly useful in comprehensions. Instead of:

files = {}
for fname in os.listdir('.'):
if predicate(fname):
with open(fname) as f:
files[fname] = foo(f)

files = {
fname: foo(f) with open(fname) as f
for fname in os.listdir('.') if predicate(fname)
}

--
messages: 187232
nosy: Eric.Wieser
priority: normal
severity: normal
status: open
title: Add a with expression, for use in comprehensions
type: enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17788
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Eric Wieser

Changes by Eric Wieser wieser.eric+py...@gmail.com:


--
components: +Interpreter Core

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17788
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-18 Thread Stijn Hoop

Stijn Hoop added the comment:

OK, fair enough.

From reading sources, it appears that hostname is using getaddrinfo(3) on 
kernelhostname with hints-ai_flags  AI_CANONNAME, while Lib/socket.py simply 
uses gethostbyaddr(kernelhostname), and falls back on kernelhostname in case 
of errors.

Unfortunately I am not entirely sure who is correct here, as I don't know the 
intent of socket.getfqdn().

In my case, kernelhostname is set to 'pclin281' e.g. without the dots. I 
believe this to be correct, but I know that this is already controversial as 
in there exists software that expects an FQDN there, and internet folklore is 
split about 50/50 about this necessity.

Then, apparently, there is confusion about AI_CANONNAME and what it actually 
should do. glibc upstream does address lookups but Fedora patches this out. See 
this recent glibc bug for more pointers:

http://sourceware.org/bugzilla/show_bug.cgi?id=15218

As mentioned in that bug, a lot of software runs on Fedora and works using that 
definition of AI_CANONNAME.

However, switching Lib/socket.py / getfqdn from gethostbyaddr to getaddrinfo 
might have more implications than just fixing this case. I can try to write a 
patch, but is this the right direction?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14910] argparse: disable abbreviation

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

Ping :)

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14910
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Berker Peksag

Berker Peksag added the comment:

I think this needs to be discussed on python-ideas first.

--
nosy: +berker.peksag

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17788
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-18 Thread Stijn Hoop

Stijn Hoop added the comment:

Attached is a very lightly tested patch that matches hostname -f behaviour on 
my system. I suspect this should be OK but it definitely needs more testing 
than just my system...

--
keywords: +patch
Added file: http://bugs.python.org/file29919/python2.7-socket-getfqdn.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-18 Thread R. David Murray

R. David Murray added the comment:

The problem with your patch is that it changes the (effective) meaning of the 
'name' parameter.  Before the patch, name can be an IP address.  After the 
patch, that will fail on Fedora.  (It also fails on my Gentoo system).

It is interesting to note, as well, that the documentation for gethostbyaddr 
says that it is obsolete and getaddrinfo should be used instead.

Could we use the getaddrinfo call if we don't get an FQDN back from 
gethostbyaddr?  It doesn't look like that would completely solve your problem, 
though, given your example output.  Have you figured out why that is happening? 

Alternatively, perhaps we could fall back to gethostbyaddr if we don't get an 
fqdn from the getaddrinfo call.  

However, given that the documentation actually specifies the algorithm used by 
getfqdn, I'm not sure if we can make either change in a bugfix version.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Eric V. Smith

Eric V. Smith added the comment:

Indeed, this should be on python-ideas. Eric: can you start a thread over 
there? Thanks.

--
nosy: +eric.smith
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17788
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12713] argparse: allow abbreviation of sub commands by users

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

The latest patch seems okay to me.  I've successfully applied it and ran the 
test suite and everything passed.  Could someone please take a look with a view 
to getting this committed, thanks.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12713
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Why did you add all those calls to PyMemoTable_Get?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17787
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17760] No i18n of IDLE's interface in french

2013-04-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I strongly disagree with Ezio's argumentation here. If Kate and Firefox are 
internationalized, IDLE can very well be internationalized too.

--
nosy: +pitrou
resolution: rejected - 
stage: committed/rejected - 
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17760
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17760] No i18n of IDLE's interface in french

2013-04-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

That said, this issue can be considered a duplicate of #17776.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17760
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17741] event-driven XML parser

2013-04-18 Thread Eli Bendersky

Eli Bendersky added the comment:

Antoine, the patch LGTM. There's some more cleaning that needs to be done in 
surrounding code, but I can do that later. Also I should probably update the 
documentation with a bit more details.

Just add a NEWS entry when you commit.

Thanks for working on this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17741
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17760] No i18n of IDLE's interface in french

2013-04-18 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - IDLE Internationalization

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17760
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17781] optimize compilation options

2013-04-18 Thread Christian Heimes

Christian Heimes added the comment:

Here is a patch for -flto. You need to run autoconf to re-generate configure, 
too.

--
keywords: +patch
nosy: +christian.heimes
Added file: http://bugs.python.org/file29920/lto_flag.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17781
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17788
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17781] optimize compilation options

2013-04-18 Thread Matthias Klose

Matthias Klose added the comment:

the proposed patch is wrong. when linking with -flto, you should pass all the 
relevant CFLAGS to the linker as well. Also pass -fuse-linker-plugin.

and this should be an opt-in, not the default. Depending on the architecture 
and the compiler version, -flto is not as stable as you want it to be.

and last, this ends up as the default for building third party extensions too, 
which again, I think should be an opt-in.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17781
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13831] get method of multiprocessing.pool.Async should return full traceback

2013-04-18 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Pickling an exception (assuming it works) does not capture the traceback.  
Doing so would be difficult/impossible since the traceback refers to a linked 
list of frames, and each frame has references to lots of other stuff like the 
code object, the global dict, local dict, builtin dict, ...  I certainly do not 
know how to make traceback objects pickle compatible.

But you could wrap any exception raised by your function in another exception 
whose representation contains a formatted traceback of the original exception.  
E.g.

class WrapException(Exception):
def __init__(self):
exc_type, exc_value, exc_tb = sys.exc_info()
self.exception = exc_value
self.formatted = ''.join(traceback.format_exception(exc_type, 
exc_value, exc_tb))
def __str__(self):
return '%s\nOriginal traceback:\n%s' % (Exception.__str__(self), 
self.formatted)

def go():
try:
1/0
except Exception:
raise WrapException()

Then raising an unpickled WrapException instance gives the original traceback

 try: go()
... except Exception as e: exc = e
...
 raise pickle.loads(pickle.dumps(exc))
Traceback (most recent call last):
  File stdin, line 1, in module
__main__.WrapException:
Original traceback:
Traceback (most recent call last):
  File stdin, line 3, in go
ZeroDivisionError: integer division or modulo by zero

--
nosy: +sbt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13831
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17135] imp doc should direct to importlib

2013-04-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f15a46a8c76 by R David Murray in branch '3.3':
#17135: Add note in imp to use importlib for new programs.
http://hg.python.org/cpython/rev/8f15a46a8c76

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17135
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17776] IDLE Internationalization

2013-04-18 Thread Roger Serwy

Roger Serwy added the comment:

Extensions would need to be modified to use the gettext module.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17776
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17135] imp doc should direct to importlib

2013-04-18 Thread R. David Murray

R. David Murray added the comment:

Thanks, Kristian.

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed
versions:  -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17135
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17177] Document/deprecate imp

2013-04-18 Thread R. David Murray

R. David Murray added the comment:

The documentation deprecation has been added as part of issue 17135.

Leaving this open to address Ezio's last comment.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17177
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17646] traceback.py has a lot of code duplication

2013-04-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Okay. Will you upload the latest version?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-18 Thread Stijn Hoop

Stijn Hoop added the comment:

OK, dumping my current findings here, as I'm still not sure what the expected 
results should be.

First of all, Lib/socket.py calls gethostbyaddr with a name. As in, gethostby 
_ADDR_ with a name.

This works because Modules/socketmodule.c internally uses setipaddr() to 
resolve the name to an address. setipaddr() does this using a call to 
getaddrinfo() with hints.ai_family == AF_UNSPEC and no further flags.

On my system (confirmed using the test program attached) this results in SIX 
entries, and this is the part that confused me.

Due to virtualization I have a virtual bridge virbr0 configured with an 
internal IP address 192.168.122.1, as well as my LAN-connected bridge br0 with 
IP address 131.155.71.8. Both of these addresses are returned in the call to 
getaddrinfo() (each one 3 times), but NOT ALWAYS IN THE SAME ORDER.

And this is the clue as to why python's socket.getfqdn() does not behave 
consistently. For 192.168.122.1 does not resolve to anything, hence it will 
return pclin281. And 131.155.71.8 will backwards resolve to 
pclin281.win.tue.nl as the PTR record points to that entry.

Now, again, I'm not entirely sure what to do here. I agree that this is not a 
simple bugfix. I also think that, apart from the weirdness of getaddrinfo() 
return order, socket.getfqdn() is doing it's documented job of returning /an/ 
FQDN for a given host.

But in case of the guaranteed LOCAL canonical hostname, another function is 
warranted, imho.

Does this make sense?

For the record, output of a given run on my system:

[TUE\shoop@pclin281] ~/tmp ./test
gai canon result 0: pclin281.campus.tue.nl 192.168.122.1
gai canon result 1: (null) 131.155.71.8
gai result 0: (null) 131.155.71.8
gai result 1: (null) 131.155.71.8
gai result 2: (null) 131.155.71.8
gai result 3: (null) 192.168.122.1
gai result 4: (null) 192.168.122.1
gai result 5: (null) 192.168.122.1
ghbn result 0 h_name: pclin281.campus.tue.nl
ghbn result 0 h_alias: __NONE__
ghbn result 1 h_name: pclin281.campus.tue.nl
ghbn result 1 h_alias: __NONE__
ghbn result 2 h_name: pclin281.campus.tue.nl
ghbn result 2 h_alias: __NONE__
ghbn result 3 h_name: pclin281.campus.tue.nl
ghbn result 3 h_alias: __NONE__
ghbn result 4 h_name: pclin281.campus.tue.nl
ghbn result 4 h_alias: __NONE__
ghbn result 5 h_name: pclin281.campus.tue.nl
ghbn result 5 h_alias: __NONE__
ghbn result 6 h_name: pclin281.campus.tue.nl
ghbn result 6 h_alias: __NONE__
ghbn result 7 h_name: pclin281.campus.tue.nl
ghbn result 7 h_alias: __NONE__
ghbn result 8 h_name: pclin281.campus.tue.nl
ghbn result 8 h_alias: __NONE__
ghbn result 9 h_name: pclin281.campus.tue.nl
ghbn result 9 h_alias: __NONE__

--
Added file: http://bugs.python.org/file29921/python5004-test.c

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

The patch doesn't apply cleanly on Windows.  Trying to sort this with 
TortoiseHg has left me completely flummoxed so can I leave this with the OP to 
provide a new patch?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0

2013-04-18 Thread R. David Murray

R. David Murray added the comment:

Yes, just with limited amounts of attention to spare :(

This is a rather difficult situation, since it appears we inadvertently changed 
a behavior.  Fortunately it was in a feature release.  Unfortunately a new 
parameter to make a subparser required again can't be done in a bug fix release.

There seem to be two ways to handle this:

(1) accept the new feature.  Then the bug fix should be to make the traceback 
not happen, and we should update the docs to mention the new behavior as added 
in 3.3.  Then we change issue 9253 to be about adding the required to 
subparsers in 3.4 with a default of False.

(2) treat this as a bug.  In that case the bug fix would be to restore the old 
required=True behavior, and making them optional again is an enhancement for 
3.4 covered by issue 9253 as is.

The issue with (1) is that the discussion in #9253 concluded that the previous 
default behavior was safer for users.

In either case, we need a unit test that tests the behavior.

I think we need input either from Steven or from other Python core devs on 
which way to go, because I can't make up my mind :)  A post to python-dev may 
be in order, since we haven't heard anything from Steven for a while now.

--
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16308
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2013-04-18 Thread R. David Murray

R. David Murray added the comment:

Yeah, a new function was a thought that had crossed my mind as well.  
getfqdnbyname, maybe?  Or gethostnamefqdn?  Then deprecate calling getfqdn 
without an argument.

I agree that gethostbyaddr accepting a non-IP is weird.  I have no idea why it 
was implemented that way, much less why it is *used* that way.  It's been that 
way for a long time, though.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12641] Remove -mno-cygwin from distutils

2013-04-18 Thread Jeffrey Armstrong

Changes by Jeffrey Armstrong jeffrey.armstr...@approximatrix.com:


--
nosy: +Jeffrey.Armstrong

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17789] Fix test discovery for test_random.py

2013-04-18 Thread Zachary Ware

New submission from Zachary Ware:

This one had subclassing issues, and SystemRandom_TestBasicOps was being 
skipped by exclusion from the list of tests passed to support.run_unittest, so 
it's been converted to a skip decorator.

--
components: Tests
files: test_random_discovery.diff
keywords: patch
messages: 187257
nosy: brett.cannon, ezio.melotti, zach.ware
priority: normal
severity: normal
status: open
title: Fix test discovery for test_random.py
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29922/test_random_discovery.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17789
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1626300] 'Installing Python Modules' does not work for Windows

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

Is any more work needed on this issue or can it be closed?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1626300
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17790] Fix test discovery for test_set.py

2013-04-18 Thread Zachary Ware

New submission from Zachary Ware:

Just subclassing and test_main in this one.

--
components: Tests
files: test_set_discovery.diff
keywords: patch
messages: 187259
nosy: brett.cannon, ezio.melotti, zach.ware
priority: normal
severity: normal
status: open
title: Fix test discovery for test_set.py
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29923/test_set_discovery.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17790
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14555] clock_gettime/settime/getres: Add more clock identifiers

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

If nothing else the patch will need updating to show versionadded as 3.4 
instead of 3.3.

--
nosy: +BreamoreBoy
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14555
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15721] PEP 3121, 384 Refactoring applied to tkinter module

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

Is any more work needed on this issue or can it be closed?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15721
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16445] SEGFAULT when deleting Exception.message

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

It looks as if this issue can be closed as a fix has been committed.  However a 
new issue will be needed if the advice offered in msg181839 is followed.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16445
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17742] Add _PyBytesWriter API

2013-04-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I run my own benchmarks and don't see any regression besides a random noise. 
Actually I see even speed up for some cases:

./python -m timeit -s a = '\x80'*1  a.encode()

Before patch: 29.8 usec per loop, after patch: 21.5 usec per loop.
This is just a compiler's caprice.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17742
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17760] No i18n of IDLE's interface in french

2013-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I responded very cautiously to #17776 in part (but not only) because I had the 
impression that Ezio's view was the general consensus of other developers. 
Antoine, since that is wrong or at least not complete right, could you record 
at least your +1 there?

My other reason for caution is ignorance of how gettext operates, beyond the 
use of _(...) to wrap strings. Hence I asked several questions on #17776 about 
gettext and the proposed patch. Answers there from someone, but especially 
another core developer, with knowledge and experience would be appreciated.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17760
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1626300] 'Installing Python Modules' does not work for Windows

2013-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I consider it Éric's decision.
3.3 on Windows comes with the new py launcher. That might be incorporated into 
the docs if it has not. That might also be a separate issue.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1626300
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17776] IDLE Internationalization

2013-04-18 Thread Ned Deily

Ned Deily added the comment:

Also, IDLE makes use of features provided by Tk and those vary by platform.  In 
some cases, IDLE uses some Tk-supplied default menus and menu items.  So 
internationalization of IDLE would need to investigate and make use of Tk i18n 
features on all supported platforms.

--
nosy: +ned.deily

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17776
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1626300] 'Installing Python Modules' does not work for Windows

2013-04-18 Thread Éric Araujo

Éric Araujo added the comment:

I consider documentation for the py launched a distinct issue.  The original 
complaint here was fixed, the part about packaging does not apply anymore, so I 
will close this.  If one of the changed instructions still does not work (e.g. 
“setup.py build” does not work), please reopen.

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1626300
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17776] IDLE Internationalization

2013-04-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

+1 for internationalizing IDLE. Any decent GUI app is internationalized these 
days, even developer tools.

Re: gettext, its semantics and API are a bit of a PITA, but it's basically the 
standard for internationalization of FLOSS projects. There are all kind of 
tools to help edit gettext localization files.

Re: how to organize translation work, Olivier Berger already answered on 
idle-dev, I believe.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17776
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14191] argparse doesn't allow optionals within positionals

2013-04-18 Thread Glenn Linderman

Glenn Linderman added the comment:

Paul, your comments are interesting, but your proposed patch doesn't actually 
solve the problem.

So here I am typing away at my command prompt, and I type in a couple optional 
parameters I know I'll need and start on the sequence of positional ones, and 
half way through I remember oh, I need another optional paremeter so I type 
it in next before I forget, and then go on with the positional ones.

No prior Unix-style argument parsing mechanism that I have ever seen or heard 
of would be confused by that, but argparse is.

This bug is about providing a facility in argparse that supports intermixing 
optional parameters into strings of positional parameters, just like all prior 
Unix-style argument parsing mechanisms, so that an application can be ported to 
use argparse without breaking command lines that their users have stored in 
command files. Otherwise argparse is not an upgrade path for an application, 
yet optparse has been deprecated.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14191] argparse doesn't allow optionals within positionals

2013-04-18 Thread Glenn Linderman

Glenn Linderman added the comment:

I should clarify, before someone jumps in: some particular applications do 
implement restrictions on order of optional and positional arguments; I'm aware 
of that. getopt easily supported application defined order restrictions, 
because it processed arguments sequentially, and the processing loop was user 
code. optparse, as has been pointed out, parses the optionals, and leaves a 
single list of positionals, combined from between all the optionals, for the 
user code to process in any manner, but would actually make it harder for user 
code to implement order restrictions. argparse goes the other way, taking over 
all the user parsing (which is a good thing), but not providing sufficient 
features to implement flexible mixing of optional and positional arguments.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17741] event-driven XML parser

2013-04-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f903cf864191 by Antoine Pitrou in branch 'default':
Issue #17741: Add ElementTree.IncrementalParser, an event-driven parser for 
non-blocking applications.
http://hg.python.org/cpython/rev/f903cf864191

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17741
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Zack Weinberg

Zack Weinberg added the comment:

Here is a new patch vs latest trunk.

--
Added file: http://bugs.python.org/file29924/issue16624-v34a.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Zack Weinberg

Changes by Zack Weinberg za...@panix.com:


Removed file: http://bugs.python.org/file28247/issue16624-v34.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17741] event-driven XML parser

2013-04-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you, Eli. Now committed :)

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17741
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17742] Add _PyBytesWriter API

2013-04-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have added some comments on Rietveld.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17742
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17442] code.InteractiveInterpreter doesn't display the exception cause

2013-04-18 Thread Philip Jenvey

Philip Jenvey added the comment:

PyPy's fixed this here:

https://bitbucket.org/pypy/pypy/commits/1341a432e134

The tests just need to be adapted to the stdlib test suite

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16037] httplib: header parsing is not delimited

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

Patches LGTM but I suggest TooManyHeaders instead of TooMuchHeaders.  I've 
tried the 3.2 patch against the latest default repo on Windows Vista and it 
applies cleanly.  All tests passed so looks as if this could be committed.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16037
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think that it will be better not introduce a new argument, but reuse stdin. 
Just allow io.BytesIO (or perhaps even any file object) be specified as stdin.

The change will be straightforward:

if isinstance(stdin, io.BytesIO):
inputdata = stdin.read()
stdin = PIPE

Or more general:

if not(stdin is None or stdin in (PIPE, DEVNULL) or isinstance(stdin, int)):
try:
stdin.fileno()
except (AttributeError, UnsupportedOperation, OSError):
inputdata = stdin.read()
stdin = PIPE

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Zack Weinberg

Zack Weinberg added the comment:

 I think that it will be better not introduce a new argument, but reuse stdin. 
 Just allow io.BytesIO (or perhaps even any file object) be specified as stdin.

If we were designing from scratch I might agree, but we aren't.  Principle of 
least astonishment says that the API here should match 
`subprocess.communicate`, and that has separate `stdin=FILE` and `input=STRING` 
arguments.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Zack Weinberg

Zack Weinberg added the comment:

Note also that allowing `stdin=any filelike` in a clean fashion would require 
rather more surgery than you suggest, because a filelike can produce an 
infinite stream of data, and people would expect that to work when the 
subprocess only reads a finite prefix; making it *actually* work would involve 
teaching communicate() to take a filelike and copy blocks into the pipe.  I 
have no *objection* to that change but I think it is too much mission creep for 
this proposal.

With the present design, where stdin= has to be something for which fileno() is 
defined, and input= has to be a string (hence of finite length), no one is 
going to expect something to work that won't.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6386] importing yields unexpected results when initial script is a symbolic link

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

It will be difficult to take this forward owing to the problem description in 
msg89914 being limited to importing from normal files in the same directory 
does not work.  Plus any problems back then may well have been fixed due to 
the reworking of the import mechanism by somebody who apparently has spent 10 
years as a Python core developer.  Congratulations :)

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6386
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6386] importing yields unexpected results when initial script is a symbolic link

2013-04-18 Thread Brett Cannon

Brett Cannon added the comment:

In case someone wants to reproduce:

  mkdir pkg
  echo import tester  pkg/symlinked.py
  ln -s pkg/symlinked.py linked.py
  echo print('HIT')  tester.py

That fails because Python assumes you are in the pkg directory, not the 
directory you started execution. This makes sense to me. If you used a hard 
link then this isn't a problem. Python treats a symlink as a redirect, which 
means it works where the redirect tells it to and doesn't try to confuse things 
by considering 2 different locations to be the cwd for imports.

Closing as won't fix since I think it would be more confusing to support both 
a symlink directory and the cwd.

--
assignee:  - brett.cannon
resolution:  - wont fix
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6386
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12762] EnvironmentError_str contributes to unportable code

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

It doesn't bother me that Python programmers can write unportable code, what 
with consenting adults and all that. Further the implementation of PEP 3151 in 
3.3 allows specific exceptions to be caught, e.g. FileNotFoundError.  I can't 
see anybody allowing the exception number being changed to the symbolic string 
or even omitted completely, so I'd recommend this is closed unless there's an 
extremely good reason not to do so.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12762
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14364] Argparse incorrectly handles '--'

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

@Michele could you provide a patch for this?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14364
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17791] PC/pyconfig.h defines PREFIX macro

2013-04-18 Thread Christian Heimes

New submission from Christian Heimes:

The pyconfig.h file of the Windows build environment defines at least two 
macros without a Py/PY prefix:

PC/pyconfig.h:#define PREFIX 
PC/pyconfig.h:#define EXEC_PREFIX 

This has caused multiple issues in the past. For example libexpat uses PREFIX, 
too. When I was working on my XML patches it took me about half an hour to fix 
the build on Windows. PyLucence's JCC has run into the same issue, too. 
http://mail-archives.apache.org/mod_mbox/lucene-pylucene-dev/201304.mbox/browser

Can we change the name of PREFIX to PY_PREFIX nad EXEC_PREFIX to PY_EXEC_PREFIX?

--
components: Build, Windows
messages: 187284
nosy: christian.heimes, loewis
priority: normal
severity: normal
stage: needs patch
status: open
title: PC/pyconfig.h defines PREFIX macro
type: compile error
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17791
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I partially agree with you. We must copy blocks in communicate().

Your patch is great, but I doubt that there is a best feature. If we teach 
communicate() to work with file-like objects, this feature will exceed your 
suggestion and 'input' parameter of check_output() will be redundant. Are you 
want to implement a more powerful feature? If not, I will commit your patch. 
But I hope that before the 3.4 release we will replace it with a more powerful 
feature.

Mark, can you please run subprocesses tests on Windows?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17633] zipimport's handling of namespace packages is incorrect

2013-04-18 Thread Phil Connell

Changes by Phil Connell pconn...@gmail.com:


Removed file: http://bugs.python.org/file29679/zipimport_ns.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17633] zipimport's handling of namespace packages is incorrect

2013-04-18 Thread Phil Connell

Changes by Phil Connell pconn...@gmail.com:


Removed file: http://bugs.python.org/file29696/test.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17633] zipimport's handling of namespace packages is incorrect

2013-04-18 Thread Phil Connell

Phil Connell added the comment:

The attached patch is ready for review.

--
Added file: http://bugs.python.org/file29925/issue17633.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15852] typos in curses argument error messages

2013-04-18 Thread Phil Connell

Phil Connell added the comment:

The patch looks correct and complete, and still patches and passes the tests.

So, as far as I can see, this can be committed.

--
nosy: +pconnell

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15852
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16000] test_curses should use unittest

2013-04-18 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +zach.ware
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16000
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12762] EnvironmentError_str contributes to unportable code

2013-04-18 Thread R. David Murray

R. David Murray added the comment:

The enum module that is likely to land in 3.4 will allow us to fix this.  We 
can discuss whether we want to just display the name, or both the name and the 
value.  Omitting it would indeed be bad, IMO.

--
nosy: +r.david.murray
stage:  - needs patch
type:  - enhancement
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12762
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Zack Weinberg

Zack Weinberg added the comment:

My position is:

* input= should be supported in check_output(), for consistency with 
communicate().

* I like the idea of making stdin= support file-like objects which don't have a 
fileno, in both communicate() and everything that calls it, but that does not 
belong in this issue, I do not have time to code it myself, and, again, it 
should be *in addition to*, not *instead of*, supporting input= in 
check_output().

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread R. David Murray

R. David Murray added the comment:

Since it is a new feature either way, we can add stdin support and deprecate 
the input= argument of communicate.  But we can also go with the input= for 
check_output now, and see if anyone steps up to do the bigger patch before 3.4 
hits beta.  Which is what I hear Serhiy suggesting.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Zack Weinberg

Zack Weinberg added the comment:

??? communicate() has always had input= AFAIK.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread R. David Murray

R. David Murray added the comment:

Yes.  IIUC are talking about possibly replacing it with a more powerful 
feature.  We wouldn't actually remove it, but we would recommend using the new 
feature instead, thus making the fact that check_output doesn't have it 
irrelevant.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16355] inspect.getcomments() does not work in the interactive shell

2013-04-18 Thread Phil Connell

Phil Connell added the comment:

Here's a patch that updates getcomments to match the behaviour of getsource, 
raising OSError if the source file can't be found and TypeError when passed a 
built-in.

Since this is a backwards-incompatible change, presumably it can only be 
applied to 3.4.

This is ready for review.

--
keywords: +patch
nosy: +pconnell
Added file: http://bugs.python.org/file29926/issue16355.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16355
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Zack Weinberg

Zack Weinberg added the comment:

OK, I get that, but what I'm saying is I think input= is still desirable even 
if stdin= becomes more powerful.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17633] zipimport's handling of namespace packages is incorrect

2013-04-18 Thread Phil Connell

Phil Connell added the comment:

Updated patch with markups suggested by Serhiy.

--
Added file: http://bugs.python.org/file29927/issue17633-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17732] distutils.cfg Can Break venv

2013-04-18 Thread Nick Sloan

Nick Sloan added the comment:

Any feedback on this latest patch?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17732
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17742] Add _PyBytesWriter API

2013-04-18 Thread STINNER Victor

STINNER Victor added the comment:

Benchmark script, should be used with:
https://bitbucket.org/haypo/misc/src/tip/python/benchmark.py

--
Added file: http://bugs.python.org/file29928/bench_encoders.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17742
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14398] bz2.BZ2DEcompressor.decompress fail on large files

2013-04-18 Thread Nadeem Vawda

Nadeem Vawda added the comment:

An oversight on my part, I think. I'll add tests for 3.x this weekend.

--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14398
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16624] subprocess.check_output should allow specifying stdin as a string

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

Tests rerun on Windows and were fine.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17646] traceback.py has a lot of code duplication

2013-04-18 Thread Martin Morrison

Martin Morrison added the comment:

Latest upload has all of the agreed markups from the review.

--
Added file: http://bugs.python.org/file29929/issue17646-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17618] base85 encoding

2013-04-18 Thread Martin Morrison

Martin Morrison added the comment:

Raised http://bz.selenic.com/show_bug.cgi?id=3894 against Mercurial for them to 
workaround issue14596.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17618] base85 encoding

2013-04-18 Thread Martin Morrison

Martin Morrison added the comment:

Attached a minor tweak over the last diff - I'd forgotten to fix the Struct 
handling inside the Mercurial implementation as well.

All other comments still apply to this diff.

--
Added file: http://bugs.python.org/file29930/issue17618-5.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17732] distutils.cfg Can Break venv

2013-04-18 Thread Éric Araujo

Éric Araujo added the comment:

Thanks for the patch, I left comments on rietveld.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17732
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17468] Generator memory leak

2013-04-18 Thread Martin Morrison

Changes by Martin Morrison m...@ensoft.co.uk:


--
nosy: +isoschiz

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17468
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17742] Add _PyBytesWriter API

2013-04-18 Thread STINNER Victor

STINNER Victor added the comment:

New version of the patch:
 - address most (all?) Serhiy's remarks
 - _PyBytesWriter_PrepareInternal() always use min_size, not only when 
overallocate is 1
 - add more comments

Performances are almost the same than without the patch. It looks like they are 
a little bit better.

--
Added file: http://bugs.python.org/file29931/bytes_writer-2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17742
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17177] Document/deprecate imp

2013-04-18 Thread STINNER Victor

STINNER Victor added the comment:

If the imp module is marked as deprecated, it would help to explain how to port 
code from imp to importlib. As it was done for os.spawn(), platform.popen(), 
etc.

I'm using imp.load_source() in my setup.py to load a version.py file which only 
contains constants, to be able to build my module even if executing the module 
fails (ex: because of a runtime dependency). I don't know how to change my code 
to use imp.load_source().

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17177
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17177] Document/deprecate imp

2013-04-18 Thread STINNER Victor

STINNER Victor added the comment:

 I don't know how to change my code to use imp.load_source().

Woops, I mean to use importlib.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17177
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3778] python uninstaller leave registry entries

2013-04-18 Thread Mark Lawrence

Mark Lawrence added the comment:

I don't think this is worth the bother.  I've checked my registry and the only 
entry under HKLM\SOFTWARE\Python is PythonCore, under this are the following.

2.6
   Help
  Pythonwin Reference
 C:\Python26\Lib\site-packages\PyWin32.chm
   Modules
2.7
   Help
  Pythonwin Reference
 C:\Python27\Lib\site-packages\PyWin32.chm
   Modules
3.1
   Modules
3.2
   Modules
3.3
   Help
  Main Python Documentation
 C:\Python33\Doc\python331.chm
   Install Path
  Install Group
 Python 3.3
   Modules
   PythonPath
  C:\Python33\Lib;C:\Python33\DLLs

Only 3.3 is live on my machine.  Clearly the pythonwin keys aren't our 
responsibility.  It's hardly a lot of data anyway so why worry about it?  Yes 
I'm aware that it's good practice to clean up after yourself but in this case 
is it really worth the effort?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3778
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11182] remove unused undocumented pydoc.Scanner class

2013-04-18 Thread Martin Morrison

Martin Morrison added the comment:

Attached patch does exactly as described. Seems to be unused, and still passes 
all pydoc tests.

--
keywords: +patch
nosy: +isoschiz
Added file: http://bugs.python.org/file29932/issue11182.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11182
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17646] traceback.py has a lot of code duplication

2013-04-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

What's this f_invisible thing?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17646] traceback.py has a lot of code duplication

2013-04-18 Thread Martin Morrison

Changes by Martin Morrison m...@ensoft.co.uk:


Removed file: http://bugs.python.org/file29929/issue17646-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17646] traceback.py has a lot of code duplication

2013-04-18 Thread Martin Morrison

Martin Morrison added the comment:

Sorry, that is an unrelated change I was experimenting with, which I 
accidentally forgot to take out.

Please see the new uploaded diff.

--
Added file: http://bugs.python.org/file29933/issue17646-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11182] remove unused undocumented pydoc.Scanner class

2013-04-18 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11182
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17062] An os.walk inspired replacement for pkgutil.walk_packages

2013-04-18 Thread Martin Morrison

Martin Morrison added the comment:

I threw together a function that implements this. The only variation from the 
proposed signature was adding the onerror argument supported by the other 
similar functions in the module.

--
keywords: +patch
nosy: +isoschiz
Added file: http://bugs.python.org/file29934/issue17062.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17062
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11182] remove unused undocumented pydoc.Scanner class

2013-04-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 465cb5ce5a7e by Ezio Melotti in branch 'default':
#11182: remove the unused and undocumented pydoc.Scanner class.  Patch by 
Martin Morrison.
http://hg.python.org/cpython/rev/465cb5ce5a7e

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11182
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2013-04-18 Thread Barry A. Warsaw

New submission from Barry A. Warsaw:

As described here:

http://www.wefearchange.org/2013/04/python-3-language-gotcha-and-short.html

the following code will produce an UnboundLocalError when the exception is 
triggered:

def bad():
e = None
try:
do_something()
except KeyError as e:
print('ke')
except ValueError as e:
print('ve')
print(e)

The reason is that the exception handling machinery del's `e` from the local 
namespace in order to break circular references caused by __traceback__.  The 
ULE is pretty mysterious and certainly not helpful for figuring out what's 
going wrong (the blog post above describes how long it took me to find it ;).

Can we do better?  What if instead of del'ing the target, we set it to None?  
We wouldn't get a ULE but the fact that print(e) would print None might be just 
as mysterious.  Any other ideas?

(BTW, there's likely nothing to be done for Python  3.4.)

--
messages: 187313
nosy: barry
priority: normal
severity: normal
status: open
title: Unhelpful UnboundLocalError due to del'ing of exception target
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17792
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11182] remove unused undocumented pydoc.Scanner class

2013-04-18 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee:  - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed
type:  - enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11182
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2013-04-18 Thread Ezio Melotti

Ezio Melotti added the comment:

Maybe we could raise a warning when the deleted name already exists in the 
local namespace?

(FWIW I knew about the fact that the name gets deleted, and still managed to 
get bitten by it a couple of times.)

--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17792
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17793] Invitation to connect on LinkedIn

2013-04-18 Thread Hank Christian

New submission from Hank Christian:

LinkedIn


Python,

I'd like to add you to my professional network on LinkedIn.

- Henry

Henry Christian
ADJUNCT PROFESSOR at Central Texas College
Greater Los Angeles Area

Confirm that you know Henry Christian:
https://www.linkedin.com/e/-3qcne3-hfols9uw-6g/isd/10674146693/f8KKDSuG/?hs=falsetok=0bzd0NdaLbulI1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-3qcne3-hfols9uw-6g/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I4172161560_1/?hs=falsetok=07YV1ohYLbulI1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

--
messages: 187316
nosy: hankchristian
priority: normal
severity: normal
status: open
title: Invitation to connect on LinkedIn

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17793
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >