Re: Errors in installation of matplotlib and pandas on Macbook

2016-06-29 Thread Madhavan Bomidi
Hello ChrisA, Thanks for your suggestion. My script works fine when I run the command 'export LC_ALL=en_AU.utf8' before starting python. I am from India and using US English and international keyboard. I also tried using the command 'export LC_ALL=en_USA.utf8' and the python script works fine.

[issue23951] Update devguide style to use a similar theme as Docs

2016-06-29 Thread Lisa Roach
Lisa Roach added the comment: I have updated the conf.py and added a "tools" folder that contains the themes, templates, etc. to make the devguide match more closely with the pydoctheme. I altered the theme a little bit to keep the colors more consistent with the original devguide, hopefully

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Random832
On Thu, Jun 30, 2016, at 00:12, Steven D'Aprano wrote: > I tried to find the actual implementation of os.abort(), but I > couldn't work out where it was or what it does. Can somebody > enlighten me? It's in posixmodule.c, it calls abort(), which is a standard C function, equivalent to killing the

How to extract error information after failing to call Py_initialize()

2016-06-29 Thread Tu Marshal
Hello Experts, I sent my issue to Python help email list. Matt from that list suggested me to ask help from "Python list". The link described how to get error information from Python after Python is initialized. It didn't meet my requirement.

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Zachary Ware
On Wed, Jun 29, 2016 at 11:12 PM, Steven D'Aprano wrote: > On Thu, 30 Jun 2016 11:28 am, Chris Angelico wrote: > >> On Thu, Jun 30, 2016 at 10:27 AM, Steven D'Aprano >> wrote: >>> Following os.abort(), the interpreter exits in the hardest, quickest >>>

Re: Errors in installation of matplotlib and pandas on Macbook

2016-06-29 Thread Chris Angelico
On Thu, Jun 30, 2016 at 1:51 PM, Madhavan Bomidi wrote: > File > "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", > line 475, in _parse_localename > raise ValueError, 'unknown locale: %s' % localename > ValueError:

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Chris Angelico
On Thu, Jun 30, 2016 at 2:12 PM, Steven D'Aprano wrote: > On Thu, 30 Jun 2016 11:28 am, Chris Angelico wrote: > >> On Thu, Jun 30, 2016 at 10:27 AM, Steven D'Aprano >> wrote: >>> Following os.abort(), the interpreter exits in the hardest, quickest >>>

Re: Errors in installation of matplotlib and pandas on Macbook

2016-06-29 Thread Madhavan Bomidi
Can you please suggest me what I shall do to make sure all the libraries that I have indicated above work in python? I don't know how I can get back to obsolete version of Python. Please suggest me the commands or references of previous posts, if any. Thanks and regards, Madhavan --

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Steven D'Aprano
On Thu, 30 Jun 2016 11:28 am, Chris Angelico wrote: > On Thu, Jun 30, 2016 at 10:27 AM, Steven D'Aprano > wrote: >> Following os.abort(), the interpreter exits in the hardest, quickest >> manner possible. > > os.kill(os.getpid(), 9) > > Now THAT is the hardest way to

[issue1732367] Document the constants in the socket module

2016-06-29 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

Re: Errors in installation of matplotlib and pandas on Macbook

2016-06-29 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 3:51:56 PM UTC+12, Madhavan Bomidi wrote: > Bomidis-MacBook-Pro:~ madhavan$ which python > /usr/local/bin/python Apple already includes a(n obsolete) version of Python with its OS. Trying to override this with a newer version could easily lead to conflicts. --

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Random832
On Wed, Jun 29, 2016, at 22:26, Rustom Mody wrote: > > os.kill(os.getpid(), 9) > > > > Now THAT is the hardest way to abort. You ain't comin' back from > > this one! > > Is it? > > | On Windows, signal() can only be called with SIGABRT, SIGFPE, > | SIGILL, SIGINT, SIGSEGV, or SIGTERM. A ValueError

