[issue27525] Wrong OS header on file created by gzip module

2016-07-16 Thread Dor Dankner
Dor Dankner added the comment: I'm convinced. Thank you all for your comments :) -- status: open -> closed ___ Python tracker ___

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2016-07-16 Thread Vedran Čačić
Changes by Vedran Čačić : -- type: performance -> behavior ___ Python tracker ___ ___

[issue27535] Memory leaks when opening tons of files

2016-07-16 Thread Александр Карпинский
Александр Карпинский added the comment: @serhiy.storchaka Any filters not solves the problem because warnings module SAVES EVERY WARNING MESSAGE for further duplication checks. Yes, the file name is helpful for determining the source of the POSSIBLE leak. While file name in error message IS

[issue27535] Memory leaks when opening tons of files

2016-07-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The file name is helpful for determining the source of the leak. If you don't want to close files in your script, set an appropriate warning filter to silence this kind of warnings. -- nosy: +serhiy.storchaka ___

[issue27525] Wrong OS header on file created by gzip module

2016-07-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This byte identifies the type of file system. How can you determine it? Note that different filesystems can be used on the same OS. FAT still widely used on Windows (and what about exFAT, should it be considered as a flavour of FAT or separate type?),

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Tim Chase
On 2016-07-17 08:19, Chris Angelico wrote: > Why do you need a linked list? That's an implementation detail; why > not simply use a regular list? > > Not trolling, genuinely asking. Is there something that you > specifically need those exact structures for? I know there have been times I want

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Steven D'Aprano
On Sun, 17 Jul 2016 08:14 am, shrey.de...@gmail.com wrote: > I have found it slightly frustrating that Python does not have built-in > support for advanced data structures (Linked Lists, Stacks/Queues, BST) in > its distribution. They are hardly "advanced" data structures. They are trivial data

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Chris Angelico
On Sun, Jul 17, 2016 at 1:43 PM, Rustom Mody wrote: > Heh! A flurry of opinions! > No time right now… other than to say thank you (MRAB) for this little gem: > > On Saturday, July 16, 2016 at 10:29:02 PM UTC+5:30, MRAB wrote: >> On 2016-07-16 17:27, Steven D'Aprano wrote:

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Chris Angelico
On Sun, Jul 17, 2016 at 1:27 PM, wrote: >> Right, but how did you *get* that deep into the list? By following a >> chain of pointers. That's a relatively costly operation, so the >> benefit of not having to move all the following elements is damaged >> some by the cost of

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread cs
On 17Jul2016 12:43, Chris Angelico wrote: On Sun, Jul 17, 2016 at 12:33 PM, Paul Rubin wrote: Chris Angelico writes: keep a reference to an element deep in the list, and insert a new element in O(1) time at that point. at the C

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Rustom Mody
Heh! A flurry of opinions! No time right now… other than to say thank you (MRAB) for this little gem: On Saturday, July 16, 2016 at 10:29:02 PM UTC+5:30, MRAB wrote: > On 2016-07-16 17:27, Steven D'Aprano wrote: > > On Sat, 16 Jul 2016 10:33 pm, Rustom Mody wrote: > [snip] > > > And yes, Rustom,

[issue27536] Convert readme to reStructuredText

2016-07-16 Thread Louis Taylor
Changes by Louis Taylor : -- title: Convert readme to markdown -> Convert readme to reStructuredText ___ Python tracker ___

[issue27536] Convert readme to markdown

2016-07-16 Thread Louis Taylor
Louis Taylor added the comment: Oh, that's a very good point. Patch updated. -- Added file: http://bugs.python.org/file43764/readme-to-rst.patch ___ Python tracker

[issue27536] Convert readme to markdown

2016-07-16 Thread Ned Deily
Changes by Ned Deily : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list

[issue27536] Convert readme to markdown

2016-07-16 Thread Ned Deily
Ned Deily added the comment: Thanks for the patch. If we do want to use a markup language for the README, we would want to use reStructuredText, the standard markup language for CPython, rather than Markdown, which we currently don't use at all. Github supports both, doesn't it? And, for

