[issue27749] python 3.5.2 maybe crash

2016-08-12 Thread Eryk Sun
Eryk Sun added the comment: To diagnose the access violation, it may help if you install the debug binaries and try to reproduce the crash using python_d.exe. Attach the dump file to this issue. Regarding the multiprocessing question, if its a separate issue you need to file it on its own

[issue27749] python 3.5.2 maybe crash

2016-08-12 Thread Eryk Sun
Changes by Eryk Sun : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

Re: Win32 API in pywin32

2016-08-12 Thread Lawrence D’Oliveiro
On Friday, August 5, 2016 at 11:58:05 AM UTC+12, I wrote: > > Are people still using Win32? I thought Windows went 64-bit years ago. Here is a little titbit I was looking for: Win32 has a function for getting the size

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

2016-08-12 Thread Lawrence D’Oliveiro
On Saturday, August 13, 2016 at 2:33:55 PM UTC+12, bream...@gmail.com wrote: >> Surely this application was built using a build system, even back then, >> that would allow compilation to resume and not rebuild object files that >> were already built. > > Are you one of those extremely lucky

[issue27698] socketpair not in socket.__all__ on Windows

2016-08-12 Thread Eryk Sun
Changes by Eryk Sun : -- keywords: +easy ___ Python tracker ___ ___

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

2016-08-12 Thread breamoreboy
On Friday, August 12, 2016 at 2:31:01 PM UTC+1, Michael Torrie wrote: > On 08/12/2016 05:07 AM, Steven D'Aprano wrote: > > The first time I ever compiled a full-sized application (not a particular > > large one either, it was a text editor a little more featureful than > > Notepad) it took

Re: Why my image cannot be displayed?

2016-08-12 Thread MRAB
On 2016-08-13 02:40, huey.y.ji...@gmail.com wrote: Hi All, Image display drives me crazy. After I get it displayed, and want to do the job with a class, display failed again. Please take a look at my trial code: from Tkinter import * class imageDisplay: def __init__(self,

[issue24637] locals dictionary in PyRun_String

2016-08-12 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Matthew! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue24637] locals dictionary in PyRun_String

2016-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0f2a09950ac8 by Berker Peksag in branch '3.5': Issue #24637: Document that locals can be any mapping object https://hg.python.org/cpython/rev/0f2a09950ac8 New changeset 61c4dbec2e2c by Berker Peksag in branch 'default': Issue #24637: Merge from 3.5

[issue27751] Itertools -> Recipes -> pairwise()

2016-08-12 Thread Tim Peters
Changes by Tim Peters : -- resolution: -> rejected stage: -> resolved ___ Python tracker ___

[issue27751] Itertools -> Recipes -> pairwise()

2016-08-12 Thread YoSTEALTH
YoSTEALTH added the comment: Tim, I get what you are saying good point. -- status: open -> closed ___ Python tracker ___

[issue27751] Itertools -> Recipes -> pairwise()

2016-08-12 Thread Tim Peters
Tim Peters added the comment: Note that "iterable" covers a world of things that may not support indexing (let alone slicing). For example, it may be a generator, or a file open for reading. -- nosy: +tim.peters ___ Python tracker

[issue27751] Itertools -> Recipes -> pairwise()

2016-08-12 Thread YoSTEALTH
New submission from YoSTEALTH: # Link: https://docs.python.org/3/library/itertools.html#itertools-recipes # Function pairwise() in Itertools -> Recipes could be improved!? Here is the code: import time import itertools def pairwise(iterable): "s -> (s0,s1), (s1,s2), (s2, s3), ..."

Why my image cannot be displayed?

