Python Ireland presents May Talks @ The Science Gallery (Wed 12th May, 7pm)

2010-05-02 Thread Vicky Twomey-Lee
Hi All, When: Wed 12th May 2010, 19:00 Where: The Science Gallery, Pearse St. What: 19:00 - 20:00: Michael Twomey - Introduction to Redis 20:00 - 21:00: Rory Geoghegan - Thrift in Python for Cross-Platform Interoperability After talks: Pub TBD This event is open for all and is *free*. More

execnet-1.0.6 released (jython/win32 and race condition fixes)

2010-05-02 Thread holger krekel
execnet-1.0.6 is a backward compatible release fixing jython/win32 and general race condition issues. execnet is a small, stable and well documented pure-python library for automatically deploying and interacting with clusters of Python interpreters. It seamlessly instantiates remote

Re: Help needed in downloading Brown corpus

2010-05-02 Thread Adil Kaleem
On May 1, 10:54 pm, Peter Pearson ppear...@nowhere.invalid wrote: As I understand it (from Wikipedia), the Brown Corpus is a collection of samples of modern American English text, and nltk.org provides a Python toolkit for exploring said Corpus. I'm trying to figure out whether you're

sometype.__new__ and C subclasses

2010-05-02 Thread James Porter
I've been trying to write a Python C extension module that uses NumPy and has a subtype of numpy.ndarray written in C. However, I've run into a snag: calling numpy.ndarray.__new__(mysubtype, ...) triggers an exception in the bowels of Python (this is necessary for a handful of NumPy features).

Re: Help needed in downloading Brown corpus

2010-05-02 Thread Adil Kaleem
On May 2, 6:30 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sat, 01 May 2010 06:28:33 -0700, Adil Kaleem wrote: Hi all I'm a masters student in NLP. I needed to download the Brown corpus. I'm unable to download from nltk.org with the python CLI. My network

Re: Python dot-equals (syntax proposal)

2010-05-02 Thread Lie Ryan
On 05/02/10 10:58, Steven D'Aprano wrote: And Python's object system makes it that the argument to __getattr__ is always a string even though there might be a valid variable that corresponds to it: That is nothing to do with the object system, it is related to the semantics of Python

Re: Python dot-equals (syntax proposal)

2010-05-02 Thread Lie Ryan
On 05/02/10 10:58, Steven D'Aprano wrote: On Sun, 02 May 2010 05:08:53 +1000, Lie Ryan wrote: On 05/01/10 11:16, Steven D'Aprano wrote: On Fri, 30 Apr 2010 12:34:34 -0400, D'Arcy J.M. Cain wrote: In practice though, I think that's a difference that makes no difference. It walks like

Re: pyjamas 0.7 released

2010-05-02 Thread Wolfgang Strobl
lkcl luke.leigh...@googlemail.com: at least _some_ input would be good! the knowledge doesn't have to be there: just the bugreports saying there's a problem and here's exactly how you reproduce it would be a start! So please make it simpler for more people to help. ... how?? there's a

Re: Python dot-equals (syntax proposal)

2010-05-02 Thread Terry Reedy
On 5/2/2010 1:05 AM, Alf P. Steinbach wrote: On 02.05.2010 06:06, * Aahz: and sometimes they rebind the original target to the same object. At the Python level that seems to be an undetectable null-operation. If you try t=(1,2,3); t[1]+=3, if very much matters that a rebind occurs.

Re: Python dot-equals (syntax proposal)

2010-05-02 Thread Steven D'Aprano
On Sun, 02 May 2010 16:28:28 +1000, Lie Ryan wrote: On 05/02/10 10:58, Steven D'Aprano wrote: And Python's object system makes it that the argument to __getattr__ is always a string even though there might be a valid variable that corresponds to it: That is nothing to do with the object

Re: Python dot-equals (syntax proposal)

2010-05-02 Thread Steven D'Aprano
On Sun, 02 May 2010 17:09:36 +1000, Lie Ryan wrote: On 05/02/10 10:58, Steven D'Aprano wrote: On Sun, 02 May 2010 05:08:53 +1000, Lie Ryan wrote: On 05/01/10 11:16, Steven D'Aprano wrote: On Fri, 30 Apr 2010 12:34:34 -0400, D'Arcy J.M. Cain wrote: In practice though, I think that's a