Re: Passing File Descriptors To Subprocesses

2016-07-16 Thread eryk sun
On Sun, Jul 17, 2016 at 1:59 AM, Lawrence D’Oliveiro wrote: > The various subprocess functions > have > arguments called “close_fds” and “pass_fds”, which specify which file > descriptors are to be > left open in the

[issue27536] Convert readme to markdown

2016-07-16 Thread Louis Taylor
New submission from Louis Taylor: Since the move to github is happening, the readme should probably be changed to markdown in order to render nicer on the github web interface. Issue 27476 introduced a .github folder, so it seems that preemptive changes for the migration are okay. --

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread MRAB
On 2016-07-17 03:33, Paul Rubin wrote: Chris Angelico writes: keep a reference to an element deep in the list, and insert a new element in O(1) time at that point. at the C level, wouldn't tracing the links cost massively more than the occasional insertion too? I'm not sure

[issue27507] bytearray.extend lacks overflow check when increasing buffer

2016-07-16 Thread Decorater
Decorater added the comment: Only 1 way to find out, test it till it breaks. :P -- ___ Python tracker ___ ___

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Chris Angelico
On Sun, Jul 17, 2016 at 12:33 PM, Paul Rubin wrote: > Chris Angelico writes: >>> keep a reference to an element deep in the list, and insert a new >>> element in O(1) time at that point. >> at the C level, wouldn't tracing the links cost massively more

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Paul Rubin
Chris Angelico writes: >> keep a reference to an element deep in the list, and insert a new >> element in O(1) time at that point. > at the C level, wouldn't tracing the links cost massively more than > the occasional insertion too? I'm not sure O(1) is of value at any > size,

[issue27507] bytearray.extend lacks overflow check when increasing buffer

2016-07-16 Thread Martin Panter
Martin Panter added the comment: Yeah I see your point. Anyway I think the current patch is fine. -- ___ Python tracker ___

Passing File Descriptors To Subprocesses

2016-07-16 Thread Lawrence D’Oliveiro
A few years ago I wrote a tool to do comparisons between different versions of the Android API. Then one day, after a Python update (from the dates, it had to have been some version of 3.2), it stopped working. It took quite a while--over a year--until I

[issue27533] release GIL in nt._isdir

2016-07-16 Thread Steve Dower
Steve Dower added the comment: Maybe so. If you find a core developer who cares about performance in 2.7, maybe they'll merge it :) -- ___ Python tracker

[issue27535] Memory leaks when opening tons of files

2016-07-16 Thread Александр Карпинский
New submission from Александр Карпинский: Actually, this issue is related to the warning module. The test script creates a lot of files with different names and deletes them. On the first pass the scripts calls the `f.close()` method for every file. On the second it doesn't. As a result, on

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Chris Angelico
On Sun, Jul 17, 2016 at 10:54 AM, wrote: > Well, in a larger context you can keep a reference to an element deep in the > list, and insert a new element in O(1) time at that point. > I'd like to know how many elements your list needs before that actually becomes faster than

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread cs
On 16Jul2016 19:49, Dennis Lee Bieber wrote: On Sat, 16 Jul 2016 15:33:12 -0700 (PDT), Shrey Desai declaimed the following: - Education: the Linked List is a core data structure that CS undergraduates (among others) use and study, so it is vital

[issue27515] Dotted name re-import does not rebind after deletion

2016-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I understand the reluctance to generically encourage something that does not always arise. With Nick's promise to help examine any particular problems with deletion of tkinter modules, should they arise, I feel comfortable closing this. I already tested and

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2016-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am thinking about addin a test. -- status: closed -> pending ___ Python tracker ___

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread MRAB
On 2016-07-17 01:10, Terry Reedy wrote: On 7/16/2016 6:14 PM, shrey.de...@gmail.com wrote: I have found it slightly frustrating that Python does not have built-in support for advanced data structures (Linked Lists, You and I have different ideas of 'advanced data structures' ;-). To me,

