Download issue.

2012-10-02 Thread subhabangalore
Dear Group, I am using Python on Windows 7 SP-1 (64 bit). I have two versions of Python installed 2.7 and 3.2. I want to install networkx in both. How may I do that? If any one may kindly let me know. Regards, Subhabrata. -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL questions: still supported? Problems on 2.7 for win? alternatives?

2012-10-02 Thread WhisperingWally
Gelonida N gelonida at gmail.com writes: I wondered whether some of you have a little more insight into what's going on with PIL. AFAIK the latest PIL stuff lives here: hg.effbot.org -- http://mail.python.org/mailman/listinfo/python-list

terminate called after throwing an instance of 'CABRTException'

2012-10-02 Thread Daniel Fetchinson
I've noticed a strange thing with python lately: Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2 Type help, copyright, credits or license for more information. def f(): print x ... f() terminate called after throwing an instance of

Re: Download issue.

2012-10-02 Thread Ritchie Flick
http://www.pip-installer.org/en/latest/index.html -- Ritchie Flick -- http://mail.python.org/mailman/listinfo/python-list

Re: terminate called after throwing an instance of 'CABRTException'

2012-10-02 Thread Peter Otten
Daniel Fetchinson wrote: I've noticed a strange thing with python lately: Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2 Type help, copyright, credits or license for more information. def f(): print x ... f() terminate called after

Re: Download issue.

2012-10-02 Thread Dave Angel
On 10/02/2012 04:43 AM, subhabangal...@gmail.com wrote: Dear Group, I am using Python on Windows 7 SP-1 (64 bit). I have two versions of Python installed 2.7 and 3.2. I want to install networkx in both. How may I do that? If any one may kindly let me know. Doing a search for networkx,

Re: terminate called after throwing an instance of 'CABRTException'

2012-10-02 Thread Daniel Fetchinson
I've noticed a strange thing with python lately: Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2 Type help, copyright, credits or license for more information. def f(): print x ... f() terminate called after throwing an instance of

Re: PIL questions: still supported? Problems on 2.7 for win? alternatives?

2012-10-02 Thread Alex Clark
On 2012-10-02 09:26:56 +, WhisperingWally said: Gelonida N gelonida at gmail.com writes: I wondered whether some of you have a little more insight into what's going on with PIL. AFAIK the latest PIL stuff lives here: hg.effbot.org Certainly true, though somewhat meaningless in the

RE: Fastest web framework

2012-10-02 Thread Andriy Kornatskyy
In order to provide more reliable benchmark, I get rid of application server and network boundary. As a result I simulated a valid WSGI request and isolated calls just to the web framework alone. Also I found interesting to take a look at total number of calls and unique functions used by

unit testing class hierarchies

2012-10-02 Thread Ulrich Eckhardt
Greetings! I'm trying to unittest a class hierachy using Python 2.7. I have a common baseclass Base and derived classes D1 and D2 that I want to test. The baseclass in not instantiatable on its own. Now, the first approach is to have test cases TestD1 and TestD2, both derived from class

Re: unit testing class hierarchies

2012-10-02 Thread Demian Brecht
[1] in C++ I would call that a mixin Mixins are perfectly valid Python constructs as well and are perfectly valid (imho) for this use case. On a side note, I usually append a Mixin suffix to my mixin classes in order to make it obvious to the reader. -- Demian Brecht @demianbrecht

Re: unit testing class hierarchies

2012-10-02 Thread Thomas Bach
On Tue, Oct 02, 2012 at 02:27:11PM +0200, Ulrich Eckhardt wrote: As you see, the code for test_base() is redundant, so the idea is to move it to a baseclass: class TestBase(unittest.TestCase): def test_base(self): ... class TestD1(TestBase): def test_r(self):

Are ABCs an anti-pattern?

2012-10-02 Thread Demian Brecht
I don't use them anymore, but I'm curious about others opinions on this list... The more time I spend in Python, discovering what Pythonic code is and such, it seems that I throw away much in terms of academic learnings as far as OOP correctness goes. In doing so, I find that, in general,

Re: unit testing class hierarchies

