Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Chris Angelico
On Mon, Jul 16, 2012 at 2:53 PM, Ranting Rick rantingrickjohn...@gmail.com wrote: if obj is in essence doing if bool(obj) behind the scenes. My question is: Why hide such valuable information from the reader? It's obvious that if bool(obj) will return a boolean; whereas if obj is ambiguous.

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Chris Angelico
On Mon, Jul 16, 2012 at 3:03 PM, Ranting Rick rantingrickjohn...@gmail.com wrote: But if you are going to argue that if obj is *explicit enough*, then apply your argument consistently to String+1.75 also. Why must we be explicit about string conversion BUT not boolean conversion? Can you

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Mark Lawrence
On 16/07/2012 04:05, Chris Angelico wrote: On Mon, Jul 16, 2012 at 12:58 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: And that, the reason given in the sentence above, is the reason that we, collectively all programmers, should prefer to be explicit, not merely conveying

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread alex23
On Jul 16, 2:53 pm, Ranting Rick rantingrickjohn...@gmail.com wrote: if obj is in essence doing if bool(obj) behind the scenes. My question is: Why hide such valuable information from the reader? If @decorator is in essence doing function = decorator(function) behind the scenes, why hide that?

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread alex23
On Jul 16, 3:03 pm, Ranting Rick rantingrickjohn...@gmail.com wrote: But if you are going to argue that if obj is *explicit enough*, then apply your argument consistently to String+1.75 also. Why must we be explicit about string conversion BUT not boolean conversion? What _other_ than booleans

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Steven D'Aprano
On Sun, 15 Jul 2012 22:03:52 -0700, Ranting Rick wrote: But if you are going to argue that if obj is *explicit enough*, then apply your argument consistently to String+1.75 also. Why must we be explicit about string conversion BUT not boolean conversion? The problem with String + 1.75 is not

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Steven D'Aprano
On Sun, 15 Jul 2012 19:41:34 -0700, Ranting Rick wrote: Short circuitry is a powerful tool! But why the heck would your sequences ever be None? Are you using None as a default? And if so, why not use an empty sequence instead ([], {}, )? Mostly for explicitness. I want to be able to say that

Re: Diagramming code

2012-07-16 Thread Ulrich Eckhardt
Am 16.07.2012 03:57, schrieb hamilton: OK then, let me ask, how do you guys learn/understand large projects ? 1. Use the program. This gives you an idea what features are there and a bit how it could be structured. 2. Build the program, to see what is done to get the program running. This

Re: Diagramming code

2012-07-16 Thread Joel Goldstick
On Mon, Jul 16, 2012 at 3:58 AM, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: Am 16.07.2012 03:57, schrieb hamilton: OK then, let me ask, how do you guys learn/understand large projects ? 1. Use the program. This gives you an idea what features are there and a bit how it could be

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-16 Thread Frederic Rentsch
On Sat, 2012-07-14 at 20:10 -0700, rantingrickjohn...@gmail.com wrote: On Thursday, July 12, 2012 1:53:54 PM UTC-5, Frederic Rentsch wrote: The hit list is a table of investment titles (stock, funds, bonds) that displays upon entry of a search pattern into a respective template. The table

Re: code review

2012-07-16 Thread Duncan Booth
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 13 Jul 2012 12:30:47 +, Albert van der Horst wrote: The worst of is, of course, = for assignment instead of := . This is a convention that Python follows, to my dismay. *shrug* The worst is to use = for both equality

Re: Initial nose experience

2012-07-16 Thread Philipp Hagemeister
On 07/15/2012 08:58 PM, Roy Smith wrote: What motivated you to migrate from unittest to nose? Mostly I was just looking for a better way to run our existing tests. We've got a bunch of tests written in standard unittest, but no good way to start at the top of the tree and run them all with

Re: Initial nose experience

2012-07-16 Thread Roy Smith
In article mailman.2149.1342375358.4697.python-l...@python.org, pyt...@bdurham.com wrote: After years of using unittest, what would you say are the pros and cons of nose? BTW, although I'm currently using nose just as a unittest aggregator, I can see some nice advantages to native nose