[issue27533] release GIL in nt._isdir

2016-07-16 Thread Eryk Sun
Eryk Sun added the comment: OK. I thought fixing bugs in 2.7 was at the discretion of core developers, including small tweaks for performance -- just not enhancements with significant amounts of new code and features. -- ___ Python tracker

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2016-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: PS: the test suite run without error on my Win10, 32bit build. -- ___ Python tracker ___

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2016-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I decided to fix this issue for both 3.5 and 3.6 by deleting the submodules both from tkinter and sys.modules (as discussed in #27515). I used a new version of tkimports.py to check the result of user imports after the patch. When this file loaded into IDLE

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Terry Reedy
On 7/16/2016 6:14 PM, shrey.de...@gmail.com wrote: I have found it slightly frustrating that Python does not have built-in support for advanced data structures (Linked Lists, You and I have different ideas of 'advanced data structures' ;-). To me, linked list are limited structures used in

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread breamoreboy
On Saturday, July 16, 2016 at 11:15:04 PM UTC+1, Shrey Desai wrote: > I have found it slightly frustrating that Python does not have built-in > support for advanced data structures (Linked Lists, Stacks/Queues, BST) in > its distribution. Many computer science students, developers, and software

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Paul Rubin
shrey.de...@gmail.com writes: > As a computer science undergraduate student, I don't want to spend > time writing the module but instead I want to work with it, play > around with it, and do problems with it. For educational purposes, I think writing the module yourself is part of the idea.

[issue27533] release GIL in nt._isdir

2016-07-16 Thread Steve Dower
Steve Dower added the comment: No, it's not a security fix, so it doesn't go in 2.7. -- ___ Python tracker ___

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-16 Thread Steve Dower
Steve Dower added the comment: Attached my first pass at the shell extension. As this has the potential to crash Windows Explorer, I want to be _really_ thorough, so all reviews and feedback welcomed. -- keywords: +patch Added file: http://bugs.python.org/file43760/27469_1.patch

Re: math.frexp

2016-07-16 Thread Vlastimil Brom
2016-07-15 13:39 GMT+02:00 Steven D'Aprano : > I'm experimenting with various implementations of product(values). Here's a > naive version that easily suffers from overflow: > > from functools import reduce > from operator import mul > > def product_naive(values): > return

[issue27534] IDLE: Reduce number and time for user process imports

2016-07-16 Thread Terry J. Reedy
New submission from Terry J. Reedy: This issue continues #25507. I still want to reduce the number of modules imported when run.py starts a user process and the time they require. In the process, I expect to reduce the number of tkinter module imports that need to be reversed and thereby

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Chris Angelico
On Sun, Jul 17, 2016 at 8:33 AM, Shrey Desai wrote: > Hi Chris, thanks for the reply. There's a couple of reasons why I would need > a Linked List (and other data structures): > - Education: the Linked List is a core data structure that CS undergraduates > (among others)

[issue27533] release GIL in nt._isdir

2016-07-16 Thread Jeremy Spiegel
Changes by Jeremy Spiegel : Added file: http://bugs.python.org/file43758/_isdir.2.7.patch ___ Python tracker ___

[issue27533] release GIL in nt._isdir

2016-07-16 Thread Jeremy Spiegel
Changes by Jeremy Spiegel : Removed file: http://bugs.python.org/file43757/_isdir.2.7.patch ___ Python tracker ___

[issue27533] release GIL in nt._isdir

2016-07-16 Thread Jeremy Spiegel
Changes by Jeremy Spiegel : Added file: http://bugs.python.org/file43757/_isdir.2.7.patch ___ Python tracker ___

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Shrey Desai
On Saturday, July 16, 2016 at 3:19:56 PM UTC-7, Chris Angelico wrote: > On Sun, Jul 17, 2016 at 8:14 AM, wrote: > > I have found it slightly frustrating that Python does not have built-in > > support for advanced data structures (Linked Lists, Stacks/Queues, BST) in > >

[issue27533] release GIL in nt._isdir

2016-07-16 Thread Eryk Sun
Eryk Sun added the comment: Should this be backported to 2.7 posix__isdir()? -- nosy: +eryksun ___ Python tracker ___

Re: PEP Request: Advanced Data Structures

2016-07-16 Thread Chris Angelico
On Sun, Jul 17, 2016 at 8:14 AM, wrote: > I have found it slightly frustrating that Python does not have built-in > support for advanced data structures (Linked Lists, Stacks/Queues, BST) in > its distribution. Many computer science students, developers, and software >

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread R. David Murray
R. David Murray added the comment: Please read the referenced issue. Your points are addressed there. -- ___ Python tracker ___

Re: Clean Singleton Docstrings

2016-07-16 Thread Chris Angelico
On Sun, Jul 17, 2016 at 7:27 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> In that case, an 'Exact' non-integer will have appalling performance - >> fractions.Fraction doesn't really work all that nicely when the >> numbers start getting huge. > > In

[issue27533] release GIL in nt._isdir

2016-07-16 Thread Steve Dower
Steve Dower added the comment: LGTM. This is the kind of patch I can't wait to have a one-click merge button... right now it'll have to wait until I have a clean repo. But if anyone else wants to get it, go ahead. -- stage: -> patch review type: -> behavior versions: +Python 3.5,

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread James Lu
James Lu added the comment: I think you closed it too quickly. You see, computing the length of combinations() doesn't require looping all the way through the iterator; you can compute it quickly. I created a wrapper class just for this purpose. On Sat, Jul 16, 2016 at 5:24 PM, R. David Murray

PEP Request: Advanced Data Structures

2016-07-16 Thread shrey . desai
I have found it slightly frustrating that Python does not have built-in support for advanced data structures (Linked Lists, Stacks/Queues, BST) in its distribution. Many computer science students, developers, and software engineers rely on these data structures; having the data structures be a

[issue26974] Crash in Decimal.from_float

2016-07-16 Thread Stefan Krah
Stefan Krah added the comment: The approaches look good, but for clarity I want to replace all method calls that should never be overridden by the plain C functions of their corresponding static types. I have no opinion about the Python version. The diff also "fixes" #26975 for the C

Re: Clean Singleton Docstrings

2016-07-16 Thread Marko Rauhamaa
Chris Angelico : > In that case, an 'Exact' non-integer will have appalling performance - > fractions.Fraction doesn't really work all that nicely when the > numbers start getting huge. In Scheme, any math operation is allowed to drop exactness: If one of these procedures

[issue27533] release GIL in nt._isdir

2016-07-16 Thread R. David Murray
Changes by R. David Murray : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue22246] add strptime(s, '%s')

