Re: Asynchronous programming

2016-08-10 Thread Paul Rudin
Steven D'Aprano writes: > > Is there a good beginner's tutorial introducing the basics of asynchronous > programming? Starting with, why and where would you use it? You could do worse than watch Dave Beazley's pycon talk: https://www.youtube.com/watch?v=lYe8W04ERnY

Generate reports in Python

2016-08-10 Thread Ernest Bonat, Ph.D.
Hi, I'm looking for best modules/practices to generate reports (HTML, PDF, etc) in Python. Good ideas are very appreciated. Thanks Ernest Bonat, Ph.D. Senior Software Engineer Senior Data Scientist -- https://mail.python.org/mailman/listinfo/python-list

Re: Asynchronous programming

2016-08-10 Thread Chris Angelico
On Thu, Aug 11, 2016 at 3:06 PM, Paul Rubin wrote: > The basic reason to do it is it lets you serve a lot of concurrent i/o > channels (network connections, say) without using threads. If you want > to read a packet, you launch a non-blocking read that returns >

Re: Asynchronous programming

2016-08-10 Thread Paul Rubin
Steven D'Aprano writes: > Is there a good beginner's tutorial introducing the basics of asynchronous > programming? Starting with, why and where would you use it? You might look at some node.js tutorials since there are about a gazillion of them and some of them must

[issue27734] Memory leaks at Python35-32

2016-08-10 Thread Филипп Пономарев
Changes by Филипп Пономарев : -- components: +Windows -2to3 (2.x to 3.x conversion tool) nosy: +paul.moore, steve.dower, tim.golden, zach.ware -Филипп Пономарев type: -> resource usage ___ Python tracker

[issue27734] Memory leaks at Python35-32

2016-08-10 Thread Филипп Пономарев
Changes by Филипп Пономарев : -- components: 2to3 (2.x to 3.x conversion tool) nosy: Филипп Пономарев priority: normal severity: normal status: open title: Memory leaks at Python35-32 versions: Python 3.5 ___ Python tracker

Send Msg To Specific Tcp Client from Tcp Server Python

2016-08-10 Thread Anil reddy reddy M
I was written a simple tcp server in python, which is nicely communicating with multiple tcp clients. My Tcp Server can accept multiple clients at time, each client as a new thread. I want send message to specific tcp client after some time. I can client Address from connction, addr =

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-10 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___

Re: Asynchronous programming

2016-08-10 Thread Chris Angelico
On Thu, Aug 11, 2016 at 1:53 PM, Steven D'Aprano wrote: > How is this the same as, or different from, event-based programming? I'm > familiar with programming in an event-based language where the interpreter > itself provides an event loop and dispatches messages to

Re: Asynchronous programming

2016-08-10 Thread Terry Reedy
On 8/10/2016 11:53 PM, Steven D'Aprano wrote: The latest versions of Python are introducing new keywords for asynchronous programming, async and await. See PEP 492: https://www.python.org/dev/peps/pep-0492/ Is there a good beginner's tutorial introducing the basics of asynchronous programming?

[issue27732] IDLE tests should be quiet

2016-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: > @support.requires_resource('audio')? The point is that the noise is extraneous and should be optional. I want the tests to run (quietly) when I run them with unittest (which is most of the time) and anytime -ugui is true (too few of the buildbots). It was

Asynchronous programming

2016-08-10 Thread Steven D'Aprano
The latest versions of Python are introducing new keywords for asynchronous programming, async and await. See PEP 492: https://www.python.org/dev/peps/pep-0492/ Is there a good beginner's tutorial introducing the basics of asynchronous programming? Starting with, why and where would you use it?

Re: Vectorized functions

2016-08-10 Thread Paul Rubin
Steven D'Aprano writes: > Is there any other functionality which would make this more useful? Cute, but map or listcomps work ok. Here's the Haskell equivalent to your example, fwiw, using the <$> operator from the Control.Applicative module: (+2) <$> [1,2,3] =>

[issue16764] Make zlib accept keyword-arguments

2016-08-10 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue27732] IDLE tests should be quiet