Re: code review

2012-07-16 Thread Ben Finney
Duncan Booth duncan.booth@invalid.invalid writes: Technically of course Python doesn't have assignment, it just binds names. Names, or other references. I'd argue that Python has assignment, and assignment in Python is identical with binding references to objects. But then, the Python

Re: Initial nose experience

2012-07-16 Thread Peter Otten
Philipp Hagemeister wrote: Currently, $ python -m unittest does nothing useful (afaik). Would it break anything to look in . , ./test, ./tests for any files matching test_* , and execute those? http://docs.python.org/library/unittest#test-discovery --

unittest: Improve discoverability of discover (Was: Initial nose experience)

2012-07-16 Thread Philipp Hagemeister
On 07/16/2012 01:47 PM, Peter Otten wrote: http://docs.python.org/library/unittest#test-discovery That's precisely it. Can we improve the discoverability of the discover option, for example by making it the default action, or including a message use discover to find test files automatically if

Re: Initial nose experience

2012-07-16 Thread Ben Finney
Roy Smith r...@panix.com writes: In article mailman.2149.1342375358.4697.python-l...@python.org, pyt...@bdurham.com wrote: After years of using unittest, what would you say are the pros and cons of nose? BTW, although I'm currently using nose just as a unittest aggregator Be aware that

Re: unittest: Improve discoverability of discover (Was: Initial nose experience)

2012-07-16 Thread Philipp Hagemeister
On 07/16/2012 02:37 PM, Philipp Hagemeister wrote: Can we improve the discoverability of the discover option, for example by making it the default action, or including a message use discover to find test files automatically if there are no arguments? Oops, already implemented as of Python 3.2.

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Serhiy Storchaka
On 15.07.12 19:50, Rick Johnson wrote: We must NEVER present if in such confusing manner as ExampleA. ## EXAMPLE C ## py if bool(money) == True: ... do_something() -- http://mail.python.org/mailman/listinfo/python-list

assertraises behaviour

2012-07-16 Thread andrea crotti
I found that the behaviour of assertRaises used as a context manager a bit surprising. This small example doesn't fail, but the OSError exception is cathed even if not declared.. Is this the expected behaviour (from the doc I would say it's not). (Running on arch-linux 64 bits and Python 2.7.3,

Re: assertraises behaviour

2012-07-16 Thread Christian Heimes
Am 16.07.2012 15:38, schrieb andrea crotti: This small example doesn't fail, but the OSError exception is cathed even if not declared.. Is this the expected behaviour (from the doc I would say it's not). (Running on arch-linux 64 bits and Python 2.7.3, but it doesn the same with Python 3.2.3)

Re: Python and Qt4 Designer

2012-07-16 Thread Michael Torrie
On 07/15/2012 01:58 AM, Vincent Vande Vyvre wrote: Rusi is not the op, and his question is about these lines app = None if ( not app ): Yeah that's a no-op. The original author of that code is clearly confused there. not this one app = QtGui.QApplication([]) which

Re: Discussion on some Code Issues

2012-07-16 Thread subhabangalore
On Sunday, July 8, 2012 10:47:00 PM UTC+5:30, Chris Angelico wrote: On Mon, Jul 9, 2012 at 3:05 AM, lt;subhabangal...@gmail.comgt; wrote: gt; On Sunday, July 8, 2012 1:33:25 PM UTC+5:30, Chris Angelico wrote: gt;gt; On Sun, Jul 8, 2012 at 3:42 PM, lt;subhabangal...@gmail.comgt; wrote:

Re: assertraises behaviour

2012-07-16 Thread andrea crotti
2012/7/16 Christian Heimes li...@cheimes.de: The OSError isn't catched as the code never reaches the line with raise OSError. In other words raise OSError is never executed as the exception raised by assert False stops the context manager. You should avoid testing more than one line of code

Re: assertraises behaviour