2012-10-02 Thread Peter Otten
Ulrich Eckhardt wrote: As you see, the code for test_base() is redundant, so the idea is to move it to a baseclass: class TestBase(unittest.TestCase): def test_base(self): ... class TestD1(TestBase): def test_r(self): ... def test_s(self):

Re: unit testing class hierarchies

2012-10-02 Thread Fayaz Yusuf Khan
Peter Otten wrote: Ulrich Eckhardt wrote: The problem here is that TestBase is not a complete test case (just as class Base is not complete), but the unittest framework will still try to run it on its own. How exactly are you invoking the test runner? unittest? nose? You can tell the test

Re: parse an environment file

2012-10-02 Thread xDog Walker
On Monday 2012 October 01 08:35, Hans Mulder wrote: AFAIK, there is no Python module that can read shell syntax. The stdlib's shlex might be that module. -- Yonder nor sorghum stenches shut ladle gulls stopper torque wet strainers. -- http://mail.python.org/mailman/listinfo/python-list

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread Ramchandra Apte
On Monday, 1 October 2012 13:47:50 UTC+5:30, Mark Lawrence wrote: On 01/10/2012 01:58, 8 Dihedral wrote: Your question seems vague to me. If you know you are storing only immutable tuples in a list, then the way to iterate is simple. Does Python have a magic method

Re: parse an environment file

2012-10-02 Thread Ramchandra Apte
On Tuesday, 2 October 2012 21:34:04 UTC+5:30, xDog Walker wrote: On Monday 2012 October 01 08:35, Hans Mulder wrote: AFAIK, there is no Python module that can read shell syntax. The stdlib's shlex might be that module. -- Yonder nor sorghum stenches shut ladle gulls stopper

Re: unit testing class hierarchies

2012-10-02 Thread Ulrich Eckhardt
Am 02.10.2012 16:06, schrieb Thomas Bach: On Tue, Oct 02, 2012 at 02:27:11PM +0200, Ulrich Eckhardt wrote: As you see, the code for test_base() is redundant, so the idea is to move it to a baseclass: class TestBase(unittest.TestCase): def test_base(self): ... class

Re: How to apply the user's HTML environment in a Python programme?

2012-10-02 Thread Ramchandra Apte
On Monday, 1 October 2012 19:49:27 UTC+5:30, BobAalsma wrote: Op vrijdag 21 september 2012 16:15:30 UTC+2 schreef Joel Goldstick het volgende: On Fri, Sep 21, 2012 at 9:58 AM, BobAalsma wrote: Op vrijdag 21 september 2012 15:36:11 UTC+2 schreef Jerry Hill het volgende:

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread Mark Lawrence
On 02/10/2012 17:12, Ramchandra Apte wrote: On Monday, 1 October 2012 13:47:50 UTC+5:30, Mark Lawrence wrote: On 01/10/2012 01:58, 8 Dihedral wrote: Your question seems vague to me. If you know you are storing only immutable tuples in a list, then the way to iterate is simple.

Re: unit testing class hierarchies

2012-10-02 Thread Ulrich Eckhardt
Am 02.10.2012 16:06, schrieb Thomas Bach: On Tue, Oct 02, 2012 at 02:27:11PM +0200, Ulrich Eckhardt wrote: As you see, the code for test_base() is redundant, so the idea is to move it to a baseclass: class TestBase(unittest.TestCase): def test_base(self): ... class

Re: unit testing class hierarchies

2012-10-02 Thread Peter Otten
Ulrich Eckhardt wrote: Am 02.10.2012 16:06, schrieb Thomas Bach: On Tue, Oct 02, 2012 at 02:27:11PM +0200, Ulrich Eckhardt wrote: As you see, the code for test_base() is redundant, so the idea is to move it to a baseclass: class TestBase(unittest.TestCase): def test_base(self):

Re: unit testing class hierarchies

2012-10-02 Thread Peter Otten
Fayaz Yusuf Khan wrote: Peter Otten wrote: Ulrich Eckhardt wrote: The problem here is that TestBase is not a complete test case (just as class Base is not complete), but the unittest framework will still try to run it on its own. How exactly are you invoking the test runner? unittest?

Re: Are ABCs an anti-pattern?