2016-08-12 Thread huey . y . jiang
Hi All, Image display drives me crazy. After I get it displayed, and want to do the job with a class, display failed again. Please take a look at my trial code: from Tkinter import * class imageDisplay: def __init__(self, parent=None): canvas = Canvas(width=400,

[issue27038] Make os.DirEntry exist

2016-08-12 Thread Brendan Moloney
Brendan Moloney added the comment: It makes it much easier to write functions that can work with either a DirEntry object or a plain path. -- ___ Python tracker

Re: Asynchronous programming

2016-08-12 Thread Paul Rubin
Steven D'Aprano writes: >> await asyncio.sleep(0.2) # pretend to do some real work > That is *awesome*. Thank you for the example! Keep in mind that the above basically takes the task off the list of runnables for 0.2 seconds, so it sits doing nothing and

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

2016-08-12 Thread Steven D'Aprano
On Sat, 13 Aug 2016 08:12 am, Lawrence D’Oliveiro wrote: > On Friday, August 12, 2016 at 9:39:11 PM UTC+12, BartC wrote: > >> 'year' has been spelled wrongly > > That’s why Python has __slots__. No, that is OFFICIALLY *not* why Python has __slots__. Python has __slots__ in order to support

Re: A strange list concatenation result

2016-08-12 Thread Steven D'Aprano
On Sat, 13 Aug 2016 06:44 am, Mok-Kong Shen wrote: > list2 = [1,2,3] > list1 += [4,5,6] > print(list1, list2) >> [1, 2, 3, 4, 5, 6] [1, 2, 3] >> >> >> Does that help? > > I don't yet understand why in my 2nd example list2 came out as > [1, 2, 3] outside. Because you assign list2 =

Re: Asynchronous programming

2016-08-12 Thread Steven D'Aprano
On Fri, 12 Aug 2016 03:47 pm, Paul Rudin wrote: > Steven D'Aprano writes: > >> Thanks to everyone who has answered, I think I'm slowly starting to get >> it now. Let's see if we can come up with a toy example that doesn't >> involve low-level socket programming :-)

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

2016-08-12 Thread Juan Pablo Romero Méndez
2016-08-12 1:10 GMT-07:00 Lawrence D’Oliveiro : > On Thursday, August 11, 2016 at 8:33:41 AM UTC+12, Juan Pablo Romero > Méndez wrote: > > > I've been trying to find (without success so far) an example of a > situation > > where the dynamic features of a language like

[issue27038] Make os.DirEntry exist

2016-08-12 Thread Brett Cannon
Brett Cannon added the comment: Exposing a class method to construct one is no different than exposing the constructor, so it's still not desired to have. What is the specific need you have for creating a DirEntry instance on its own? -- ___ Python

[issue27038] Make os.DirEntry exist

2016-08-12 Thread Brendan Moloney
Brendan Moloney added the comment: It would be nice if there was a supported way to create a DirEntry object from a path. If you don't want to document the constructor perhaps expose some helper function or class method (i.e. from_path)? -- nosy: +moloney

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

2016-08-12 Thread BartC
On 12/08/2016 23:12, Lawrence D’Oliveiro wrote: On Friday, August 12, 2016 at 9:39:11 PM UTC+12, BartC wrote: 'year' has been spelled wrongly That’s why Python has __slots__. OK. So when I said: > > My example was specifically about attribute names where pre-declaring > the set of allowed

Error running an exe file in Windows with reportlab import

2016-08-12 Thread Ernest Bonat, Ph.D.
I have created a simple Python program including the following packages: import numpy as np import matplotlib.pyplot as plt import pandas as pd from reportlab.pdfgen import canvas if __name__ == '__main__': print("Hi!") I have created the installation package (PyInstaller) using

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 71a7db7ceabc by Alexander Belopolsky in branch 'default': Issue #24773: Skip system tests for transitions in year 2037 and later. https://hg.python.org/cpython/rev/71a7db7ceabc -- ___ Python tracker

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

2016-08-12 Thread Lawrence D’Oliveiro
On Friday, August 12, 2016 at 9:39:11 PM UTC+12, BartC wrote: > 'year' has been spelled wrongly That’s why Python has __slots__. -- https://mail.python.org/mailman/listinfo/python-list

Meta Python Chapter 3 Available

2016-08-12 Thread Charles Ross
I’ve completed a first draft of Chapter 3: Modules (and Packages) of the Meta Python book. Feedback from novices and experts alike would be welcome. https://github.com/chivalry/meta-python Thanks, Chuck --

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