Errors in installation of matplotlib and pandas on Macbook

2016-06-29 Thread Madhavan Bomidi
Hello everyone, I am very new to Macbook and python. I have installed python through MacPorts and when I check if all the packages I required are installed properly, I get the following traceback errors for matplotlib and pandas packages. Can anyone suggest me how I can rectify the same? I

Re: Meta decorator with parameters, defined in explicit functions

2016-06-29 Thread Steven D'Aprano
On Thu, 30 Jun 2016 12:43 pm, Lawrence D’Oliveiro wrote: > On Tuesday, June 28, 2016 at 5:03:08 PM UTC+12, Ben Finney wrote: >> There is a clever one-line decorator that has been copy-pasted without >> explanation in many code bases for many years:: >> >> decorator_with_args = lambda

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-06-29 Thread Wei-Cheng Pan
Wei-Cheng Pan added the comment: If the arguments should be aligned with those in dump/load, then maybe "--no-ensure-ascii" is an option? -- ___ Python tracker

Re: Assignment Versus Equality

2016-06-29 Thread Steven D'Aprano
On Thu, 30 Jun 2016 10:29 am, Gregory Ewing wrote: > All your experiment shows is that the last information we had > about the magnet is that it was nearly stationary just above > the horizon. > > It doesn't prove that the probe itself is frozen, any more than > the fact that a photograph you

Re: Meta decorator with parameters, defined in explicit functions

2016-06-29 Thread Lawrence D’Oliveiro
On Tuesday, June 28, 2016 at 5:03:08 PM UTC+12, Ben Finney wrote: > decorator_with_args = lambda decorator: lambda *args, **kwargs: lambda > func: decorator(func, *args, **kwargs) Ah, I see why there are 3 lambdas, instead of 2. It’s so that you can write decorator_func =

Re: Meta decorator with parameters, defined in explicit functions

