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,

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

[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?),

[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 ___

[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: 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

[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

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,

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

[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

[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

[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

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

[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 ___

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

[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 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

[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: 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 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

[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: 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,

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

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

[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

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

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: 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 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 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

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

[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

[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 reStructuredText

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

[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 ___

[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

[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 ___

[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 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: Clean Singleton Docstrings

2016-07-16 Thread Marko Rauhamaa
Chris Angelico : > With a single abstract numeric type, what exactly does "inexact" mean, > where does it come from, and how does that affect the expected > behaviour and performance of numbers? Not much is said in the standard: Thus inexactness is a contagious property of a

[issue20842] pkgutil docs should reference glossary terms not PEP 302

2016-07-16 Thread Martin Panter
Martin Panter added the comment: I still think the links are too dense. Three links to the same term in two short paragraphs is too much. Do you think it would be okay to just link the first occurrence for pkgutil.ImpImporter? Also, there is still a problem at least the definition of “finder”

EPS Board Candidates for 2016/2017

2016-07-16 Thread M.-A. Lemburg
At this year’s General Assembly we will vote in a new board of the EuroPython Society: http://www.europython-society.org/post/146998034935/invitation-to-the-europython-society-general This posting is also available as blog post:

Re: Clean Singleton Docstrings

2016-07-16 Thread Chris Angelico
On Sat, Jul 16, 2016 at 4:19 PM, Lawrence D’Oliveiro wrote: > On Saturday, July 16, 2016 at 4:20:13 PM UTC+12, Ethan Furman wrote: >> >> On 07/15/2016 09:04 PM, Rustom Mody wrote: >> >>> Just that suggesting that python's bool notion is straightforward is an >>>

Re: Clean Singleton Docstrings

2016-07-16 Thread Random832
On Sat, Jul 16, 2016, at 02:29, Chris Angelico wrote: > The difference between ints and floats can lead to bugs, too. Which > one should we eliminate? Eliminate both of them. Move to a single abstract numeric type* a la Scheme, with an "inexact" attribute (inexact numbers may or may not be

Re: Clean Singleton Docstrings

2016-07-16 Thread Chris Angelico
On Sat, Jul 16, 2016 at 4:53 PM, Random832 wrote: > On Sat, Jul 16, 2016, at 02:29, Chris Angelico wrote: >> The difference between ints and floats can lead to bugs, too. Which >> one should we eliminate? > > Eliminate both of them. Move to a single abstract numeric type*

[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0d8f139a6e19 by Martin Panter in branch 'default': Issue #27285: Cleanup leftover susp-ignored entry after text was changed https://hg.python.org/cpython/rev/0d8f139a6e19 -- ___ Python tracker

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Steven D'Aprano
On Sat, 16 Jul 2016 03:58 pm, Rustom Mody wrote: > > From other thread: > > On Saturday, July 16, 2016 at 9:50:13 AM UTC+5:30, Ethan Furman wrote: >> On 07/15/2016 09:04 PM, Rustom Mody wrote: >> >> > Just that suggesting that python's bool notion is straightforward is an >> > unnecessary lie

Re: Clean Singleton Docstrings

2016-07-16 Thread Steven D'Aprano
Oh, and a further thought... On Sat, 16 Jul 2016 04:53 pm, Random832 wrote: > Eliminate both of them. Move to a single abstract numeric type* a la > Scheme, with an "inexact" attribute (inexact numbers may or may not be > represented by a float, or by the same bigint/decimal/rational types as

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

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

2016-07-16 Thread Antti Haapala
Antti Haapala added the comment: "Be conservative in what you do, be liberal in what you accept from others" they say. Also Z as a timezone designator is also widely used in iso 8601 timestamps. I believe the effort should be made to *parse* *any/all* of the ISO 8601 supported time-zone codes

[issue27528] Document that filterwarnings(message=...) matches the start of a message

2016-07-16 Thread Martin Panter
New submission from Martin Panter: I assumed that the “message” parameter could be used to match any substring of a warning message, but it turns out it calls regex.match(), which is anchored at the beginning of the search string (but is not anchored at the end). I propose this patch to

Re: math.frexp

2016-07-16 Thread Steven D'Aprano
On Sat, 16 Jul 2016 06:24 am, Paul Rubin wrote: > Steven D'Aprano writes: >> But this can give some protection against overflow of intermediate >> values. > > Might be simplest to just add the logarithms. Look up Kahan summation > for how to do that while minimizing loss

[issue25571] Improve the lltrace feature with the Py_Debug mode

2016-07-16 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Here is a small example of lltrace when you enable it. ``` stephane@sg1 ~/s/h/cpython> ./python Python 3.6.0a3+ (default:0d8f139a6e19+, Jul 16 2016, 11:59:46) [GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux Type "help", "copyright", "credits" or "license"

[issue23262] webbrowser module broken with Firefox 36+

2016-07-16 Thread Oleg Broytman
Oleg Broytman added the comment: Patch for Python 3.4 and 3.5 to support Firefox >= 36.0, with version test. -- Added file: http://bugs.python.org/file43749/webbrowser.py-3.4-newfox.patch ___ Python tracker

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Chris Angelico
On Sat, Jul 16, 2016 at 8:16 PM, Steven D'Aprano wrote: >> If both you and Chris tripped up on a right definition of an “empty” >> automaton and regex respectively, I believe it demonstrates that getting >> boolishness for an arbitrary type right is at least non-trivial.

[issue23262] webbrowser module broken with Firefox 36+

2016-07-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue23262] webbrowser module broken with Firefox 36+

2016-07-16 Thread Oleg Broytman
Oleg Broytman added the comment: Patch for Python 2.7 to support Firefox >= 36.0, with version test. -- keywords: +patch Added file: http://bugs.python.org/file43748/webbrowser.py-2.7-newfox.patch ___ Python tracker

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Steven D'Aprano
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 an > empty collection. (And it's possible for ANYONE to get that wrong - cf >

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Rustom Mody
From other thread: On Saturday, July 16, 2016 at 9:50:13 AM UTC+5:30, Ethan Furman wrote: > On 07/15/2016 09:04 PM, Rustom Mody wrote: > > > Just that suggesting that python's bool notion is straightforward is an > > unnecessary lie – especially to newbies. > > Python's boolean concept is as

Re: Clean Singleton Docstrings

2016-07-16 Thread Lawrence D’Oliveiro
On Saturday, July 16, 2016 at 4:20:13 PM UTC+12, Ethan Furman wrote: > > On 07/15/2016 09:04 PM, Rustom Mody wrote: > >> Just that suggesting that python's bool notion is straightforward is an >> unnecessary lie – especially to newbies. > > Python's boolean concept is as simple as it gets --

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-16 Thread Martin Panter
Martin Panter added the comment: Here is a patch with the proposed warning. I think “Error finding module specification” might be a bit better than the current “finding spec”, so I included that change. With the patch, this is what the messages look like: $ ./python -m package.module

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

2016-07-16 Thread Dor Dankner
Dor Dankner added the comment: It does not seem like a feature after you see this issue #27521. The OS was just hardcoded, the same way the compression level was hardcoded. you may say it's a feature too :P The way I see it, the gzip module should at least work like the original GNU gzip, if

Re: Clean Singleton Docstrings

2016-07-16 Thread Steven D'Aprano
On Sat, 16 Jul 2016 04:53 pm, Random832 wrote: > On Sat, Jul 16, 2016, at 02:29, Chris Angelico wrote: >> The difference between ints and floats can lead to bugs, too. Which >> one should we eliminate? > > Eliminate both of them. Move to a single abstract numeric type* a la > Scheme, with an

EuroPython 2016: Recruiting Offers

2016-07-16 Thread M.-A. Lemburg
Many of our sponsors are looking for new employees, so EuroPython 2016 is not only an exciting conference, but may very well also be your chance to find the perfect job you’ve always been looking for. Sponsor job board - We will post sponsor recruiting offers on the job board of

[issue25571] Improve the lltrace feature with the Py_Debug mode

2016-07-16 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: here is the patch, if you want to test it, just use the REPL and add __ltrace__ = None in the REPL. -- Added file: http://bugs.python.org/file43747/issue25571-2.diff ___ Python tracker

[issue27527] Make not yielding from or awaiting a coroutine a SyntaxError

2016-07-16 Thread Decorater
Decorater added the comment: Oh it does not happen if you use the asyncio.coroutine decorater but it does do RuntimeWarning if you use the async def on it. -- versions: -Python 3.4 ___ Python tracker

[issue27527] Make not yielding from or awaiting a coroutine a SyntaxError

2016-07-16 Thread Decorater
Decorater added the comment: So to make it Error it must be : import asyncio async def SomeCoroutine(): print("test...") SomeCoroutine() -- ___ Python tracker

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

2016-07-16 Thread Nick Coghlan
Nick Coghlan added the comment: Terry: it's not a 100% guarantee, but it should be sufficient for your purposes (the more obscure failure modes mostly relate to C level globals, Python level module globals, pickling, and module import having side effects on state in other modules, and it's

[issue27083] PYTHONCASEOK is ignored on Windows

2016-07-16 Thread Martin Panter
Martin Panter added the comment: This appears to have broken the tests on Windows: http://buildbot.python.org/all/builders/x86%20Windows7%203.5/builds/1030/steps/test/logs/stdio == FAIL: test_insensitive

[issue21136] fractions.Fraction.__pow__ does unneeded renormalization

2016-07-16 Thread Vedran Čačić
Vedran Čačić added the comment: Unfortunately, this introduced a bug. It seems Mark Dickinson should go easier on his LGTMs. :-) >>> import fractions >>> fractions.Fraction(-1, 2) ** -1 Fraction(2, -1) That is a really strange object, since it's not normalized, and many functions expect all

[issue27529] Tkinter memory leak on OS X

2016-07-16 Thread Mirano Tuk
New submission from Mirano Tuk: There seems to be a memory leak in tkinter on OSX (Windows and Linux don't seem to be affected). Explicitly calling Tk.update() sometimes permanently allocates a multiple of 4096 bytes. Allocation happens more frequently if update calls are in close succession.

Re: Operator Precedence/Boolean Logic

2016-07-16 Thread Steven D'Aprano
On Sat, 16 Jul 2016 03:48 pm, Rustom Mody wrote: > On Thursday, June 30, 2016 at 10:52:50 PM UTC+5:30, Steven D'Aprano wrote: >> Okay, if you think that automata cannot be empty, I'll accept that. In >> that case, then I'll change my answer and say that __bool__ for automata >> should simply

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

[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

[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 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

[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,

[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

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

[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: 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?"

[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 ___

[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

[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

[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

[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

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

[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 ___

[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

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 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

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

[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

[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: 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 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

  1   2   >