2012-07-16 Thread Peter Otten
andrea crotti wrote: 2012/7/16 Christian Heimes li...@cheimes.de: The OSError isn't catched as the code never reaches the line with raise OSError. In other words raise OSError is never executed as the exception raised by assert False stops the context manager. You should avoid testing more

Style question: metaclass self vs cls?

2012-07-16 Thread Steven D'Aprano
Here's a style question for you: in a metaclass, what should I call the instance parameter of methods, cls or self? class ExampleMeta(type): def method(self, *args): ... I'm not quite sure if that feels right. On the one hand, self is the ExampleMeta instance alright... but on the other,

PyQt QCalendarWidget events question

2012-07-16 Thread tinnews
I am trying to use the PyQt4 calendar widget to perform some different actions on specific dates. There are three events available:- selectionChanged() activated(QDate) clicked(QDate) On trying all these out it would appear that the event handlers get called as follows:- The

Re: PyQt QCalendarWidget events question

2012-07-16 Thread tinnews
tinn...@isbd.co.uk wrote: I am trying to use the PyQt4 calendar widget to perform some different actions on specific dates. There are three events available:- selectionChanged() activated(QDate) clicked(QDate) On trying all these out it would appear that the event handlers

Re: assertraises behaviour

2012-07-16 Thread andrea crotti
Good thanks, but there is something that implements this behaviour.. For example nose runs all the tests, and if there are failures it goes on and shows the failed tests only in the end, so I think it is possible to achieve somehow, is that correct? --

RE: Diagramming code

2012-07-16 Thread Sells, Fred
You leave many relevant questions unanswered. 1. Is the original developer/team available or have you been left with the code and little or no doc's? 2. How big is big in terms of the number of files/modules in the project? 3. Is there a reasonable structure to the project in terms of

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Albert van der Horst
In article b2971c4d-0769-4d03-a7b6-c527629a8...@x39g2000yqx.googlegroups.com, Ranting Rick rantingrickjohn...@gmail.com wrote: We DON'T want Python to silently convert cost to a string. What we DO want is to force the author to use the str function thereby making the conversion explicit. We do

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Albert van der Horst
In article 50038364$0$29995$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 15 Jul 2012 18:21:06 -0700, Ranting Rick wrote: If HOWEVER we want to truth test an object (as in: if obj) we should be FORCED to use the bool! Why? Because

Re: assertraises behaviour

2012-07-16 Thread Peter Otten
andrea crotti wrote: Good thanks, but there is something that implements this behaviour.. For example nose runs all the tests, and if there are failures it goes on and shows the failed tests only in the end, so I think it is possible to achieve somehow, is that correct? No, I don't see how

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Ethan Furman
Steven D'Aprano wrote: On Sun, 15 Jul 2012 10:19:16 -0600, Ian Kelly wrote: On Sun, Jul 15, 2012 at 4:56 AM, Steven D'Aprano wrote: (For the record, I can only think of one trap for the unwary: time objects are false at *exactly* midnight.) Ugh, that's irritating. I can't think of any

Re: Diagramming code

2012-07-16 Thread hamilton
Thank you Fred. I am new to python and am reviewing code I find online. Some projects do have docs that spell out what its doing, but many projects that I have download have just the code. I have my own personal style to decypher C and C++ code. But python is still foreign to me. hamilton

Re: Diagramming code

2012-07-16 Thread Miki Tebeka
Is there any software to help understand python code ? For module dependency you can try http://furius.ca/snakefood/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: PyQt QCalendarWidget events question

2012-07-16 Thread John Posner
On 7/16/2012 12:28 PM, tinn...@isbd.co.uk wrote: tinn...@isbd.co.uk wrote: I am trying to use the PyQt4 calendar widget to perform some different actions on specific dates. There are three events available:- selectionChanged() activated(QDate) clicked(QDate) On trying all

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Andrew Berg
On 7/15/2012 9:38 PM, Steven D'Aprano wrote: I would expect None to mean doesn't exist or unknown or something like that - e.g., a value of 0 means 0 jelly beans in the jar and None means there isn't a jar. How you interpret some_variable = None depends on what some_variable represents. If