2016-08-12 Thread Ned Deily
Ned Deily added the comment: >So what happens if you comment out line 34? > macosx.setupApp(cls.root, None) That seems to eliminate the intermittent "IndexError: list assignment index out of range" and doesn't seem to cause any new errors. -- ___

[issue12345] Add math.tau

2016-08-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > All that said, I agree with Mark that math.e is at best an attractive > nuisance. Why don't we fix the nuisance part without making it less attractive: class _E(float): def __pow__(self, other): if self is e: return exp(other)

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-08-12 Thread Keith Brafford
Keith Brafford added the comment: Serge, I wrote this awhile back, before I learned you aren't supposed to subclass built-in types. Is this the type of effect you're looking for? https://gist.github.com/kbrafford/da39e06d18b6df2a0eecb4493699 Here's an example using it:

[issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults

2016-08-12 Thread Brett Cannon
Brett Cannon added the comment: The revision that Ned found only changed posixmodule.c by adding PyModule_AddObject(m, "DirEntry", (PyObject *)); at the end of the module initializer. Only thing I can think of is it needs to go into the `if (!initialized)` block:

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-08-12 Thread Stefan Krah
Stefan Krah added the comment: On Fri, Aug 12, 2016 at 08:38:52PM +, Serge Stroobandt wrote: > This should not be that difficult to implement? > I promise, every six months an engineer will stop by here asking for this. > Instead of nagging, this could already have been implemented one way

Re: A strange list concatenation result

2016-08-12 Thread Mok-Kong Shen
Am 11.08.2016 um 23:49 schrieb Gary Herron: On 08/11/2016 03:06 PM, Mok-Kong Shen wrote: def test(list1,list2): list1+=[4,5,6] list2=list2+[4,5,6] print("inside ",list1,list2) return [snip] # With list1=[1,2,3] list2=[1,2,3] test(list1,list2) print("outside",list1,list2) # I got

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-08-12 Thread Serge Stroobandt
Serge Stroobandt added the comment: What most engineers would like to see implemented in Python is a new engineering notation identical to the one implemented in the omnipresent HP calculators. Quoting from the HP-15C Owner's Handbook: "- In engineering notation, the first significant digit

[issue12345] Add math.tau

2016-08-12 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: What about rounding pi to 3 (and tau to 6)? https://en.wikipedia.org/wiki/Indiana_Pi_Bill (and I'm sure we can find a cute video about how cool to have pi as 3 to add it to the docs). -- nosy: +pfalcon ___ Python

[issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults

2016-08-12 Thread Ned Deily
Ned Deily added the comment: Thanks for the good test, Simon. Bisection points to b841972ed0bd for Issue27038 as the culprit here. (It was pushed between 3.6.0a2 and a3.) Brett, Jelle, can you please take a look at this? I'm going to keep it as a Release Blocker for now. --

[issue27182] PEP 519 support in the stdlib

2016-08-12 Thread Brett Cannon
Brett Cannon added the comment: Here is an odd patch because I don't know where else to put it ATM that adds the remaining support in the os module/package not covered by other issues w/ patches (specifically os.walk() and os.fwalk()). I think everything else simply falls through thanks to

[issue27750] Idle editor crashes when input size more than 250 lines given

2016-08-12 Thread chinmay hegde
New submission from chinmay hegde: Idle editor crashes when input size more than 250 lines given. Steps to reproduce:- try with below snippet of code for i in range(250): n=input() Execute the snippet of code. But while giving the input copy all 250 inputs with single paste. Editor is

[issue26027] Support Path objects in the posix module

2016-08-12 Thread Brett Cannon
Brett Cannon added the comment: Here is an updated patch that adds in change to posixmodule.c stemming from the new warning about using bytearrays. It also makes type checking more stringent for what __fspath__() returns. -- Added file:

[issue12345] Add math.tau

2016-08-12 Thread Tim Peters
Tim Peters added the comment: Serhiy's objection is a little subtler than that. The Python expression `math.log(math.e)` in fact yields exactly 1.0, so IF it were the case that x**y were implemented as math.exp(math.log(x) * y) THEN math.e**500 would be computed as math.exp(math.log(math.e)

[issue27747] Broken example in the queue module documentation

2016-08-12 Thread R. David Murray
Changes by R. David Murray : -- stage: -> resolved type: enhancement -> behavior ___ Python tracker ___

[issue27712] Tiny typos in import.rst

2016-08-12 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your work too! :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue25805] Failure in test_pkgutil run from command-line

2016-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 863258dcb745 by Brett Cannon in branch 'default': Issue #25805: Skip a test for test_pkgutil when __name__ == __main__. https://hg.python.org/cpython/rev/863258dcb745 -- nosy: +python-dev ___ Python

[issue25805] Failure in test_pkgutil run from command-line

2016-08-12 Thread Brett Cannon
Changes by Brett Cannon : -- stage: patch review -> resolved ___ Python tracker ___ ___

[issue27712] Tiny typos in import.rst

2016-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 927c29e1d646 by Brett Cannon in branch '3.5': Issue #27712: Fix some typos in the import docs. https://hg.python.org/cpython/rev/927c29e1d646 New changeset 42a461366d6c by Brett Cannon in branch 'default': Merge for issue #27712

[issue27712] Tiny typos in import.rst

2016-08-12 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch! -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue25805] Failure in test_pkgutil run from command-line