Re: sometype.__new__ and C subclasses

2010-05-02 Thread Carl Banks
On May 1, 11:03 pm, James Porter port...@alum.rit.edu wrote: I've been trying to write a Python C extension module that uses NumPy and has a subtype of numpy.ndarray written in C. However, I've run into a snag: calling numpy.ndarray.__new__(mysubtype, ...) triggers an exception in the bowels

Re: PyObject_SetAttrString - doesn't set instance attribute

2010-05-02 Thread Carl Banks
On May 1, 4:04 am, Jason jason.hee...@gmail.com wrote: I'm having a bit of trouble with C/Python bindings. Particularly, trying to set an instance variable from C when the object is initialised using PyObject_SetAttrString, but nothing seems to happen. The C initialisation code is: static

help error : Failed to build these modules: _dbm

2010-05-02 Thread michel parker
Hi, When i make python 3.1 on my ubuntu 9.10 i get following error : Failed to build these modules: _dbm Please help me. I have done : apt-get build-dep python2.5 but to no avail. Cheers

Re: Python dot-equals (syntax proposal)

2010-05-02 Thread Steven D'Aprano
On Sun, 02 May 2010 04:04:11 -0400, Terry Reedy wrote: On 5/2/2010 1:05 AM, Alf P. Steinbach wrote: On 02.05.2010 06:06, * Aahz: and sometimes they rebind the original target to the same object. At the Python level that seems to be an undetectable null-operation. If you try t=(1,2,3);

Re: PyObject_SetAttrString - doesn't set instance attribute

2010-05-02 Thread Jason
On May 2, 5:52 pm, Carl Banks pavlovevide...@gmail.com wrote: Not sure what you're doing here.  It looks like you are being passed an object of a given type, then you get the type object, call it to create another object of that type, and assign it to object-instance. Sorry, I should have

Re: help error : Failed to build these modules: _dbm

2010-05-02 Thread Kushal Kumaran
On Sun, May 2, 2010 at 3:30 PM, michel parker michelpar...@live.com wrote: Hi, When i make python 3.1 on my ubuntu 9.10 i get following error : Failed to build these modules: _dbm Please help me. I have done : apt-get build-dep python2.5 but to no avail. Cheers Probably the packages

Re: Python dot-equals (syntax proposal)

2010-05-02 Thread Albert van der Horst
In article mailman.2429.1272646255.23598.python-l...@python.org, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Jabapyth wrote: At least a few times a day I wish python had the following shortcut syntax: vbl.=func(args) this would be equivalent to vbl = vbl.func(args) example:

Re: matching strings in a large set of strings

2010-05-02 Thread Albert van der Horst
In article 877hnpjtdw@rudin.co.uk, Paul Rudin paul.nos...@rudin.co.uk wrote: Karin Lagesen karin.lage...@bio.uio.no writes: Hello. I have approx 83 million strings, all 14 characters long. I need to be able to take another string and find out whether this one is present within the 83

RE: help error : Failed to build these modules: _dbm

2010-05-02 Thread michel parker
hi, yup problem solved module was missing libgdbm-dev From: kushal.kumaran+pyt...@gmail.com Date: Sun, 2 May 2010 16:38:28 +0530 Subject: Re: help error : Failed to build these modules: _dbm To: michelpar...@live.com CC: python-list@python.org On Sun, May 2, 2010 at 3:30 PM, michel

help req setting python executable

2010-05-02 Thread michel parker
hi, i have just installed python3.1 with opt=g option. but when i set python executable in wingide to usr/local/bin/python3.1 it says : Some values are invalid: - Python executable 'usr/local/bin/python3.1' is not in path Please correct the values and try again. Please help. What is going to

Bug in Python set

2010-05-02 Thread dmitrey
Python 2.6.5 r265:79063 set().update(set()) is None True while I expect result of update to be set. Also, result of set().add(None) is None while I expect it to be set with element None (or, maybe, it should be empty set?) Regards, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: recommended way to insert data into a one to many relationship using python