2016-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Bell-using files patched (module and test) autoexpand, parenmatch, replace, search, undo Bell-using files not patched (no test yet) debugger, editor, grep, history, pyshell, scrolled_list, zoomheight A second bonus is that the dummy bell function, instead of

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-08-10 Thread Martin Panter
Martin Panter added the comment: Any news on the remaining failures for year 2037? What about the buildbots that time out? Can the size of the tests be reduced, or perhaps should the buildbots be updated to extend the timeout? -- ___ Python tracker

Vectorized functions

2016-08-10 Thread Steven D'Aprano
Its sometimes very useful to apply a function to each element of a list in turn. One common term for that is "vectorized function". Julia has a convenient syntactic shortcut for this: http://julia.readthedocs.io/en/latest/manual/functions/#dot-syntax-for-vectorizing-functions func(arg)

[issue27733] Test that self.bell is called in IDLE classes when intended.

2016-08-10 Thread Terry J. Reedy
New submission from Terry J. Reedy: Spinoff of #27732, which changed 5 tested bell-using classes to consistently call 'self.bell()' (instead of self.text.bell or whatever) so tests for such classes could replace the function with a quiet function. For 4 of the classes, the replacement is

[issue27733] Test that self.bell is called in IDLE classes when intended.

2016-08-10 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- components: +Tests ___ Python tracker ___ ___

[issue27732] IDLE tests should be quiet

2016-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2eb84fe85889 by Terry Jan Reedy in branch 'default': Issue #27732: Silence test_idle with dummy bell functions. https://hg.python.org/cpython/rev/2eb84fe85889 -- nosy: +python-dev ___ Python tracker

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Martin Panter
Changes by Martin Panter : -- assignee: orsenthil -> martin.panter ___ Python tracker ___

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Martin Panter
Martin Panter added the comment: Some of the header field validation was included in Demian’s first patch, raising HTTPEncodingError. But I don’t know why he included it. Maybe it was more appropriate then; it looks like that patch took a different approach than the current

Re: ctypes And The WACAH Principle

2016-08-10 Thread eryk sun
On Wed, Aug 10, 2016 at 10:26 PM, Lawrence D’Oliveiro wrote: > But it has to copy the bytes into an array.array object, then decode that. Is > there a way it > could access the bytes memory directly? ctypes cast, string_at, wstring_at, memmove, and memset are implemented

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Martin Panter
Martin Panter added the comment: _is_textIO(): I’m sorry but I still prefer the TextIOBase check over read(0). Each option has a disadvantage, but with TextIOBase, the disadvantage only affects text files, not byte files. Maybe another option is to stick with the current checking of the

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-08-10 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing

Re: Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Steven D'Aprano
On Thu, 11 Aug 2016 06:57 am, Cai Gengyang wrote: > Yea, using IDLE on OSX, Python 3.4.3. > > Yeah it works now ... I had to increase the font size and the indentation > width. When that happened , it could define miles_driven You were always defining "miles_driven", it is just that the display

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-10 Thread Evelyn Mitchell
Evelyn Mitchell added the comment: I had to look up what engineering notation meant, so I added detail to the docstring. -- nosy: +Evelyn Mitchell stage: -> patch review Added file: http://bugs.python.org/file44072/patch27720 ___ Python tracker

[issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial

2016-08-10 Thread Ben Hoyt
Ben Hoyt added the comment: Okay, patch attached -- I think it's best to simply remove that sentence. Side note: this is why GitHub is so good -- click edit, remove the sentence, click create pull request (approx time 30 seconds). I've got a new machine since I last did Python development, so

Re: Python slang

2016-08-10 Thread Lawrence D’Oliveiro
On Thursday, August 11, 2016 at 7:18:28 AM UTC+12, Marko Rauhamaa wrote: > Oh, there's of course COBOL: > >ADD X TO Y GIVING RESULT I think COBOL has the same usage of “=” as BASIC, as assignment or equality comparison, depending on context. --

Re: ctypes And The WACAH Principle

2016-08-10 Thread Lawrence D’Oliveiro
On Thursday, August 11, 2016 at 10:31:36 AM UTC+12, Gregory Ewing wrote: > > Lawrence D’Oliveiro wrote: > >>>It will let you create non-leaky wrappers ... >> >> Why would I want to do that? > > You mentioned that ctypes wrappers are leaky, which I > assumed was meant as a criticism. WACAH! --

[issue27732] IDLE tests should be quiet

2016-08-10 Thread Zachary Ware
Zachary Ware added the comment: You could guard the noisy tests with "@support.requires_resource('audio')" (however that is actually spelled :)). -- nosy: +zach.ware ___ Python tracker