2016-08-12 Thread Brett Cannon
Brett Cannon added the comment: Since most people just run tests using `-m test` I only applied the fix to 3.6. Thanks for the patch, SilentGhost! -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue25805] Failure in test_pkgutil run from command-line

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

[issue27594] Assertion failure when running "test_ast" tests with coverage.

2016-08-12 Thread Quentin Pradet
Quentin Pradet added the comment: Thanks levkivskyi, it fixed the issue for me! -- ___ Python tracker ___ ___

[issue25805] Failure in test_pkgutil run from command-line

2016-08-12 Thread SilentGhost
SilentGhost added the comment: Could anyone could have a look at this fairly trivial patch? -- ___ Python tracker ___

[issue27747] Broken example in the queue module documentation

2016-08-12 Thread Paulo Gabriel Poiati
Paulo Gabriel Poiati added the comment: You are absolutely right David. I was calling join after putting `None` in the queue. Sorry, I'm closing this. -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue27748] Simplify test_winsound

2016-08-12 Thread Zachary Ware
New submission from Zachary Ware: test_winsound is rather annoying. It currently attempts to determine whether a sound card is present, and whether particular system sounds are available. These checks are fragile at best, and I routinely see failures that shouldn't be. In particular, if I

[issue27742] Random.randint generates different values in Python2 and Python3

2016-08-12 Thread SilentGhost
Changes by SilentGhost : -- stage: -> resolved ___ Python tracker ___ ___

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

2016-08-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

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

2016-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6fdd29a9d5d4 by Raymond Hettinger in branch '3.5': Issue 27719: Remove a doc example that is not applicable in Python 3 https://hg.python.org/cpython/rev/6fdd29a9d5d4 -- nosy: +python-dev ___ Python

[issue27742] Random.randint generates different values in Python2 and Python3

2016-08-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Wolfgang, sorry you bumped into this problem and glad that you have a workaround. We only guarantee availability of backward compatible seeders and that calls to random() are reproducible. The other methods are allowed to change so that we can make

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

2016-08-12 Thread William Ray Wing
> On Aug 12, 2016, at 7:07 AM, Steven D'Aprano > wrote: > > [megabyte] > > > [1] Are there programming language aware spell checkers? If not, there > should be. > > There are programming language-aware editors with built-in spell checkers (and