2012-10-02 Thread Mark Adam
On Tue, Oct 2, 2012 at 9:23 AM, Demian Brecht demianbre...@gmail.comwrote: I don't use them anymore, but I'm curious about others opinions on this list... Interesting question. I think they haven't been useful for representing the real world as everyone hoped, but are pretty good for

Re: unit testing class hierarchies

2012-10-02 Thread Demian Brecht
Am I missing something? Is there something that wasn't answered by my reply about using mixins? from unittest import TestCase class SharedTestMixin(object): def test_shared(self): self.assertNotEquals('foo', 'bar') class TestA(TestCase, SharedTestMixin): def test_a(self):

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread Chris Angelico
On Wed, Oct 3, 2012 at 2:44 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: What happened to freedom of speech? If I want to talk to a bot, I'll talk to a bot. Besides I'm not convinced it/he/she is a bot. Plus if you read my post carefully, add in several years experience of Python the

Re: unit testing class hierarchies

2012-10-02 Thread Demian Brecht
Am I missing something? Is there something that wasn't answered by my reply about using mixins? from unittest import TestCase class SharedTestMixin(object): def test_shared(self): self.assertNotEquals('foo', 'bar') class TestA(TestCase, SharedTestMixin): def test_a(self):

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread Mark Lawrence
On 02/10/2012 18:58, Chris Angelico wrote: Dihedral might be a bot and might not. I've come to the conclusion that it's not worth trying to find out, given that a good bot can outdo a lot of humans in useful conversation. ChrisA Try telling that to the newbies on the Python tutor mailing

Re: unit testing class hierarchies

2012-10-02 Thread Mark Lawrence
On 02/10/2012 19:06, Demian Brecht wrote: Am I missing something? Is there something that wasn't answered by my reply about using mixins? from unittest import TestCase class SharedTestMixin(object): def test_shared(self): self.assertNotEquals('foo', 'bar') class TestA(TestCase,

Re: Are ABCs an anti-pattern?

2012-10-02 Thread Terry Reedy
On 10/2/2012 10:23 AM, Demian Brecht wrote: I don't use them anymore, but I'm curious about others opinions on this list... The more time I spend in Python, discovering what Pythonic code is and such, it seems that I throw away much in terms of academic learnings as far as OOP correctness goes.

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread Terry Reedy
On 10/2/2012 1:58 PM, Chris Angelico wrote: On Wed, Oct 3, 2012 at 2:44 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: What happened to freedom of speech? If I want to talk to a bot, I'll talk to a bot. Besides I'm not convinced it/he/she is a bot. Plus if you read my post carefully, add

trying to unsubscribe

2012-10-02 Thread timothy holmes
My efforts at trying to unsubscribe are not working. Could you help me with this, or take this email as a request to unsubscribe. Thanks, Timothy Holmes -- http://mail.python.org/mailman/listinfo/python-list

design question:game skill system

2012-10-02 Thread Littlefield, Tyler
Hello all: I'm looking at a skill/perk system, where the player builds up his char by using perk points to add abilities. Each perk is under a category, and generally costs go up as you increase the perk. So I'm trying to figure something out; first, I'd really like the cost calculation and

Re: trying to unsubscribe

2012-10-02 Thread Joel Goldstick
On Tue, Oct 2, 2012 at 3:01 PM, timothy holmes timothyh2s...@gmail.com wrote: My efforts at trying to unsubscribe are not working. Could you help me with this, or take this email as a request to unsubscribe. Thanks, Timothy Holmes -- http://mail.python.org/mailman/listinfo/python-list Go

Re: design question:game skill system

2012-10-02 Thread Ian Kelly
On Tue, Oct 2, 2012 at 2:00 PM, Littlefield, Tyler ty...@tysdomain.com wrote: Hello all: I'm looking at a skill/perk system, where the player builds up his char by using perk points to add abilities. Each perk is under a category, and generally costs go up as you increase the perk. So I'm

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread 88888 Dihedral
On Monday, October 1, 2012 4:17:50 PM UTC+8, Mark Lawrence wrote: On 01/10/2012 01:58, 8 Dihedral wrote: Your question seems vague to me. If you know you are storing only immutable tuples in a list, then the way to iterate is simple. Does Python have a magic method that

Python Developers needed in Austin TX with a top notch IT company

