Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Mark Lawrence
On 17/05/2014 05:19, Marko Rauhamaa wrote: The sole copyright holder can simply state: this work is in the Public Domain, or: all rights relinquished, or some such. Ultimately, everything is decided by the courts, of course. For examples see all the Python PEPs. -- My fellow Pythonistas,

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Robert Kern
On 2014-05-17 02:07, Steven D'Aprano wrote: On Fri, 16 May 2014 14:46:23 +, Grant Edwards wrote: At least in the US, there doesn't seem to be such a thing as placing a work into the public domain. The copyright holder can transfer ownershipt to soembody else, but there is no public domain

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Chris Angelico
On Sat, May 17, 2014 at 6:57 PM, Robert Kern robert.k...@gmail.com wrote: There is such a thing as the public domain in the US, and there are works in it, but there isn't really such a thing as placing a work there voluntarily, as Grant says. A work either is or isn't in the public domain. The

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Robert Kern
On 2014-05-17 05:19, Marko Rauhamaa wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: On Fri, 16 May 2014 14:46:23 +, Grant Edwards wrote: At least in the US, there doesn't seem to be such a thing as placing a work into the public domain. The copyright holder can transfer

Bug in Decimal??

2014-05-17 Thread Stefan Krah
I'll follow up directly with the author of mpdecimal, as this is somewhat serious on a language that's so widely used as python. But please test it and confirm, am I seeing ghost digits? This has already been settled on libmpdec-devel, but for the list: As Mark Dickinson has already

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: On Sat, May 17, 2014 at 6:57 PM, Robert Kern robert.k...@gmail.com wrote: There is such a thing as the public domain in the US, and there are works in it, but there isn't really such a thing as placing a work there voluntarily, as Grant says. A work

Re: Loading modules from files through C++

2014-05-17 Thread Stefan Behnel
Roland Plüss, 17.05.2014 02:27: I'm using Python in an embedded situation. In particular I have to load python scripts through a memory interface so regular python module loading can not be used. I got working so far a module loader object I've added using C++ to sys.meta_path . Now I'm

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Steven D'Aprano
On Sat, 17 May 2014 09:57:06 +0100, Robert Kern wrote: On 2014-05-17 02:07, Steven D'Aprano wrote: On Fri, 16 May 2014 14:46:23 +, Grant Edwards wrote: At least in the US, there doesn't seem to be such a thing as placing a work into the public domain. The copyright holder can transfer

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Albert van der Horst
In article mailman.10041.1400164039.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Fri, May 16, 2014 at 12:17 AM, wxjmfa...@gmail.com wrote: One another trick is to drop spaces around keywords 9and 12345or 99if 'a'in'a' else or 77 12345 and

Re: Loading modules from files through C++

2014-05-17 Thread Roland Plüss
That doesn't work in 2.x, doesn't it? On 05/17/2014 01:58 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 02:27: I'm using Python in an embedded situation. In particular I have to load python scripts through a memory interface so regular python module loading can not be used. I got working

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-05-17 Thread Albert van der Horst
In article mailman.9537.1398635527.18130.python-l...@python.org, Andrew Konstantaras akon...@icloud.com wrote: -=-=-=-=-=- I guess I am missing something big as I am looking for a shorthand way of doing the following: dctA = dict(x=x, y=y, ... n=n) This is, as I understand it a very

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Chris Angelico
On Sat, May 17, 2014 at 10:52 PM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: That may be tong-in-cheek but mathematicians do exactly that. We use roman, greek and hebrew alphabets in normal italics and boldface and then some special characters for element-of, logical-or, integral

Re: Loading modules from files through C++