2016-07-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread R. David Murray
R. David Murray added the comment: If you read issue 24849, you will see that iterators having len was rejected by Guido long ago. -- nosy: +r.david.murray ___ Python tracker

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> resolved superseder: -> Add __len__ to map, everything in itertools ___ Python tracker

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread R. David Murray
Changes by R. David Murray : -- status: open -> closed ___ Python tracker ___ ___

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread James Lu
James Lu added the comment: same for itertools iterators - libraries such as tqdm would benefit from this On Sat, Jul 16, 2016 at 3:08 PM, James Lu wrote: > > New submission from James Lu: > > This would be useful for libraries like tqdm (progress bar module). > >

Re: Clean Singleton Docstrings

2016-07-16 Thread Chris Angelico
On Sun, Jul 17, 2016 at 4:04 AM, Random832 wrote: > On Sat, Jul 16, 2016, at 03:27, Chris Angelico wrote: >> Will an "Exact" non-integer be stored as Decimal or >> Fraction? How do you know? They have vastly different semantics, and >> you should be able to choose. > > Er,

[issue27533] release GIL in nt._isdir

2016-07-16 Thread Jeremy Spiegel
New submission from Jeremy Spiegel: In Modules/posixmodule.c, the function os__isdir_impl calls GetFileAttributesA/GetFileAttributesW without releasing the GIL. This is problematic since it can result in disk or network I/O, depending on the filesystem. -- components: Library (Lib)