2012-10-02 Thread sunny narang
Job Title: Python developers Duration: 6 months; Location: Austin TX Responsibilities / Skills: 1) distributed complex application experience 2) prefer experience with enterprise class identity management systems, particularly around auth/credentials 3) experience with openstack 4) experience

Re: unit testing class hierarchies

2012-10-02 Thread Ben Finney
Ulrich Eckhardt ulrich.eckha...@dominolaser.com writes: I want test_base() to be run as part of both TestD1 and TestD2, because it tests basic functions provided by both classes D1 and D2. It sounds, from your description so far, that you have identified a design flaw in D1 and D2. The common

Re: Issue installing pyopencv in mac

2012-10-02 Thread hotmail . com
On Wednesday, August 29, 2012 6:21:50 AM UTC-4, Rakesh Rocker RuLZzz wrote: I tried installing pyopencv in mac but i gives me an error I have installed all the dependent softwares like opencv,boost, etcstill unable to fix it. also i have updated xcode and using python 2.7 I also

Re: unit testing class hierarchies

2012-10-02 Thread Roy Smith
In article mailman.1734.1349199947.27098.python-l...@python.org, Peter Otten __pete...@web.de wrote: Another is to remove it from the global namespace with del TestBase When I had this problem, that's the solution I used. -- http://mail.python.org/mailman/listinfo/python-list

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread 88888 Dihedral
Steven D'Aprano於 2012年10月3日星期三UTC+8上午8時57分20秒寫道: On Wed, 03 Oct 2012 03:58:02 +1000, Chris Angelico wrote: Dihedral might be a bot and might not. I've come to the conclusion that it's not worth trying to find out, given that a good bot can outdo a lot of humans in useful

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread Steven D'Aprano
On Tue, 02 Oct 2012 18:11:20 -0700, 8 Dihedral wrote: Steven D'Aprano於 2012年10月3日星期三UTC+8上午8時57分20秒寫道: Oh, I'm convinced that it's a bot. The fact that Dihedral never responds to conversations about him/it is a give away: nearly all people are far to egotistical to let accusations of

Re: unit testing class hierarchies

2012-10-02 Thread Steven D'Aprano
On Wed, 03 Oct 2012 08:30:19 +1000, Ben Finney wrote: Ulrich Eckhardt ulrich.eckha...@dominolaser.com writes: I want test_base() to be run as part of both TestD1 and TestD2, because it tests basic functions provided by both classes D1 and D2. It sounds, from your description so far, that

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread 88888 Dihedral
Steven D'Aprano於 2012年10月3日星期三UTC+8上午9時24分13秒寫道: On Tue, 02 Oct 2012 18:11:20 -0700, 8 Dihedral wrote: Steven D'Aprano於 2012年10月3日星期三UTC+8上午8時57分20秒寫道: Oh, I'm convinced that it's a bot. The fact that Dihedral never responds to conversations about him/it is a give

local variable 'a' referenced b

2012-10-02 Thread contro opinion
code1 def foo(): ... a = 1 ... def bar(): ... b=2 ... print a + b ... bar() ... ... foo() 3 code2 def foo(): ... a = 1 ... def bar(): ... b=2 ... a = a + b ... print a ... bar() ... foo() Traceback (most recent call last): File

Re: local variable 'a' referenced b

2012-10-02 Thread Dave Angel
On 10/02/2012 10:03 PM, contro opinion wrote: code1 def foo(): ... a = 1 ... def bar(): ... b=2 ... print a + b ... bar() ... ... foo() 3 code2 def foo(): ... a = 1 ... def bar(): ... b=2 ... a = a + b Because your function

Re: Slicing iterables in sub-generators without loosing elements

2012-10-02 Thread Ramchandra Apte
On Tuesday, 2 October 2012 22:13:20 UTC+5:30, Mark Lawrence wrote: On 02/10/2012 17:12, Ramchandra Apte wrote: On Monday, 1 October 2012 13:47:50 UTC+5:30, Mark Lawrence wrote: On 01/10/2012 01:58, 8 Dihedral wrote: Your question seems vague to me. If you know you

Re: parse an environment file