[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-08-12 Thread Fabio Alessandro Locati
Fabio Alessandro Locati added the comment: Any news on this? -- nosy: +Fabio Alessandro Locati ___ Python tracker ___

[issue27747] Broken example in the queue module documentation

2016-08-12 Thread R. David Murray
R. David Murray added the comment: The example looks correct to me. Have you tested it and seen it hang? The q.join() is done, and returns once all the puts have been processed. *Then* None is put for each worker, which terminates the worker thread. There's no q.join() to block at that

[issue27738] odd behavior in creating list of lambda expressions

2016-08-12 Thread John Sahr
John Sahr added the comment: I eventually figured that out that source of the problem; thanks for the coding fix; that's useful to know. -John On Thu, Aug 11, 2016 at 8:17 AM, Emanuel Barry wrote: > > Emanuel Barry added the comment: > > This is due to the fact that

[issue27747] Broken example in the queue module documentation

2016-08-12 Thread Paulo Gabriel Poiati
New submission from Paulo Gabriel Poiati: I believe the code example at https://docs.python.org/3.6/library/queue.html is broken. The break condition in the worker loop (when the queued value is None) must call the `task_done` before breaking, otherwise the code blocks indefinitely in the

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

2016-08-12 Thread Michael Selik
On Fri, Aug 12, 2016, 7:11 AM Steven D'Aprano wrote: > > [1] Are there programming language aware spell checkers? If not, there > should be. > A good autocomplete is much like a spell-checker. I have far fewer spelling errors when using an editor with autocomplete.

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

2016-08-12 Thread Michael Torrie
On 08/12/2016 05:07 AM, Steven D'Aprano wrote: > The first time I ever compiled a full-sized application (not a particular > large one either, it was a text editor a little more featureful than > Notepad) it took something like nine hours to compile on a Mac SE (this was > circa 1990). How mad

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-08-12 Thread Christian Heimes
Changes by Christian Heimes : Removed file: http://bugs.python.org/file44088/Microsoft_Screen_Sharing_for_Lumia_Phones_HD-10_UG_th_TH.pdf ___ Python tracker

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-08-12 Thread Pan Naekton
Changes by Pan Naekton : Added file: http://bugs.python.org/file44088/Microsoft_Screen_Sharing_for_Lumia_Phones_HD-10_UG_th_TH.pdf ___ Python tracker

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

2016-08-12 Thread BartC
On 12/08/2016 12:55, BartC wrote: On 12/08/2016 12:07, Steven D'Aprano wrote: The first time I ever compiled a full-sized application (not a particular large one either, it was a text editor a little more featureful than Notepad) it took something like nine hours to compile on a Mac SE (this

[issue25825] AIX shared library extension modules installation broken

2016-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 58c8cae6c61a by Martin Panter in branch '3.5': Issue #25825: Fix references to Modules/python.exp https://hg.python.org/cpython/rev/58c8cae6c61a New changeset 4d4b5b978b7e by Martin Panter in branch 'default': Issue #25825: Merge AIX fix from 3.5

[issue25825] AIX shared library extension modules installation broken

2016-08-12 Thread David Edelsohn
David Edelsohn added the comment: Yes, please apply Patch 1 that reverts the mistaken change of revision 88a532a31eb3 . I want to work through this incrementally so that it's clear to reviewers. -- ___ Python tracker

[issue12887] Documenting all SO_* constants in socket module

2016-08-12 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue24363] httplib fails to handle semivalid HTTP headers

2016-08-12 Thread Martin Panter
Martin Panter added the comment: In order to avoid messing too much with the intricacies of the existing email parsing, here is a patch for Python 3 that limits the behaviour changes to the HTTP module. It should fix the bad handling of broken header lines. As a side effect, it should also

[issue27745] Fix typos in Argument Clinic howto

2016-08-12 Thread SilentGhost
SilentGhost added the comment: Thanks, Lele. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-08-12 Thread Martin Panter
Martin Panter added the comment: No super important reason, just to avoid indenting the code. This is a medium-sized test function, with a few long lines already. And if you keep the indentation the same, it makes it easier to port other changes to Python 2, look through the repository

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-08-12 Thread STINNER Victor
STINNER Victor added the comment: Martin: why don't you use "with"? -- ___ Python tracker ___ ___