Re: math.frexp

2016-07-16 Thread Paul Rubin
Steven D'Aprano writes: >>> protection against overflow of intermediate values. >> Might be simplest to just add the logarithms. > Simplest, but least accurate, even with Kahan summation or equivalent. Well the idea was to avoid overflow first, then hold on to whatever

[issue1621] Do not assume signed integer overflow behavior

2016-07-16 Thread Antti Haapala
Antti Haapala added the comment: Gnulib portability library has https://www.gnu.org/software/gnulib/manual/html_node/Integer-Range-Overflow.html and https://www.gnu.org/softwarhe/gnulib/manual/html_node/Integer-Type-Overflow.html and even macros for producing well-defined integer wraparound

[issue22246] add strptime(s, '%s')

2016-07-16 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread James Lu
New submission from James Lu: This would be useful for libraries like tqdm (progress bar module). -- components: Interpreter Core messages: 270581 nosy: James.Lu priority: normal severity: normal status: open title: Dictionary iterator has no len() type: enhancement versions: Python 3.6

[issue1621] Do not assume signed integer overflow behavior

2016-07-16 Thread Jeffrey Walton
Jeffrey Walton added the comment: > Has this sort of thing been done in other projects? Yes. If you are using C, you can use safe_iop. Android uses it for safer integer operations. If you are using C++, you can use David LeBlanc's SafeInt class. Microsoft uses it for safer inter operations.

Re: Clean Singleton Docstrings

2016-07-16 Thread Marko Rauhamaa
Random832 : > On Sat, Jul 16, 2016, at 03:27, Chris Angelico wrote: >> Will an "Exact" non-integer be stored as Decimal or >> Fraction? How do you know? They have vastly different semantics, and >> you should be able to choose. > > Er, the point is for them to _not_ have

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2016-07-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Antti, while I see some convenience in making %z parsing promiscuous, there is clear utility in adding %:z to strftime. If we do that, not allowing the same for parsing will be odd. Let's start with that. A case for a promiscuous %z can be made

[issue27083] PYTHONCASEOK is ignored on Windows

2016-07-16 Thread Brett Cannon
Brett Cannon added the comment: Buildbots are green again and I addressed the key type issue. Thanks for letting me know about the failure, Martin. -- stage: needs patch -> resolved status: open -> closed ___ Python tracker

Re: Clean Singleton Docstrings

2016-07-16 Thread Random832
On Sat, Jul 16, 2016, at 03:27, Chris Angelico wrote: > Will an "Exact" non-integer be stored as Decimal or > Fraction? How do you know? They have vastly different semantics, and > you should be able to choose. Er, the point is for them to _not_ have different semantics. A decimal storage format

[issue27531] Documentation for assert_not_called() has wrong signature

2016-07-16 Thread Michael Killough
New submission from Michael Killough: The documentation for `Mock.assert_not_called` gives its signature as `assert_not_called(*args, **kwargs)`. Since 01ae1ac2daf4, its signature has just been `assert_not_called()`. I've attached a trivial patch that updates the documentation to match the

[issue27083] PYTHONCASEOK is ignored on Windows