2010-05-02 Thread Peter Otten
Peter Otten wrote: If you create indices for floors (and rooms) cur.execute(create unique index room_index on rooms (fid, number);) cur.execute(create unique index floor_index on floors (floor);) the addition of missing rows can be simplified to missing = c2.execute(select distinct floor from

Re: Bug in Python set

2010-05-02 Thread Aahz
In article 0bd314a8-db65-43f1-a999-521e2ed71...@n15g2000yqf.googlegroups.com, dmitrey dmitrey.kros...@scipy.org wrote: Python 2.6.5 r265:79063 set().update(set()) is None True while I expect result of update to be set. Also, result of set().add(None) is None while I expect it to be set with

Re: Bug in Python set

2010-05-02 Thread Steven D'Aprano
On Sun, 02 May 2010 05:11:40 -0700, dmitrey wrote: Python 2.6.5 r265:79063 set().update(set()) is None True while I expect result of update to be set. Change your expectations. Generally, methods which modify the object rather than creating a new one return None. s = set([1,2,3])

List size versus list allocation

2010-05-02 Thread Steven D'Aprano
Python lists are over-allocated: whenever they need to be resized, they are made a little bit larger than necessary so that appends will be fast. See: http://code.python.org/hg/trunk/file/e9d930f8b8ff/Objects/listobject.c I'm interested in gathering some statistics on this, and to do so I need

Re: Fast Efficient way to transfer an object to another list

2010-05-02 Thread Hans Mulder
Francesco Bochicchio wrote: Anyway i think that list.extract( old_list, predicate ) - new_list would be a nice addition to the standard library You could use filter( predicate, old_list ) - new_list -- HansM -- http://mail.python.org/mailman/listinfo/python-list

Re: help req setting python executable

2010-05-02 Thread D'Arcy J.M. Cain
On Sun, 2 May 2010 12:59:35 +0100 michel parker michelpar...@live.com wrote: hi, i have just installed python3.1 with opt=g option. but when i set python executable in wingide to usr/local/bin/python3.1 it says : I don't know anything about wingide but I think your problem is simply a

Re: List size versus list allocation

2010-05-02 Thread Peter Otten
Steven D'Aprano wrote: Python lists are over-allocated: whenever they need to be resized, they are made a little bit larger than necessary so that appends will be fast. See: http://code.python.org/hg/trunk/file/e9d930f8b8ff/Objects/listobject.c I'm interested in gathering some

Re: List size versus list allocation

2010-05-02 Thread Christian Heimes
I'm interested in gathering some statistics on this, and to do so I need a way of measuring the list's logical size versus its actual size. The first is easy: it's just len(list). Is there some way of getting the allocated size of the list? With Python 2.6 and newer you can use sys.getsizeof()

Re: List size versus list allocation

2010-05-02 Thread Peter Otten
Christian Heimes wrote: def slots(lst): ... return (sys.getsizeof(lst) - sys.getsizeof([])) / D'oh! Peter -- http://mail.python.org/mailman/listinfo/python-list

condition and True or False

2010-05-02 Thread Paul McGuire
While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler: x = boolean expression and True or False What is and True or False adding to this picture? The boolean expression part is already evaluating to a

Re: sometype.__new__ and C subclasses

2010-05-02 Thread James Porter
On 5/2/2010 4:34 AM, Carl Banks wrote: Why don't you use mysubtype.__new__(mysubtype,...)? If you wrote mysubtype in C, and defined a different tp_new than ndarray, then this exception will trigger. And it ought to; you don't want to use ndarray's tp_new to create an object of your subclass,

Python debuggers with sys.settrace()

2010-05-02 Thread Sarah Mount
This is a bit of an odd question, but is there any way for a Python debugger to suppress I/O generated by the program which is being debugged? I guess an obvious thing to do would be to replace core parts of the standard library and change any relevant imports in the locals and globals dicts to

Re: condition and True or False

2010-05-02 Thread Peter Otten
Paul McGuire wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler: x = boolean expression and True or False What is and True or False adding to this picture? The boolean expression part

Re: assigning multi-line strings to variables

2010-05-02 Thread Sibylle Koczian
goldtech schrieb: Thank you to posters for help to my question. Seems I had trouble with triple quotes strings in the PythonWin shell. But using the Idle shell things work as expected. But this is probably another issue...any way, w/Idle's shell I got the action regarding multiline strings I

Re: condition and True or False

2010-05-02 Thread Vito 'ZeD' De Tullio
Peter Otten wrote: def f(): big_beast = list(range(10**100)) return big_beast and True or False x = f() it would prevent that a big_beast reference becomes visible outside the function and allow for immediate release of its memory. what's wrong in bool(big_beast)? -- By ZeD --

Re: sometype.__new__ and C subclasses

2010-05-02 Thread Robert Kern
On 2010-05-02 12:48 , James Porter wrote: On 5/2/2010 4:34 AM, Carl Banks wrote: Why don't you use mysubtype.__new__(mysubtype,...)? If you wrote mysubtype in C, and defined a different tp_new than ndarray, then this exception will trigger. And it ought to; you don't want to use ndarray's

Re: recommended way to insert data into a one to many relationship using python

2010-05-02 Thread Bryan
Wolfgang Meiners wrote: one to many relationships are fairly common, i think. So there should be a recommended way to insert data into such a relation using python. Given the following programm, what is the recommended way to insert the list of NewEmployees to the database?

Re: Bug in Python set

2010-05-02 Thread Terry Reedy
On 5/2/2010 8:11 AM, dmitrey wrote: Python 2.6.5 r265:79063 set().update(set()) is None True while I expect result of update to be set. Also, result of set().add(None) is None while I expect it to be set with element None (or, maybe, it should be empty set?) 'Expect' has two different

Parser

2010-05-02 Thread Andreas Löscher
Hi, I am looking for an easy to use parser. I am want to get an overview over parsing and want to try to get some information out of a C-Header file. Which parser would you recommend? Best, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: sometype.__new__ and C subclasses

2010-05-02 Thread James Porter
On 5/2/2010 1:43 PM, Robert Kern wrote: Perhaps things would be clearer if you could post the C code that you've written that fails. So far, you've only alluded at what you are doing using Python-syntax examples. I'm not sure how much this will help, but here you go. The actual C code

Re: condition and True or False

2010-05-02 Thread David Robinow
On Sun, May 2, 2010 at 1:14 PM, Paul McGuire pt...@austin.rr.com wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler:    x = boolean expression and True or False What is and True or False adding

Re: Parser

2010-05-02 Thread Jason Scheirer
On May 2, 12:54 pm, Andreas Löscher andreas.loesc...@s2005.tu- chemnitz.de wrote: Hi, I am looking for an easy to use parser. I am want to get an overview over parsing and want to try to get some information out of a C-Header file. Which parser would you recommend? Best, Andreas Pyparsing:

Re: sometype.__new__ and C subclasses

2010-05-02 Thread Carl Banks
On May 2, 10:48 am, James Porter port...@alum.rit.edu wrote: On 5/2/2010 4:34 AM, Carl Banks wrote: Why don't you use mysubtype.__new__(mysubtype,...)? If you wrote mysubtype in C, and defined a different tp_new than ndarray, then this exception will trigger.  And it ought to; you don't

Re: sometype.__new__ and C subclasses

2010-05-02 Thread Robert Kern
On 2010-05-02 15:28 , Carl Banks wrote: On May 2, 10:48 am, James Porterport...@alum.rit.edu wrote: On 5/2/2010 4:34 AM, Carl Banks wrote: Why don't you use mysubtype.__new__(mysubtype,...)? If you wrote mysubtype in C, and defined a different tp_new than ndarray, then this exception will

Re: sometype.__new__ and C subclasses

2010-05-02 Thread Robert Kern
On 2010-05-02 15:03 , James Porter wrote: And then in Python: A = iMesh.Array(numpy.array([1,2,3,4,5]), instance=mesh) numpy.zeros_like(A) # fails here Inside NumPy, zeros_like looks like this (there's a bit more than this, but it's irrelevant to this problem): def zeros_like(a): if

Re: PyObject_SetAttrString - doesn't set instance attribute

2010-05-02 Thread Carl Banks
On May 2, 3:26 am, Jason jason.hee...@gmail.com wrote: On May 2, 5:52 pm, Carl Banks pavlovevide...@gmail.com wrote: Not sure what you're doing here.  It looks like you are being passed an object of a given type, then you get the type object, call it to create another object of that type,

Re: sometype.__new__ and C subclasses

2010-05-02 Thread Carl Banks
On May 2, 1:51 pm, Robert Kern robert.k...@gmail.com wrote: On 2010-05-02 15:28 , Carl Banks wrote: On May 2, 10:48 am, James Porterport...@alum.rit.edu  wrote: On 5/2/2010 4:34 AM, Carl Banks wrote: Why don't you use mysubtype.__new__(mysubtype,...)? If you wrote mysubtype in C, and

Re: condition and True or False

2010-05-02 Thread Carl Banks
On May 2, 10:14 am, Paul McGuire pt...@austin.rr.com wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler:     x = boolean expression and True or False What is and True or False adding to this

Re: Parser

2010-05-02 Thread Martin v. Loewis
Andreas Löscher wrote: Hi, I am looking for an easy to use parser. I am want to get an overview over parsing and want to try to get some information out of a C-Header file. To get information from a header file, try Tools/scripts/h2py.py Regards, Martin --

Re: sometype.__new__ and C subclasses

2010-05-02 Thread James Porter
On 5/2/2010 3:58 PM, Robert Kern wrote: Well, I think we can change zeros_like() and the rest to work around this issue. Can you bring it up on the numpy mailing list? def zeros_like(a): if isinstance(a, ndarray): res = numpy.empty(a.shape, a.dtype, order=a.flags.fnc) res.fill(0) res =

Re: condition and True or False

2010-05-02 Thread Steven D'Aprano
On Sun, 02 May 2010 10:14:44 -0700, Paul McGuire wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler: x = boolean expression and True or False What is and True or False adding to this

ANN: expy 0.6.6 released!

2010-05-02 Thread Yingjie Lan
EXPY is an express way to extend Python! EXPY provides a way to extend python in an elegant way. For more information and a tutorial, see: http://expy.sourceforge.net/ What's new: 1. Special methods can now take @throws decorators. 2. Added convenience macros type_NEW and type_CheckExact for

Re: List size versus list allocation

2010-05-02 Thread Steven D'Aprano
On Sun, 02 May 2010 18:07:31 +0200, Christian Heimes wrote: I'm interested in gathering some statistics on this, and to do so I need a way of measuring the list's logical size versus its actual size. The first is easy: it's just len(list). Is there some way of getting the allocated size of

Re: condition and True or False

2010-05-02 Thread Patrick Maupin
On May 2, 12:14 pm, Paul McGuire pt...@austin.rr.com wrote: While sifting through some code looking for old x and y or z code that might better be coded using y if x else z, I came across this puzzler:     x = boolean expression and True or False What is and True or False adding to this

Re: sometype.__new__ and C subclasses

2010-05-02 Thread Gregory Ewing
James Porter wrote: Functions like numpy.zeros_like use ndarray.__new__(subtype, ...) to create new arrays based on the shape of other arrays. Maybe the real answer to this question is NumPy is doing it wrong Yes, I think NumPy is doing it wrong, even for subclasses written in Python. If the

Re: condition and True or False

2010-05-02 Thread John Machin
On May 3, 9:14 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: If it is any arbitrary object, then x and True or False is just an obfuscated way of writing bool(x). Perhaps their code predates the introduction of bools, and they have defined global constants True and False

Re: ANN: expy 0.6.6 released!

2010-05-02 Thread Yingjie Lan
Subject: ANN: expy 0.6.6 released! To: python list python-list@python.org Cc: CAPI Python capi-...@python.org Date: Monday, May 3, 2010, 3:24 AM EXPY is an express way to extend Python! EXPY provides a way to extend python in an elegant way. For more information and a tutorial, see:

Re: Fast Efficient way to transfer an object to another list

2010-05-02 Thread Bryan
Steven D'Aprano wrote: The simplest way to speed the above code up is not to start from the beginning each time. That requires two very small changes. And since deletions from the front of the list are slow, MRAB's suggestion is also a good idea. Those two speed-ups provide worst-case linear

Re: Python dot-equals (syntax proposal)

2010-05-02 Thread Alf P. Steinbach
* Terry Reedy: * Alf P. Steinbach: * Aahz: and sometimes they rebind the original target to the same object. At the Python level that seems to be an undetectable null-operation. If you try t=(1,2,3); t[1]+=3, if very much matters that a rebind occurs. Testing: test lang=py3 t = ([],

Re: Parser

2010-05-02 Thread dmtr
On May 2, 12:54 pm, Andreas Löscher andreas.loesc...@s2005.tu- chemnitz.de wrote: Hi, I am looking for an easy to use parser. I am want to get an overview over parsing and want to try to get some information out of a C-Header file. Which parser would you recommend? ANTLR --

Re: Parser

2010-05-02 Thread Chris Rebert
On Sun, May 2, 2010 at 10:10 PM, dmtr dchich...@gmail.com wrote: On May 2, 12:54 pm, Andreas Löscher andreas.loesc...@s2005.tu- chemnitz.de wrote: Hi, I am looking for an easy to use parser. I am want to get an overview over parsing and want to try to get some information out of a C-Header

Re: Parser

2010-05-02 Thread dmtr
ANTLR I don't know if it's that easy to get started with though. The companion for-pay book is *most excellent*, but it seems to have been written to the detriment of the normal online docs. Cheers, Chris --http://blog.rebertia.com IMO ANTLR is much easier to use compared to any other

[issue1533] Bug in range() function for large values

2010-05-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks---the new patch looks good. Pulling the argument conversion out into a separate function makes the whole thing much cleaner. I still have a couple of nits: - Please add a comment before get_range_argument indicating what it's

[issue1533] Bug in range() function for large values

2010-05-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thinking about it a bit more, I really would prefer get_range_argument not to steal a reference. If I'm reading a bit of C code and encounter something like: obj = transform(obj); if (obj == NULL) ... my hindbrain immediately starts

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Ok, let's try sys.stderr solution: commited in r80694 (py3k). If it breaks buildbot outputs, I will revert it and try the second solution. -- status: open - pending ___ Python tracker

[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal

2010-05-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The bug only occurs on Mac OS X because file system encoding is hardcoded to UTF-8 on this OS and the test is skipped if the file system encoding is ASCII. But the bug is not specific to test_warnings, as mentionned by R. David

[issue1533] Bug in range() function for large values

2010-05-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: BTW, I've changed the various nb_int should return int object error messages in Objects/intobject.c to the more meaningful and accurate message: __int__ method should return an integer, in r80695. --

[issue7192] webbrowser.get(firefox) does not work on Mac with installed Firefox

2010-05-02 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Firefox doesn't seem to support a full scripting api, which makes opening tabs and windows harder. I've committed an alternate version of your patch in r80698: This uses osascript to open the url instead of the open command. I've also

[issue7192] webbrowser.get(firefox) does not work on Mac with installed Firefox

2010-05-02 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've ported the change to 3.2 as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7192 ___

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: TestIPv6Environment testcase of test_ftplib uses support.HOST as hostname, and HOST=localhost. Usually, localhost is the name of 127.0.0.1, but not always ::1. On Linux, the usual names for ::1 are ip6-localhost or ip6-loopback.

[issue8596] crypt blowfish 'ignores' salt

2010-05-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I doubt this is a Python issue, since the crypt function does little more than wrap the system crypt function. What does your man page for crypt say? Are you sure you're providing a salt that the system crypt accepts? -- nosy:

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Attached patch uses IPV6_HOST='::1'. -- keywords: +patch Added file: http://bugs.python.org/file17183/support_ipv6_host.patch ___ Python tracker rep...@bugs.python.org

[issue8596] crypt blowfish 'ignores' salt

2010-05-02 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: - invalid status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8596 ___

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Mac OS X 10.6.3 has ::1 localhost. My Ubuntu 9.10 has ::1 ip6-localhost ip6-loopback but I don't rember if I edited this line or not. I don't think so. -- ___ Python tracker

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Debian Sid has ::1 ip6-localhost ip6-loopback localhost. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8598 ___

[issue8567] decimal module doesn't respect precedence rules for exceptional conditions

2010-05-02 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- stage: unit test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8567 ___ ___

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Since it may reorder output, I think it's better revert the patch and try the other solution. However, I don't think you need to replace sys.stdout at all: just output the traceback more carefully. -- status: pending - open

[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-05-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I'm also seeing this on OS X 10.6. It seems to have started with r80243. -- nosy: +mark.dickinson, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8455

[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-05-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: To clarify, that last message was about trunk, where this test is failing for me since r80243. Adding 2.7 to the versions. -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue8538] Add ConfigureAction to argparse

2010-05-02 Thread Yaniv Aknin
Changes by Yaniv Aknin yaniv.ak...@gmail.com: -- nosy: +Yaniv.Aknin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8538 ___ ___ Python-bugs-list

[issue7192] webbrowser.get(firefox) does not work on Mac with installed Firefox

2010-05-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: issue 8238 notes the problem with autoraise and new on windows. I believe when I looked at that issue that I confirmed that the syntax webbrowser uses on Linux to support those options works on windows with the current firefox, even

[issue8597] build out-of-line asm on Windows

2010-05-02 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8597 ___ ___ Python-bugs-list mailing

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-05-02 Thread July Tikhonov
July Tikhonov july.t...@gmail.com added the comment: Patch updated: bound and unbound methods, user-defined callable, partial object included in test. By the way, [id(abs.__doc__) for i in range(5)] [140714383081744, 140714383081744, 140714383081744, 140714383081744, 140714383081744]

[issue8599] _execvpe should behaves inconsistently when PATH includes a filename

2010-05-02 Thread Oren Held
New submission from Oren Held o...@held.org.il: A. Description When running os._execvpe with a relative pathname that does not exist, I'd expect to get ENOENT error. But there is an edge case in which Python throws ENOTDIR error - when the LAST element in PATH is a regular file (e.g. /bin/ls).

[issue8599] _execvpe behaves inconsistently when PATH includes a filename

2010-05-02 Thread Oren Held
Changes by Oren Held o...@held.org.il: -- title: _execvpe should behaves inconsistently when PATH includes a filename - _execvpe behaves inconsistently when PATH includes a filename ___ Python tracker rep...@bugs.python.org

[issue8599] _execvpe behaves inconsistently when PATH includes a filename

2010-05-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The python functions are thin wrappers around the system calls, and are reporting the result of calling the corresponding system call. The fact that the shell chooses to catch both errors and report a single one would be equivalent to,

[issue8597] build out-of-line asm on Windows

2010-05-02 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I think this is a duplicate of issue 7546. -- nosy: +skrah type: behavior - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8597

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: All of my Gentoo systems except one have localhost on the ::1 line. The one that doesn't hasn't been updated in several years. That one has the same entry for ::1 as your Ubuntu. The FreeBSD 6.3 box I have access to has localhost on

[issue8597] build out-of-line asm on Windows

2010-05-02 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Distutils is frozen, switching to distutils2 -- components: +Distutils2 -Distutils ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8597 ___

[issue7546] msvc9compiler.py: add .asm extension

2010-05-02 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Distutils is frozen, switching to distutils2 -- components: +Distutils2 -Distutils ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7546 ___

[issue2091] file accepts 'rU+' as a mode

2010-05-02 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- keywords: +needs review stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2091 ___

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-05-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: As expected, the patch doesn't work: it randomize the output order :-( I checked sparc Ubuntu 3.x: the output order is correct. test_xxx lines are written to stdout, FAIL: ... + traceback are written to stderr, and the lines are

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-02 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: There is at least one valid use case: code that needs to deal with HTML and XHTML currently has to normalise the tag names in some way, which usually means that it will want to remove the namespaces from XHTML documents to make it

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, I forgot to copy/paste a test_ftplib failure: == ERROR: test_makeport (test.test_ftplib.TestIPv6Environment)

[issue4687] GC stats not accurate because of debug overhead

2010-05-02 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: The patch looks obviously correct to me. I can confirm that the patch applies cleanly both to the trunk and to the 'release26-maint' branch, and that the 'test_gc' tests pass in both cases after applying it and rebuilding. --

[issue4687] GC stats not accurate because of debug overhead

2010-05-02 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4687 ___ ___

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-02 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: This bug exists on Python 2.6, too. It seems to me that the right solution here is to use both opened files as context managers. See attached patch (made against the release26-maint branch). The patch also cleans up the old-style

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2010-05-02 Thread Tres Seaver
Changes by Tres Seaver tsea...@agendaless.com: -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4265 ___ ___

  1   2   >