[issue12345] Add math.tau

2016-08-12 Thread STINNER Victor
STINNER Victor added the comment: > math.e**500 = math.exp(math.log(math.e)*500) That's the theory if numbers have an infinite precision. In practice, intermediate results are rounded and have a limited precision. -- ___ Python tracker

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset f78a682a3515 by Martin Panter in branch '3.5': Issue #26741: Clean up subprocess.Popen object in test_poll https://hg.python.org/cpython/rev/f78a682a3515 New changeset 7ff3ce0dfd45 by Martin Panter in branch 'default': Issue #26741: Merge

[issue27745] Fix typos in Argument Clinic howto

2016-08-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 129c601e7bfa by Martin Panter in branch '3.5': Issue #27745: Fix some typos in Argument Clinic howto, by Lele Gaifax https://hg.python.org/cpython/rev/129c601e7bfa New changeset 8c33152fd75c by Martin Panter in branch 'default': Issue #27745: Merge

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

2016-08-12 Thread Eryk Sun
Eryk Sun added the comment: I overlooked some aspects of the problem: * A short relative path may end up exceeding MAX_PATH when normalized as a fully qualified path. * The working directory may be a UNC path or may already have the \\?\ prefix. It's not thread-safe to check this beforehand.

[issue27746] ResourceWarnings in test_asyncio

2016-08-12 Thread Martin Panter
New submission from Martin Panter: $ ./python -bWerror -m test -r -u all . . . 0:12:58 [ 70/402] test_asyncio Exception ignored in: > Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/asyncio/sslproto.py", line 329, in __del__ source=self) ResourceWarning:

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

2016-08-12 Thread BartC
On 12/08/2016 12:07, Steven D'Aprano wrote: On Fri, 12 Aug 2016 07:38 pm, BartC wrote: 'year' has been spelled wrongly How do you know? I know because my intention was to create a RECORD, with a specific set of members or fields. With records, you usually don't just create arbitrary

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

2016-08-12 Thread Steven D'Aprano
On Fri, 12 Aug 2016 07:58 pm, BartC wrote: > On 12/08/2016 10:45, Chris Angelico wrote: >> On Fri, Aug 12, 2016 at 7:38 PM, BartC wrote: >>> You can be too dynamic. Take an example like this: > >>> d.yaer=1999 [...] > How would a linter know that you didn't /want/ to create a

[issue27539] negative Fraction ** negative int not normalized

2016-08-12 Thread Mark Dickinson
Mark Dickinson added the comment: > _Please_, can this go in before 15th? Note that this is a bugfix, not a new feature, so it can still go in after the 15th. -- ___ Python tracker

[issue27594] Assertion failure when running "test_ast" tests with coverage.

2016-08-12 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: You could try changing this line in compile.c (in function 'assemble') if (entryblock && entryblock->b_instr) to if (entryblock && entryblock->b_instr && entryblock->b_instr->i_lineno) Does this help? -- nosy: +levkivskyi

[issue27181] Add geometric mean to `statistics` module

2016-08-12 Thread Mark Dickinson
Mark Dickinson added the comment: > According to my testing, math.pow(x, 0.5) is no worse than sqrt. It certainly is worse than sqrt, both in terms of speed and accuracy. Whether the difference is enough to make it worth special-casing is another question, of course, and as you say, that can

[issue27350] Compact and ordered dict

2016-08-12 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44086/compact-dict.patch ___ Python tracker ___

[issue27740] Fix doc of Py_CompileStringExFlags

2016-08-12 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file44085/Py_CompileStringExFlags_doc.patch ___ Python tracker ___

[issue27740] Fix doc of Py_CompileStringExFlags

2016-08-12 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file44078/Py_CompileStringExFlags_doc.patch ___ Python tracker ___

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

2016-08-12 Thread Steven D'Aprano
On Fri, 12 Aug 2016 07:38 pm, BartC wrote: > 'year' has been spelled wrongly How do you know? The point is that it is intentional that callers can set arbitrary attributes on (most) objects. It is perfectly legitimate to set: d.year d.century d.owner d.extra_seconds and, yes, even d.yaer,