2016-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6b46c1510bfa by Brett Cannon in branch '3.5': Fix regressions introduced by fixes for issue #27083. https://hg.python.org/cpython/rev/6b46c1510bfa New changeset f4c91b883772 by Brett Cannon in branch 'default': Merge for #27083

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2016-07-16 Thread Antti Haapala
Antti Haapala added the comment: Alexander: that is true, because they are *separate* conversion flags. However even the POSIX standard strptime has some leniency: '%m` and `%d` accept the numbers *without* leading zeroes. This actually also means that one cannot use `%Y%m%d` to detect an

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +haypo stage: needs patch -> commit review ___ Python tracker ___

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Submitting the latest Github snapshot as a patch against master for review. See issue24773-s3-2.diff. -- Added file: http://bugs.python.org/file43753/issue24773-s3-2.diff ___ Python tracker

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2016-07-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: "Be conservative in what you do, be liberal in what you accept from others" I would agree to this approach with respect to a proposed fromisoformat() method (see issue 15873), but setptime seems to be about specifying an exact format. For example,

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Chris Angelico
On Sun, Jul 17, 2016 at 2:27 AM, Steven D'Aprano wrote: > If you really mean your words, and don't wish to step back and make a less > extreme claim, then you ought to be easily able to show that Python's use > of bools hardly ever works. It's clearly a terrible idea, almost

[issue27530] Non-Critical Compiler WARNING: Python Embedding C++11 does not allow non-constant string literals

2016-07-16 Thread Daniel Lord
New submission from Daniel Lord: ERROR SUMMARY: abstract.h:1332:60: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] #define PyMapping_Keys(O) PyObject_CallMethod(O,"keys",NULL) ISSUE CRITICALITY: Non-fatal Warning (will become an error eventually when

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread MRAB
On 2016-07-16 17:27, Steven D'Aprano wrote: On Sat, 16 Jul 2016 10:33 pm, Rustom Mody wrote: [snip] And yes, Rustom, I'm very familiar with the philosophical objections to the something/nothing distinction. "Is zero truly nothing, or is it some thing distinct from the absence of any number?"

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Steven D'Aprano
On Sat, 16 Jul 2016 10:15 pm, Rustom Mody wrote: > Earlier you said: > >> > 1. Graphs -- the kind mathematicians define with "Let G =(V,E) be a >> > graph..." >> >> I would make the empty graph (zero nodes) falsey, and non-empty graphs >> (one or more nodes) truthy. >> >> >> > 2. Automata

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Steven D'Aprano
On Sat, 16 Jul 2016 10:33 pm, Rustom Mody wrote: > You also have a bizarre notion that python's property: “Everything has > auto-bool-nature” IS STRAIGHTFORWARD. That's a very strong claim. You're not just pointing out that there may be a few old corner cases here and there where Python's

[issue27529] Tkinter memory leak on OS X

2016-07-16 Thread Ned Deily
Changes by Ned Deily : -- Removed message: http://bugs.python.org/msg270570 ___ Python tracker ___

[issue27529] Tkinter memory leak on OS X

2016-07-16 Thread Ned Deily
Ned Deily added the comment: tkinter is pretty much just a thin wrapper around the Tcl/Tk C API so suspicion for behavior like this should start there. Usually, the easiest way to confirm that is to write an equivalent test in Tcl using its wish shell but, in this case, there's an even

[issue27529] Tkinter memory leak on OS X

2016-07-16 Thread Ned Deily
Ned Deily added the comment: tkinter is pretty much just a thin wrapper around the Tcl/Tk C API so suspicion for behavior like this start there. Usually, the easiest way to confirm that is to write an equivalent test in Tcl using its wish shell but, in this case, there's an even easier way.

[issue23262] webbrowser module broken with Firefox 36+

2016-07-16 Thread Oleg Broytman
Oleg Broytman added the comment: I am on Debian 8 "jessie" that only has Python 3.4, so I want to patch webbrowser.py in a backward-compatible way. -- ___ Python tracker

[issue27507] bytearray.extend lacks overflow check when increasing buffer

2016-07-16 Thread Xiang Zhang
Xiang Zhang added the comment: I can't totally agree the point. The code means every time we increase the buffer by half the current length. So when the length arrives 2/3 * PY_SSIZE_T_MAX it's going to overflow. There is a 1/3 * PY_SSIZE_T_MAX gap between the theoretical upper limit. I think