2012-10-02 Thread Jason Friedman
Ah, fair enough. Well, since you're using the full range of bash functionality, the only viable way to parse it is with bash itself. I'd recommend going with the version you have above: * * * * * . /path/to/export_file /path/to/script.py Under what circumstances is this not an option?

Re: parse an environment file

2012-10-02 Thread Chris Angelico
On Wed, Oct 3, 2012 at 1:49 PM, Jason Friedman ja...@powerpull.net wrote: Based on your responses and everyone's responses I'm guessing that what I am doing is sufficiently novel that there is no canned solution. I looked at shlex but did not see how that would be helpful. The only canned

Re: Experimental Python-based shell

2012-10-02 Thread Tim Roberts
Jonathan Hayward christos.jonathan.hayw...@gmail.com wrote: I've made an experimental Python-based Unix/Linux shell at: http://JonathansCorner.com/cjsh/ An experimental Unix/Linux command line shell, implemented in Python 3, that takes advantage of some more recent concepts in terms of

Re: local variable 'a' referenced b

2012-10-02 Thread Demian Brecht
On 12-10-02 07:26 PM, Dave Angel wrote: if you're stuck with Python2.x, you can use a mutable object for a, and mutate it, rather than replace it. For example, def foo(): a = [3] def bar(): b=2 a.append(b) #this mutates a, but doesn't assign it

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2012-10-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.2, Python 3.3, Python 3.4 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3991 ___

[issue2774] ctypes documentation not effective

2012-10-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch type: performance - enhancement versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org

[issue16106] antigravity tests

2012-10-02 Thread Georg Brandl
Georg Brandl added the comment: Are you serious? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16106 ___ ___

[issue5497] openssl compileerror with original source

2012-10-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +pitrou versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5497

[issue3849] FUD in documentation for urllib.urlopen()

2012-10-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy versions: +Python 2.7 -Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3849 ___

[issue5497] openssl compileerror with original source

2012-10-02 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5497 ___ ___ Python-bugs-list mailing

[issue6477] Pickling of NoneType raises PicklingError

2012-10-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: - needs patch versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6477

[issue16105] Pass read only FD to signal.set_wakeup_fd

2012-10-02 Thread Charles-François Natali
Charles-François Natali added the comment: I would not say that is a bug, but there is a write(wakeup_fd) call with ignored return code and maybe this can be improved to an output to stderr, or maybe a better solution. The problem is that it's called from the signal handler, so there's not

[issue16106] antigravity tests

2012-10-02 Thread Christian Heimes
Christian Heimes added the comment: Ezio is as serious as the antigravity module. *g* -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16106 ___

[issue16089] _elementtree causes segfault in GC

2012-10-02 Thread Stefan Krah
Stefan Krah added the comment: Nice find. -- The Python version does this: _Element = _ElementInterface = Element So (naively) I would think the same should be done for the C version after importing Element. But then one runs into the object layouts conflict that you mentioned. On the

[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: f = lambda t, c, *, _f=(lambda a, b, c: a + b + c): _f(*(unpack_tuple(2, t) + (c,))) def unpack_tuple(n, t): t = tuple(t) if len(t) n: raise ValueError('too many values to unpack (expected %d)' % (n,)) if len(t) n: raise

[issue8800] add threading.RWLock

2012-10-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: You are not restricted to the context manager model. Just use selock.shared.acquire() or selock.exclusive.acquire(). The unlock operation is the same, so now you have to arbitrarily pick one of the lockd and chose release(). Why take a construct

[issue8800] add threading.RWLock

2012-10-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: We've already departed from that. Our Lock is nothing like a mutex, for example (it's more of a binary semaphore). This is not by nature of good design, but an accident. C python needed both mutex and signaling ability and decided that a single

[issue8800] add threading.RWLock

2012-10-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I have implemented the simplest possible acquisition order. The lock acquired first will be granted first. Without that (or a more advanced policy) in applications with concurrent threads/processes that are heavily using the shared lock, the

[issue8800] add threading.RWLock

2012-10-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think you got that argument backwards. The simple greedy policy you implement works well provided there are not too many readers. Otherwise, the writers will be starved, since they have to wait for an oppertune moment when no readers are active to get

[issue15609] Format string: add more fast-path

