Re: Question about Source Control

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 4:39 PM, Frank Millman fr...@chagford.com wrote: Two quick questions - 1. At present the source code is kept on one machine (A), but only accessed from the two other machines (B and C). Does it make sense to create the central repository on A, but *not* install the

Re: Question about Source Control

2014-03-18 Thread Frank Millman
Chris Angelico ros...@gmail.com wrote in message news:captjjmqhxh2m3-qgbelv_akgajzmeymbudly8_dkpnhrpsu...@mail.gmail.com... On Tue, Mar 18, 2014 at 4:39 PM, Frank Millman fr...@chagford.com wrote: Two quick questions - 1. At present the source code is kept on one machine (A), but only

Re: Question about Source Control

2014-03-18 Thread Ben Finney
Frank Millman fr...@chagford.com writes: I feel that I have just not grasped the basics yet, so any assistance that puts me on the right path is appreciated. Here is “Hg Init”, a tutorial for Mercurial URL:http://hginit.com/. (“source control” is not the most common term for this; what we're

Re: Question about Source Control

2014-03-18 Thread Frank Millman
Andriy Kornatskyy andriy.kornats...@live.com wrote in message news:blu0-smtp953c8572b5ca6374830e5091...@phx.gbl... Frank, I would suggest start with an account on https://bitbucket.org. It supports private repositories so you should be good there. From other hand you can setup own

Re: 'complex' function with string argument.

2014-03-18 Thread Christian Gollwitzer
Am 15.03.14 17:26, schrieb Jayanth Koushik: This is regarding the inbuilt 'complex' function. The python docs say: Note: When converting from a string, the string must not contain whitespace around the central + or - operator. For example, complex('1+2j') is fine, but complex('1 + 2j') raises

Re: Question about Source Control

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 5:42 PM, Frank Millman fr...@chagford.com wrote: Excuse my ignorance, but how does it actually work? Ignorance not only excused, but welcomed. :) However, caveat: I know how git is set up, but not hg. Someone else can fill in the details; for now, I'll explain git and

Re: 'complex' function with string argument.

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 6:04 PM, Christian Gollwitzer aurio...@gmx.de wrote: As others have explained, the basic issue is the question how to parse an expression like 1+2i*3 is it complex(1+2i) times 3 or is it sum of 1 and product of complex 2i and 3? The only way to have it be

Re: Question about Source Control

2014-03-18 Thread Frank Millman
Ben Finney ben+pyt...@benfinney.id.au wrote in message news:85y508roiw@benfinney.id.au... Frank Millman fr...@chagford.com writes: I feel that I have just not grasped the basics yet, so any assistance that puts me on the right path is appreciated. Here is Hg Init, a tutorial for

