Re: How to generate only rotationally-unique permutations?

2012-05-19 Thread Arnaud Delobelle
On 19 May 2012 06:23, John O'Hagan resea...@johnohagan.com wrote: To revisit a question which I'm sure none of you remember from when I posted it a year or so ago - there were no takers at the time - I'd like to try again with a more concise statement of the problem: How to generate only

Re: How to generate only rotationally-unique permutations?

2012-05-19 Thread Zero Piraeus
: On 19 May 2012 01:23, John O'Hagan resea...@johnohagan.com wrote: How to generate only the distinct permutations of a sequence which are not rotationally equivalent to any others? More precisely, to generate only the most left-packed of each group of rotationally equivalent permutations,

ctype C library call always returns 0 with Python3

2012-05-19 Thread Johannes Bauer
Hi group, I'm playing with ctypes and using it to do regressions on some C code that I compile as a shared library. Python is the testing framework. This works nicely as long as I do not need the return value (i.e. calling works as expected and parameters are passed correctly). The return value

Re: ctype C library call always returns 0 with Python3

2012-05-19 Thread Nobody
On Sat, 19 May 2012 11:30:46 +0200, Johannes Bauer wrote: import ctypes libc = ctypes.cdll.LoadLibrary(/lib64/libc-2.14.1.so) print(libc.strchr(abcdef, ord(d))) In 3.x, a string will be passed as a wchar_t*, not a char*. IOW, the memory pointed to by the first argument to strchr() will

Re: ctype C library call always returns 0 with Python3

2012-05-19 Thread Colin McPhail
On 19/05/2012 10:30, Johannes Bauer wrote: Even the example in the standard library fails: import ctypes libc = ctypes.cdll.LoadLibrary(/lib64/libc-2.14.1.so) print(libc.strchr(abcdef, ord(d))) Always returns 0. I think there may be two problems with this code: (1) You are using a 64-bit

Re: Plot a function with matplotlib?

2012-05-19 Thread Vlastimil Brom
2012/5/19 Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: I have matplotlib and iPython, and want to plot a function over an equally-spaced range of points. That is to say, I want to say something like this: plot(func, start, end) rather than generating the X and Y values by hand,

Re: .py to .pyc

2012-05-19 Thread Colin J. Williams
On 18/05/2012 7:20 PM, Tony the Tiger wrote: On Sun, 13 May 2012 23:36:02 +0200, Irmen de Jong wrote: Why do you care anyway? Wanna hide his code...? /Grrr Curiosity. Perhaps there are stack-based processors out there which could use the .pyc code more directly. Colin W. --

sqlalchemy: delete() on m:n-relationship

2012-05-19 Thread Wolfgang Meiners
Hi all, i dont understand, how sqlalchemy deletes from m:n relationships. Maybe, someone can explain to me, how to delete in the following program: (pyhton3, sqlalchemy 0.7.0) = #!/usr/bin/env python3 # -*- coding: utf-8 -*-

Re: Questions on __slots__