2014-05-17 Thread Stefan Behnel
Roland Plüss, 17.05.2014 15:00: On 05/17/2014 01:58 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 02:27: I'm using Python in an embedded situation. In particular I have to load python scripts through a memory interface so regular python module loading can not be used. I got working so far

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Tim Chase
On 2014-05-17 12:52, Albert van der Horst wrote: Now translate E=mc^2 into Java. I suspect it would be something like public class Einstein { private double mass=0, energy=0; public class Relativity implements IEquation { Relativity(double mass) { set_mass(mass); } public

Re: Loading modules from files through C++

2014-05-17 Thread Roland Plüss
I'm willing to go to Py3 but only if the solution to the problem is simpler than getting it fixed in Py2. So some questions first: - does this importlib stuff you showed there apply to C++ land (I need to fully drive it from C++ not Python code)? - is the C++ land of Py3 similar to Py2 or totally

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Roy Smith
In article mailman.10085.140038.18130.python-l...@python.org, Tim Chase python.l...@tim.thechases.com wrote: On 2014-05-17 12:52, Albert van der Horst wrote: Now translate E=mc^2 into Java. I suspect it would be something like public class Einstein { private double mass=0,

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Roy Smith
In article mailman.10083.1400332708.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Sat, May 17, 2014 at 10:52 PM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: That may be tong-in-cheek but mathematicians do exactly that. We use roman, greek and hebrew

Re: Loading modules from files through C++

2014-05-17 Thread Stefan Behnel
Hi, please avoid top-posting. Roland Plüss, 17.05.2014 15:49: On 05/17/2014 03:26 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 15:00: On 05/17/2014 01:58 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 02:27: I'm using Python in an embedded situation. In particular I have to load

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Mark Lawrence
On 17/05/2014 13:52, Albert van der Horst wrote: Now translate E=mc^2 into Java. I can't do that as I simply don't understand it. What has the Marylebone Cricket Club got to do with E? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Roy Smith
In article mailman.10088.1400335366.18130.python-l...@python.org, Mark Lawrence breamore...@yahoo.co.uk wrote: On 17/05/2014 13:52, Albert van der Horst wrote: Now translate E=mc^2 into Java. I can't do that as I simply don't understand it. What has the Marylebone Cricket Club got

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Steven D'Aprano
On Sat, 17 May 2014 10:29:00 +0100, Robert Kern wrote: One can state many things, but that doesn't mean they have legal effect. The US Code has provisions for how works become copyrighted automatically, how they leave copyright automatically at the end of specific time periods, how some works

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Mark Lawrence
On 17/05/2014 15:06, Roy Smith wrote: In article mailman.10088.1400335366.18130.python-l...@python.org, Mark Lawrence breamore...@yahoo.co.uk wrote: On 17/05/2014 13:52, Albert van der Horst wrote: Now translate E=mc^2 into Java. I can't do that as I simply don't understand it. What

Re: Values and objects

2014-05-17 Thread Albert van der Horst
In article 536decca$0$29980$c3e8da3$54964...@news.astraweb.com, SNIP Personally, I don't imagine that there ever could be a language where variables were first class values *exactly* the same as ints, strings, floats etc. Otherwise, how could you tell the difference between a function which

Re: Loading modules from files through C++

2014-05-17 Thread Roland Plüss
On 05/17/2014 04:01 PM, Stefan Behnel wrote: Hi, please avoid top-posting. Roland Plüss, 17.05.2014 15:49: On 05/17/2014 03:26 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 15:00: On 05/17/2014 01:58 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 02:27: I'm using Python in an

Re: Loading modules from files through C++

2014-05-17 Thread Stefan Behnel
Roland Plüss, 17.05.2014 17:28: On 05/17/2014 04:01 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 15:49: On 05/17/2014 03:26 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 15:00: On 05/17/2014 01:58 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 02:27: I'm using Python in an

Re: Loading modules from files through C++

2014-05-17 Thread Roland Plüss
On 05/17/2014 05:49 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 17:28: On 05/17/2014 04:01 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 15:49: On 05/17/2014 03:26 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 15:00: On 05/17/2014 01:58 PM, Stefan Behnel wrote: Roland Plüss,

Problem building 3.5 on Windows

2014-05-17 Thread Mark Lawrence
First time in months I've tried building, first time I've ever had a problem that I can't solve for myself. I'm using Visual C++ 2010 Express. 1-- Build started: Project: make_versioninfo, Configuration: Debug Win32 -- 1 make_versioninfo.c 1..\PC\make_versioninfo.c(1): fatal error

Re: Problem building 3.5 on Windows

2014-05-17 Thread Chris Angelico
On Sun, May 18, 2014 at 2:59 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: 1..\PC\make_versioninfo.c(1): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory What stupid thing have I forgotten, apart from switching to *nix? :) Well, apart from that... I'd guess

Re: Loading modules from files through C++

2014-05-17 Thread Stefan Behnel
Roland Plüss, 17.05.2014 18:28: On 05/17/2014 05:49 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 17:28: On 05/17/2014 04:01 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 15:49: On 05/17/2014 03:26 PM, Stefan Behnel wrote: Roland Plüss, 17.05.2014 15:00: On 05/17/2014 01:58 PM,

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Rustom Mody
On Saturday, May 17, 2014 7:36:19 PM UTC+5:30, Roy Smith wrote: Mark Lawrence wrote: Now translate E=mc^2 into Java. I can't do that as I simply don't understand it. What has the Marylebone Cricket Club got to do with E? A wicket looks like an E on its side. Does that help?

Re: Problem building 3.5 on Windows

2014-05-17 Thread Mark Lawrence
On 17/05/2014 18:05, Chris Angelico wrote: On Sun, May 18, 2014 at 2:59 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: 1..\PC\make_versioninfo.c(1): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory What stupid thing have I forgotten, apart from switching to

Re: Problem building 3.5 on Windows

2014-05-17 Thread Chris Angelico
On Sun, May 18, 2014 at 5:06 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: Solved as you got me looking in a different direction. It certainly helps if you have an up to date version of the SDK :) Hah. I don't know which versions of Visual Studio Express go with which versions of Python,

Re: Problem building 3.5 on Windows

2014-05-17 Thread Mark Lawrence
On 17/05/2014 20:08, Chris Angelico wrote: On Sun, May 18, 2014 at 5:06 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: Solved as you got me looking in a different direction. It certainly helps if you have an up to date version of the SDK :) Hah. I don't know which versions of Visual Studio

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Robert Kern
On 2014-05-17 15:15, Steven D'Aprano wrote: On Sat, 17 May 2014 10:29:00 +0100, Robert Kern wrote: One can state many things, but that doesn't mean they have legal effect. The US Code has provisions for how works become copyrighted automatically, how they leave copyright automatically at the