[issue27181] Add geometric mean to `statistics` module

2016-08-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: I thought about special-casing n=2 to math.sqrt, but as that's an implementation detail I can make that change at any time. According to my testing, math.pow(x, 0.5) is no worse than sqrt, so I'm not sure if there's any advantage to having yet another

[issue27743] Python 2 has a wrong artificial limit on the amount of memory that can be allocated in ctypes

2016-08-12 Thread Eryk Sun
Eryk Sun added the comment: AFAIK this only affects Windows. It looks like a relatively simple fix. In PyCArrayType_new, change the declaration of `length` to Py_ssize_t to match the definition StgDictObject.length; ensure the _length_ attribute is an index via PyIndex_Check instead of

[issue27745] Fix typos in Argument Clinic howto

2016-08-12 Thread SilentGhost
SilentGhost added the comment: LGTM -- stage: -> commit review type: -> behavior ___ Python tracker ___ ___

[issue27745] Fix typos in Argument Clinic howto

2016-08-12 Thread SilentGhost
Changes by SilentGhost : -- components: +Documentation versions: +Python 3.5 ___ Python tracker ___

[issue27745] Fix typos in Argument Clinic howto

2016-08-12 Thread Lele Gaifax
Changes by Lele Gaifax : Removed file: http://bugs.python.org/file44083/ac-doc-typos.patch ___ Python tracker ___

[issue27745] Fix typos in Argument Clinic howto

2016-08-12 Thread Lele Gaifax
Lele Gaifax added the comment: Re-uploaded the patch file, without spurious stuff. -- Added file: http://bugs.python.org/file44084/ac-doc-typos.patch ___ Python tracker

[issue27745] Fix typos in Argument Clinic howto

2016-08-12 Thread Lele Gaifax
Lele Gaifax added the comment: Yes, sorry about that, picked the wrong file :-| I will renew the patch shortly! -- components: -Documentation versions: -Python 3.5 ___ Python tracker

[issue27745] Fix typos in Argument Clinic howto

2016-08-12 Thread SilentGhost
SilentGhost added the comment: Then I guess all the changes to Modules/_sqlite.c are there by mistake? Would you mid refreshing your patch to remove them? -- assignee: -> docs@python components: +Documentation nosy: +SilentGhost, docs@python versions: +Python 3.5

[issue27742] Random.randint generates different values in Python2 and Python3

2016-08-12 Thread Antti Haapala
Antti Haapala added the comment: Anyhow, in this case it is easy to simulate the Python 2 randint behaviour (add checks for hi >= lo if needed): >>> random.seed(5, version=1) >>> randint_compat = lambda lo, hi: lo + int(random.random() * (hi + 1 - lo)) >>> randint_compat(0,

[issue27745] Fix typos in Argument Clinic howto

2016-08-12 Thread Lele Gaifax
New submission from Lele Gaifax: The attached patch, available also as https://github.com/lelit/cpython/commit/9e33f33e87ad594daae71ccdbe6f0a5c5f8aca65, fixes a few typos in the Argument Clinic howto document. -- components: Argument Clinic files: ac-doc-typos.patch keywords: patch

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-08-12 Thread Cory Benfield
Changes by Cory Benfield : -- nosy: +Lukasa ___ Python tracker ___ ___ Python-bugs-list

[issue27742] Random.randint generates different values in Python2 and Python3

2016-08-12 Thread Wolfgang Rohdewald
Wolfgang Rohdewald added the comment: @SilentGhost: Sorry, I did not see the latest messages, I was referring to msg272511 Having to re-implement everything but rnd.random is not very user friendly. I will do that now for my project. -- ___ Python

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-08-12 Thread Christian Heimes
New submission from Christian Heimes: Linux has a netlink-based user-space interface for Kernel cryptography. Kernel based crypto has a couple of advantages that are explained at http://www.chronox.de/libkcapi/html/ch01s02.html . The document doesn't mention that a crypto socket also supports

  1   2   >