[issue12760] Add create mode to open()

2011-12-27 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 C11 uses 'x' for this, for what it's worth.
 
 This is not a duplicate issue. The openat solution is no easier than 
 the os.open solution.

Ok, let's re-open then. I'm not sold on the feature, but the fact C11 adds a 
dedicated letter mode for it could be a good excuse for us to mimick it :)

--
resolution: duplicate - 
status: closed - open
superseder: io.FileIO and io.open should support openat - 

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



[issue12857] Expose called function on frame object

2011-12-27 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue12760] Add create mode to open()

2011-12-27 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError

2011-12-27 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue13663] pootle.python.org is outdated.

2011-12-27 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +georg.brandl, loewis

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



[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-27 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

f0fcb82a88e9 broke bots. See 
http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%203.x/builds/1374/steps/test/logs/stdio

--
nosy: +benjamin.peterson

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



[issue1953] Compact int and float freelists

2011-12-27 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I don't know what the purpose of this feature is nor who the target users are. 
Trying to micro-manage the interpreter's resource allocation from Python code 
is certainly a losing battle, and does not warrant relying on 
implementation-specific APIs. Moreover, these days gc.collect() implicitly 
collects the freelists.

I therefore recommend rejecting this patch.

--
nosy: +pitrou
resolution: accepted - rejected

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



[issue12857] Expose called function on frame object

2011-12-27 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue13465] A Jython section in the dev guide would be great

2011-12-27 Thread Frank Wierzbicki

Frank Wierzbicki fwierzbi...@gmail.com added the comment:

I have forked the devguide into http://hg.python.org/jython-docs/devguide/ -- 
this way I can merge changes from the main devguide as they make sense. DVCS 
FTW :) -- I guess this issue can be closed.

--

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



[issue13465] A Jython section in the dev guide would be great

2011-12-27 Thread Frank Wierzbicki

Changes by Frank Wierzbicki fwierzbi...@gmail.com:


--
status: open - closed

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



[issue11638] python setup.py sdist --formats tar* crashes if version is unicode

2011-12-27 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

 That's a shame. I tested it in advance. I'll correct or revert tonight or 
 tomorrow.

--
title: python setup.py sdist --formats tar* crashes if version is unicode - 
python setup.py sdist --formats tar* crashes if versionis unicode
Added file: http://bugs.python.org/file24096/smime.p7m

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11638
___Content-Type: multipart/signed; micalg=sha1;
boundary=Apple-Mail-FA56491B-2C01-4E22-9020-A26B2780291D;
protocol=application/pkcs7-signature

--Apple-Mail-FA56491B-2C01-4E22-9020-A26B2780291D
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii

 That's a shame. I tested it in advance. I'll correct or revert tonight or t=
omorrow.

--Apple-Mail-FA56491B-2C01-4E22-9020-A26B2780291D
Content-Disposition: attachment; filename=smime.p7s
Content-Type: application/pkcs7-signature; name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIVrjCCBjQw
ggQcoAMCAQICASIwDQYJKoZIhvcNAQEFBQAwfTELMAkGA1UEBhMCSUwxFjAUBgNVBAoTDVN0YXJ0
Q29tIEx0ZC4xKzApBgNVBAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNpZ25pbmcxKTAn
BgNVBAMTIFN0YXJ0Q29tIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA3MTAyNDIxMDMzM1oX
DTE3MTAyNDIxMDMzM1owgYwxCzAJBgNVBAYTAklMMRYwFAYDVQQKEw1TdGFydENvbSBMdGQuMSsw
KQYDVQQLEyJTZWN1cmUgRGlnaXRhbCBDZX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jAnFiBTdGFydENvbSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAD
AgEBGoG+VGhpcyBjZXJ0aWZpY2F0ZSB3YXMgaXNzdWVkIGFjY29yZGluZyB0byB0aGUgQ2xhc3Mg
MyBWYWxpZGF0aW9uIHJlcXVpcmVtZW50cyBvZiB0aGUgU3RhcnRDb20gQ0EgcG9saWN5LCByZWxp

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-12-27 Thread Nam Nguyen

Nam Nguyen bits...@gmail.com added the comment:

Here's a minimal test case for #define bug in LLVM GCC.

If the base struct is 8-byte long or smaller, the code runs correctly.

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)


#include stdio.h
#include stdlib.h

typedef struct {
int padding;  /* remove this and the sizes will be the same */
int type;
int attr;
} struct_a;

typedef struct {
struct_a base;
int junk;
} struct_b;

#define BUG(op) \
struct_a*)(op))-type) ? (void*)((struct_a*)(op) + 1) : \
 (void*)((struct_b*)(op) + 1))

static void* func(void* op)
{
if (((struct_a*)(op))-type)
{
return (void*)((struct_a*)(op) + 1);
}
return (void*)((struct_b*)(op) + 1);
}

int main(int argc, char** argv)
{
struct_b* b = malloc(sizeof(struct_b) + 2);
struct_a* a = (struct_a*)b;
char* p;
a-type = 0;
p = BUG(b);
printf(expected: %d, actual: %d, b = %p, p = %p\n,
sizeof(struct_b), p - (char*)b, b, p);
p = func(b);
printf(expected: %d, actual: %d, b = %p, p = %p\n,
sizeof(struct_b), p - (char*)b, b, p);
return 0;
}


$ ./bug
expected: 16, actual: 12, b = 0x10d7008b0, p = 0x10d7008bc
expected: 16, actual: 16, b = 0x10d7008b0, p = 0x10d7008c0

--

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



[issue13659] Add a help() viewer for IDLE's Shell.

2011-12-27 Thread Roger Serwy

Roger Serwy roger.se...@gmail.com added the comment:

If you're on Linux, run this as your first command in IDLE:

import pydoc; pydoc.pager = lambda text: 
pydoc.tempfilepager(pydoc.plain(text), 'xterm -e less')

If Windows: 

import pydoc; pydoc.pager = lambda text: 
pydoc.tempfilepager(pydoc.plain(text), 'notepad')

All help() output for objects will now display outside of IDLE.

The Squeezer extension does something similar for output that is longer than 30 
lines.

It should be possible to create a custom pager for the subprocess which 
communicates with IDLE to display this text. RPCProxy could be used to 
accomplish this in conjunction with the textView module.

--
nosy: +serwy

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



[issue12857] Expose called function on frame object

2011-12-27 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

What would you use the functionality provided by this patch for?

--
nosy: +benjamin.peterson

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



[issue13346] re.split() should behave like string.split() for maxsplit=0 and maxsplit=-1

2011-12-27 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

I concur with closing this one.

--

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



[issue12857] Expose called function on frame object

2011-12-27 Thread Eric Snow

Eric Snow ericsnowcurren...@gmail.com added the comment:

My response to a similar query:

What it enables is the ability to introspect the *actual* function object 
belonging to the currently executing code, whether in the same execution frame 
or in a later one on the stack.  We don't have that now.  The best we can do is 
guess, and I'm trying to refuse the temptation by building in an alternative 
that doesn't get in the way (and doesn't provide an attractive nuisance).

My motivation for this patch was to be able to find out, in one of my 
functions, what function called it and to interact with that function object.  
The name or file represented in the code object on the stack didn't cut it; and 
decorators and function factories make the whole thing a mess.  Guido sounded 
rather positive to the idea, which is why I pursued it.  From Guido's post to 
which I linked in the issue[1]:

For me the use case involves determining what function called my
function.  Currently you can tell in which execution frame a function
was called, and thereby which code object, but reliably matching that
to a function is not so simple.  I recognize that my case is likely
not a general one.

   But it is a nice one. It solves some issues that pdb currently solves
   by just using a file/line reference.

Not that it necessarily matters, but I could dig up the bit of code that 
motivated the whole thing.  I recall it was something related to writing an 
enum library (a la flufl.enum).  Anyway, I'd love to see this move forward.


[1] http://mail.python.org/pipermail/python-ideas/2011-August/011062.html

--

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



[issue13641] decoding functions in the base64 module could accept unicode strings

2011-12-27 Thread Petri Lehtinen

Changes by Petri Lehtinen pe...@digip.org:


--
nosy: +petri.lehtinen

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