Re: Question about Source Control

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 5:47 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: (“source control” is not the most common term for this; what we're talking about is a “version control system”, or VCS. But some Git users may disagree.) People use different terms depending on their backgrounds, I

Re: Ordering in the printout of a dictionary

2014-03-18 Thread Marc Christiansen
Chris Angelico ros...@gmail.com wrote: On Tue, Mar 18, 2014 at 11:32 AM, Mok-Kong Shen mok-kong.s...@t-online.de wrote: Is there a way to force a certain ordering of the printout or else somehow manage to get at least a certain stable ordering of the printout (i.e. input and output are

Re: Balanced trees

2014-03-18 Thread Joshua Landau
On 18 March 2014 01:01, Daniel Stutzbach stutzb...@google.com wrote: I would love to have include macro-benchmarks. I keep waiting for the PyPy benchmark suite to get ported to Python 3... *grins* Delete a slice is fudged from its inclusion of multiplication, which is far faster on blists.

Re: Ordering in the printout of a dictionary

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 6:36 PM, Marc Christiansen usenetm...@solar-empire.de wrote: I would say using pprint.pprint is even easier and it works with your failing example: pprint.pprint({True:1,Hello:2}) {True: 1, 'Hello': 2} True. I could try to say that I prefer to offer the simpler

Re: Question about Source Control

2014-03-18 Thread Steven D'Aprano
On Tue, 18 Mar 2014 17:47:51 +1100, Ben Finney wrote: Frank Millman fr...@chagford.com writes: I feel that I have just not grasped the basics yet, so any assistance that puts me on the right path is appreciated. Here is “Hg Init”, a tutorial for Mercurial URL:http://hginit.com/.

Re: 'complex' function with string argument.

2014-03-18 Thread Steven D'Aprano
On Tue, 18 Mar 2014 08:04:44 +0100, Christian Gollwitzer wrote: Am 15.03.14 17:26, schrieb Jayanth Koushik: This is regarding the inbuilt 'complex' function. The python docs say: Note: When converting from a string, the string must not contain whitespace around the central + or - operator.

Re: Question about Source Control

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 6:55 PM, Steven D'Aprano st...@pearwood.info wrote: I don't think that *version* control is the right model to describe what hg and git do, although it may be appropriate for subversion. hg doesn't manage *versions*, it manages changes to source code (changesets).

Re: 'complex' function with string argument.

2014-03-18 Thread Christian Gollwitzer
Hi Steven, Am 18.03.14 09:00, schrieb Steven D'Aprano: On Tue, 18 Mar 2014 08:04:44 +0100, Christian Gollwitzer wrote: Am 15.03.14 17:26, schrieb Jayanth Koushik: This is regarding the inbuilt 'complex' function. The python docs say: Note: When converting from a string, the string must not

Re: Venus / GuthVenus for iPhone, Nexus, Droid and Android Jelly Bean

2014-03-18 Thread Chris Angelico
On Tue, Mar 18, 2014 at 2:45 PM, Brad Guth bradg...@yahoo.com wrote: You may want to revise that manifesto to read 'suffer and pay dearly' instead of GOING TO DIE, unless you meant via natural causes. Don't bother responding to Thrinaxodon, it's a spammer. ChrisA --

Find and replace multiple RegEx search expressions

2014-03-18 Thread Jignesh Sutar
Hi, I'm trying to delete contents of a .txt log file, matching on multiple re.sub criteria but not sure how to achieve this. Below is an illustration of what I am trying to achieve (of course in this example I can combine the 3 re.sub into a single re expression but my actual code will have a

Re: Find and replace multiple RegEx search expressions

2014-03-18 Thread Peter Otten
Jignesh Sutar wrote: Hi, I'm trying to delete contents of a .txt log file, matching on multiple re.sub criteria but not sure how to achieve this. Below is an illustration of what I am trying to achieve (of course in this example I can combine the 3 re.sub into a single re expression but

Python3 html.parser

2014-03-18 Thread balaji marisetti
Hi, I'm trying to parse a pice of HTML code using `html.parser` in Python3. I want to find out the offset of a particular end tag (let's say /p) and then stop processing the remaining HTML code immediately. So I wrote something like this. [code] def handle_endtag(self, tag): if tag == mytag:

Re: Python3 html.parser

2014-03-18 Thread Peter Otten
balaji marisetti wrote: Hi, I'm trying to parse a pice of HTML code using `html.parser` in Python3. I want to find out the offset of a particular end tag (let's say /p) and then stop processing the remaining HTML code immediately. So I wrote something like this. [code] def

Re: Question about Source Control

2014-03-18 Thread Steven D'Aprano
On Tue, 18 Mar 2014 19:08:17 +1100, Chris Angelico wrote: On Tue, Mar 18, 2014 at 6:55 PM, Steven D'Aprano st...@pearwood.info wrote: I don't think that *version* control is the right model to describe what hg and git do, although it may be appropriate for subversion. hg doesn't manage

Re: 'complex' function with string argument.

2014-03-18 Thread Marko Rauhamaa
Christian Gollwitzer aurio...@gmx.de: The same problem arises with unary minus, but it's less annoying because -(a*b) = (-a)*b. -1**2 -1 Marko -- https://mail.python.org/mailman/listinfo/python-list

Unexpected comparisons in dict lookup

2014-03-18 Thread Steven D'Aprano
I stumbled across this unexpected behaviour with Python 2.7 and 3.3. When you look up a key in a dict, the key is sometimes compared against other keys twice instead of just once. First, a class that reports when it is being tested for equality, with a fixed hash so that we get collisions

