[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-09-03 Thread STINNER Victor
STINNER Victor added the comment: Thank you for fixes Naoki! -- ___ Python tracker ___ ___ Python-bugs-list

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-09-03 Thread Guido van Rossum
Guido van Rossum added the comment: Oh well. While it is undoubtedly useful I wish we had had more experience and factored the API differently. Ditto for the maxsize=N feature. So, while it's not too late, perhaps we should indeed follow Antoine's advice and implement a different queue that

[issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

2017-09-03 Thread Aaron Hall
Aaron Hall added the comment: Serhiy, Not sure what else needs to be done to wrap this up. All checks are passing on the pull request. Thoughts? -- ___ Python tracker

Re: ANN: psutil 5.3.0 with full unicode support is out

2017-09-03 Thread Giampaolo Rodola'
Hello Eryk, it is true that the most correct way to represent strings in Python 2 is by dealing with Unicode but it is also true that the most common scenario in both the stdlib and most third party libs is to return and deal with str (bytes) instead, so this is why I decided to do the same in

[issue31319] Rename idlelib to just idle

2017-09-03 Thread Aaron Hall
Changes by Aaron Hall : -- nosy: +Aaron Hall ___ Python tracker ___ ___

[issue31333] Implement ABCMeta in C

2017-09-03 Thread Aaron Hall
Changes by Aaron Hall : -- nosy: +Aaron Hall ___ Python tracker ___ ___

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2017-09-03 Thread Ned Deily
Ned Deily added the comment: New changeset 918edc0edb356d0561062c1dc267b1d68a684b70 by Ned Deily in branch 'master': bpo-12383: Also ignore __PYVENV_LAUNCHER__ (#3278) https://github.com/python/cpython/commit/918edc0edb356d0561062c1dc267b1d68a684b70 --

Re: meaning of [ ]

2017-09-03 Thread Rustom Mody
On Sunday, September 3, 2017 at 5:10:13 PM UTC+5:30, Rick Johnson wrote: > Andrej Viktorovich wrote: > > I suppose p becomes array of strings but what [] means in this statement? > > Generally, it's an inline form of writing a loop that returns a list. There > are other types as well. Tsk tsk

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-09-03 Thread INADA Naoki
INADA Naoki added the comment: New changeset 4cde4bdcc86cb08ee3847500a172cc24eba37ffe by INADA Naoki in branch '2.7': bpo-31095: Fix potential crash during GC (GH-3197) https://github.com/python/cpython/commit/4cde4bdcc86cb08ee3847500a172cc24eba37ffe --

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-09-03 Thread INADA Naoki
INADA Naoki added the comment: New changeset 2eea952b1b9ebbc2d94fd3faca1536c6b4963725 by INADA Naoki in branch '3.6': bpo-31095: fix potential crash during GC (GH-3195) https://github.com/python/cpython/commit/2eea952b1b9ebbc2d94fd3faca1536c6b4963725 --

Re: A question on modification of a list via a function invocation

2017-09-03 Thread Rustom Mody
On Monday, September 4, 2017 at 7:50:22 AM UTC+5:30, Chris Angelico wrote: > On Mon, Sep 4, 2017 at 12:05 PM, Steve D'Aprano wrote: > > On Mon, 4 Sep 2017 04:15 am, Stephan Houben wrote: > > > >> Needless to say, according to the definition in Plotkin's paper, Python > >> is "call-by-value". > > >

Re: A question on modification of a list via a function invocation

2017-09-03 Thread Steve D'Aprano
On Mon, 4 Sep 2017 12:20 pm, Chris Angelico wrote: > This is another proof that you can't divide everything into "pass by > value" vs "pass by reference", unless you mess around with "passing a > reference by value" or other shenanigans. In C, a string is not an > entity; it's simply an array of

Capital ß [was Re: Case-insensitive string equality]

2017-09-03 Thread Steve D'Aprano
On Sat, 2 Sep 2017 01:48 pm, Stefan Ram wrote: > Steve D'Aprano writes: >>[1] I believe that the German government has now officially recognised the >>uppercase form of ß. > > [skip to the last paragraph for some "ß" content, > unless you want to read details

Re: A question on modification of a list via a function invocation

2017-09-03 Thread Chris Angelico
On Mon, Sep 4, 2017 at 12:05 PM, Steve D'Aprano wrote: > On Mon, 4 Sep 2017 04:15 am, Stephan Houben wrote: > >> Needless to say, according to the definition in Plotkin's paper, Python >> is "call-by-value". > > According to Plotkin's definition, when you pass a value

Re: A question on modification of a list via a function invocation

2017-09-03 Thread Steve D'Aprano
On Mon, 4 Sep 2017 04:15 am, Stephan Houben wrote: > Needless to say, according to the definition in Plotkin's paper, Python > is "call-by-value". According to Plotkin's definition, when you pass a value like a 100MB string: "This is a long string of text..." # continues on for millions more

Re: Case-insensitive string equality

2017-09-03 Thread Steve D'Aprano
On Mon, 4 Sep 2017 09:10 am, Gregory Ewing wrote: > Stefan Ram wrote: >> But of >> course, actually the rules of orthography require "Maße" or >> "Masse" and do not allow "MASSE" or "MASZE", just as in >> English, "English" has to be written "English" and not >> "english" or "ENGLISH".

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2017-09-03 Thread Ned Deily
Changes by Ned Deily : -- pull_requests: +3321 ___ Python tracker ___ ___ Python-bugs-list

Re: Case-insensitive string equality

2017-09-03 Thread Gregory Ewing
Stefan Ram wrote: But of course, actually the rules of orthography require "Maße" or "Masse" and do not allow "MASSE" or "MASZE", just as in English, "English" has to be written "English" and not "english" or "ENGLISH". While "english" is wrong in English, there's no rule against

[issue31334] select.poll.poll fails on BSDs with arbitrary negative timeouts

2017-09-03 Thread Riccardo Coccioli
Changes by Riccardo Coccioli : -- pull_requests: +3320 ___ Python tracker ___ ___

python multiprocessing question

2017-09-03 Thread Xristos Xristoou
hello i have create a 4 function using python(f1,f2,f3,f4) and i have 4 cores in my system. def f1() ... ... def f2() ... ... def f3() ... ... def f4() ...

[issue31334] select.poll.poll fails on BSDs with arbitrary negative timeouts

2017-09-03 Thread Riccardo Coccioli
New submission from Riccardo Coccioli: According to the Python documentation for the 'poll.poll([timeout])' method in the 'select' module, any negative value for the 'timeout' parameter is valid and should have the same behaviour [1]: "If timeout is omitted, negative, or None, the call

[issue29212] Python 3.6 logging thread name regression with concurrent.future threads

2017-09-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 7d8282d25d4900dd3367daf28bb393be7f276729 by Gregory P. Smith in branch '3.6': [3.6] bpo-29212: Fix the ugly repr() ThreadPoolExecutor thread name. (GH-2315) (#3276)

testfixtures 5.2.0 released!

2017-09-03 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 5.2.0 featuring the following: * test_datetime and test_time now accept a [1]datetime instance during instantiation to set the initial value. * test_date now accepts a [2]date instance during instantiation

[issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib"

2017-09-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 31b8efeaa893e95358b71eb2b8365552d3966b4a by Gregory P. Smith in branch '3.6': [3.6] bpo-9146: Raise a ValueError if OpenSSL fails to init a hash func (#3274) https://github.com/python/cpython/commit/31b8efeaa893e95358b71eb2b8365552d3966b4a

[issue29212] Python 3.6 logging thread name regression with concurrent.future threads

2017-09-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- pull_requests: +3319 ___ Python tracker ___ ___

Re: Run Windows commands from Python console

2017-09-03 Thread Terry Reedy
On 9/3/2017 11:17 AM, eryk sun wrote: On Sun, Sep 3, 2017 at 7:56 AM, wrote: What means line below: File "", line 1 I don't have any file. Indeed, on Windows you cannot create a file named "". Python uses this fake name for the code object it compiles when

[issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib"

2017-09-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 4f013881cb0ca7d29620ddb0594dde09bc5d24ca by Gregory P. Smith in branch 'master': bpo-9146: add the missing NEWS entry. (#3275) https://github.com/python/cpython/commit/4f013881cb0ca7d29620ddb0594dde09bc5d24ca --

[issue31333] Implement ABCMeta in C

2017-09-03 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +brett.cannon, haypo, serhiy.storchaka, yselivanov ___ Python tracker ___

[issue31333] Implement ABCMeta in C

2017-09-03 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi: The idea is that creating ABCs is approximately twice slower than normal classes. Plus there are smaller penalties for various operations with ABCs. This mostly influences the Python interpreter start-up time (because of extensive use of ABCs in

[issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib"

2017-09-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- pull_requests: +3318 ___ Python tracker ___ ___

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-03 Thread STINNER Victor
STINNER Victor added the comment: Thank you both for this nice enhancement. -- ___ Python tracker ___ ___

Re: Have do_nothing as default action for dictionary?

2017-09-03 Thread Peter Otten
Christopher Reimer via Python-list wrote: > Greetings, > > I was playing around this piece of example code (written from memory). > > > def filter_text(key, value): > > def do_nothing(text): return text > > return {'this': call_this, > > 'that': call_that, > > 'what': do_nothing > >

[issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib"

2017-09-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- pull_requests: +3317 ___ Python tracker ___ ___

Re: Have do_nothing as default action for dictionary?

2017-09-03 Thread Peter Otten
Christopher Reimer via Python-list wrote: > Greetings, > > I was playing around this piece of example code (written from memory). > > > def filter_text(key, value): > > def do_nothing(text): return text > > return {'this': call_this, > > 'that': call_that, > > 'what': do_nothing > >

Re: Have do_nothing as default action for dictionary?

2017-09-03 Thread Chris Angelico
On Mon, Sep 4, 2017 at 5:31 AM, Christopher Reimer via Python-list wrote: > Greetings, > > I was playing around this piece of example code (written from memory). > > > def filter_text(key, value): > > def do_nothing(text): return text > > return {'this': call_this,

Re: Case-insensitive string equality

2017-09-03 Thread Pavol Lisy
On 9/3/17, Steve D'Aprano wrote: > On Sun, 3 Sep 2017 05:17 pm, Stephan Houben wrote: > >> Generally speaking, the more you learn about case normalization, >> the more attractive case sensitivity looks > > Just because something is hard doesn't mean its not worth

[issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline

2017-09-03 Thread Elena Oat
Changes by Elena Oat : -- pull_requests: +3316 ___ Python tracker ___ ___

Have do_nothing as default action for dictionary?

2017-09-03 Thread Christopher Reimer via Python-list
Greetings, I was playing around this piece of example code (written from memory). def filter_text(key, value):     def do_nothing(text): return text     return {'this': call_this,   'that': call_that,   'what': do_nothing }[key](value) Is

[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2017-09-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: Can this issue be closed? -- nosy: +csabella ___ Python tracker ___ ___

Re: A question on modification of a list via a function invocation

2017-09-03 Thread Stephan Houben
Op 2017-08-17, Rustom Mody schreef : > On Thursday, August 17, 2017 at 6:49:19 AM UTC+5:30, Mok-Kong Shen wrote: >> Am 17.08.2017 um 02:41 schrieb Steve D'Aprano: >> > By reference and by value are not the only two conventions. >> > >> > Perhaps if you go back to the 1950s

Re: Case-insensitive string equality

2017-09-03 Thread Steve D'Aprano
On Sun, 3 Sep 2017 05:17 pm, Stephan Houben wrote: > Generally speaking, the more you learn about case normalization, > the more attractive case sensitivity looks Just because something is hard doesn't mean its not worth doing. And just because you can't please all the people all the time

[issue31332] Building modules by Clang with Microsoft CodeGen

2017-09-03 Thread Tatsunori Uchino
Tatsunori Uchino added the comment: Incorrect: May someone tell use how to use. | V Correct: May someone tell us how to use. -- ___ Python tracker ___

[issue31332] Building modules by Clang with Microsoft CodeGen

2017-09-03 Thread Tatsunori Uchino
Tatsunori Uchino added the comment: I cannot use it from the command line. May someone tell use how to use. PS C:\> cd 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ClangC2\bin\amd64' PS C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ClangC2\bin\amd64> ./clang.exe

[issue31301] Python 2.7 SIGSEGV

2017-09-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

Re: ANN: psutil 5.3.0 with full unicode support is out

2017-09-03 Thread eryk sun
On Sun, Sep 3, 2017 at 9:58 AM, Giampaolo Rodola' wrote: > > - #1040: all strings are encoded by using OS fs encoding. > - #1040: the following Windows APIs on Python 2 now return a string instead > of > unicode: > - Process.memory_maps().path > -

How to get status of Autoplay video from browser

2017-09-03 Thread kabalida16
Hi , I have a URL where Video will start playing after launch (autoplay video) eg:https://techcrunch.com/ Another script will pause the video as soon as it detects a Video is playing. Now I need to verif the video is paused successfully or not. HOw to get the status of video? I am using

Re: Run Windows commands from Python console

2017-09-03 Thread eryk sun
On Sun, Sep 3, 2017 at 7:56 AM, wrote: > > I run Python console in Windows. Can I run cmd prompt commands > there? Python doesn't know the first thing about CMD's "batch" language. Also, Python's shell (i.e. REPL) is not a system administration shell that implicitly runs

ANN: psutil 5.3.0 with full unicode support is out

2017-09-03 Thread Giampaolo Rodola'
Hello all, I'm glad to announce the release of psutil 5.3.0: https://github.com/giampaolo/psutil A blogpost describing the main changes is available here: http://grodola.blogspot.com/2017/09/psutil-530-with-full-unicode-support-is.html About = psutil (process and system utilities) is a

[issue31301] Python 2.7 SIGSEGV

2017-09-03 Thread Jakub Wilk
Jakub Wilk added the comment: Thanks, I can reproduce the crashes with Python 2.7.9. The first commit that fixes them is 5d7d26c403d86e9525820d872eb3e331dbc31750, so I believe this is duplicate of issue25388. -- ___ Python tracker

[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-09-03 Thread David Ellis
David Ellis added the comment: This is related to the issue I'd brought up previously here so closing this would also close that issue: http://bugs.python.org/issue29627 I did originally attempt to add support for bytes in PR where I added support for Path-like objects:

Re: Run Windows commands from Python console

2017-09-03 Thread Rick Johnson
On Sunday, September 3, 2017 at 7:57:14 AM UTC-5, g.mor...@gmail.com wrote: > Hello, > > I run Python console in Windows. Can I run cmd prompt commands there? > > If I run command dir I have: > > >>> dir > > > What does it means? It means that the expression `dir` (in python's universe) is

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: The regression should be fixed now. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 5cbca0235b8da07c9454bcaa94f12d59c2df0ad2 by Antoine Pitrou in branch '3.6': [3.6] Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (GH-3270) (#3271)

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- pull_requests: +3315 ___ Python tracker ___ ___

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 2ef37607b7aacb7c750d008b9113fe11f96163c0 by Antoine Pitrou in branch 'master': Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (#3270) https://github.com/python/cpython/commit/2ef37607b7aacb7c750d008b9113fe11f96163c0

Run Windows commands from Python console

2017-09-03 Thread g . morkvenas
Hello, I run Python console in Windows. Can I run cmd prompt commands there? If I run command dir I have: >>> dir What does it means? If i trying to create file I have error: >>> type NUL > hh.txt File "", line 1 type NUL > hh.txt ^ SyntaxError: invalid syntax What means

Re: Python... feeding an instance as an argument into a new instance.

2017-09-03 Thread Rick Johnson
On Saturday, September 2, 2017 at 7:45:14 PM UTC-5, Steve D'Aprano wrote: > On Sun, 3 Sep 2017 08:34 am, Chris Roberts wrote: > > > Perhaps someone here could help me to get this into > > perspective. Somehow when we start to feed an instance as > > the argument in a new instance. my head

Re: Case-insensitive string equality

2017-09-03 Thread Chris Angelico
On Sun, Sep 3, 2017 at 5:17 PM, Stephan Houben wrote: > Generally speaking, the more you learn about case normalization, > the more attractive case sensitivity looks ;-) Absolutely agreed. My general recommendation is to have two vastly different concepts: "equality

Re: Python... feeding an instance as an argument into a new instance.

2017-09-03 Thread Chris Roberts
On Saturday, September 2, 2017 at 6:34:59 PM UTC-4, Chris Roberts wrote: > Perhaps someone here could help me to get this into perspective. > Somehow when we start to feed an instance as the argument in a new instance. > my head explodes.. > in this case... > a = Foo() > b = Bar(a) > So... > a

Re: meaning of [ ]

2017-09-03 Thread Rick Johnson
Andrej Viktorovich wrote: > I suppose p becomes array of strings but what [] means in this statement? Generally, it's an inline form of writing a loop that returns a list. There are other types as well. https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions --

Re: tkinter keypress events are a mess for numpad keys

2017-09-03 Thread Rick Johnson
Irmen de Jong wrote: > Using tkinter in python3, I was trying to intercept > individual keypresses (and releases) of keys on the numeric > keypad. I want to use this as a simple joystick simulation. > While you can bind the event, actually doing > something sensible with it in a cross platform

Re: meaning of [ ]

2017-09-03 Thread Peter Otten
Andrej Viktorovich wrote: > Hello, > > Trying to understand command: > [p for p in sys.path] > > It prints array of paths. I suppose p becomes array of strings but what [] > means in this statement? This is called "list comprehension", and paths = [p for p in sys.path if "foo" in p] is

[issue31332] Building modules by Clang with Microsoft CodeGen

2017-09-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: You will have to also create a new compiler class for the compiler. If this is more or less the same clang as used on Unix and MacOS, chances are high, the UnixCCompiler class already supports most of it. Only some changes related to paths may be

meaning of [ ]

2017-09-03 Thread Andrej Viktorovich
Hello, Trying to understand command: [p for p in sys.path] It prints array of paths. I suppose p becomes array of strings but what [] means in this statement? -- https://mail.python.org/mailman/listinfo/python-list

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-03 Thread Grzegorz Grzywacz
Grzegorz Grzywacz added the comment: Tests are reusing finished futures. `_yield_and_decref` function do not clear waiters in finished futures. In the initial merge i propose to clear waiters but after review we decide it should be removed. I am confused now, should we change tests or

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- pull_requests: +3314 ___ Python tracker ___ ___

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-09-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you Victor. There is indeed a logic error in the new code. I'm opening a new PR. -- ___ Python tracker ___

Re: tkinter keypress events are a mess for numpad keys

2017-09-03 Thread Stephan Houben
Op 2017-08-29, Irmen de Jong schreef : > I'll have a look at https://www.tcl.tk/man/tcl8.6/TkCmd/keysyms.htm > but I don't have high hopes because I already tried empirically to > figure out the distinguishing attributes of the keypress event object, > on various platforms

Re: Case-insensitive string equality

2017-09-03 Thread Stephan Houben
Op 2017-09-02, Pavol Lisy schreef : > But problem is that if somebody like to have stable API it has to be > changed to "do what the Unicode consortium said (at X.Y. )" :/ It is even more exciting. Presumably a reason to have case-insentivity is to be compatible with

[issue31301] Python 2.7 SIGSEGV

2017-09-03 Thread Cody Sixteen
Cody Sixteen added the comment: c@debian:~/tools/afl/afl-2.50b/out_python/crashes$ ls -la total 160 drwx-- 2 c c 4096 Aug 31 00:23 . drwx-- 5 c c 4096 Sep 3 09:04 .. -rw--- 1 c c 29352 Aug 28 16:14 id:00,sig:11,src:00,op:havoc,rep:32 -rw--- 1 c c 62917 Aug 28 17:08

[issue31185] Miscellaneous errors in asyncio speedup module

2017-09-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31185] Miscellaneous errors in asyncio speedup module

2017-09-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 98bbeb78e06d5756491705920e72f9721850c727 by Serhiy Storchaka in branch '3.6': bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076) (#3269) https://github.com/python/cpython/commit/98bbeb78e06d5756491705920e72f9721850c727

[issue30828] Out of bounds write in _asyncio_Future_remove_done_callback

2017-09-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___