2012-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5ddc7b3f2795 by Victor Stinner in branch 'default': Issue #15609: Fix refleak introduced by my last optimization http://hg.python.org/cpython/rev/5ddc7b3f2795 -- ___ Python tracker rep...@bugs.python.org

[issue8800] add threading.RWLock

2012-10-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: The unlock operation is the same, so now you have to arbitrarily pick one of the lockd and chose release(). That depends on the implementation. In the three implementations on http://en.wikipedia.org/wiki/Readers-writers_problem the unlock

[issue15776] Allow pyvenv to work in existing directory

2012-10-02 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- hgrepos: +150 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15776 ___ ___ Python-bugs-list

[issue15776] Allow pyvenv to work in existing directory

2012-10-02 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Added file: http://bugs.python.org/file27384/e14d4c28bb03.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15776 ___

[issue8800] add threading.RWLock

2012-10-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Here is a new patch. it is complete with: threading implementation and tests multiprocessing implementation and tests. Let's leave the naming bikeshedding a bit and focus on some practical aspects: 1) The threading version contains a RWLock and a

[issue3754] cross-compilation support for python build

2012-10-02 Thread Václav Šmilauer
Václav Šmilauer added the comment: Being a newcomer to this issue, I would like to ask for a brief summary about which parts of the patch are checked in for 3.3.0 and which are still to be applied. Roumen mentions #15483, #15484, #15268 and the ac_cv_thread in the previous post as mandatory

[issue8800] add threading.RWLock

2012-10-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Oh, I forgot to mention: Once one gets into the domain of allowing such niceties as writer priority, surely you can agree that the implementation of both locking modes belongs in the same class instance. That is just plain good coding practice,

[issue8800] add threading.RWLock

2012-10-02 Thread Sebastian Noack
Sebastian Noack added the comment: Exactly, with my implemantation the lock acquired first will be granted first. There is no way that either shared nor exclusive locks can starve, and therefore it should satisfy all use cases. Since you can only share simple datastructures like integers

[issue8800] add threading.RWLock