Re: Everything you did not want to know about Unicode in Python 3

2014-05-17 Thread Robert Kern
On 2014-05-17 13:07, Steven D'Aprano wrote: On Sat, 17 May 2014 09:57:06 +0100, Robert Kern wrote: On 2014-05-17 02:07, Steven D'Aprano wrote: On Fri, 16 May 2014 14:46:23 +, Grant Edwards wrote: At least in the US, there doesn't seem to be such a thing as placing a work into the public

using a new computer and bringing needed libraries to it

2014-05-17 Thread CM
If I want to switch my work from one computer to a new one, and I have lots of various libraries installed on the original computer, what's the best way to switch that all to the new computer? I'm hoping there is some simple way like just copying the Python/Lib/site-packages folder, but I'm

Can't figure out 'instance has no attribute' error

2014-05-17 Thread varun7rs
Hello Friends, I am working on this code but I kind of get the same error over and over again. Could any of you help me fix this part of the error? File RW1: class PHY_NETWORK: def __init__(self, nodes, edges): self.nodes = nodes self.edges = edges def

Re: Can't figure out 'instance has no attribute' error

2014-05-17 Thread Ned Batchelder
On 5/17/14 7:56 PM, varun...@gmail.com wrote: Hello Friends, I am working on this code but I kind of get the same error over and over again. Could any of you help me fix this part of the error? File RW1: class PHY_NETWORK: def __init__(self, nodes, edges): self.nodes = nodes

Re: using a new computer and bringing needed libraries to it