[issue23262] webbrowser module broken with Firefox 36+

2016-07-16 Thread Berker Peksag
Berker Peksag added the comment: I was talking about webbrowser.py-3.4-newfox.patch 3.4 is now in security-fix-only mode so we can't push the patch to the 3.4 branch. -- ___ Python tracker

[issue23262] webbrowser module broken with Firefox 36+

2016-07-16 Thread Oleg Broytman
Oleg Broytman added the comment: Updated patch for Python 2.7 with subprocess.check_output(). -- Added file: http://bugs.python.org/file43751/webbrowser.py-2.7-newfox.patch ___ Python tracker

[issue23262] webbrowser module broken with Firefox 36+

2016-07-16 Thread Oleg Broytman
Oleg Broytman added the comment: Updated patch for Python 3.4+ with subprocess.check_output(). -- Added file: http://bugs.python.org/file43752/webbrowser.py-3.4-newfox.patch ___ Python tracker

[issue27507] bytearray.extend lacks overflow check when increasing buffer

2016-07-16 Thread Martin Panter
Martin Panter added the comment: Not particularly related, but the special fast case in Objects/listobject.c:811, listextend(), also seems to lack an overflow check. “An alternative would be to raise the error without trying to allocate Py_SSIZE_T_MAX first”: what I meant was removing the

[issue23262] webbrowser module broken with Firefox 36+

2016-07-16 Thread Oleg Broytman
Oleg Broytman added the comment: Not subprocess.run() as I'm aiming to Python 2.7. Perhaps subprocess.check_output(). I'll try it. -- ___ Python tracker

[issue1621] Do not assume signed integer overflow behavior

2016-07-16 Thread Martin Panter
Martin Panter added the comment: I tried the newer -fsanitize=undefined mode, and it is better than -ftrapv. It adds instrumentation that by default nicely reports the errors and continues running. My problem with the large slice step is not restricted to Element Tree; it affects list

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-16 Thread Martin Panter
Changes by Martin Panter : -- Removed message: http://bugs.python.org/msg270561 ___ Python tracker ___

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-16 Thread Martin Panter
Martin Panter added the comment: I added one comment, but I think this might almost be ready -- ___ Python tracker ___

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-16 Thread Xiang Zhang
Xiang Zhang added the comment: Upload the v9 version. It applies your last comment and catch up with the hg tip. -- Added file: http://bugs.python.org/file43750/64bit_support_for_zlib_v9.patch ___ Python tracker

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Chris Angelico
On Sat, Jul 16, 2016 at 9:02 PM, Steven D'Aprano wrote: > On Sat, 16 Jul 2016 08:46 pm, Chris Angelico wrote: > >> As Steven says, >> the default is that they're all truthy, and onus is on the implementer >> to demonstrate that this object is functionally equivalent to 0 or

EuroPython 2017 On-site Teams: Call for Interest (CFI)

2016-07-16 Thread M.-A. Lemburg
The EuroPython Society (EPS) is happy to announce the Call for Interest (CFI) for EuroPython 2017: http://www.europython-society.org/post/147488978255/europython-2017-on-site-teams-call-for-interest The purpose of this call is to get to know teams willing to help organize the EuroPython

re: Operator Precedence/Boolean Logic

2016-07-16 Thread Gerald Britton
>Earlier you said: >* > 1. Graphs -- the kind mathematicians define with "Let G =(V,E) be a *>* > graph..." *> >* I would make the empty graph (zero nodes) falsey, and non-empty graphs (one *>* or more nodes) truthy. *> > >* > 2. Automata which in a way are special kinds of graphs *> >* As

[issue27525] Wrong OS header on file created by gzip module

2016-07-16 Thread R. David Murray
R. David Murray added the comment: This is a harder call than #27521. There (IUUC), the *wrong* compression level was specified. Here, 'unknown' is a valid value. The biggest disadvantage of changing this is the maintenance burden of keeping it up to date with platform changes (eg: we're

  1   2   >