Re: 'complex' function with string argument.

2014-03-18 Thread Mark H Harris
On 3/17/14 11:52 PM, Steven D'Aprano wrote: On Mon, 17 Mar 2014 11:18:56 -0500, Mark H Harris wrote: Who knows, beats me. With respect, that's just because you would make a lousy language designer :-) Ouch;-) How should one spell a complex number? There is perfectly good syntax

Re: HOLY SH*T! HUMANS ORIGINATED IN THE DEVONIAN

2014-03-18 Thread Juha Nieminen
In comp.lang.c++ ASSODON troll@bitch.invalid wrote: THRINAXODON DANCED WITH JOY AS HE WAS GRANTED $600,000,000,000.000! I find it interesting, from a psychological perspective, that you are not even *pretending* that you are not lying and making stuff up. You pretty much imply it as clearly as

Re: HOLY SH*T! HUMANS ORIGINATED IN THE DEVONIAN

2014-03-18 Thread Danyelle Davis
Don't feed the trolls. Actually talking to it makes it think you actually care.. On Mon, Mar 17, 2014 at 4:50 AM, ASSODON troll@bitch.invalid wrote: === BREAKING NEWS === RICHARD LEAKEY JUST DIED DUE TO HEART FAILURE! THE REASONS

extract stream title from the output of mplayer

2014-03-18 Thread Jabba Laci
Hi, I have a simple command-line radio player and I want to extract song titles from the output of mplayer. Example: $ mplayer http://relay2.slayradio.org:8000/ It produces a streamed output of this form: MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team mplayer: could not connect to socket

Re: Question about Source Control

2014-03-18 Thread Mark H Harris
On 3/17/14 8:06 AM, Frank Millman wrote: All my source code resides on an old Linux server, which I switch on in the morning and switch off at night, but otherwise hardly ever look at. It uses 'samba' to allow sharing with Windows, and 'nfs' to allow sharing with other Linux machines. hi

Re: extract stream title from the output of mplayer

2014-03-18 Thread Chris Angelico
On Wed, Mar 19, 2014 at 4:03 AM, Jabba Laci jabba.l...@gmail.com wrote: I have a simple command-line radio player and I want to extract song titles from the output of mplayer. ICY Info: StreamTitle='Alexander 'Taxim' Nev - Unsound minds feat. SAM';StreamUrl='http://www.SLAYRadio.org/'; At

Re: extract stream title from the output of mplayer

2014-03-18 Thread Jabba Laci
Python. (Or s/guess/hop/ if you prefer!) There are many ways this could be done; what have you tried, what partly worked, what did something unexpected? Hi, I managed to solve the problem. In the man of mplayer I found how to quit after X seconds: -endpos X. See my solution below. Best,

Re: Balanced trees

2014-03-18 Thread Dan Stromberg
On Mon, Mar 17, 2014 at 3:05 PM, Marko Rauhamaa ma...@pacujo.net wrote: Joshua Landau jos...@landau.ws: The thing we really need is for the blist containers to become stdlib (but not to replace the current list implementation). Very interesting. Downloaded blist but didn't compile it yet. It

Re: Unexpected comparisons in dict lookup

2014-03-18 Thread Ian Kelly
On Tue, Mar 18, 2014 at 8:20 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I stumbled across this unexpected behaviour with Python 2.7 and 3.3. When you look up a key in a dict, the key is sometimes compared against other keys twice instead of just once. From what I can see

Controlling buffer alignment in file.read()

2014-03-18 Thread Haralanov, Mitko
Hi all, I am using Python to read from a binary device file which requires that all read sizes are in 8byte multiples and the user's buffer is 8byte aligned. I am currently using a file object and the file.read() method. However, the issue is that the file.read() method allocates the buffer

Re: Question about Source Control

2014-03-18 Thread Dave Angel
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info Wrote in message: On Tue, 18 Mar 2014 19:08:17 +1100, Chris Angelico wrote: On Tue, Mar 18, 2014 at 6:55 PM, Steven D'Aprano st...@pearwood.info wrote: I don't think that *version* control is the right model to describe what hg and git