2016-06-29 Thread Lawrence D’Oliveiro
On Tuesday, June 28, 2016 at 5:03:08 PM UTC+12, Ben Finney wrote: > There is a clever one-line decorator that has been copy-pasted without > explanation in many code bases for many years:: > > decorator_with_args = lambda decorator: lambda *args, **kwargs: lambda > func: decorator(func,

Re: Can math.atan2 return INF?

2016-06-29 Thread Chris Angelico
On Thu, Jun 30, 2016 at 12:13 PM, Rustom Mody wrote: > ... hotly disputing for more than ½ a century... You keep using that character. Is it just to show off that you can? I was always taught to match the style of the rest of the sentence, so this would be "half a

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Rustom Mody
On Thursday, June 30, 2016 at 6:58:42 AM UTC+5:30, Chris Angelico wrote: > On Thu, Jun 30, 2016 at 10:27 AM, Steven D'Aprano wrote: > > Following os.abort(), the interpreter exits in the hardest, quickest manner > > possible. > > os.kill(os.getpid(), 9) > > Now THAT is the hardest way to abort.

Re: Can math.atan2 return INF?

2016-06-29 Thread Rustom Mody
On Thursday, June 30, 2016 at 7:03:30 AM UTC+5:30, Lawrence D’Oliveiro wrote: > On Wednesday, June 29, 2016 at 10:55:03 PM UTC+12, Marko Rauhamaa wrote: > > No, the fundamental question here is whether it makes scientific sense > > to speculate about topics that are beyond the reach of science.

Re: Can math.atan2 return INF?

2016-06-29 Thread Lawrence D’Oliveiro
On Wednesday, June 29, 2016 at 10:55:03 PM UTC+12, Marko Rauhamaa wrote: > No, the fundamental question here is whether it makes scientific sense > to speculate about topics that are beyond the reach of science. Few > scientists speculate about what went on before the Big Bang, for > example. On

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Chris Angelico
On Thu, Jun 30, 2016 at 10:27 AM, Steven D'Aprano wrote: > Following os.abort(), the interpreter exits in the hardest, quickest manner > possible. os.kill(os.getpid(), 9) Now THAT is the hardest way to abort. You ain't comin' back from this one! ChrisA --

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Mark Hammond
Mark Hammond added the comment: I've a few reservations here: * CoInitialize will load a number of COM DLLs into the process, which isn't free and will have some memory and performance costs for programs that don't use COM. I see around 10 such DLLs loaded. * pythoncom uses sys.coinit_flags

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Steven D'Aprano
On Wed, 29 Jun 2016 08:01 pm, Victor Savu wrote: > There are many posts trying to explain the else after for or while. Here > is my take on it: > > There are three ways of getting out of a (for/while) loop: throw, break or > the iterator gets exhausted. - reaching the end of the loop - raise

Re: Assignment Versus Equality

2016-06-29 Thread Gregory Ewing
Marko Rauhamaa wrote: -- / \ / (almost) \ N |black || | hole |S \/ \ / -- / / compass needle / The compass needle shows that the probe is "frozen" and

Re: Iteration, while loop, and for loop

2016-06-29 Thread Steven D'Aprano
On Thu, 30 Jun 2016 01:29 am, Ian Kelly wrote: > On Tue, Jun 28, 2016 at 11:58 AM, Grant Edwards > wrote: [...] >>> But then, if you wrap up your "while" loop as a generator that yields >>> things, you can then use it in a "for" loop which seems to me like >>> the

Re: Operator Precedence/Boolean Logic

2016-06-29 Thread Steven D'Aprano
On Thu, 30 Jun 2016 01:00 am, Grant Edwards wrote: > On 2016-06-29, Steven D'Aprano wrote: > >> To Nick, having 1+True return 2 is an accident of implementation, > > My recollection is that it was not an accident of impliementation. It > was an intentional descision to

Re: Operator Precedence/Boolean Logic

2016-06-29 Thread Steven D'Aprano
On Wed, 29 Jun 2016 11:30 pm, Rustom Mody wrote: > The other answers -- graphs and automata -- are questionable and/or wrong > > You may wish to think about them again? You may wish to justify your assertion. -- Steven “Cheer up,” they said, “things could be worse.” So I cheered up, and

[issue27418] Tools/importbench/importbench.py is broken

2016-06-29 Thread Brett Cannon
Brett Cannon added the comment: I don't see anything obviously wrong with it. -- ___ Python tracker ___ ___

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Steve Dower
Steve Dower added the comment: > pythoncom and comtypes use the value of sys.coinit_flags when imported Good to know. Assume we'll add that as well. Also, with respect to threading, we'd want to initialize on all new threads too. That will require a way to specify that a new thread should be

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Steve Dower
Steve Dower added the comment: I'm also okay to discuss whether MTA or STA should be the default, but I'll also be seeking advice from work colleagues on this who know COM really well. -- ___ Python tracker

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Steve Dower
Steve Dower added the comment: > But do I understand correctly that, if you implement this, there's no way for > me to select MTA? MTA would be the default, with no -X argument. But we could support a no-op "-X:MTA" as well. Because of the potential for use in security features, I don't want

[issue27418] Tools/importbench/importbench.py is broken

2016-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch seems fixes importbench. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file43583/importbench.patch ___ Python tracker

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Terry Reedy
On 6/29/2016 6:01 AM, Victor Savu wrote: There are many posts trying to explain the else after for or while. My take: a while statement *is* a repeated if statement, and that is how it is implemented. while condition: true() is equivalent to and implemented in machine language without

[issue27418] Tools/importbench/importbench.py is broken

2016-06-29 Thread Brett Cannon
Brett Cannon added the comment: Feel free to do whatever you need/want to with the benchmark. I originally created it when switching __import__ to importlib to prove that it didn't impact performance. -- ___ Python tracker

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Eryk Sun
Eryk Sun added the comment: pythoncom and comtypes use the value of sys.coinit_flags when imported, and otherwise default to calling CoInitializeEx(NULL, COINIT_APARTMENTTHREADED). Setting this value should ease problems, but something like -X:STA is still necessary. Note that the launcher

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Tim Golden
Tim Golden added the comment: As it happens, all the code I use which calls CoInitialise[Ex] does so with STA. But do I understand correctly that, if you implement this, there's no way for me to select MTA? If so I would consider that a major drawback. --

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Steve Dower
Steve Dower added the comment: > If it allowed user code to access COM without needing a 3rd party dependency, > I'd be +1, but I don't think that's being proposed here. It's a prerequisite to adding features to the stdlib that access COM (whether or not COM is directly exposed to the user).

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Paul Moore
Paul Moore added the comment: Things I know that call CoInitialize - pywin32/pythoncom and comtypes. I assume the proposal is to call CoInitializeEx in a way that won't break those? I'm not sure I see how this would affect the user (i.e. Python code). Brett mentions detecting the user's

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: :) I'm not a fan of monkey patching code in production, unless the code I'm monkey patching is code I control. (And since releasing code now is a lot easier than it used to be, I have much less occasion to monkey-patch code I control.) (I'm a big fan of and am

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Yury Selivanov
Yury Selivanov added the comment: > Rather tham monkey-patching, in general I recommend just copying some code from the asyncio library and calling that. In this case you'd be copying a tiny bit of code from create_connection(). You'd still be calling an internal API, _make_ssl_transport(), but

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Guido van Rossum
Guido van Rossum added the comment: Rather tham monkey-patching, in general I recommend just copying some code from the asyncio library and calling that. In this case you'd be copying a tiny bit of code from create_connection(). You'd still be calling an internal API, _make_ssl_transport(), but

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Steve Dower
Steve Dower added the comment: It would enable wrapping up anything from this list too, and more: https://msdn.microsoft.com/en-us/library/windows/desktop/bb774328(v=vs.85).aspx Plenty of cool potential features in there :) -- ___ Python tracker

[issue27418] Tools/importbench/importbench.py is broken

2016-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just now I'm writing a patch for optimizing __import__. Maybe importbench would be helpful. -- ___ Python tracker

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Brett Cannon
Brett Cannon added the comment: Steve has also told me this would enable querying the OS for what the default web browser is. -- ___ Python tracker ___

[issue27418] Tools/importbench/importbench.py is broken

2016-06-29 Thread Brett Cannon
Brett Cannon added the comment: If you don't have any use for it I say just delete the benchmark. -- ___ Python tracker ___

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: With SSL, the protocol is a little different clients and servers, although that may just be in the handshake. I'm no SSL expert by any means. When you call wrap_socket on an SSLContext, you can pass server_side, which defaults to False. If you get this wrong,

[issue27418] Tools/importbench/importbench.py is broken

2016-06-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python Tools/importbench/importbench.py Traceback (most recent call last): File "Tools/importbench/importbench.py", line 8, in from test.test_importlib.source import util as source_util ImportError: cannot import name 'util' --

[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-06-29 Thread Steve Dower
Steve Dower added the comment: This now depends on issue27417, since we can't enable AMSI without enabling COM, and doing that has a number of back-compat implications. -- dependencies: +Call CoInitializeEx on startup ___ Python tracker

[issue27417] Call CoInitializeEx on startup

2016-06-29 Thread Steve Dower
New submission from Steve Dower: I'd like to enable calling CoInitializeEx on Python startup for 3.6 (and into the future). See https://msdn.microsoft.com/en-us/library/windows/desktop/ms695279.aspx This would enable us to use more advanced Windows features within Python that require COM,

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Guido van Rossum
Guido van Rossum added the comment: Hm. The docs in PEP 3156 do mention that create_connection() is for clients (though it weakens this with "typically"): https://www.python.org/dev/peps/pep-3156/#internet-connections I always think of TCP connections (which is what create_connection() is

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Yury Selivanov
Yury Selivanov added the comment: > It also doesn't occur with uvloop, which I assume still uses sockets. No, uvloop doesn't use python sockets or select for IO at all. All IO is done in libuv. > WRT CPython/sockets this problem doesn't happen if I use asyncore to accept > connections and

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Guido van Rossum
Changes by Guido van Rossum : -- Removed message: http://bugs.python.org/msg269529 ___ Python tracker ___

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Guido van Rossum
Changes by Guido van Rossum : -- Removed message: http://bugs.python.org/msg269525 ___ Python tracker ___

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: WRT CPython/sockets this problem doesn't happen if I use asyncore to accept connections and hand them off to create_connection. :) It also doesn't occur with uvloop, which I assume still uses sockets. Also, FWIW, the relevant ZEO test passes if I use SSL, which

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Guido van Rossum
Guido van Rossum added the comment: No, I just don't have a computer right now, only a phone. --Guido (mobile) -- ___ Python tracker ___

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Yury Selivanov
Yury Selivanov added the comment: Running out of time to debug this today. I think this is a bug in CPython, in either socket or select module. When I inject some debug code in selectors.py and replace KQueue with select(), I can see that the server thread's selector stops working at some

[issue27416] typo / missing word in docs.python.org/2/library/copy.html

2016-06-29 Thread Paul Killey
Paul Killey added the comment: Ah, I see now -- your comment clarified it for me. Thanks. -- ___ Python tracker ___

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: Yuri, right you are. Thanks. Марк, see https://bugs.launchpad.net/zodb/+bug/135108/comments/9 -- ___ Python tracker ___

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: Sorry, ignore my last message -- ___ Python tracker ___ ___ Python-bugs-list

[issue27363] Complex numbers with negative zero imaginary parts do not roundtrip properly

2016-06-29 Thread ppperry
Changes by ppperry : -- title: Complex with negative zero imaginary part -> Complex numbers with negative zero imaginary parts do not roundtrip properly ___ Python tracker

[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-06-29 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Yury Selivanov
Yury Selivanov added the comment: Jim, I think you wanted to post this link in this issue: https://bugs.launchpad.net/zodb/+bug/135108/comments/9 instead of in #27392. I can reproduce this on my mac, but so far I've no idea what's going on. -- ___

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: See: https://bugs.launchpad.net/zodb/+bug/135108/comments/9 Sorry, I should have sent that link sooner. In my flailing to come up with a simple case, I forgot the importance of that setting. -- ___ Python tracker

Re: Iteration, while loop, and for loop

2016-06-29 Thread Ian Kelly
On Tue, Jun 28, 2016 at 11:58 AM, Grant Edwards wrote: > On 2016-06-28, Tim Chase wrote: >> On 2016-06-29 01:20, Steven D'Aprano wrote: >>> While loops are great for loops where you don't know how many >>> iterations there will be but you

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: >> Yury, I'm curious what you think the socket argument to create_connection is >> about. > > :) The current intended purpose of create_connection is to create a client > connection. You're proposing to add a new argument -- server_side -- which I > think will

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: Here's a version sans prints -- Added file: http://bugs.python.org/file43581/echo-no-print.py ___ Python tracker ___

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Марк Коренберг
Марк Коренберг added the comment: One more thing. Why you set socket.SO_LINGER ? and why lingering timeout is 0 seconds ? Removing that eliminate problem completely. -- ___ Python tracker

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury, I'm curious what you think the socket argument to create_connection is > about. :) The current intended purpose of create_connection is to create a client connection. You're proposing to add a new argument -- server_side -- which I think will

Re: Language improvement: Get more from the `for .. else` clause

2016-06-29 Thread Michael Selik
On Wed, Jun 29, 2016 at 7:11 AM Victor Savu wrote: > Please let me know if you are interested in a more concrete case such as a > domain-specific application (I can think of progress bars, logging, > transfer rate statistics ...). > Yes, please. I'd like to

[issue27416] typo / missing word in docs.python.org/2/library/copy.html

2016-06-29 Thread R. David Murray
R. David Murray added the comment: No, the text is correct. Perhaps it would be clearer if the 'even' were moved to the front of the phrase? "...it may copy too much, even data structures that should be shared between copies." -- nosy: +r.david.murray

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Jim Fulton
Changes by Jim Fulton : Removed file: http://bugs.python.org/file43540/echo.py ___ Python tracker ___

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Марк Коренберг
Марк Коренберг added the comment: Also I recommend you to use asyncio streams, instead of reinventing wheels. So, reading your command will look like: data = await stream.read_exactly(4) (len,) = unpack(">I", data) command = await stream.read_exactly(len) --

Re: Operator Precedence/Boolean Logic

2016-06-29 Thread Jon Ribbens
On 2016-06-29, Grant Edwards wrote: > On 2016-06-29, Steven D'Aprano wrote: >> To Nick, having 1+True return 2 is an accident of implementation, > > My recollection is that it was not an accident of impliementation. It > was an intentional

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: BTW, a problem with this proposal that I realized after submitting it is that it changes an API that has multiple implementations, including implementations outside of the Python codebase. Arguably, this would require a PEP, at which point the change is

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: Yury, I'm curious what you think the socket argument to create_connection is about. -- ___ Python tracker ___

[issue27416] typo / missing word in docs.python.org/2/library/copy.html

2016-06-29 Thread Paul Killey
Paul Killey added the comment: I'm sorry, 'not' could be missing between 'should' and 'be' --- 'should not be shared' -- ___ Python tracker ___

[issue27416] typo / missing word in docs.python.org/2/library/copy.html

2016-06-29 Thread Paul Killey
New submission from Paul Killey: I wonder if the word 'not' is missing between 'that' and 'should' in this sentence in https://docs.python.org/2/library/copy.html? Because deep copy copies everything it may copy too much, e.g., administrative data structures that should be shared even between

Re: Operator Precedence/Boolean Logic

2016-06-29 Thread Grant Edwards
On 2016-06-29, Steven D'Aprano wrote: > To Nick, having 1+True return 2 is an accident of implementation, My recollection is that it was not an accident of impliementation. It was an intentional descision to provide compatibility with many years worth of programs that were

[issue27391] server_hostname should only be required when checking host names

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: OK, sure, I'll make a PR. -- ___ Python tracker ___ ___ Python-bugs-list

[issue27391] server_hostname should only be required when checking host names

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: No need to apologize! My capitulation was just due to the fact that this isn't a big deal. (My tone probably came across as cranky; sorry) WRT backward compatibility, I suspect that there's a bit of wiggle here between loop implementations and I doubt this would

[issue27391] server_hostname should only be required when checking host names

2016-06-29 Thread Yury Selivanov
Yury Selivanov added the comment: > SSL contexts, https://docs.python.org/3/library/ssl.html#ssl-contexts, have an attribute, check_hostname, which controls whether hostname checking is required. If set to false in a context passed to create_connection, then it makes no sense to require

Re: "for/while ... break(by any means) ... else" make sense?

2016-06-29 Thread Grant Edwards
On 2016-06-29, Steven D'Aprano wrote: [...] > is "insane" too, but still legal. The Python interpreter does not > judge your code. That's what Usenet is for. -- Grant Edwards grant.b.edwardsYow! I'm a nuclear at

Re: Assignment Versus Equality

2016-06-29 Thread BartC
On 29/06/2016 14:35, Chris Angelico wrote: On Wed, Jun 29, 2016 at 11:24 PM, BartC wrote: I used this little benchmark: def fn(): n=0 for i in range(100): n+=i for k in range(100): fn() Add, up the top: try: range = xrange except NameError: pass

[issue27391] server_hostname should only be required when checking host names

2016-06-29 Thread R. David Murray
R. David Murray added the comment: Sorry, I've been having trouble communicating on this ticket. I thought I'd posetd an apology but I don't see it...I wonder where I did post it? Bad morning :(. Anyway, create_connection was what I was asking for. Reading the docs, I, at least, agree with

[issue27415] BaseEventLoop.create_server does not accept port=None

2016-06-29 Thread Marcus Cobden
New submission from Marcus Cobden: With the most recent 3.4 bugfix, calling create_server with port=None stopped working. This also affects 3.5, and I would imagine also 3.6, but haven't checked that. Test case: import asyncio; l = asyncio.get_event_loop();

[issue26686] email.parser stops parsing headers too soon when given a defective message.

2016-06-29 Thread ppperry
Changes by ppperry : -- title: email.parser stops parsing headers too soon. -> email.parser stops parsing headers too soon when given a defective message. ___ Python tracker

[issue27363] Complex with negative zero imaginary part

2016-06-29 Thread R. David Murray
R. David Murray added the comment: Ah, I haven't used Fractions and Decimal much, so I hadn't noticed. Those postdate complex, I think, but do follow the model Mark is suggesting. Seems like it would be reasonble to make complex do the same...the concern of course is backward compatibilty.

[issue27391] server_hostname should only be required when checking host names

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: Consider this a suggestion. Do with it what you will. I'm closing this as I don't want to spend more time on it other than creating a PR if requested. -- status: open -> closed ___ Python tracker

Re: ANN: Bokeh 0.12 Released

2016-06-29 Thread Bryan Van de Ven
Apologies, I neglected to include a project description: """ Bokeh is a Python interactive visualization library that targets modern web browsers for presentation. Its goal is to provide elegant, concise construction of versatile graphics with high-performance interactivity over very large or

[issue27412] float('∞') returns 8.0

2016-06-29 Thread David Howlett
David Howlett added the comment: I am sorry about misattributing this bug and wasting your time. I have opened two new bugs against Komodo: https://github.com/Komodo/KomodoEdit/issues/1760 https://github.com/Komodo/KomodoEdit/issues/1759 They are looking into it. --

[issue27391] server_hostname should only be required when checking host names

2016-06-29 Thread Jim Fulton
Jim Fulton added the comment: I'm not sure I understand your question. The documentation for create_connection, https://docs.python.org/3/library/asyncio-eventloop.html#creating-connections states that server_hostname is required if the host is empty. (I'm generalizing "empty" to include

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread R. David Murray
R. David Murray added the comment: Sorry once again for the infelicitous phrasing. I meant to say "sorry, what I was unclearly asking for was what you were calling that..." Too bad I don't drink coffee or I could blame it on not having had any yet today... --

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread R. David Murray
R. David Murray added the comment: For reference, the changeset that introduced that was ee34cb049a10. An interesting feature of that changset is the trace command in the test...I guess the wrong patch was comitted and no one noticed. The trace was obvious fixed but no one appears to have

[issue27363] Complex with negative zero imaginary part

2016-06-29 Thread Vedran Čačić
Vedran Čačić added the comment: ...but hopefully not the last. People are playing (with BDFL's blessing) with the idea of types having just (qual)name as str. By "first stdlib case" you mean "first builtin case", right? fractions.Fraction and decimal.Decimal are in stdlib. :-) Yes, not all

[issue27391] server_hostname should only be required when checking host names

2016-06-29 Thread R. David Murray
R. David Murray added the comment: You still haven't told me what you are passing the context to that objects to not having server_hostname. I suppose the asyncio experts would know immediately, so I should probably just leave it to them...or wait for your PR. --

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +ezio.melotti, pitrou, rhettinger ___ Python tracker ___

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-06-29 Thread R. David Murray
R. David Murray added the comment: Maybe name it --no-insure-ascii? Or --insure-ascii=no/yes. (or true/false). -- nosy: +r.david.murray ___ Python tracker

  1   2   >