[issue27732] IDLE tests should be quiet

2016-08-10 Thread Terry J. Reedy
New submission from Terry J. Reedy: IDLE uses tkinter.widget.bell() in various places to signal an exceptional situation. Examples include 'Find' when the target cannot be found and 'Expand word' when there is no expansion (or are no more expansions. [The tk manual page is

[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread R. David Murray
R. David Murray added the comment: Yes, this is one of those cases where the benefit of the change is probably outweighed by the cost. -- ___ Python tracker

Re: Python slang

2016-08-10 Thread Michael Torrie
On 08/10/2016 05:57 PM, Michael Torrie wrote: > On 08/10/2016 10:19 AM, Random832 wrote: >> On Wed, Aug 10, 2016, at 07:59, Dennis Lee Bieber wrote: >>> The use of = also has a long history... FORTRAN (where the comparison >>> was .EQ.), BASIC (granted, K required assignment to start with the

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Michael Torrie
On 08/10/2016 11:29 AM, Michael Selik wrote: > On Tue, Aug 9, 2016 at 9:31 PM Steven D'Aprano > wrote: > >> >> http://steve-yegge.blogspot.com.au/2008/05/dynamic-languages-strike-back.html > > > Great link. I enjoyed the video, too. >

Re: Python slang

2016-08-10 Thread Michael Torrie
On 08/10/2016 10:19 AM, Random832 wrote: > On Wed, Aug 10, 2016, at 07:59, Dennis Lee Bieber wrote: >> The use of = also has a long history... FORTRAN (where the comparison >> was .EQ.), BASIC (granted, K required assignment to start with the >> keyword LET, so the use of = was mainly a

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: The issue with test_textview in 3.x is that tearDownModule deleted a module attribute, 'TV', that was not created in setUpModule. For 2.7, 'TV' is a class attribute that is created in setUpClass and deleted in tearDownClass, so it does not have the same

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0de509a79181 by Terry Jan Reedy in branch '2.7': Issue #27714: For IDLE's test_textview, backport 3.x subclass with mocks https://hg.python.org/cpython/rev/0de509a79181 -- ___ Python tracker

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Michael Selik
On Wed, Aug 10, 2016, 6:44 PM Juan Pablo Romero Méndez < jpablo.rom...@gmail.com> wrote: > As to why I asked that, there are several reasons: I have a very concrete > need right now to find pragmatic ways to increase code quality, reduce > number of defects, etc. in a Python code base. But also I

[issue27731] Opt-out of MAX_PATH on Windows 10

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

[issue27730] Update shutil to work with max file path length on Windows

2016-08-10 Thread Steve Dower
Steve Dower added the comment: Issue #27731 will resolve this for the latest versions of Windows 10, but if we want to support this for earlier versions of Windows here's the algorithm I'd suggest: * if len(path) < 260 - we're good, don't do anything * get the last '\' or '/' character before

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Gregory Ewing
Dennis Lee Bieber wrote: Stray gamma rays flipping bits in memory (though a bit harder to do, considering the firmware was in some hard-wired mess of core, I think the RAM was core too, so pretty much immune to gamma rays as well (at least at any intensity that wouldn't instantly kill the

[issue27731] Opt-out of MAX_PATH on Windows 10

2016-08-10 Thread Steve Dower
New submission from Steve Dower: According to https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx we can opt-out of MAX_PATH limitations on a selection of functions on the latest version of Windows 10. This will allow unprefixed paths (i.e. no "\\?\") to exceed

[issue27729] Provide a better error message when the file path is too long on Windows

2016-08-10 Thread Steve Dower
Steve Dower added the comment: See https://github.com/pypa/pip/issues/3055 for an example of this error. (Also note that there is a path limit of ~32k with the prefix, and that using it also disables a lot of standard path resolution algorithms, so simply adding it everywhere does not fix

[issue27730] Update shutil to work with max file path length on Windows

2016-08-10 Thread Brett Cannon
New submission from Brett Cannon: It would be nice to have a place in the stdlib that can work with long file names on Windows no matter what. shutils seems like a possibly reasonable place. -- components: Windows messages: 272384 nosy: brett.cannon, paul.moore, steve.dower,

[issue27729] Provide a better error message when the file path is too long on Windows

2016-08-10 Thread Brett Cannon
New submission from Brett Cannon: Windows has a max path length when the path doesn't start with r'\\?\'. When you hit that limit you get a FileNotFoundError but no explanation that it was because of some file path length. It would be nice to clarify this case in the exception message

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

2016-08-10 Thread Martin Panter
Martin Panter added the comment: Thanks David. Since I am more intersted in fixing this robustly for HTTP and similar protocols, I might focus on just Issue 24363. Either confine my changes to the existing HTTP (or new) policy and start using that, or just address this from the HTTP package.

Re: Make sure you removed all debugging print statements error

2016-08-10 Thread Chris Angelico
On Thu, Aug 11, 2016 at 8:48 AM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> I suppose you could put down Kelvin as a last name and either Baron or >> Lord as a first name, but that'd just be cheating... > > > Or put NULL as the first name and have fun watching

Re: Python slang

2016-08-10 Thread Ian Kelly
On Aug 10, 2016 4:36 PM, "Lawrence D’Oliveiro" wrote: On Thursday, August 11, 2016 at 5:35:03 AM UTC+12, Rustom Mody wrote: > On Wednesday, August 10, 2016 at 9:31:40 PM UTC+5:30, Anders J. Munch wrote: > Python’s inspiration and origin is ABC > Whose assignment looked

Re: Make sure you removed all debugging print statements error

2016-08-10 Thread Gregory Ewing
Chris Angelico wrote: I suppose you could put down Kelvin as a last name and either Baron or Lord as a first name, but that'd just be cheating... Or put NULL as the first name and have fun watching the database break. http://www.wired.com/2015/11/null/ Or perhaps even profit:

Re: ctypes And The WACAH Principle

2016-08-10 Thread Chris Angelico
On Thu, Aug 11, 2016 at 8:31 AM, Gregory Ewing wrote: > Lawrence D’Oliveiro wrote: > >>> It will let you create non-leaky wrappers ... >> >> >> Why would I want to do that? > > > You mentioned that ctypes wrappers are leaky, which I > assumed was meant as a criticism.

[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Martin Panter
Martin Panter added the comment: If the code does happen to mutate the dictionary, there would still be a bug with modifying any dictionary passed in by the caller. But I suspect there is no bug. So I am not sure the change is worth it. If we do go ahead, the documentation needs updating to

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
I've made my motives to start this conversation very clear: """ Determine if there is a style of writing code in a dynamic language that minimizes the occurrence of runtime errors AND avoids two things: 1) using runtime checks all over the place (either ad hoc or using tools like Valideer) 2)

Re: How do I make a video animation with transparent background?

2016-08-10 Thread Lawrence D’Oliveiro
On Thursday, August 11, 2016 at 9:34:33 AM UTC+12, Martin Schöön wrote: > Next on my TODO list is to look into the color composition idea. I > have already looked this tutorial: > https://youtu.be/sZzmksnzrX0 If the images you generate have an alpha channel, Blender can composite them directly,

Re: ctypes And The WACAH Principle

2016-08-10 Thread Gregory Ewing
Lawrence D’Oliveiro wrote: It will let you create non-leaky wrappers ... Why would I want to do that? You mentioned that ctypes wrappers are leaky, which I assumed was meant as a criticism. But if you *like* your wrappers to be leaky, by all means go for it. :-) -- Greg --

Re: cmd prompt does not recognizes python command on Windows 7

2016-08-10 Thread Lawrence D’Oliveiro
On Wednesday, August 10, 2016 at 4:47:33 PM UTC+12, sh.a...@gmail.com wrote: > i have installed python 3.5 , but the python command is not recognized Windows does not make it easy to install things, does it... -- https://mail.python.org/mailman/listinfo/python-list

Re: Python slang

2016-08-10 Thread Lawrence D’Oliveiro
On Thursday, August 11, 2016 at 4:01:40 AM UTC+12, Anders J. Munch wrote: > Lawrence D’Oliveiro: >> >>> [...] as much like C++ as possible. >> >> Nevertheless, Python copied the C misfeature [...] > > You segued a little too easily from C++ to C. Because C++ copied that same C misfeature. --

Re: Python slang

2016-08-10 Thread Lawrence D’Oliveiro
On Thursday, August 11, 2016 at 5:35:03 AM UTC+12, Rustom Mody wrote: > On Wednesday, August 10, 2016 at 9:31:40 PM UTC+5:30, Anders J. Munch wrote: > Python’s inspiration and origin is ABC > Whose assignment looked like > PUT expr INTO var HyperTalk did that in 1987. Is that where GvR got the

Re: ctypes And The WACAH Principle

2016-08-10 Thread Lawrence D’Oliveiro
On Wednesday, August 10, 2016 at 10:13:53 PM UTC+12, eryk sun wrote: > ctypes classes have from_buffer and from_buffer_copy methods that use > the buffer protocol. For example, for a read-only buffer you can use > from_buffer_copy: > > >>> b = bytes(b'1234') > >>> a = (ctypes.c_char *

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree. The issue may come up with other tests in the future. I just decided to do the part I knew how to do first ;-). For #18409, I added the mac call to Phil's original patch with the vague comment "now needed to run without raising". But it is not

Re: How do I make a video animation with transparent background?

2016-08-10 Thread Martin Schöön
Den 2016-08-10 skrev Christian Gollwitzer : > Am 09.08.16 um 14:44 schrieb Martin Schöön: >> Using this example: >> http://matplotlib.org/examples/animation/moviewriter.html >> and this tutorial: >> https://www.youtube.com/watch?v=h0F5X4b7jug >> I have covered a lot of ground. >>

Re: Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Ethan Furman
On 08/10/2016 01:57 PM, Cai Gengyang wrote: Yea, using IDLE on OSX, Python 3.4.3. Yeah it works now ... I had to increase the font size and the indentation width. When that happened , it could define miles_driven I suspect you were defining it before, you just couldn't see the underscore.

Re: Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Cai Gengyang
Yea, using IDLE on OSX, Python 3.4.3. Yeah it works now ... I had to increase the font size and the indentation width. When that happened , it could define miles_driven On Thursday, August 11, 2016 at 2:09:11 AM UTC+8, Zachary Ware wrote: > On Wed, Aug 10, 2016 at 12:39 PM, Cai Gengyang

Re: cross-platform logging.config: how to set cross platform log (handlers) file location?

2016-08-10 Thread Berteh BE
Thanks Peter for the insights that args are passed to eval(). Thanks Steven for the suggestion that ´~/' may actually work in windows. Combining both I'm now successfully using the following in my logging.conf configuration file, that works in both *nix and Windows: [handler_file]

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc31fa499359 by Terry Jan Reedy in branch '3.5': Issue #27714: text_textview now passes when re-run in the same process https://hg.python.org/cpython/rev/dc31fa499359 -- ___ Python tracker

Re: Python slang

2016-08-10 Thread Chris Angelico
On Thu, Aug 11, 2016 at 5:18 AM, Marko Rauhamaa wrote: > Rustom Mody : > >> On Wednesday, August 10, 2016 at 9:31:40 PM UTC+5:30, Anders J. Munch wrote: >> Python’s inspiration and origin is ABC >> Whose assignment looked like >> PUT expr INTO var >> >>

[issue12345] Add math.tau

2016-08-10 Thread Evelyn Mitchell
Evelyn Mitchell added the comment: I also agree with Raymond's arguments. Adding tau doesn't add clarity to the math module, it just adds complexity. -- nosy: +Evelyn Mitchell ___ Python tracker

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Michael Selik
On Wed, Aug 10, 2016, 4:34 PM Juan Pablo Romero Méndez < jpablo.rom...@gmail.com> wrote: > > I've been trying to find (without success so far) an example of a situation > where the dynamic features of a language like Python provides a clear > advantage over languages with more than one type. >

[issue12345] Add math.tau

2016-08-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed with Raymond's arguments. -- ___ Python tracker ___ ___

[issue12345] Add math.tau

2016-08-10 Thread Guido van Rossum
Guido van Rossum added the comment: Noted, but it doesn't change my decision. Obscure fact: did you know there are also branches of mathematics and engineering that define pi to for something else? -- ___ Python tracker

[issue12345] Add math.tau

2016-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: +1 to Raymond. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Juan Pablo Romero Méndez
2016-08-09 18:28 GMT-07:00 Steven D'Aprano : > On Wed, 10 Aug 2016 04:29 am, Juan Pablo Romero Méndez wrote: > > > Hello, > > > > In online forums sometimes people complain that they end up having to > test > > constantly for None, > > Then don't return None to

[issue12345] Add math.tau

2016-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Perhaps minds are already made up, but this may be the last chance to say that I think that this shouldn't go forward. * The push to use of "tau" has the flavor a political fad or wishful thinking that may or may not succeed. The math module should only

[issue27502] Python -m Module Vulnerable to Buffer Over Flow.

2016-08-10 Thread R. David Murray
R. David Murray added the comment: A python traceback is not in and of itself a security issue. Based on your program name, I am guessing you are trying to "break" python. That's fine, but if you want us to take action on a bug report like this you are going to have to do more work in

[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- stage: -> patch review ___ Python tracker ___ ___

[issue27502] Python -m Module Vulnerable to Buffer Over Flow.

2016-08-10 Thread Dhiraj
Dhiraj added the comment: Sorry , for replying to late , But yes if the script is run , again and again the application throws the python error and the Server gets crashed. I request to have a look on it. -- ___ Python tracker

[issue17153] tarfile extract fails when Unicode in pathname

2016-08-10 Thread Vinay Sajip
Vinay Sajip added the comment: Could you point to some suitable projects from GitHub whose tarballs fail on 3.5 / 3.6? My script in the first post, with the replacing of "unicode(...)" with "str(...)" and my original failing archive, works on Python 3.5 and 3.6 on Linux. Which platform have

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Ned Deily
Ned Deily added the comment: Terry, b10a312f6d00 appears to fix most of the issue, that is, if I insert a deliberate failure into another IDLE test and use -w without -j, the four repeatable errors I identified above no longer occur. Thanks. However, the fifth, timing-dependent error still

[issue27286] str object got multiple values for keyword argument

2016-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Bytecode generated by 3.5.1 is not correct (wrong error message can be not the only effect). The only way to resolve this issue is regenerating the bytecode. 3.5.2 was released two weeks after committing this patch. I expected it includes this change.

[issue27380] IDLE: add base Query dialog with ttk widgets

2016-08-10 Thread Ned Deily
Ned Deily added the comment: With 8f37d772f71f, the test no longer fails. Thanks! -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue27584] New addition of vSockets to the python socket module

2016-08-10 Thread R. David Murray
R. David Murray added the comment: Ah, I see. No, the versionadded will be 3.6, and should go *after* the documentation of the new socket type. The existing socket tests are in Lib/test/test_socket.py. -- ___ Python tracker

[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-10 Thread Ned Deily
Ned Deily added the comment: It seems that there are a bunch of different ctags and ctags-like programs out there. I don't use ctags myself (nor the "make tags" build step) and I don't know how other programs use the tags file it produces so I don't really have an opinion one way or the

Re: Python slang

2016-08-10 Thread Marko Rauhamaa
Rustom Mody : > On Wednesday, August 10, 2016 at 9:31:40 PM UTC+5:30, Anders J. Munch wrote: > Python’s inspiration and origin is ABC > Whose assignment looked like > PUT expr INTO var > > This has the salutary effect > - Of being l-to-r (the only other such case I know is

Re: cmd prompt does not recognizes python command on Windows 7

2016-08-10 Thread eryk sun
On Wed, Aug 10, 2016 at 2:03 PM, Random832 wrote: > On Wed, Aug 10, 2016, at 06:34, eryk sun wrote: >> On Wed, Aug 10, 2016 at 4:46 AM, wrote: >> > >> > i have installed python 3.5 , but the python command is not recognized >> > >> >

[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Thanks R.David.Murray, @SilentGhost in fact, in this code, it's not an issue but we use a bad practice and not a good practice with a mutable value. -- ___ Python tracker

[issue27584] New addition of vSockets to the python socket module

2016-08-10 Thread Cathy Avery
Cathy Avery added the comment: Sure I can add tests. I would like to base them on the existing socket tests. Where are those? I did add a version + .. versionadded:: 3.4 It just not may not be the right one. -- ___ Python tracker

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset b10a312f6d00 by Terry Jan Reedy in branch 'default': Issue #27714: text_textview now passes when re-run in the same process https://hg.python.org/cpython/rev/b10a312f6d00 -- nosy: +python-dev ___ Python

[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: For test_textview, I triggered the symptom -- 4 'TV' NameErrors on re-run, by (temporarily) adding 1/0 to tearDownModule and running with -w. After removing the TV deletion, only the ZeroDivisionError remained. This experiment also resulted in a '''can't

[issue27286] str object got multiple values for keyword argument

2016-08-10 Thread John Ehresman
John Ehresman added the comment: Should the bytecode magic number be bumped in the 3.5 branch? This breaks .pyc / .pyo binary compatibility for python 3.5. As far as I can tell this has never been done before in a release after the major.minor.0 final release. This patch has made its way

Re: cross-platform logging.config: how to set cross platform log (handlers) file location?

2016-08-10 Thread bertrand . courts . circuits
Thanks Peter for the insights that args are passed to eval(). Thanks Steven for the suggestion that ´~/' may actually work in windows. Combining both I'm now successfully using the following in my logging.conf configuration file, that works in both *nix and Windows: [handler_file]

Re: cmd prompt does not recognizes python command on Windows 7

2016-08-10 Thread eryk sun
On Wed, Aug 10, 2016 at 1:46 PM, BartC wrote: > On 10/08/2016 11:34, eryk sun wrote: >> >> On Wed, Aug 10, 2016 at 4:46 AM, wrote: >>> >>> i have installed python 3.5 , but the python command is not recognized >>> >>> C:\Users\sharmaaj>python >>> 'python'

[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread R. David Murray
R. David Murray added the comment: Well, it's a problem in general because if the called routine modifies the default dict...the default is modified. I'm guessing it is never modified, but it is indeed better future proofing of the code to not use a mutable default in a routine that passes

[issue27584] New addition of vSockets to the python socket module

2016-08-10 Thread R. David Murray
R. David Murray added the comment: Looks like there's a missing versionadded directive in the doc patch. Is it possible/sensible to add tests for the new feature? (I haven't reviewed the patch in detail, hopefully someone with more experience with C socket programming than I have will do

[issue16764] Make zlib accept keyword-arguments

2016-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyArg_ParseTupleAndKeywords() and Argument Clinic now support positional-only arguments. Thus this my objection can be resolved. But performance argument still needs an investigation. In any case the patch needs updating, since the zlib module was rewritten

[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread SilentGhost
SilentGhost added the comment: Why is that an issue? -- nosy: +SilentGhost ___ Python tracker ___ ___

Re: Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Zachary Ware
On Wed, Aug 10, 2016 at 12:39 PM, Cai Gengyang wrote: > I managed to get this piece of code to work : > print("This program calculates mpg.") > This program calculates mpg. milesdriven = input("Enter miles driven:") > Enter miles driven: 50 milesdriven =

Re: Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Michael Selik
On Wed, Aug 10, 2016 at 1:41 PM Cai Gengyang wrote: > I managed to get this piece of code to work : > > >>> print("This program calculates mpg.") > This program calculates mpg. > >>> milesdriven = input("Enter miles driven:") > Enter miles driven: 50 > >>> milesdriven =

[issue27200] make doctest in CPython has failures

2016-08-10 Thread Zachary Ware
Zachary Ware added the comment: Thanks for creating all the patches! If you create further issues for this, feel free to make me nosy. -- ___ Python tracker

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: When I have read the last patch, I have seen a mutable as the default value of the HTTPConnection.request method. I have proposed this issue and the attached patch http://bugs.python.org/issue27728 -- nosy: +matrixise

[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Stéphane Wirtel
New submission from Stéphane Wirtel: http.client.HTTPConnection.request, the argument 'headers' has a default value, and this one is a mutable (dict). -- messages: 272352 nosy: matrixise priority: normal severity: normal status: open title: HTTPConnection.requests has a mutable as

  1   2   >