2014-05-17 Thread Ned Batchelder
On 5/17/14 7:53 PM, CM wrote: If I want to switch my work from one computer to a new one, and I have lots of various libraries installed on the original computer, what's the best way to switch that all to the new computer? I'm hoping there is some simple way like just copying the

Re: Can't figure out 'instance has no attribute' error

2014-05-17 Thread Rhodri James
On Sun, 18 May 2014 00:56:42 +0100, varun...@gmail.com wrote: Hello Friends, I am working on this code but I kind of get the same error over and over again. Could any of you help me fix this part of the error? Shuffling your post around to make an explanation easier, the traceback is:

Re: Can't figure out 'instance has no attribute' error

2014-05-17 Thread Gary Herron
On 05/17/2014 04:56 PM, varun...@gmail.com wrote: Hello Friends, I am working on this code but I kind of get the same error over and over again. Could any of you help me fix this part of the error? It's an indentation error: In the following the three function defs for __init__, addNode

Re: using a new computer and bringing needed libraries to it

2014-05-17 Thread Terry Reedy
On 5/17/2014 7:53 PM, CM wrote: If I want to switch my work from one computer to a new one, and I have lots of various libraries installed on the original computer, what's the best way to switch that all to the new computer? I'm hoping there is some simple way like just copying the

Re: using a new computer and bringing needed libraries to it

2014-05-17 Thread Chris Angelico
On Sun, May 18, 2014 at 10:17 AM, Ned Batchelder n...@nedbatchelder.com wrote: Make a list of the packages you need. Put it in a file called requirements.txt. Then install them with: $ pip install -r requirements.txt Keep that file up-to-date as you add new requirements. +1. And the

Pip requirements: Machine-readable configuration versus human-audience documentation (was: using a new computer and bringing needed libraries to it)

2014-05-17 Thread Ben Finney
Ned Batchelder n...@nedbatchelder.com writes: Make a list of the packages you need. Put it in a file called requirements.txt. Then install them with: $ pip install -r requirements.txt Keep that file up-to-date as you add new requirements. Since these requirements are specifically for

Python and Math

2014-05-17 Thread Bill Cunningham
Does Python have good mathematical capabilities? I am interested in learning a second language for mathematical purposes. I am considering looking at python, perl, fortran, Adas out. It looked too complicated to learn. Perl looked easy and I haven't really looked into python. Bill --

Re: Python and Math

2014-05-17 Thread Rustom Mody
On Sunday, May 18, 2014 8:43:11 AM UTC+5:30, Bill Cunningham wrote: Does Python have good mathematical capabilities? I am interested in learning a second language for mathematical purposes. I am considering looking at python, perl, fortran, Adas out. It looked too complicated to

Re: using a new computer and bringing needed libraries to it

2014-05-17 Thread Rustom Mody
On Sunday, May 18, 2014 5:47:05 AM UTC+5:30, Ned Batchelder wrote: On 5/17/14 7:53 PM, CM wrote: If I want to switch my work from one computer to a new one, and I have lots of various libraries installed on the original computer, what's the best way to switch that all to the new

Re: Python and Math

2014-05-17 Thread Chris Angelico
On Sun, May 18, 2014 at 1:13 PM, Bill Cunningham nospam@nspam.invalid wrote: Does Python have good mathematical capabilities? I am interested in learning a second language for mathematical purposes. I am considering looking at python, perl, fortran, Adas out. It looked too complicated to

Re: Problem building 3.5 on Windows

2014-05-17 Thread Joseph L. Casale
Mark, Excuse the format of this post, stuck on the road only with an iPhone but in the event it helps, http://blog.vrplumber.com/b/2014/02/12/step-2-get-amd64-compatible-vs-2010/ may be useful. Jlc -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and Math

2014-05-17 Thread Gary Herron
On 05/17/2014 08:13 PM, Bill Cunningham wrote: Does Python have good mathematical capabilities? I am interested in learning a second language for mathematical purposes. I am considering looking at python, perl, fortran, Adas out. It looked too complicated to learn. Perl looked easy and I