2012-05-19 Thread Adam Tauno Williams
On Fri, 2012-05-18 at 09:53 -0700, Charles Hixson wrote: Does __slots__ make access to variables more efficient? Absolutely, yes. If one uses property() to create a few read-only pseudo-variables, does that negate the efficiency advantages of using __slots__? (Somehow I feel the

Re: Plot a function with matplotlib?

2012-05-19 Thread Alex van der Spek
On Sat, 19 May 2012 01:59:59 +, Steven D'Aprano wrote: I have matplotlib and iPython, and want to plot a function over an equally-spaced range of points. That is to say, I want to say something like this: plot(func, start, end) rather than generating the X and Y values by hand, and

Re: cPython, IronPython, Jython, and PyPy (Oh my!)

2012-05-19 Thread Adam Tauno Williams
On Thu, 2012-05-17 at 11:13 +1000, Chris Angelico wrote: On Thu, May 17, 2012 at 9:01 AM, Ethan Furman et...@stoneleaf.us wrote: A record is an interesting critter -- it is given life either from the user or from the disk-bound data; its fields can then change, but those changes are not

Re: Plot a function with matplotlib?

2012-05-19 Thread Miki Tebeka
I'm looking for an interface closer to what my HP graphing calculator would use, i.e. something like this: plot(lambda x: sin(x*pi), # function or expression to plot, start=0.0, end=2.0, ) and have step size taken either from some default, or better still,

Re: bash/shell to python

2012-05-19 Thread Michael Torrie
On 05/16/2012 08:16 PM, Rita wrote: I currently build a lot of interfaces/wrappers to other applications using bash/shell. One short coming for it is it lacks a good method to handle arguments so I switched to python a while ago to use 'argparse' module. Actually there is a great way of

Re: ctype C library call always returns 0 with Python3

2012-05-19 Thread Hans Mulder
On 19/05/12 13:20:24, Nobody wrote: On Sat, 19 May 2012 11:30:46 +0200, Johannes Bauer wrote: import ctypes libc = ctypes.cdll.LoadLibrary(/lib64/libc-2.14.1.so) print(libc.strchr(abcdef, ord(d))) In 3.x, a string will be passed as a wchar_t*, not a char*. IOW, the memory pointed to by

Re: How to generate only rotationally-unique permutations?

2012-05-19 Thread John O'Hagan
On Sat, 19 May 2012 09:15:39 +0100 Arnaud Delobelle arno...@gmail.com wrote: On 19 May 2012 06:23, John O'Hagan resea...@johnohagan.com wrote: [...] How to generate only the distinct permutations of a sequence which are not rotationally equivalent to any others? More precisely, to generate

Re: Jython 2.7 alpha1 is out!

2012-05-19 Thread Guido van Rossum
Congrats Frank! I reposted this on my G+ account and got some interesting comments. https://plus.google.com/u/0/115212051037621986145/posts/ifyqW3JBd3a There's got to be a way for you to make money off the Oracle connection! (PS: It would have been nice if there was an announcement page on the

Re: Questions on __slots__

2012-05-19 Thread Charles Hixson
On 05/19/2012 06:39 AM, Adam Tauno Williams wrote: On Fri, 2012-05-18 at 09:53 -0700, Charles Hixson wrote: Does __slots__ make access to variables more efficient? Absolutely, yes. If one uses property() to create a few read-only pseudo-variables, does that negate the

Re: How to generate only rotationally-unique permutations?

2012-05-19 Thread John O'Hagan
On Sat, 19 May 2012 04:21:35 -0400 Zero Piraeus sche...@gmail.com wrote: : On 19 May 2012 01:23, John O'Hagan resea...@johnohagan.com wrote: How to generate only the distinct permutations of a sequence which are not rotationally equivalent to any others? More precisely, to generate only

Advantages of logging vs. print()

2012-05-19 Thread Giampaolo Rodolà
Hi all, I'm currently working on 1.0.0 release of pyftpdlib module. This new release will introduce some backward incompatible changes in that certain APIs will no longer accept bytes but unicode. While I'm at it, as part of this breackage I was contemplating the possibility to rewrite my logging

setdefault behaviour question

2012-05-19 Thread pete McEvoy
I am confused by some of the dictionary setdefault behaviour, I think I am probably missing the obvious here. def someOtherFunct(): print in someOtherFunct return 42 def someFunct(): myDict = {1: 2} if myDict.has_key(1): print myDict has key 1 x = myDict.setdefault(1,

Re: setdefault behaviour question

2012-05-19 Thread MRAB
On 19/05/2012 20:44, pete McEvoy wrote: I am confused by some of the dictionary setdefault behaviour, I think I am probably missing the obvious here. def someOtherFunct(): print in someOtherFunct return 42 def someFunct(): myDict = {1: 2} if myDict.has_key(1):

Re: setdefault behaviour question

2012-05-19 Thread pete McEvoy
Ah - I have checked some previous posts (sorry, should have done this first) and I now can see that the lazy style evaluation approach would not be good. I can see the reasons it behaves this way. many thanks anyway. -- http://mail.python.org/mailman/listinfo/python-list

Re: Plot a function with matplotlib?

2012-05-19 Thread Mark Lawrence
On 19/05/2012 02:59, Steven D'Aprano wrote: I have matplotlib and iPython, and want to plot a function over an equally-spaced range of points. That is to say, I want to say something like this: plot(func, start, end) rather than generating the X and Y values by hand, and plotting a scatter

Re: print XML

2012-05-19 Thread Karl Knechtel
What do you want the contents of the file to look like? Why are you parsing the XML in the first place? (What do you want to happen if the data on `sys.stdin` isn't actually valid XML?) On Thu, May 17, 2012 at 9:52 AM, Nibin V M nibi...@gmail.com wrote: Hello, I have the following code, which

Re: setdefault behaviour question

2012-05-19 Thread Chris Angelico
On Sun, May 20, 2012 at 5:44 AM, pete McEvoy peterx.mce...@gmail.com wrote: I am confused by some of the dictionary setdefault behaviour, I think I am probably missing the obvious here. def someOtherFunct():    print in someOtherFunct    return 42    x = myDict.setdefault(1,

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-19 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: The code should be changed to use the buffer API (instead of accepting only bytes objects). Other than that, I think it's ready for integration. -- ___ Python tracker rep...@bugs.python.org

[issue14838] IDLE Will not load on reinstall

2012-05-19 Thread Cain
Cain gamingleg...@gmail.com added the comment: Awesome, that resolved it. Simply started idle through the command window, then changed the theme back to the default. Thanks Roger. -- ___ Python tracker rep...@bugs.python.org

[issue14572] 2.7.3: sqlite module does not build on centos 5 and Mac OS X 10.4

2012-05-19 Thread Marc Abramowitz
Marc Abramowitz msabr...@gmail.com added the comment: OK, here's a patch for configure.ac which seems to fix this problem -- if folks could review and test it that would be great. -- keywords: +patch Added file: http://bugs.python.org/file25634/sqlite3_int64.patch

[issue14721] httplib doesn't specify content-length header for POST requests without data

2012-05-19 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: The rule for content-length seems, if there is a body for a request, even if the body is ( empty body), then you should send the Content-Length. The mistake in the Python httplib was, the set_content_length was called with this

[issue14854] faulthandler: segfault with SystemError: null argument to internal routine

2012-05-19 Thread Zbyszek Jędrzejewski-Szmek
New submission from Zbyszek Jędrzejewski-Szmek zbys...@in.waw.pl: Simply running './python -X faulthandler' in the source directory gives me this: % ./python -X faulthandler Fatal Python error: Py_Initialize: can't initialize faulthandler SystemError: null argument to internal routine [1]

[issue14721] httplib doesn't specify content-length header for POST requests without data

2012-05-19 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 57f1d13c2cd4 by Senthil Kumaran in branch '2.7': Fix Issue14721: Send Content-length: 0 for empty body () in the http.request http://hg.python.org/cpython/rev/57f1d13c2cd4 New changeset 6da1ab5f777d by Senthil

[issue14721] httplib doesn't specify content-length header for POST requests without data

2012-05-19 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: This is fixed in all the branches. Thanks! -- assignee: - orsenthil resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue14624] Faster utf-16 decoder

2012-05-19 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Thank you, Antoine. Now only issue14625 waits for review. changeset: 77012:3430d7329a3b +* UTF-8 and UTF-16 decoding is now 2x to 4x faster. In fact now UTF-16 decoding faster for a maximum of +25% compared to Python 3.2 on my

[issue14854] faulthandler: fatal error with SystemError: null argument to internal routine

2012-05-19 Thread Zbyszek Jędrzejewski-Szmek
Changes by Zbyszek Jędrzejewski-Szmek zbys...@in.waw.pl: -- title: faulthandler: segfault with SystemError: null argument to internal routine - faulthandler: fatal error with SystemError: null argument to internal routine ___ Python tracker

[issue14855] IPv6 support for logging.handlers

2012-05-19 Thread Yuriy Syrovetskiy
New submission from Yuriy Syrovetskiy c...@cblp.su: IPv4 operations may fail on IPv6 systems, and vice versa. So we have to create sockets with the proper address family. Maybe this behaviour could be incapsulated in socket object, but didn't find a good way to do it. No documentation

[issue14855] IPv6 support for logging.handlers

2012-05-19 Thread Yuriy Syrovetskiy
Yuriy Syrovetskiy c...@cblp.su added the comment: More correct description: IPv4 operations may fail on IPv6 systems, and vice versa; so we have to detect the proper address family before creating a socket. -- ___ Python tracker

[issue14855] IPv6 support for logging.handlers

2012-05-19 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: For TCP, socket.create_connection() is your friend. For UDP I'm not sure, but adding a helper to the socket module might also be a good idea. -- nosy: +gregory.p.smith, pitrou versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2,

[issue14855] IPv6 support for logging.handlers

2012-05-19 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The Linux getaddrinfo() man page has an UDP client example which uses connect() to decide whether the target address is valid or not. -- ___ Python tracker rep...@bugs.python.org

[issue14472] .gitignore is outdated

2012-05-19 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Against which branch or Python version your patch is? It doesn't apply cleanly on any branch (and yes, I changed the target filename to .gitignore first). -- ___ Python tracker rep...@bugs.python.org

[issue14855] IPv6 support for logging.handlers

2012-05-19 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Apparently, connecting the socket is better because some systems (BSDs in particular) only report ICMP errors to connected UDP sockets. The Linux man page claims that this reporting is necessary regardless of whether the socket is

[issue13210] Support Visual Studio 2010

2012-05-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Ok, I find no way to override the linker so that it does not search the current directory first. I think it is best, and probably in the spirit of visual studio, to use the reference part of a project to facilitate linking between

[issue13210] Support Visual Studio 2010

2012-05-19 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I think it is best, and probably in the spirit of visual studio, to use the reference part of a project to facilitate linking between dependency projects. it is designed to take the hassle out of libraries and search paths. I will

[issue14845] list(generator expression) != [list comprehension]

2012-05-19 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14845 ___ ___ Python-bugs-list

[issue13210] Support Visual Studio 2010

2012-05-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Here is an updated patch, with proper project references added and some slight cleanup of .props files. -- Added file: http://bugs.python.org/file25636/pcbuildpatch.patch ___ Python

[issue13152] textwrap: support custom tabsize

2012-05-19 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d38e821c1b80 by Hynek Schlawack in branch 'default': #13152: Allow to specify a custom tabsize for expanding tabs in textwrap http://hg.python.org/cpython/rev/d38e821c1b80 -- nosy: +python-dev

[issue13152] textwrap: support custom tabsize

2012-05-19 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: I've added it myself and committed your code – thank you for your contribution John! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker

[issue14856] argparse: creating an already defined subparsers does not raises an exception

2012-05-19 Thread Étienne Buira
New submission from Étienne Buira etienne.bu...@free.fr: With this patch, it raises an ArgumentException, instead of overwriting previous subparser without notice. Regards. -- components: Library (Lib) files: argparse_no_dup_subparsers.diff keywords: patch messages: 161112 nosy: eacb

[issue11647] function decorated with a context manager can only be invoked once

2012-05-19 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I'm closing this *without* converting ContextDecorator._recreate_cm() to a public method (although I'm also attaching the patch that would have done exactly that). My rationale for doing so is that I *still* consider making

[issue14854] faulthandler: fatal error with SystemError: null argument to internal routine

2012-05-19 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch: $ hg di diff --git a/Python/pythonrun.c b/Python/pythonrun.c --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -356,15 +356,15 @@ Py_InitializeEx(int install_sigs) _PyImportHooks_Init(); -/* initialize the

[issue14847] AttributeError: NoneType has no attribute 'utf_8_decode'

2012-05-19 Thread Daniel Swanson
Daniel Swanson popcorn.tomato.d...@gmail.com added the comment: I attempted to reproduce the error. I didn't, all I got was 'str' object has no attribute 'decode' here is the whole test. Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win32 Type copyright, credits

[issue14702] os.makedirs breaks under autofs directories

2012-05-19 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I see no evidence that this is a bug in Linux, stat(/net/prodigy, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 mkdir(/net/prodigy/tmp, 0777) = -1 EACCES (Permission denied) As you can see, a stat() is already done on

[issue14072] urlparse on tel: URI-s misses the scheme in some cases

2012-05-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: According to RFC 1808 [0], the netloc must follow //, so this doesn't seem to apply to 'tel' URIs. [0]: http://tools.ietf.org/html/rfc1808.html#section-2.1 -- ___ Python tracker

[issue14702] os.makedirs breaks under autofs directories

2012-05-19 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: stat(/net/prodigy, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 mkdir(/net/prodigy/tmp, 0777) = -1 EACCES (Permission denied) As you can see, a stat() is already done on /net/prodigy. To be fair, that shouldn’t trigger a mount.

[issue14072] urlparse on tel: URI-s misses the scheme in some cases

2012-05-19 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ff0fd7b26219 by Ezio Melotti in branch '2.7': #14072: Fix parsing of tel URIs in urlparse by making the check for ports stricter. http://hg.python.org/cpython/rev/ff0fd7b26219 New changeset 9f6b7576c08c by Ezio

[issue14702] os.makedirs breaks under autofs directories

2012-05-19 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: stat(/net/prodigy, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 mkdir(/net/prodigy/tmp, 0777) = -1 EACCES (Permission denied) As you can see, a stat() is already done on /net/prodigy. To be fair, that shouldn’t trigger a

[issue14036] urlparse insufficient port property validation

2012-05-19 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14036 ___

[issue14072] urlparse on tel: URI-s misses the scheme in some cases

2012-05-19 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14072

[issue14702] os.makedirs breaks under autofs directories

2012-05-19 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: stat(/net/prodigy, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 mkdir(/net/prodigy/tmp, 0777) = -1 EACCES (Permission denied) As you can see, a stat() is already done on /net/prodigy. To be fair, that shouldn’t trigger a mount.

[issue13210] Support Visual Studio 2010

2012-05-19 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: After enabling the eol extension and re-checking out my working copy, I've applied the patch successfully, but after I do so, I get this error when trying to open the solution in VS2010: One or more projects in the solution were not loaded

[issue13210] Support Visual Studio 2010

2012-05-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Ah, good, it looks as though a file is missing from the patch. I'll fix it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13210

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I think I liked the first version more, possibly with a few minor changes: Though tuples may seem very similar to lists, their immutability makes them ideal for fundamentally different usage. I would drop the 'very', and I'm not sure

[issue14822] Build unusable when compiled for Win 64-bit release

2012-05-19 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Could you try with latest default? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14822 ___

[issue14857] Direct access to lexically scoped __class__ is broken in 3.3

2012-05-19 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: Currently, __class__ references from methods in 3.3 aren't being mapped correctly to the class currently being defined. This goes against the documented behaviour of PEP 3135, which states explicitly that the new zero-argument form is

[issue14855] IPv6 support for logging.handlers

2012-05-19 Thread Yuriy Syrovetskiy
Yuriy Syrovetskiy c...@cblp.su added the comment: On my computer, connect() on a UDP socket always finishes successfully. What's wrong? I tried that C example from man getaddrinfo(3). -- ___ Python tracker rep...@bugs.python.org

[issue14855] IPv6 support for logging.handlers

2012-05-19 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: On my computer, connect() on a UDP socket always finishes successfully. What's wrong? Nothing wrong I guess, since connect() on an UDP socket doesn't actually do anything, network-wise (UDP being an unconnected protocol). --

[issue14858] 'pysetup create' off-by-one when choosing classification maturity status interactively.

2012-05-19 Thread Todd DeLuca
New submission from Todd DeLuca todddel...@gmail.com: Today I installed distutils2 via pip and ran 'pysetup create'. During the selection of Trove classifiers for Development status I chose '2 - Alpha' but setup.cfg ended up incorrectly indicating that my project is Pre-Alpha. Here is a

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-05-19 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: I'm taking Charles-François' review comments here. 1. since fwalk() uses O(depth directory tree) file descriptors, we might run out of FD on really deep directory hierarchies. It shouldn't be a problem in practise Should I mention it in the

[issue14494] __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't

2012-05-19 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset cc9e5ddd8220 by Petri Lehtinen in branch '2.7': #14494: Document that absolute imports became default in 3.0 instead of 2.7. http://hg.python.org/cpython/rev/cc9e5ddd8220 New changeset 7cdc1392173f by Petri Lehtinen

[issue14855] IPv6 support for logging.handlers

2012-05-19 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: On my computer, connect() on a UDP socket always finishes successfully. What's wrong? Nothing is wrong. UDP is connection-less, so connect() is a no-op, except that it remembers the address so you can use send() instead of sendto(). Any

[issue14494] __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't

2012-05-19 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Fixed, thanks for the patch. BTW, you should sign the PSF Contributor Agreement. See http://www.python.org/psf/contrib/. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed

[issue14468] Update cloning guidelines in devguide

2012-05-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: - $ hg clone py3k py3.2 - $ cd py3.2 - $ hg update 3.2 + $ hg clone py3k py3.2 -u 3.2 While the second command is more concise, I find the first easier to understand, so maybe you could leave both the first time (proposing the

[issue14855] IPv6 support for logging.handlers

2012-05-19 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I worked on the 3.2 branch, because the default branch has broken test_logging. What breakage are you referring to? There's a race condition test that fails on Windows sometimes, but that's on the 2.7 branch. Apart from that, I don't

[issue14588] PEP 3115 compliant dynamic class creation

2012-05-19 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset befd56673c80 by Nick Coghlan in branch 'default': Close #14588: added a PEP 3115 compliant dynamic type creation mechanism http://hg.python.org/cpython/rev/befd56673c80 -- nosy: +python-dev resolution: -

[issue14859] Patch to make IDLE window rise to top in OS X on launch

2012-05-19 Thread Marc Abramowitz
New submission from Marc Abramowitz msabr...@gmail.com: On OS X 10.6.8, when I execute idle, I see nothing in the Terminal and the IDLE GUI launches but is not visible until I Command-Tab to the Python application. I stumbled upon a solution to this problem using OS X's built-in

[issue14859] Patch to make IDLE window rise to top in OS X on launch

2012-05-19 Thread Marc Abramowitz
Marc Abramowitz msabr...@gmail.com added the comment: I created the patch against the 2.7 branch of hg, but I just tried it with both the 3.2 branch of hg and an installed version of 3.2 and it worked great. [last: 0] marca@scml-marca:~/dev/hg-repos/cpython$ pushd

[issue14859] Patch to make IDLE window rise to top in OS X on launch

2012-05-19 Thread Ned Deily
Ned Deily n...@acm.org added the comment: This is really a duplicate of Issue11571 which gives an easier way to do this directly using Tk calls. I'll see about getting that applied. -- nosy: +ned.deily resolution: - duplicate stage: - committed/rejected status: open - closed

[issue11647] function decorated with a context manager can only be invoked once

2012-05-19 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11647 ___ ___ Python-bugs-list

[issue14854] faulthandler: fatal error with SystemError: null argument to internal routine

2012-05-19 Thread Zbyszek Jędrzejewski-Szmek
Zbyszek Jędrzejewski-Szmek zbys...@in.waw.pl added the comment: I can confirm that it works with the patch. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14854 ___

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-19 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I am ok with Ezio's 3rd version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14840 ___ ___

[issue14854] faulthandler: fatal error with SystemError: null argument to internal routine

2012-05-19 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Hum, a test may be added to ensure that we will not have the regression anymore. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14854

[issue13210] Support Visual Studio 2010

2012-05-19 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: PCbuild/build.bat and Modules/_decimal/tests/runall.bat still use vcbuild instead of msbuild. It also seems that if an external dependency is unavailable then msbuild can fail to build targets which do not depend on it. For instance if I

[issue14854] faulthandler: fatal error with SystemError: null argument to internal routine

2012-05-19 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: The patch looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14854 ___

[issue11571] Turtle window pops under the terminal on OSX

2012-05-19 Thread Marc Abramowitz
Marc Abramowitz msabr...@gmail.com added the comment: I wonder if this could be applied at some lower level in TkInter, because this bug happens with every Tk app -- e.g.: turtle, idle, web2py -- nosy: +Marc.Abramowitz ___ Python tracker

[issue1602] windows console doesn't print or input Unicode

2012-05-19 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___

[issue11571] Turtle window pops under the terminal on OSX

2012-05-19 Thread Ned Deily
Changes by Ned Deily n...@acm.org: Removed file: http://bugs.python.org/file21581/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11571 ___ ___

[issue11571] Turtle window pops under the terminal on OSX

2012-05-19 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Marc, it could although that would be a change in behavior that possibly might not be desired by all tkinter apps. Perhaps the thing to do is add an optional topmost argument to tkinter.Tk() with the default value being True. --

[issue13210] Support Visual Studio 2010

2012-05-19 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I propose that we declare this issue closed, and defer any new issues arising from the switch to VS 2010 in separate issues. There will surely be many issues over the next weeks and months, and there is little point in tracking this all on

[issue13210] Support Visual Studio 2010

2012-05-19 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: So closing this issue. Kristjan, if you want your patch reviewed further and/or approved by Brian, please copy it into a new issue. -- status: open - closed ___ Python tracker

[issue14854] faulthandler: fatal error with SystemError: null argument to internal routine

2012-05-19 Thread Zbyszek Jędrzejewski-Szmek
Zbyszek Jędrzejewski-Szmek zbys...@in.waw.pl added the comment: % PYTHONFAULTHANDLER=1 ./python -E -c 'import faulthandler; faulthandler._sigsegv()' [3]14516 segmentation fault (core dumped) Unless I'm missing something, the env. var. is not working as documented. Patch with two tests is

[issue12760] Add create mode to open()

2012-05-19 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Shouldn't the documentation of builtin open() (in Doc/library/functions.rst) be updated too? -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12760

[issue1602] windows console doesn't print or input Unicode

2012-05-19 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Not sure whether a solution has already been proposed because the issue is very long, but I just bumped into this on Windows and come up with this: from __future__ import print_function import sys def safe_print(s): try:

[issue14854] faulthandler: fatal error with SystemError: null argument to internal routine

2012-05-19 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: PYTHONFAULTHANDLER=1 ./python -E ... Documentation of the -E option Ignore all PYTHON* environment variables, e.g. PYTHONPATH and PYTHONHOME, that might be set. http://docs.python.org/dev/using/cmdline.html#cmdoption-E So the option

[issue1602] windows console doesn't print or input Unicode

2012-05-19 Thread David-Sarah Hopwood
David-Sarah Hopwood david-sa...@jacaranda.org added the comment: Giampaolo: See #msg120700 for why that won't work, and the subsequent comments for what will work instead (basically, using WriteConsoleW and a workaround for a Windows API bug). Also see the prototype win_console.patch from

[issue14721] httplib doesn't specify content-length header for POST requests without data

2012-05-19 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Too late for asking to keep the parenthesis :-). I hate to have to remember non-obvious precedence rules :-). Cognitive overhead. -- ___ Python tracker rep...@bugs.python.org

[issue14860] devguide: Clarify how to run cpython test suite - esp. on 2.7

2012-05-19 Thread Marc Abramowitz
New submission from Marc Abramowitz msabr...@gmail.com: The way to test on Python 2.7 (discovered on IRC) is: ~/dev/hg-repos/cpython$ ./python.exe -m test.regrtest -j3 This is not documented. I will submit a patch... -- components: Devguide files: devguide.patch keywords: patch

[issue14843] support define_macros / undef_macros in setup.cfg

2012-05-19 Thread Daniel Holth
Daniel Holth dho...@fastmail.fm added the comment: Looks like it can go into [build_ext] but not per-extension -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14843 ___

[issue1602] windows console doesn't print or input Unicode

2012-05-19 Thread Matt Mackall
Changes by Matt Mackall m...@selenic.com: -- nosy: -Matt.Mackall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list

[issue14588] PEP 3115 compliant dynamic class creation

2012-05-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Great doc patch. I think it would be worthwhile to backport it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14588 ___

[issue14843] support define_macros / undef_macros in setup.cfg

2012-05-19 Thread Daniel Holth
Daniel Holth dho...@fastmail.fm added the comment: A tuple of (macro, '1') seems to do the trick define_macros has to be space-separated, not comma-separated -- hgrepos: +127 ___ Python tracker rep...@bugs.python.org

[issue14843] support define_macros / undef_macros in setup.cfg

2012-05-19 Thread Daniel Holth
Changes by Daniel Holth dho...@fastmail.fm: -- keywords: +patch Added file: http://bugs.python.org/file25642/65c3af0d283b.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14843 ___

  1   2   >