[issue27350] Compact and ordered dict

2016-08-07 Thread INADA Naoki
INADA Naoki added the comment: I see, and I'm sorry about that. -- ___ Python tracker ___ ___

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file44042/do_raise_v2.patch ___ Python tracker ___

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your reply Raymond. You always provide thoughtful feedbacks, though it makes me somewhat more nervous. ;) (I am nervous about making noise here and waste others' time.) > Have you checked all the possibly code paths to be sure? Yes. I did check all

[issue6422] timeit called from within Python should allow autoranging

2016-08-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the patch is good to go. -- ___ Python tracker ___ ___

Re: Running Python from the source repo

2016-08-07 Thread Chris Angelico
On Mon, Aug 8, 2016 at 12:11 PM, Steven D'Aprano wrote: > I have cloned the Python source repo, and build CPython, as described here: > > https://docs.python.org/devguide/ > > > Now a little bit later, I want to update the repo, so I run: > > hg fetch > > to get and

Running Python from the source repo

2016-08-07 Thread Steven D'Aprano
I have cloned the Python source repo, and build CPython, as described here: https://docs.python.org/devguide/ Now a little bit later, I want to update the repo, so I run: hg fetch to get and apply any changes. How do I know if I need to rebuild Python? I don't want to have to rebuild after

Re: Ned Batchelder: Loop Like A Native

2016-08-07 Thread Steven D'Aprano
On Mon, 8 Aug 2016 09:19 am, Rick Johnson wrote: > On Saturday, August 6, 2016 at 10:43:01 PM UTC-5, Steven D'Aprano wrote: > >> Yes. The two ways of ending the loop are distinct and different: >> >> - reach the end, and stop; >> - bail out early. >> >> >> When you read a book, there are two

[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the bug report. This is a case of something that used to work fine but was affected by an incidental change elsewhere. To support the use case for deterministic sequences of values starting from a known point, the docs promise, "If a new

Re: Awful code of the week

2016-08-07 Thread Steven D'Aprano
On Mon, 8 Aug 2016 08:03 am, Tim Delaney wrote: > On 7 August 2016 at 16:54, Steven D'Aprano < > steve+comp.lang.pyt...@pearwood.info> wrote: > >> Seen in the office IRC channel: >> >> >> (13:23:07) fred: near_limit = [] >> (13:23:07) fred: near_limit.append(1) >> (13:23:07) fred:

[issue6422] timeit called from within Python should allow autoranging

2016-08-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: Nick gave a +1 to my auto-range patch with callback on 2016-05-13, and there's been no negative feedback since. Should I go ahead and check it in for 3.6? -- ___ Python tracker

[issue27128] Add _PyObject_FastCall()

2016-08-07 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file44041/fastcall-2.patch ___ Python tracker ___

[issue27128] Add _PyObject_FastCall()

2016-08-07 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file44040/fastcall-2.patch ___ Python tracker ___

[issue27128] Add _PyObject_FastCall()

2016-08-07 Thread STINNER Victor
STINNER Victor added the comment: Rebased patch. -- Added file: http://bugs.python.org/file44040/fastcall-2.patch ___ Python tracker ___

[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-07 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-07 Thread Glyph Lefkowitz
New submission from Glyph Lefkowitz: The purpose of 'seeding' a random number generator is usually to supply a deterministic sequence of values starting from a known point. This works fine if you seed random.Random with an integer. Often (for example, see Minecraft's map generation

Re: Win32 API in pywin32

2016-08-07 Thread Rick Johnson
On Thursday, August 4, 2016 at 6:58:05 PM UTC-5, Lawrence D’Oliveiro wrote: > On Friday, August 5, 2016 at 11:50:28 AM UTC+12, jj0ge...@gmail.com wrote: > > According to Python.org Mark Hammond has an Add-on (pywin32) that supports > > Win32 and COM. > > Are people still using Win32? I thought

Re: Win32 API in pywin32

2016-08-07 Thread Rick Johnson
On Thursday, August 4, 2016 at 6:50:28 PM UTC-5, jj0ge...@gmail.com wrote: > According to Python.org Mark Hammond has an Add-on > (pywin32) that supports Win32 and COM. Does anyone know if > the Add-on covers all Win32 API functions, and if not is > there a list of the subset of Win32 API

Re: make an object read only

2016-08-07 Thread Rick Johnson
On Thursday, August 4, 2016 at 7:03:32 PM UTC-5, Lawrence D’Oliveiro wrote: > As GvR has said: “we’re all consenting adults here”. But as we've learned from animal farm, some are more consenting than others. -- https://mail.python.org/mailman/listinfo/python-list

Re: Ned Batchelder: Loop Like A Native

2016-08-07 Thread Rick Johnson
On Saturday, August 6, 2016 at 10:43:01 PM UTC-5, Steven D'Aprano wrote: > Yes. The two ways of ending the loop are distinct and different: > > - reach the end, and stop; > - bail out early. > > > When you read a book, there are two ways of stopping: > > - reach the end, and run out of pages

Re: Ned Batchelder: Loop Like A Native

2016-08-07 Thread Ned Batchelder
On Sunday, August 7, 2016 at 6:52:45 PM UTC-4, Lawrence D’Oliveiro wrote: > On Sunday, August 7, 2016 at 1:26:48 PM UTC+12, Ned Batchelder wrote: > > I'm merely pointing out that your concern about multiple ways to exit loops > > sounds like exactly what was discussed here two months ago. > > And

[issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux

2016-08-07 Thread Sworddragon
Sworddragon added the comment: Maybe it sounded a bit confusing but this text was not to be meant as a direct match against the documentation. -- ___ Python tracker

Re: Ned Batchelder: Loop Like A Native

2016-08-07 Thread Lawrence D’Oliveiro
On Sunday, August 7, 2016 at 1:26:48 PM UTC+12, Ned Batchelder wrote: > I'm merely pointing out that your concern about multiple ways to exit loops > sounds like exactly what was discussed here two months ago. And one could point out that your presentation on Python loops sounds exactly like

Re: Win32 API in pywin32

2016-08-07 Thread Lawrence D’Oliveiro
On Sunday, August 7, 2016 at 4:59:39 PM UTC+12, Rustom Mody wrote: > To be fair my head spins in Linux-land trying to work out what all these > 32's and 64's mean: mingw-w64-x86-64 The package descriptions tell you: mingw-w64 - Development environment targeting 32- and 64-bit Windows

[issue27350] Compact and ordered dict

2016-08-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: You make need to ask for review help on python-dev. Patches this big take a lot of time and energy to review. Making pings into the blind doesn't help much (most of the patch reviewers are highly time constrained). --

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Have you checked all the possibly code paths to be sure? "Seems to be unnecessary" is insufficient reason for undoing Guido's code that has stood since 1997. Looking at the snarl of possible code paths, I not finding it obvious why some of the paths

Re: Awful code of the week

2016-08-07 Thread Tim Delaney
On 7 August 2016 at 16:54, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > Seen in the office IRC channel: > > > (13:23:07) fred: near_limit = [] > (13:23:07) fred: near_limit.append(1) > (13:23:07) fred: near_limit = len(near_limit) > (13:23:09) fred: WTF > Assuming

[issue26624] Windows hangs in call to CRT setlocale()

2016-08-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I updated ucrtbased.dll and resolved the warning as described in #27705. -- ___ Python tracker ___

[issue27705] Updating old C:/Windows/System32/ucrtbased.dll

2016-08-07 Thread Terry J. Reedy
New submission from Terry J. Reedy: This is a continuation of msg269741 from #26624, summarizing how to resolve this message. C:\WINDOWS\SYSTEM32\ucrtbased.dll is version 10.0.10240.16384 WARN: ucrtbased contains known issues. Please update Visual Studio or the Windows SDK. See:

Re: How do I make a game in Python ?

2016-08-07 Thread Michael Torrie
On 08/07/2016 08:47 AM, Cai Gengyang wrote: > Games are great. I guess I would like to invent animated games that > can teach students how to solve mathematical, physics, engineering , > Go and programming puzzles, basic financial literacy and investing > techniques through interesting and

[issue27704] bytes(x) is slow when x is bytearray

2016-08-07 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: the patch seems to be fine. -- nosy: +haypo, matrixise ___ Python tracker ___

[issue27704] bytes(x) is slow when x is bytearray

2016-08-07 Thread INADA Naoki
New submission from INADA Naoki: When bytes(x), bytes_new checks if x is integer via PyNumber_AsSize_t(x). It cause TypeError internally. When x is not an integer, especially bytearray or memoryview, the internal exception cause significant overhead. # HEAD $ ./python -m timeit -s

[issue27392] Add a server_side keyword parameter to create_connection

2016-08-07 Thread Jim Fulton
Jim Fulton added the comment: FTR another use case for this. :) We have a ZEO applications where individual database users authenticate via self-signed certs. The server's SSL connection has to have this collection of certs. User CRUD operations can add and remove certs to authenticate

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-07 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Christian, I have reviewed your patch, seems to be fine for me. -- nosy: +matrixise ___ Python tracker ___

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-07 Thread Christian Heimes
Changes by Christian Heimes : Added file: http://bugs.python.org/file44038/Port-Python-s-SSL-module-to-OpenSSL-1.1.0.patch ___ Python tracker

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-07 Thread Christian Heimes
Changes by Christian Heimes : Added file: http://bugs.python.org/file44037/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0.patch ___ Python tracker

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-07 Thread Christian Heimes
Changes by Christian Heimes : Removed file: http://bugs.python.org/file42526/0001-Port-Python-s-SSL-module-to-OpenSSL-1.1.0-WIP.patch ___ Python tracker

Re: Python slang

2016-08-07 Thread Bernd Nawothnig
On 2016-08-06, Chris Angelico wrote: > On Sun, Aug 7, 2016 at 5:37 AM, Bernd Nawothnig > wrote: >>> But SQL's NULL is a cross between C's NULL, IEEE's NaN, Cthulhu, and >>> Emrakul. >> >> SQL NULL has the semantic of "unknown". So if one or both operands of >> a

[issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor

2016-08-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: cleaned up a bit with documentation added and submitted. thanks. ThreadPoolExecutor threads now have a default name as well, because why not. -- resolution: -> fixed stage: patch review -> commit review status: open -> closed

[issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor

2016-08-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1002a1bdc5b1 by Gregory P. Smith in branch 'default': Issue #27664: Add to concurrent.futures.thread.ThreadPoolExecutor() https://hg.python.org/cpython/rev/1002a1bdc5b1 -- nosy: +python-dev ___ Python

[issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor

2016-08-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: A workaround for this on 3.5 and older versions is probably to do: initialization: num_q = queue.Queue() map(num_q.put, range(max_workers)) Then schedule max_workers identical tasks: def task(): threading.current_thread().name = '%s_%d' % (your_prefix,

[issue26750] Mock autospec does not work with subclasses of property()

2016-08-07 Thread Berker Peksag
Berker Peksag added the comment: Thanks! Is there a reason not to use inspect.isdatadescriptor() instead of _is_data_descriptor()? -- stage: commit review -> resolved ___ Python tracker

[issue23306] Within zipfile, use of zlib.crc32 raises OverflowError at argument-parsing time on large strings

2016-08-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: This appears to have been fixed by at least issue27130's https://hg.python.org/cpython/rev/2192edcfea02 recent commits. greg:cpython/build27$ ./python -c "import zlib;zlib.crc32('a'*(1<<31))" greg:cpython/build27$ ./python ../zipfile_2gb_test.py True

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-08-07 Thread Vinay Sajip
Changes by Vinay Sajip : Added file: http://bugs.python.org/file44036/refresh-2016-08-07.diff ___ Python tracker ___

[issue10721] Remove HTTP 0.9 server support

2016-08-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker ___ ___

[issue26750] Mock autospec does not work with subclasses of property()

2016-08-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker

[issue26750] Mock autospec does not work with subclasses of property()

2016-08-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset e947248100ae by Gregory P. Smith in branch '3.5': Issue #26750: unittest.mock.create_autospec() now works properly https://hg.python.org/cpython/rev/e947248100ae New changeset 0bc14c91ef7e by Gregory P. Smith in branch 'default': Issue #26750:

Error running the exe file in Windows "Failed to execute script pyi_rth_pkgres"

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

Re: How do I make a game in Python ?

2016-08-07 Thread Cai Gengyang
Games are great. I guess I would like to invent animated games that can teach students how to solve mathematical, physics, engineering , Go and programming puzzles, basic financial literacy and investing techniques through interesting and enriching games and puzzles and university admissions

[issue26750] Mock autospec does not work with subclasses of property()

2016-08-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___

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

2016-08-07 Thread Martin Panter
Martin Panter added the comment: Yes when I say “text” I mean str objects, as opposed to byte strings, etc. I wonder if it would be safer to test for TextIOBase. With the read(0) hack, the zero size may be unexpected. A file object may need special handling to generate an empty result, or to

[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured

2016-08-07 Thread Florian Höch
Florian Höch added the comment: It seems this hasn't landed yet? -- ___ Python tracker ___ ___

[issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise

2016-08-07 Thread Xiang Zhang
New submission from Xiang Zhang: In do_raise, the two Py_XDECREFs at the final of the success branch seem doing unnecessary NULL checks. -- components: Interpreter Core files: do_raise.patch keywords: patch messages: 272119 nosy: serhiy.storchaka, xiang.zhang priority: normal severity:

[issue23740] http.client request and send method have some datatype issues

2016-08-07 Thread Martin Panter
Martin Panter added the comment: I’ve decided I would prefer deprecating the Latin-1 encoding, rather than adding more encoding support for iterables and text files. If not deprecating it altogether, at least prefer just ASCII encoding (like Python 2). The urlopen() function already rejects

[issue27702] [Patch] Only use SOCK_RAW when defined

2016-08-07 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- nosy: +matrixise ___ Python tracker ___ ___

[issue27702] [Patch] Only use SOCK_RAW when defined

2016-08-07 Thread Ed Schouten
New submission from Ed Schouten: POSIX only requires socket types SOCK_STREAM, SOCK_DGRAM and SOCK_SEQPACKET to be present. SOCK_RAW is optional, as it is placed between [RS] tags in the specification: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html It looks like

[issue18049] Re-enable threading test on OSX

2016-08-07 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: yes, maybe, could you provide a patch ? -- ___ Python tracker ___ ___

[issue10496] Python startup should not require passwd entry

2016-08-07 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue10496] Python startup should not require passwd entry

2016-08-07 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: Another scenario how this could happen is when Python interpreter is run from a scheduled job on a BlueGene/Q node by the CNK; this is a minimalist execution environment where getpwuid() is unable to resolve home directories for UIDs running the jobs.

[issue27701] [posixmodule] [Refactoring patch] Simply call into *at() functions unconditionally when present

2016-08-07 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- nosy: +matrixise ___ Python tracker ___ ___

[issue27701] [posixmodule] [Refactoring patch] Simply call into *at() functions unconditionally when present

2016-08-07 Thread Ed Schouten
New submission from Ed Schouten: CloudABI is a sandboxed UNIX-like environment (https://mail.python.org/pipermail/python-dev/2016-July/145708.html). As it implements a security framework similar to FreeBSD's Capsicum, file system access is only permitted by using POSIX-2008-style directory

Re: Python slang

2016-08-07 Thread Anders J. Munch via Python-list
Marco Sulla via Python-list: > Well, they are the most used languages. They weren't when Python was created. Python's terms raise/except and self were normal for the time. C++ was the odd one out. throw/catch and this are Stroustrup's inventions, no other language used those terms. It was

Re: Awful code of the week

2016-08-07 Thread Chris Angelico
On Sun, Aug 7, 2016 at 4:54 PM, Steven D'Aprano wrote: > Seen in the office IRC channel: > > > (13:23:07) fred: near_limit = [] > (13:23:07) fred: near_limit.append(1) > (13:23:07) fred: near_limit = len(near_limit) > (13:23:09) fred: WTF > > > >

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2016-08-07 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: you can merge the patch. -- nosy: +matrixise ___ Python tracker ___ ___

[issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux

2016-08-07 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Which sentence with "Windows only" ? Thanks -- ___ Python tracker ___ ___

Awful code of the week

2016-08-07 Thread Steven D'Aprano
Seen in the office IRC channel: (13:23:07) fred: near_limit = [] (13:23:07) fred: near_limit.append(1) (13:23:07) fred: near_limit = len(near_limit) (13:23:09) fred: WTF Speaks for itself. -- Steve -- https://mail.python.org/mailman/listinfo/python-list

Re: where is it

2016-08-07 Thread eryk sun
On Sat, Aug 6, 2016 at 5:16 PM, Dave via Python-list wrote: > I am trying to associate the .py file extension with idle...where IS > idle? Can you > make it a bit more difficult to load/use your software please. You can run IDLE from the command-line as follows:

Re: Win32 API in pywin32

2016-08-07 Thread Chris Angelico
On Sun, Aug 7, 2016 at 2:59 PM, Rustom Mody wrote: > To be fair my head spins in Linux-land trying to work out what all these > 32's and 64's mean: mingw-w64-x86-64 There aren't any 32s in that. The beginning of that probably means the Win64 version of MinGW, which (IIRC)