2012-10-02 Thread Sebastian Noack
Sebastian Noack added the comment: @Kristján: Uhh, that is a huge amount of code, more than twice as much (don't counting tests) as my implementation, to accomplish the same. And it seems that there is not much code shared between the threading and multiprocessing implementation. And for

[issue3982] support .format for bytes

2012-10-02 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Since Benjamin originally requested this feature, and then decided that he could accomplish his desired goal (ftplib porting, as far as I can tell) without it, I think that the rejected status is actually incorrect. I think that Benjamin just wanted to

[issue8800] add threading.RWLock

2012-10-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: This amount of code provides recursion, context managers, condition variable compatibility, timeout functionality, error checking and conformance with the unit tests. The actual locking code is encapsulated in the three functions acquire_read(),

[issue8800] add threading.RWLock

2012-10-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Ah, you are implementing an FIFO lock. That should have been made clear. I see it now that you grant the lock in the order that the acquisition is attempted. Ok, this is fine, but with one important caveat: Explicit handoff such as that can suffer

[issue5497] openssl compileerror with original source

2012-10-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think this issue is outdated. ocean-city, is this still concern for you? FWIW, I'll be removing the VC6 build process from the 3.4 (default) branch soon. -- ___ Python tracker rep...@bugs.python.org

[issue3982] support .format for bytes

2012-10-02 Thread Christian Heimes
Christian Heimes added the comment: The proposal sounds like a good idea to me. Benjamin, what needs to be done to implement the feature? -- nosy: +christian.heimes versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org

[issue16101] Verify all imported modules at startup are needed

2012-10-02 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- dependencies: +Speedup sysconfig startup, locale can be imported at startup but relies on too many library modules ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16101

[issue3982] support .format for bytes

2012-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Formatting is a very complicated part of Python (especially after Victor's optimizations). I think no one wants to maintain this code for a long time. The price of maintaining exceeds the potential very limited benefits from the use. -- nosy:

[issue16106] antigravity tests

2012-10-02 Thread Brett Cannon
Brett Cannon added the comment: It's actually a nice example of using unittest.mock. =) -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16106 ___

[issue3849] FUD in documentation for urllib.urlopen()

2012-10-02 Thread Chris Jerdonek
Chris Jerdonek added the comment: The section of the Dev Guide on affirmative tone should also be applied: The documentation focuses on affirmatively stating what the language does and how to use it effectively http://docs.python.org/devguide/documenting.html#affirmative-tone --

[issue3982] support .format for bytes

2012-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: I was just logging in to make this point, but Serhiy beat me to it. When I wrote several years ago that this was easy, it was before the (awesome) PEP 393 work. I suspect, but have not verified, that having a bytes version of this code would now require an

[issue3982] support .format for bytes

2012-10-02 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: The price of maintaining exceeds the potential very limited benefits from the use. The very limited benefits of being able to write I/O code without roughly 3 times code bloat? Perhaps for people who don't write code that does non-trivial I/O, but

[issue3982] support .format for bytes

2012-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: The implementation may be difficult, therefore no one should attempt it? The development cost and maintenance cost is surely part of the evaluation when deciding whether to implement a feature, no? -- ___ Python

[issue16106] antigravity tests

2012-10-02 Thread Michael Foord
Michael Foord added the comment: What happens if test_geohash runs first? It looks like test_antigravity will only pass if it is run first. You could remove the order dependence by ensuring antigravity is not in sys.modules. sys.modules.pop('antigravity', None) --

[issue3982] support .format for bytes

2012-10-02 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: The development cost and maintenance cost is surely part of the evaluation when deciding whether to implement a feature, no? Sure, but in an open source project where almost all contributions are done by volunteers (ie, donated), what is the

[issue3982] support .format for bytes

2012-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suspect, but have not verified, that having a bytes version of this code would now require an implementation that shared very little with the str version. This is not all. The usage model will be completely different too. * The default formatting

[issue16106] antigravity tests

2012-10-02 Thread Chris Jerdonek
Chris Jerdonek added the comment: Oh, this explains it. I was wondering why my browser was opening xkcd whenever I tried running doctest against all modules in the library. -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org

[issue3982] support .format for bytes

2012-10-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: As Serhiy suggests, it would be best to collect th eusecases for a format-like method for bytes and design something which can meet them. It's definitely a PEP. -- ___ Python tracker rep...@bugs.python.org

[issue15452] Improve the security model for logging listener()

2012-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26c3d170fd56 by Vinay Sajip in branch 'default': Issue #15452: Added verify option for logging configuration socket listener. http://hg.python.org/cpython/rev/26c3d170fd56 -- nosy: +python-dev ___ Python

[issue14850] The inconsistency of codecs.charmap_decode

2012-10-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file25934/decode_charmap_fffe.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14850 ___

[issue15452] Improve the security model for logging listener()

2012-10-02 Thread Vinay Sajip
Vinay Sajip added the comment: I've updated logging as discussed in this issue, except for the removal of the two calls to eval() in logging.config. I propose to resolve that as follows: 1. Add the Evaluator implemented in the Gist I linked to to ast.py. 2. Expose a function

[issue16107] distutils2.version doesn't str() 1.0.post1 correctly

2012-10-02 Thread Éric Araujo
Éric Araujo added the comment: Thanks, will apply. -- versions: +3rd party ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16107 ___ ___

[issue15776] Allow pyvenv to work in existing directory

2012-10-02 Thread Éric Araujo
Éric Araujo added the comment: LGTM. -- priority: critical - normal stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15776 ___

[issue16109] urllib2.urlopen throws HTTP Error in python 2.7.2, 2.7.3, but not in python 2.7

2012-10-02 Thread Christian Fertig
New submission from Christian Fertig: wespe:/tmp/python2.7 # cat /etc/SuSE-release openSUSE 12.1 (x86_64) VERSION = 12.1 CODENAME = Asparagus wespe:/tmp/python2.7 # rpm -q python python-2.7.2-7.17.1.x86_64 wespe:/tmp/python2.7 # python Python 2.7.2 (default, Aug 19 2011, 20:41:43) [GCC] on

[issue16110] Provide logging.config.configParserConfig

2012-10-02 Thread thbach
New submission from thbach: Currently logging.config provides a fileConfig function which reads a ini-style file via configparser.ConfigParser. I would like to have a function e.g. configParserConfig which accepts a ConfigParser instance and configures logging directly from the settings found

  1   2   >