Re: Python and Math

2014-05-17 Thread Steven D'Aprano
On Sat, 17 May 2014 23:13:11 -0400, Bill Cunningham wrote: Does Python have good mathematical capabilities? I am interested in learning a second language for mathematical purposes. I am considering looking at python, perl, fortran, Adas out. It looked too complicated to learn. Perl looked

Re: Python and Math

2014-05-17 Thread Bill Cunningham
Rustom Mody rustompm...@gmail.com wrote in message news:09bbda59-9c37-44b0-acfc-0571d4fe8...@googlegroups.com... What does the word 'mathematical' connote for you? On the whole the term is so wide that its hard to answer without some more context. For example there's numpy,scipy for

Re: Python and Math

2014-05-17 Thread Bill Cunningham
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote in message news:53783c5f$0$29977$c3e8da3 You say you want to learn a *second* language, but you don't say what your first language is. Nor do you say what sort of mathematics you wish to do, or at what level. Depending on what you

[issue21517] installer Python default setting fails with mac Python Launcher

2014-05-17 Thread Ned Deily
Ned Deily added the comment: Python.org installers do not install anything to /usr/bin; they do, by default, install symbolic links in /usr/local/bin. Python 3 installers set the symlink /usr/local/bin/python3 to the most recently installed version. The Python Launcher app has several open

[issue21385] in debug mode, compile(ast) fails with an assertion error if an AST node has no line number information

2014-05-17 Thread R. David Murray
R. David Murray added the comment: Victor: in the production code discussed in the original posting, there *are* line numbers, and they are meaningful; they just aren't monotonically increasing. I believe the request here is to simply remove the assert. (If we did that, we'd have to also

[issue21386] ipaddress.IPv4Address.is_global not implemented

2014-05-17 Thread R. David Murray
R. David Murray added the comment: The patch looks correct to me, but we also need tests. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21386 ___

[issue21391] shutil uses both os.path.abspath and an 'import from' of abspath

2014-05-17 Thread R. David Murray
R. David Murray added the comment: I'd prefer to get rid of it, otherwise we might get requests to add all the other os.path functions to the shutil namespace, and I don't think having that kind of more than one way to do it serves anyone. I suppose we'll have to deprecate it first if we do

[issue21397] tempfile.py: Fix grammar in docstring, comment typos

2014-05-17 Thread R. David Murray
R. David Murray added the comment: 'below' doesn't make sense at all if you view it via pydoc. There is only one unsafe function left, mktemp. Here is an alternate patch that takes advantage of that fact. -- nosy: +r.david.murray Added file:

[issue18540] imaplib.IMAP4() ends with Name or service not known on Fedora 18