Re: Diagramming code

2012-07-16 Thread Andrea Crotti
On 07/16/2012 02:26 AM, hamilton wrote: Is there any software to help understand python code ? Thanks hamilton Sometimes to get some nice graphs I use gprof2dot (http://code.google.com/p/jrfonseca/wiki/Gprof2Dot) or doxygen (http://www.stack.nl/~dimitri/doxygen/) gprof2dot analyses the

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Ethan Furman
Andrew Berg wrote: On 7/15/2012 9:38 PM, Steven D'Aprano wrote: I would expect None to mean doesn't exist or unknown or something like that - e.g., a value of 0 means 0 jelly beans in the jar and None means there isn't a jar. How you interpret some_variable = None depends on what

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Laszlo Nagy
... Traceback (most recent quip last): Author: DeAprano, line 7, in post LogicalFallacyError: Reductio ad absurdum Deary deary me Rick. Reductio ad adsurdum is not a fallacy. It is a counter-argument to an argument or claim, by showing that the premise of the original claim leads to an

Re: No more Python support in NetBeans 7.0

2012-07-16 Thread trevor . carlston
On Wednesday, October 26, 2011 8:06:16 PM UTC-6, w...@naveed.net wrote: Sorry to comment on an old topic, but I wanted to clarify for others like me who might get the wrong idea. It looks like this is no longer true. Netbeans 7 might be supporting python after all.

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Laszlo Nagy
This syntax is explicit *enough*. We don't need to be any more explicit. But if you are going to argue that if obj is *explicit enough*, then apply your argument consistently to String+1.75 also. Why must we be explicit about string conversion BUT not boolean conversion? Can you reduce this to

Re: No more Python support in NetBeans 7.0

2012-07-16 Thread trevor . carlston
On Wednesday, October 26, 2011 8:06:16 PM UTC-6, w...@naveed.net wrote: Sorry to comment on an old topic, but I wanted to clarify for others like me who might get the wrong idea. It looks like this is no longer true. Netbeans 7 might be supporting python after all.

Re: Style question: metaclass self vs cls?

2012-07-16 Thread Terry Reedy
On 7/16/2012 11:29 AM, Steven D'Aprano wrote: Here's a style question for you: in a metaclass, what should I call the instance parameter of methods, cls or self? class ExampleMeta(type): def method(self, *args): ... I'm not quite sure if that feels right. On the one hand, self is the

Re: Diagramming code

2012-07-16 Thread Andrew Cooper
On 16/07/2012 21:41, Andrea Crotti wrote: On 07/16/2012 02:26 AM, hamilton wrote: Is there any software to help understand python code ? Thanks hamilton Sometimes to get some nice graphs I use gprof2dot (http://code.google.com/p/jrfonseca/wiki/Gprof2Dot) or doxygen

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2012 13:54:32 -0700, Ethan Furman wrote: Andrew Berg wrote: On 7/15/2012 9:38 PM, Steven D'Aprano wrote: I would expect None to mean doesn't exist or unknown or something like that - e.g., a value of 0 means 0 jelly beans in the jar and None means there isn't a jar. How

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Steven D'Aprano
On Tue, 17 Jul 2012 01:12:47 +, Steven D'Aprano wrote: It looks like Firebird implements the variety of ternary logical called Keene logic. Oops, I meant Kleene. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2012 13:28:14 -0400, Dennis Lee Bieber wrote: On 16 Jul 2012 02:38:35 GMT, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info declaimed the following in gmane.comp.python.general: On Sun, 15 Jul 2012 12:02:37 -0500, Andrew Berg wrote: Okay, I see the value in this,

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Andrew Berg
On 7/15/2012 3:28 PM, Terry Reedy wrote: Because everything does (or should). I can see how truth testing for empty values is convenient, but perhaps objects should only have a truth value if explicitly given one - particularly in cases where such a value wouldn't be obvious or the obvious value

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread rusi
On Jul 15, 9:50 pm, Rick Johnson rantingrickjohn...@gmail.com wrote: On Sunday, July 15, 2012 11:19:16 AM UTC-5, Ian wrote: On Sun, Jul 15, 2012 at 4:56 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: (For the record, I can only think of one trap for the unwary: time

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Andrew Berg
On 7/16/2012 7:43 PM, Steven D'Aprano wrote: The existence of a jar or no jar is irrelevant to the question of how many jellybeans there are. They are two different things, and therefore need two different values. There are many ways to implement this. I have a better real example, but I

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Chris Angelico
On Tue, Jul 17, 2012 at 11:57 AM, Andrew Berg bahamutzero8...@gmail.com wrote: I could do: if has_message: send('{command} {args} :{message}') else: send('{command} {args}') but then I'd have to make sure has_message stays accurate since message won't necessarily be. Or

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2012 20:22:18 -0500, Andrew Berg wrote: On 7/15/2012 3:28 PM, Terry Reedy wrote: Because everything does (or should). I can see how truth testing for empty values is convenient, but perhaps objects should only have a truth value if explicitly given one - particularly in cases

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Devin Jeanpierre
On Mon, Jul 16, 2012 at 12:03 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 15 Jul 2012 22:15:13 -0400, Devin Jeanpierre wrote: For example, instead of if stack: or if bool(stack):, we could use if stack.isempty():. This line tells us explicitly that stack is a

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Chris Angelico
On Tue, Jul 17, 2012 at 2:18 PM, Ranting Rick rantingrickjohn...@gmail.com wrote: On Jul 16, 11:11 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: I imagine though that the Python dev's answer will basically be #2: it isn't a container, it just behaves a little bit like a

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2012 20:57:43 -0500, Andrew Berg wrote: I have a better real example, but I opted not to use it before since it requires some explanation - IRC messages. A client-to-server message has the basic form of b'COMMAND arguments :message' (e.g. b'PRIVMSG #channel :hi guys!'). Some

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Andrew Berg
On 7/16/2012 11:11 PM, Steven D'Aprano wrote: If you are right that SimpleNamespace should be treated as a container, then it should implement container semantics. Since it doesn't, that is either: 1) a bug; or 2) a triumph of laziness over correctness I imagine though that the Python

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Andrew Berg
On 7/16/2012 11:39 PM, Steven D'Aprano wrote: If you need three (or four, or fifty) distinguishable states, then obviously boolean context will not solve your problem. I never said it would. That is the impression I got from this statement: How you interpret some_variable = None depends on

[issue7171] Add inet_ntop and inet_pton support for Windows

2012-07-16 Thread Atsuo Ishimoto
Atsuo Ishimoto ishim...@gembook.org added the comment: Implementation of inet_pton and inet_ntop by WSAAddressToStringA and WSAStringToAddressA for Windows. Conversion of IPv6 address might fail if IPv6 is not installed. Tested on Windows XP SP3 and Windows7. -- keywords: +patch

[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2012-07-16 Thread Tomi Pieviläinen
Tomi Pieviläinen tomi.pievilainen+launch...@iki.fi added the comment: On Sat, Jul 14, 2012 at 12:44:46PM +, Éric Araujo wrote: Éric Araujo mer...@netwok.org added the comment: How did you configure and build? If you ran make as root it may explain this. Indeed I did do it as root for

[issue15337] The cmd module incorrectly lists help as an undocumented command

2012-07-16 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15337 ___

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-07-16 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset de229dde486b by Gregory P. Smith in branch '3.2': Fixes Issue #14635: telnetlib will use poll() rather than select() when possible http://hg.python.org/cpython/rev/de229dde486b New changeset 558e5ed678c3 by Gregory

[issue14790] use packaging in setup.py

2012-07-16 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: At the moment, it seems that this just won't happen. If a new attempt is made to integrate packaging with Python, this may or may not become an issue (e.g. whoever is doing the integration the next time might adapt setup.py from the

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-07-16 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14635 ___

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-16 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: +1 for backport. There's no benefit to leaving ambiguity floating about, nor was there ever any intention for the behavior to have been different. -- ___ Python tracker

[issue12428] functools test coverage

2012-07-16 Thread Brian Thorne
Changes by Brian Thorne hardb...@gmail.com: -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12428 ___ ___ Python-bugs-list

[issue15337] The cmd module incorrectly lists help as an undocumented command

2012-07-16 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 076ae30e5dd0 by Raymond Hettinger in branch '2.7': Issue 15337: help() shown as undocumented http://hg.python.org/cpython/rev/076ae30e5dd0 -- nosy: +python-dev ___ Python

[issue15337] The cmd module incorrectly lists help as an undocumented command

2012-07-16 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15337 ___

[issue12978] Figure out extended attributes on BSDs

2012-07-16 Thread koobs
koobs koobs.free...@gmail.com added the comment: And to clarify the no-follow-symlinks case on FreeBSD: extattr_{get,set,list,delete}_link system calls behave in the same way as their _file counterparts, except that they do not follow sym-links. as per the man page. --

[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes

2012-07-16 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I agree with Meador that this should be fixed upstream first. There's a thread here on libffi-discuss, with a patch but no conclusive answer: http://sourceware.org/ml/libffi-discuss/2012/msg00168.html --

[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes

2012-07-16 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Ah, forget that: Alex has apparently already tested that patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4130 ___

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Richard Oudkerk
New submission from Richard Oudkerk shibt...@gmail.com: With unix, and a source build, sysconfig.get_config_var('srcdir') and sysconfig.get_path('include') misbehave: user@mint-vm ~/Repos/cpython $ cd / user@mint-vm / $ ~/Repos/cpython/python Python 3.3.0b1 (default:671894ae19a2, Jul 16

[issue15170] Fix 64-bit building for buildbot scripts (2.7)

2012-07-16 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Closing, since all 2.7 buildbots compile. -- resolution: - fixed stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15170

[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Anyway, I am hitting another problem now -- _freeze_importlib is *not* idempotent. What do you mean with idempotent? Deterministic? -- ___ Python tracker rep...@bugs.python.org

[issue15170] Fix 64-bit building for buildbot scripts (2.7)

2012-07-16 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15170 ___ ___

[issue15171] Fix 64-bit building for buildbot scripts (3.2)

2012-07-16 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: David, do you have an idea why the XP-4 3.2 machine fails the compile? I can't reproduce this and I don't know if it's related to 334ff92a8483 or 177f93f0f5b9. -- nosy: +db3l ___ Python

[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15364 ___ ___ Python-bugs-list mailing

[issue15365] Traceback reporting can fail if IO cannot be imported

2012-07-16 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson krist...@ccpgames.com: Reporting an error early in the python startup, before importing is properly initialized, can be tricky. For example, here: if (PyImport_ImportFrozenModule(_frozen_importlib) = 0) { Py_FatalError(Py_Initialize: can't import

[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto
Atsuo Ishimoto ishim...@gembook.org added the comment: Cleaned up the patch. Gennadiy added a test of shutil.move(), but SameFileError will be raised only if shutil.copy() was called. Am I missing something? -- nosy: +ishimoto Added file:

[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes

2012-07-16 Thread Alex Leach
Alex Leach beamesle...@gmail.com added the comment: I hadn't tried the `long long` substitution before, but unfortunately I don't think that simple fix quite does the trick. I just checked out libffi from git, and made the following patch:- #$ diff -u ffi64.c ffi64.c.orig --- ffi64.c

[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-16 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The new test fails on the Fedora bot: http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/2881/steps/test/logs/stdio == FAIL:

[issue15366] venv assumes header files in sys._home + '/Include'

2012-07-16 Thread Richard Oudkerk
New submission from Richard Oudkerk shibt...@gmail.com: For Unix I follow the practice suggested in README of running configure from a subdir of the main python directory, eg mkdir release cd release ../configure make But if I create a venv then I cannot use it to compile C

[issue15367] build_ext in a venv on Windows assumes pyconfig.h in sys.exec_prefix + '\PC'

2012-07-16 Thread Richard Oudkerk
New submission from Richard Oudkerk shibt...@gmail.com: On Windows I can't use a source build of Python to create a venv which will compile C extensions because pyconfig.h cannot be found. For example running build running build_ext building 'demo' extension creating build

[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-16 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: You can’t just compare the xattr because some (like security.*) can be only copied as root. IIRC they come from SELinux. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15238

[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le lundi 16 juillet 2012 à 05:42 +, Meador Inge a écrit : The order of 'co_cellvars', 'co_varnames', and 'co_freevars' can be different from compile to compile, thus the bytecode can be different from compile to compile (I am not sure if

[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1492704 ___ ___ Python-bugs-list mailing

[issue15367] build_ext in a venv on Windows assumes pyconfig.h in sys.exec_prefix + '\PC'

2012-07-16 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: The attached patch works for me. -- keywords: +patch Added file: http://bugs.python.org/file26395/build_ext.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15367

[issue15307] Patch for --symlink support in pyvenv with framework python

2012-07-16 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: The test failure in test_osx_env is in itself fairly harmless because PYTHONEXECUTABLE is only used to ensure IDLE.app works correct, and IDLE.app doesn't use the pythonw executable and hence won't hit the code that special-cases the

[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-16 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: On Mon, Jul 16, 2012 at 5:20 AM, Antoine Pitrou rep...@bugs.python.org wrote: Anyway, I am hitting another problem now -- _freeze_importlib is *not* idempotent. What do you mean with idempotent? Deterministic? Whoops, yeah, deterministic.

[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Meador Inge
New submission from Meador Inge mead...@gmail.com: Consider this small example (you might have to run sample program multiple times to see a difference): $ cat dis-closure.py import dis def adder(a, b): def add(): return a + b return add print(dis.dis(adder(1, 2).__code__))

[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-16 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: On Mon, Jul 16, 2012 at 7:13 AM, Antoine Pitrou rep...@bugs.python.org wrote: I don't know, but you could open an issue just for the record. People may be surprised if bytecode generation isn't deterministic. Yeah, I was somewhat surprised and

[issue15366] venv assumes header files in sys._home + '/Include'

2012-07-16 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: The attached patch seems to fix the problem. -- keywords: +patch Added file: http://bugs.python.org/file26397/distutils-sysconfig.patch ___ Python tracker rep...@bugs.python.org

[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks. Can you clarify what behavior changed compared to the previous patch? From the doc it looks like shutil.move now always raises SameFileError, whereas the previous patch said that on Unix it depended on the semantics of os.rename. The

[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I might come to regret asking this, but so what? Is this actually causing you issues, or are you literally just finding this behavior surprising and that's it? I mean we could simply sort the tuples, but I don't know what kind of performance

[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: On Mon, Jul 16, 2012 at 8:11 AM, Brett Cannon rep...@bugs.python.org wrote: I might come to regret asking this, but so what? Is this actually causing you issues, or are you literally just finding this behavior surprising and that's it? I

[issue14644] test_logging failure on OS X Tiger

2012-07-16 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I get failures for the same test on my machine running OSX 10.7, the machine is fairly overloaded right now because I'm running a large VM in the background. Increasing the timeout from 5.0 to 15.0 seconds ensures that the test passes.

[issue9102] pybench: Cannot compare 2.x and 3.x benchmarks

2012-07-16 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9102 ___

[issue15369] pybench and test.pystone poorly documented

2012-07-16 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: The benchmarking tools pystones and pybench which are shipped with the Python standard distribution are not documented. The only information is in the what's-new for Python 2.5:

[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto
Atsuo Ishimoto ishim...@gembook.org added the comment: Behavior is not changed at all. I fixed test_shutil.py to test if SameFileError is raised in shutil.copy() instead of shutil.move(). -- ___ Python tracker rep...@bugs.python.org

  1   2   >