Re: Balanced trees

2014-03-18 Thread Marko Rauhamaa
Dan Stromberg drsali...@gmail.com: The results are at http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/2014-03/ Unfortunately I'm having a hard time understanding the results. The 50/50 get/set ratio is most interesting to me. I'm seeing (under cpython-3.3):

mobile friendly docs?

2014-03-18 Thread klo uo
Hi, let me quickly introduce my concern - I was happy to see main python.org portal rendered nicely on mobile, but docs are still hardly accessible, while sphinx allows better experience if user instructs it to. So I browsed Python MLs (sorry if this is not the right one, I'd be happy to forward

Re: Balanced trees

2014-03-18 Thread Dan Stromberg
On Tue, Mar 18, 2014 at 1:55 PM, Marko Rauhamaa ma...@pacujo.net wrote: Dan Stromberg drsali...@gmail.com: The results are at http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/2014-03/ Unfortunately I'm having a hard time understanding the results. The 50/50 get/set

Re: Question about Source Control

2014-03-18 Thread Gregory Ewing
Frank Millman wrote: These are the kind of stumbling blocks that prevented me from succeeding in my previous attempt. I have a vague recollection that I set it up on machine A, but then hit a problem because machines B and C both accessed the same directory, but with different names For

Re: Balanced trees

2014-03-18 Thread Marko Rauhamaa
Dan Stromberg drsali...@gmail.com: dict was able to do 1048576 operations on a dictionary before taking more than 120 seconds to complete - it took 75.3 seconds to do 1048576 operations. AVL_tree was able to do 262144 operations on a dictionary before taking more than 120 seconds to

Re: Balanced trees

2014-03-18 Thread Dan Stromberg
On Tue, Mar 18, 2014 at 3:03 PM, Marko Rauhamaa ma...@pacujo.net wrote: Dan Stromberg drsali...@gmail.com: For a proper comparison, I'd like a fixed, identical dataset and set of operations run against each data structure. How about this test program: I used to do essentially this, but it

Re: Controlling buffer alignment in file.read()

2014-03-18 Thread Gregory Ewing
Haralanov, Mitko wrote: I am using Python to read from a binary device file which requires that all read sizes are in 8byte multiples and the user's buffer is 8byte aligned. Is there a way that I can get file.read() to use an 8byte aligned buffer? For control at that level you'd be better off

RE: Controlling buffer alignment in file.read()

2014-03-18 Thread Haralanov, Mitko
For control at that level you'd be better off using direct system calls, i.e. os.open() and os.read(), then you can read exacty the number of bytes you want. The problem is not controlling the number of bytes read. That part seems to be working. The issue is that the buffer into which the

Re: Balanced trees

2014-03-18 Thread Marko Rauhamaa
Dan Stromberg drsali...@gmail.com: On Tue, Mar 18, 2014 at 3:03 PM, Marko Rauhamaa ma...@pacujo.net wrote: Dan Stromberg drsali...@gmail.com: For a proper comparison, I'd like a fixed, identical dataset and set of operations run against each data structure. How about this test program: I

Re: Controlling buffer alignment in file.read()

2014-03-18 Thread Gregory Ewing
Haralanov, Mitko wrote: The problem is not controlling the number of bytes read. That part seems to be working. The issue is that the buffer into which the data is placed needs to be of certain alignment (8byte-aligned). Python does not seem to have a way that allows me to control that. Hmmm,

Re: Controlling buffer alignment in file.read()

2014-03-18 Thread Dan Stromberg
On Tue, Mar 18, 2014 at 1:23 PM, Haralanov, Mitko mitko.harala...@intel.com wrote: Hi all, I am using Python to read from a binary device file which requires that all read sizes are in 8byte multiples and the user's buffer is 8byte aligned. I am currently using a file object and the

Re: Balanced trees

2014-03-18 Thread Chris Kaynor
On Tue, Mar 18, 2014 at 1:55 PM, Marko Rauhamaa ma...@pacujo.net wrote: Dan Stromberg drsali...@gmail.com: The results are at http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/2014-03/ Size: 1048576, duration: 75.3, dictionary type: dict [...] Size:

Re: Balanced trees

2014-03-18 Thread Steven D'Aprano
On Wed, 19 Mar 2014 01:11:33 +0200, Marko Rauhamaa wrote: Dan Stromberg drsali...@gmail.com: Rather than throw out unbalanced binary tree altogether, it makes more sense to run it until it gets too slow. I disagree strongly. You should throw out unbalanced binary trees and linked lists

Re: Balanced trees

2014-03-18 Thread Steven D'Aprano
On Tue, 18 Mar 2014 15:21:28 -0700, Dan Stromberg wrote: On Tue, Mar 18, 2014 at 3:03 PM, Marko Rauhamaa ma...@pacujo.net wrote: Dan Stromberg drsali...@gmail.com: For a proper comparison, I'd like a fixed, identical dataset and set of operations run against each data structure. How about

Re: Question about Source Control

2014-03-18 Thread Terry Reedy
On 3/18/2014 5:51 PM, Gregory Ewing wrote: Frank Millman wrote: These are the kind of stumbling blocks that prevented me from succeeding in my previous attempt. I have a vague recollection that I set it up on machine A, but then hit a problem because machines B and C both accessed the same

[no subject]

2014-03-18 Thread Nathan Bruce
Hi I was wondering how much your oxycontins are for what mg and quantity. Also do you guys sell dilaudid? Thank you -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about Source Control

2014-03-18 Thread Tim Chase
On 2014-03-18 21:38, Terry Reedy wrote: At least with hg, one should best test the code in the working directory *before* committing to the local repository. I don't know if this is a hg-vs-git way of thinking, but I tend to frequently commit things on a private development branch regardless

Re: Question about Source Control

2014-03-18 Thread Chris Angelico
On Wed, Mar 19, 2014 at 1:12 PM, Tim Chase python.l...@tim.thechases.com wrote: On 2014-03-18 21:38, Terry Reedy wrote: At least with hg, one should best test the code in the working directory *before* committing to the local repository. I don't know if this is a hg-vs-git way of thinking,

Greetings from Al-Madinah International University

2014-03-18 Thread marwa kotb
Al Salam Alaykom w rahmat allah w barkato Dear : mr \ mrs We are pleased that on behalf of the Al-Madinah International University [MEDIU] greetings and best wishes for you continued success , coupled with the sincere invitations for your further success and development and growth.

[issue19640] Drop _source attribute of namedtuple

2014-03-18 Thread Eric Snow
Eric Snow added the comment: It does not necessarily require a metaclass. You can accomplish it using a custom descriptor: class classattr: def __init__(self, getter): self.getter = getter def __get__(self, obj, cls): return self.getter(cls) FWIW, this is a descriptor

[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError

2014-03-18 Thread Marc Schlaich
Changes by Marc Schlaich marc.schla...@googlemail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20954 ___ ___

[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError

2014-03-18 Thread Marc Schlaich
Marc Schlaich added the comment: This was fixed in #19284 for Python 3.4 (without having possible consequences in mind). I have updated my patch accordingly. Maybe it's worth to port my test case to Python 3.4. Removed Python 3.3 as it isn't in bugfix maintenance anymore. --

[issue20112] The documentation for http.server error_message_format is inadequate.

2014-03-18 Thread Anastasia.Filatova
Changes by Anastasia.Filatova anastasia.n.filat...@gmail.com: Removed file: http://bugs.python.org/file34467/Issue20112_py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20112 ___

[issue20112] The documentation for http.server error_message_format is inadequate.

2014-03-18 Thread Anastasia.Filatova
Changes by Anastasia.Filatova anastasia.n.filat...@gmail.com: Removed file: http://bugs.python.org/file34469/Issue20112_py34.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20112 ___

[issue20112] The documentation for http.server error_message_format is inadequate.

2014-03-18 Thread Anastasia.Filatova
Changes by Anastasia.Filatova anastasia.n.filat...@gmail.com: Removed file: http://bugs.python.org/file34468/Issue20112_py33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20112 ___

[issue20112] The documentation for http.server error_message_format is inadequate.

2014-03-18 Thread Anastasia.Filatova
Changes by Anastasia.Filatova anastasia.n.filat...@gmail.com: Added file: http://bugs.python.org/file34481/Issue20112_py34.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20112 ___

[issue20112] The documentation for http.server error_message_format is inadequate.

2014-03-18 Thread Anastasia.Filatova
Changes by Anastasia.Filatova anastasia.n.filat...@gmail.com: Added file: http://bugs.python.org/file34482/Issue20112_py33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20112 ___

[issue20112] The documentation for http.server error_message_format is inadequate.

2014-03-18 Thread Anastasia.Filatova
Anastasia.Filatova added the comment: Thank you, Eric for your comments! I see now what doese the 'review' link mean :) You are right the send_error should be a method not a class variable. I changed it in a new patch. As regards the responses I prefer don't change it to a class attribute

[issue20112] The documentation for http.server error_message_format is inadequate.

2014-03-18 Thread Anastasia.Filatova
Changes by Anastasia.Filatova anastasia.n.filat...@gmail.com: Added file: http://bugs.python.org/file34483/Issue20112_py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20112 ___

[issue17110] sys.argv docs should explaining how to handle encoding issues

2014-03-18 Thread andy.ma
Changes by andy.ma andy.ju...@gmail.com: -- nosy: +andyma ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17110 ___ ___ Python-bugs-list mailing

[issue19640] Drop _source attribute of namedtuple (waste memory)

2014-03-18 Thread STINNER Victor
STINNER Victor added the comment: namedtuple_source.patch: Replace _source attribute wasting memory with a property generating the source on demand. The patch adds also unit test for the verbose attribute (which is public and documented, even it is said to be outdated). The patch removes

[issue20966] Documentation Link for Python Tkinter Resources is currently broken

2014-03-18 Thread andy.ma
New submission from andy.ma: The Python Tkinter Resources link(http://www.python.org/topics/tkinter/) resides in the topic of tkinter — Python interface to Tcl/Tk(http://docs.python.org/2/library/tkinter.html) is currently broken. It redirects to https://www.python.org/topics/tkinter/; which

[issue8813] SSLContext doesn't support loading a CRL

2014-03-18 Thread Christian Heimes
Christian Heimes added the comment: Yes, Python 3.4 can load and use CRLs. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8813 ___

[issue8813] SSLContext doesn't support loading a CRL

2014-03-18 Thread STINNER Victor
STINNER Victor added the comment: Yes, Python 3.4 can load and use CRLs. Great work Christian, I was expecting this feature since many years :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8813

[issue8813] SSLContext doesn't support loading a CRL

2014-03-18 Thread Christian Heimes
Christian Heimes added the comment: It was *really* trivial. I just had to expose two simple OpenSSL APIs to enable / disable CRL. All versions of Python could already load the CRLs but CRL checks could not be enabled. -- ___ Python tracker

[issue8813] SSLContext doesn't support loading a CRL

2014-03-18 Thread STINNER Victor
STINNER Victor added the comment: It was *really* trivial. I just had to expose two simple OpenSSL APIs to enable / disable CRL. It was trivial thanks to all the work done before around SSLContext. For example, Python 2.7 doesn't have SSLContext, so adding support for CRL in Python 2.7 is

[issue11416] netrc module does not handle multiple entries for a single host

2014-03-18 Thread Berker Peksag
Berker Peksag added the comment: I've updated the tests to match the changes in issue 12009 and documentation a bit. -- nosy: +berker.peksag versions: +Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file34485/issue11416.diff ___ Python

[issue17462] argparse FAQ: how it is different from optparse

2014-03-18 Thread Anastasia.Filatova
Anastasia.Filatova added the comment: Now argparse documentation includes a paragraph about advantages of argparse module over optparse module. -- keywords: +patch nosy: +Anastasia.Filatova Added file: http://bugs.python.org/file34486/Issue17462_py27.patch

[issue17462] argparse FAQ: how it is different from optparse

2014-03-18 Thread Anastasia.Filatova
Changes by Anastasia.Filatova anastasia.n.filat...@gmail.com: Added file: http://bugs.python.org/file34487/Issue17462_py33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17462 ___

[issue17462] argparse FAQ: how it is different from optparse

2014-03-18 Thread Anastasia.Filatova
Changes by Anastasia.Filatova anastasia.n.filat...@gmail.com: Added file: http://bugs.python.org/file34488/Issue17462_py34.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17462 ___

[issue20827] IDLE : Display function argument list in ClassBrowser

2014-03-18 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com: Removed file: http://bugs.python.org/file34439/classbrowser-improvements-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20827 ___

[issue17462] argparse FAQ: how it is different from optparse

2014-03-18 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the patch, will apply. -- assignee: docs@python - eric.araujo stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17462

[issue20897] @abstractmethod does not enforce method signatures

2014-03-18 Thread the mulhern
the mulhern added the comment: I feel that I worded this in a way that makes it look like I'm asking for an enhancement, not reporting a bug, so I'll try again. The documentation for 2.7.6 and 3.4.0 says: Using this decorator requires that the class’s metaclass is ABCMeta or is derived from

[issue20918] Logging of logging exceptions can fail in 3.4 if args are unprintable

2014-03-18 Thread the mulhern
the mulhern added the comment: Thanks for the fix. When you say having repr raise is a pretty unusual occurrence you probably mean having repr raise should be a pretty unusual occurrence. I think its more usual than you realize and the regression in 3.4 will have consequences. --

[issue20897] @abstractmethod does not enforce method signatures

2014-03-18 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello. In 3.3 you can instantiate META class, because it does not properly say that it wants abc.ABCMeta as a metaclass. For this, you have to write your class as such: class META(metaclass=abc.ABCMeta): @abc.abstractmethod def _junk(self): ...

[issue7980] time.strptime not thread safe

2014-03-18 Thread Romuald Brunet
Changes by Romuald Brunet romuald.bru...@gmail.com: -- nosy: +Romuald ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list

[issue20967] hashlib memory leak

2014-03-18 Thread Adrian Teng
New submission from Adrian Teng: A particular usage pattern of hashlib will cause a memory leak. This leaks: import hashlib import sys if __name__ == '__main__': data_sha1 = hello world data_md5 = hello world for i in xrange(int(1e6)): hashlib.sha1(data_sha1)

[issue20897] @abstractmethod does not enforce method signatures

2014-03-18 Thread R. David Murray
R. David Murray added the comment: The fact that you say the method is _junk(self) and say the other classes don't override it makes me think you are thinking that methods with the same name are different from a subclasses perspective if they have different signatures. In Python this is not

[issue19009] Enhance HTTPResponse.readline() performance

2014-03-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: patch review - commit review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19009 ___

[issue20968] mock.MagicMock does not mock __truediv__

2014-03-18 Thread Johannes Baiter
New submission from Johannes Baiter: It seems that when creating a MagicMock the magic '__truediv__' method is not replaced with a mock: import mock foo = mock.MagicMock() foo / 2 Traceback (most recent call last): File stdin, line 1, in module TypeError: unsupported operand type(s) for

[issue20897] @abstractmethod does not enforce method signatures

2014-03-18 Thread Eric Snow
Eric Snow added the comment: Both abstractnethod and abstractproperty work by setting __isabstractmethod__ to True on the decorated function. Then type.__new__ looks for any attributes of the current class (including inherited ones) that have __isabstractmethod__ set to True. The signature

[issue20966] Documentation Link for Python Tkinter Resources is currently broken

2014-03-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset be1e015a8405 by Zachary Ware in branch '2.7': Issue #20966: Fix Tkinter Resources link http://hg.python.org/cpython/rev/be1e015a8405 New changeset f28f63c5d30a by Zachary Ware in branch '3.4': Issue #20966: Fix Tkinter Resources link

[issue20966] Documentation Link for Python Tkinter Resources is currently broken

2014-03-18 Thread Zachary Ware
Zachary Ware added the comment: Fixed, thanks for the report! -- nosy: +zach.ware type: resource usage - behavior versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20966

[issue20897] @abstractmethod does not enforce method signatures

2014-03-18 Thread Eric Snow
Eric Snow added the comment: Oops, typos. Both abstractmethod and abstractproperty work by setting __isabstractmethod__ to True on the decorated function. Then type.__new__ That should be type.__call__ or object.__new__, I don't remember which. looks for any attributes of the current class

[issue20918] Logging of logging exceptions can fail in 3.4 if args are unprintable

2014-03-18 Thread R. David Murray
R. David Murray added the comment: Did you reopen the issue accidentally? The bug has been fixed. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___

[issue20968] mock.MagicMock does not mock __truediv__

2014-03-18 Thread Johannes Baiter
Johannes Baiter added the comment: Attached is a patch that fixes the issue for me. -- keywords: +patch Added file: http://bugs.python.org/file34490/mock_truediv.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20968

[issue20969] Author of EPUB version of Python docs is set to Unknown instead of PSF

2014-03-18 Thread Christian Clauss
New submission from Christian Clauss: http://docs.python.org/3/download.html has an EPUB version of the Python docs but the Author of the document is set to Unknown so this text appears on the cover page and is repeated on the top of every other page throughout the document (in the iBooks app

[issue20968] mock.MagicMock does not mock __truediv__

2014-03-18 Thread Johannes Baiter
Johannes Baiter added the comment: I just noticed that I put the magic method names in the wrong place in the patch. Attached is a fix that adds 'truediv' to the global 'numberics' variable, this way '__rtruediv__' and '__itruediv__' will be correctly mocked as well. -- Added file:

[issue20746] test_pdb fails in refleak mode

2014-03-18 Thread Xavier de Gaye
Xavier de Gaye added the comment: test_statistics also defines a load_tests() function that builds unittest tests from doctests with doctest.DocTestSuite() and also fails in refleak mode. The above regrtest.diff patch also fixes the test_statistics in refleak mode. --

[issue20897] @abstractmethod does not enforce method signatures

2014-03-18 Thread R. David Murray
R. David Murray added the comment: Or, in 3.4, class META(abc.ABC). OK, since Eric agrees that this is python-ideas material, we'll close this issue for now. If you get consensus for it on python-ideas, the issue can be reopened (or a new one started, whichever turns out to be appropriate).

[issue15100] Race conditions in shutil.copy, shutil.copy2 and shutil.copyfile

2014-03-18 Thread Jim Jewett
Jim Jewett added the comment: Is this really only 3.4? Since it is security-related, it seems like it should be at least considered for older versions as well. -- nosy: +Jim.Jewett ___ Python tracker rep...@bugs.python.org

[issue16043] xmlrpc: gzip_decode has unlimited read()

2014-03-18 Thread Jim Jewett
Jim Jewett added the comment: I'm putting it back to release blocker, because 3.3 should decide whether to fix it/call it security/remove itself from the list. The patch contains several small changes. I like the spelling fix (gsip - gzip) in a test method, but otherwise, I prefer the

[issue20967] hashlib memory leak

2014-03-18 Thread STINNER Victor
STINNER Victor added the comment: I'm unable to reproduce your issue with Python 2.7.5: $ python memoryleak_min.py [256720896.0, 15740928.0, 139264.0] [256724992.0, 15962112.0, 139264.0] [256724992.0, 15966208.0, 139264.0] [256724992.0, 15966208.0, 139264.0] (...) [256724992.0, 15966208.0,

[issue20967] hashlib memory leak

2014-03-18 Thread Adrian Teng
Adrian Teng added the comment: Python 2.7.3, Red Hat Enterprise Linux Server release 5.5, with kernal 2.6.18-308.el5 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20967 ___

[issue1599254] mailbox: other programs' messages can vanish without trace

2014-03-18 Thread Jim Jewett
Jim Jewett added the comment: What is the status here? As best I can tell from a skim, (a) It should be broken into at least three separate issues. (Though maybe some can just be closed instead of separated?) (b) None of them are security holes, so we missed 2.5 and 2.6, and should now

  1   2   >