2014-05-17 Thread R. David Murray
R. David Murray added the comment: Milan: using 'localhost' is incorrect, since the string 'localhost' will not always resolve to the local host IP, while passing None to getaddrinfo will. It is significant that the example fails. We need a test for this case (the imap tests have been

[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks

2014-05-17 Thread Kristian Benoit
Kristian Benoit added the comment: I added code to skip the bom if present when encoding is either None or utf-8. The problem I have with Victor's solution is that users don't know these files are not plain UTF-8. Most text editor says it's utf-8 encoded, how can a user figure out there 3

[issue21517] installer Python default setting fails with mac Python Launcher

2014-05-17 Thread Andrew Harrington
Andrew Harrington added the comment: I see not messing with /usr/bin. Your note about Python Launcher would be a nice addition to the Mac installer notes. I would encourage that before closing this. On Sat, May 17, 2014 at 1:57 AM, Ned Deily rep...@bugs.python.org wrote: Ned Deily added

[issue15014] smtplib: add support for arbitrary auth methods

2014-05-17 Thread R. David Murray
R. David Murray added the comment: OK, I've finally had time to review this, sorry for the delay. The impalib mechanism is tailored to how imap works (that's the whole thing about continuation response. smtplib auth works a bit differently, and your adaptation looks OK to me. The

[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks

2014-05-17 Thread Kristian Benoit
Changes by Kristian Benoit kristian.ben...@gmail.com: Added file: http://bugs.python.org/file35270/json.v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21509 ___

[issue21518] Expose RegUnloadKey in winreg

2014-05-17 Thread Claudiu.Popa
New submission from Claudiu.Popa: Hello. While working on issue8579, I noticed that there is no way to detach a key from the registry, loaded with LoadKey function. The attached patch exposes RegUnLoadKeyW as winreg.UnloadKey. Also, this patch adds a new script in the test folder,

[issue21518] Expose RegUnloadKey in winreg

2014-05-17 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +steve.dower, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___

[issue21518] Expose RegUnloadKey in winreg

2014-05-17 Thread Claudiu.Popa
Claudiu.Popa added the comment: It needs administrator elevation for running the test. I'll update the patch to skip the test if the user doesn't have elevation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-17 Thread Thomas Heller
Thomas Heller added the comment: When you say os.path.isdir(...) works fine, you mean it's returning False? As shown in the original report (http://bugs.python.org/issue21516#msg218664) os.path.isdir() returns True; which is correct since c:\Users\admin is a directory on my machine.

[issue21430] Document ssl.pending()

2014-05-17 Thread Steffen Ullrich
Steffen Ullrich added the comment: Data transport in SSL is not done with plain TCP, but with encoded frames inside TCP. To get decoded data one has to first receive the full frame, even if one is only interested in the first bytes. Example: - server does an SSL_write with 200 bytes. This

[issue21430] Document ssl.pending()

2014-05-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: So to make use of select with SSL the application would have to check first with pending, if there are already buffered data, What's the point of checking? Just call SSL_read() and catch the SSL_ERROR_WANT_{READ,WRITE} to determine that no data is available;

[issue21430] Document ssl.pending()

2014-05-17 Thread Bas Wijnen
Bas Wijnen added the comment: After trying to use this, I think ssl.pending is a valuable function that should be supported and documented. My use case is a half-synchronous system, where I want most calls to block but asynchronous events are possible as well. Switching the socket between

[issue21362] concurrent.futures does not validate that max_workers is proper

2014-05-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3024ad49f00e by Brian Quinlan in branch 'default': Issue #21362: concurrent.futures does not validate that max_workers is proper http://hg.python.org/cpython/rev/3024ad49f00e -- nosy: +python-dev ___

[issue21362] concurrent.futures does not validate that max_workers is proper

2014-05-17 Thread Brian Quinlan
Brian Quinlan added the comment: Committed, thanks for the fix! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21362 ___

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 44dac2e7fcb8 by Benjamin Peterson in branch '2.7': support pep 3118 format strings for ctypes objects with nontrivial shapes (closes #10744) http://hg.python.org/cpython/rev/44dac2e7fcb8 New changeset 22938bf57161 by Benjamin Peterson in branch

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-05-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 060cfd049d14 by Stefan Krah in branch 'default': Issue #20186: memoryobject.c: add function signatures. http://hg.python.org/cpython/rev/060cfd049d14 -- nosy: +python-dev ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-05-17 Thread Stefan Krah
Stefan Krah added the comment: memoryobject.c is converted with a minimal patch (I would like to keep 100% code coverage for the file). -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186

[issue21430] Document ssl.pending()

2014-05-17 Thread Steffen Ullrich
Steffen Ullrich added the comment: What's the point of checking? Just call SSL_read() and catch the SSL_ERROR_WANT_{READ,WRITE} to determine that no data is available; as a bonus it also tells you whether you have to select() for read or for write. A common scenario with non-blocking

[issue21430] Document ssl.pending()

2014-05-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: I was trying to point out that for SSL enabled sockets this approach will no longer work and might cause odd stalling of connections, because select will not show the socket as readable although data are there for read. You are right, this is worth

[issue19980] Improve help('non-topic') response

2014-05-17 Thread Mark Lawrence
Mark Lawrence added the comment: I propose the following. help('') returns help on strings in the same way that help([]) and help({}) returns help on lists and dicts respectively, further help(''.method) returns help on the string method or an attribute error, so this appears to me

[issue21430] Document ssl.pending()

2014-05-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset b820b1b282b2 by Antoine Pitrou in branch '3.4': Issue #21430: additions to the description of non-blocking SSL sockets http://hg.python.org/cpython/rev/b820b1b282b2 New changeset 077e64b23592 by Antoine Pitrou in branch 'default': Issue #21430:

[issue21385] in debug mode, compile(ast) fails with an assertion error if an AST node has no line number information

2014-05-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Summary of this post: compile currently checks user input with assert; this is a bug that should be changed. I re-read astlinenotest.py and realized that FunctionDef is included in '*' and not some omitted import. (The latter is common for code posted on

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-17 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776 ___ ___

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-17 Thread Donald Stufft
Donald Stufft added the comment: @larry Is there anything else I need to do? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776 ___ ___

[issue21391] shutil uses both os.path.abspath and an 'import from' of abspath

2014-05-17 Thread Berker Peksag
Berker Peksag added the comment: Here is a patch to deprecate the shutil.abspath function. -- nosy: +berker.peksag Added file: http://bugs.python.org/file35272/issue21391.diff ___ Python tracker rep...@bugs.python.org

[issue2052] Allow changing difflib._file_template character encoding.

2014-05-17 Thread Berker Peksag
Berker Peksag added the comment: Attaching a new version of issue2052_html5.diff. Changes: - Switch from px to em in CSS - Cleanup markup a bit (e.g. delete redundant colgroup tags) -- Added file: http://bugs.python.org/file35273/issue2052_html5_v2.diff

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2014-05-17 Thread Berker Peksag
Berker Peksag added the comment: Berker: do you consider your diff ready to go in, or is it an early diff (like a work-in-progress)? I tested my patch with test_expectedFailure.py again. The patch is not really fixes the problem described in msg215240. So, I consider it a WIP patch for now.

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-17 Thread Senthil Kumaran
Senthil Kumaran added the comment: @dstufft - should you commit it in 3.4 branch (since the change is already in 3.5) and then wait for larry's approval or rejection? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-17 Thread Larry Hastings
Larry Hastings added the comment: Okay, this has my blessing to be merged for 3.4.1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776 ___ ___

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-17 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776 ___ ___ Python-bugs-list

[issue21470] Better seeding for the random module

2014-05-17 Thread Larry Hastings
Larry Hastings added the comment: (If the past few weeks have taught us *anything*, it's that we can't look to OpenSSL to learn best practices.) -- nosy: +larry stage: - resolved ___ Python tracker rep...@bugs.python.org

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2014-05-17 Thread Larry Hastings
Larry Hastings added the comment: Considering that I'm tagging 3.4.1 within an hour or two, and we don't have a patch yet, I'd say that this is too late to go into 3.4.1. But I'm happy to consider it for a future 3.4.x revision. -- ___ Python

[issue21430] Document ssl.pending()

2014-05-17 Thread Alexey Gorshkov
Alexey Gorshkov added the comment: Issue #21430: additions to the description of non-blocking SSL sockets I do not see any mention of .pending() in Your commit. Is this some personal hate to subject? Are You going to document this method or not? Documenting it on line of text. If You are not

[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc

2014-05-17 Thread Berker Peksag
Berker Peksag added the comment: I've added missing self._formatMessage() functions to assertRegex and assertNotRegex asserts. -- keywords: +patch nosy: +berker.peksag stage: needs patch - patch review versions: -Python 3.3 Added file: http://bugs.python.org/file35274/issue20362.diff

[issue21519] IDLE : Bug in keybinding validity check

2014-05-17 Thread Saimadhav Heblikar
New submission from Saimadhav Heblikar: Steps to reproduce the bug: 1. IDLE options configure idle keys 2. Try to replace a keybinding for an action with that of another action which has more than one keybinding. For eg : Default binding of copy=Control-Key-c Control-Key-C. So, try to