[issue31185] Miscellaneous errors in asyncio speedup module

2017-09-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3313 ___ Python tracker ___ ___

[issue31185] Miscellaneous errors in asyncio speedup module

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

[issue27099] IDLE: turn built-in extensions into regular modules

2017-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The warning is from code context. The callback after loops run whether one uses context or not and there is currently no mechanism to stop them. I will add a cancel function soon. Or the loops might be eliminated by adding context to the config change

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

2017-09-02 Thread STINNER Victor
STINNER Victor added the comment: "concurrent.futures.as_completed() memory inefficiency" hum, sadly the commit 97e1b1c81458d2109b2ffed32ffa1eb643a6c3b9 introduced a reference leak. Example: $ ./python -m test -R 3:3 -test_concurrent_futures -m

[issue12154] PyDoc Partial Functions

2017-09-02 Thread Aaron Hall
Aaron Hall added the comment: It seems that this issue is still properly open. (Another open issue seems be related: http://bugs.python.org/issue30129) In the docs on partial, we have: >>> from functools import partial >>> basetwo = partial(int, base=2) >>> basetwo.__doc__ = 'convert base 2

[issue31332] Building modules by Clang with Microsoft CodeGen

2017-09-02 Thread Tatsunori Uchino
New submission from Tatsunori Uchino: Microsoft released a new compiler for VC++ that complies with more of modern C++ than the standard compiler. https://blogs.msdn.microsoft.com/vcblog/2016/03/31/clang-with-microsoft-codegen-march-2016-released/ Is it possible to support it by creating a

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

2017-09-02 Thread Steve D'Aprano
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 explodes.. in this case... > a = Foo() > b = Bar(a) > So... > a is a 'Foo instance' with

Re: Battle of the garbage collectors, or ARGGHHHHHH!!!!

2017-09-02 Thread CFK
On Wed, Apr 26, 2017 at 10:38 PM, Cem Karan wrote: > > On Apr 24, 2017, at 8:54 PM, Jon Ribbens > wrote: > > > On 2017-04-24, CFK wrote: > >> Long version: I'm trying to write bindings for python via ctypes to > control > >> a

[issue27099] IDLE: turn built-in extensions into regular modules

2017-09-02 Thread Cheryl Sabella
Cheryl Sabella added the comment: The test pass on Ubuntu. I'm getting a warning, but it's not because of this change. test_init (idlelib.idle_test.test_tree.TreeTest) ... invalid command name "140245621847896timer_event" while executing "140245621847896timer_event" ("after" script)

Re: Delay a computation in another thread

2017-09-02 Thread Terry Reedy
On 9/2/2017 6:53 AM, Steve D'Aprano wrote: I want to delay a computation and then print it, in the REPL (interactive interpreter). I have something like this: import time from threading import Timer def do_work(): x = 2 + 2 print("It is", time.asctime(), "and 2+2 is", x) def

[issue31331] IDLE: Move prompts with input.

2017-09-02 Thread Terry J. Reedy
New submission from Terry J. Reedy: When this program (from thread by Steven D'Aprano) on python-list is run import time from threading import Timer def do_work(): x = 2 + 2 print("It is", time.asctime(), "and 2+2 is", x) def go(): Timer(10, do_work, ()).start() # schedule it in

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

2017-09-02 Thread Irv Kalb
> On Sep 2, 2017, at 3:34 PM, 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...

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

2017-09-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Guido] > Why was task management ever added? See http://bugs.python.org/issue1455676 Problem being solved: How can a requestor of a service get notified when that service is complete given that the work is being done by a daemon thread that never

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

2017-09-02 Thread Chris Roberts
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 is a 'Foo instance' with properties and methods. b is a 'Bar instance' Since b is using

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

2017-09-02 Thread Tim Peters
Tim Peters added the comment: [Guido] > Why was task management ever added? Raymond published a "joinable" queue class as a recipe here: http://code.activestate.com/recipes/475160-taskqueue/ and later folded it into the standard Python queue. So the usual answer applies: "it was easy to

Re: possible bug in while loop test

2017-09-02 Thread MRAB
On 2017-09-02 18:53, Charles Hixson wrote: python3 --version Python 3.5.3 Running on Debian stretch In this code s is a string parameter while (j < k and \ (s[j].isalnum()) or \ (s[j] in seps and s[j+1].isalnum()) ): j = j + 1 print ("i = {0}, j =

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

2017-09-02 Thread desbma
desbma added the comment: Gregory, please don't forget to backport the fix in the 3.6 branch, so that it is released with Python 3.6.3. Thank you -- ___ Python tracker

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

2017-09-02 Thread Guido van Rossum
Guido van Rossum added the comment: Agreed; the Queue class has a bunch of rarely used functionality rolled in... Why was task management ever added? -- ___ Python tracker

[issue22281] ProcessPoolExecutor/ThreadPoolExecutor should provide introspection APIs

2017-09-02 Thread Dan O'Reilly
Dan O'Reilly added the comment: Unfortunately, I don't really have time to continue working on this anymore (or any of the other proposed patches I had submitted around 2014). -- ___ Python tracker

Re: possible bug in while loop test

2017-09-02 Thread Peter Otten
Charles Hixson wrote: > python3 --version > Python 3.5.3 > > Running on Debian stretch > > In this code s is a string parameter > > while (j < k and \ > (s[j].isalnum()) or \ >(s[j] in seps and s[j+1].isalnum()) ): > j = j + 1 > print ("i = {0}, j =

[issue31329] Add idlelib module entry to doc

2017-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Also document in idle doc that 'import idlelib.idle' is the programmatic API, and that icons and context menus may be available. In any case, add more information on 'How to start IDLE'. -- ___ Python tracker

[issue1346874] httplib simply ignores CONTINUE

2017-09-02 Thread Georg Sauthoff
Changes by Georg Sauthoff : -- nosy: +gms ___ Python tracker ___ ___ Python-bugs-list

cx_Oracle 6.0.2

2017-09-02 Thread Anthony Tuininga
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python 3.x and 2.x and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to

possible bug in while loop test

2017-09-02 Thread Charles Hixson
python3 --version Python 3.5.3 Running on Debian stretch In this code s is a string parameter while (j < k and \ (s[j].isalnum()) or \ (s[j] in seps and s[j+1].isalnum()) ): j = j + 1 print ("i = {0}, j = {1}, k = {2}, len[s] = {3}". \ format(i,

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

2017-09-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just a random thought: if there was a SimpleQueue class with very basic functionality (only FIFO, only get(), put() and empty(), no size limit, no task management), it would be easier to make it reentrant using C. (FTR, multiprocessing also has a light-weight

[issue22281] ProcessPoolExecutor/ThreadPoolExecutor should provide introspection APIs

2017-09-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Dan, not sure you're still interested on working on this? Looking at the API, IMHO it should be consolidated as a simple stats() method, which allows for a consistent snapshot. -- nosy: +pitrou stage: -> needs patch versions: +Python 3.7 -Python 3.5

Re: Delay a computation in another thread

2017-09-02 Thread eryk sun
On Sat, Sep 2, 2017 at 5:53 AM, Steve D'Aprano wrote: > > The problem is that after the message is printed, the REPL's prompt is > disrupted. This is especially annoying when I'm in the middle of typing a > line. > This is just a cosmetic flaw, but it would be nice if

[issue21009] Potential deadlock in concurrent futures when garbage collection occurs during Queue.get

2017-09-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't really understand this issue. How is concurrent.futures supposed to be the culprit here? Can you elaborate which weakref callback you are talking about? -- nosy: +pitrou ___ Python tracker

[issue31144] add initializer to concurrent.futures.ProcessPoolExecutor

2017-09-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, looks like this was already proposed in issue 21423. Closing as duplicate. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an

[issue31144] add initializer to concurrent.futures.ProcessPoolExecutor

2017-09-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: That would sound like a reasonable addition, yes. -- nosy: +pitrou versions: +Python 3.7 -Python 3.6 ___ Python tracker

Re: Delay a computation in another thread

2017-09-02 Thread MRAB
On 2017-09-02 11:59, Steve D'Aprano wrote: On Sat, 2 Sep 2017 08:53 pm, Steve D'Aprano wrote: I want to delay a computation and then print it, in the REPL (interactive interpreter). I have something like this: [...] The other problem is that if I exit the REPL while a Timer is still active,

[issue30421] argparse: relative include of config files

2017-09-02 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list

[issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes

2017-09-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes

2017-09-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 990b2d043cdfaafc3378550f7d27259410a6b918 by Antoine Pitrou (Pauli Virtanen) in branch '2.7': [2.7] bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (GH-31) (#3242)

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

2017-09-02 Thread paul j3
paul j3 added the comment: http://bugs.python.org/issue17113 argparse.RawDescriptionHelpFormatter should not delete blank lines This provides more details on why this is happening. I suggest using adding a space between newlines, thus: '\n \n'. HelpFormatter.format_help is just looking for

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

2017-09-02 Thread paul j3
paul j3 added the comment: I've seen this before, either in another bug/issue or a Stackoverflow question. The basic change in RawTextHelpFormatter is to turn off the line wrapping for texts like the description. Multiple newlines are preserved at this step. But after assembling all the

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

2017-09-02 Thread R. David Murray
R. David Murray added the comment: If that is the intended definition of "whitespace" in this context (I have no opinion on that so far), then the docs need amplification, because in general "whitespace" includes newlines. On the other hand, this might be considered a bug in the code and not

Re: Delay a computation in another thread

2017-09-02 Thread Chris Angelico
On Sat, Sep 2, 2017 at 8:53 PM, Steve D'Aprano wrote: > The problem is that after the message is printed, the REPL's prompt is > disrupted. This is especially annoying when I'm in the middle of typing a > line. > This is just a cosmetic flaw, but it would be nice if I

Re: Delay a computation in another thread

2017-09-02 Thread Steve D'Aprano
On Sat, 2 Sep 2017 08:53 pm, Steve D'Aprano wrote: > I want to delay a computation and then print it, in the REPL (interactive > interpreter). I have something like this: [...] > The other problem is that if I exit the REPL while a Timer is still active, it > freezes until the time has run before

Delay a computation in another thread

2017-09-02 Thread Steve D'Aprano
I want to delay a computation and then print it, in the REPL (interactive interpreter). I have something like this: import time from threading import Timer def do_work(): x = 2 + 2 print("It is", time.asctime(), "and 2+2 is", x) def schedule_work(): Timer(60, do_work, ()).start()

Re: Case-insensitive string equality

2017-09-02 Thread Pavol Lisy
On 9/2/17 at 4:21, Steve D'Aprano wrote: > If regular case-sensitive string comparisons don't support the locale, why > should case-insensitive comparisons be required to? I think that Chris answered very good before: On 9/2/17 at 2:53 AM, Chris Angelico

[issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string

2017-09-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review versions: +Python 2.7, Python 3.6 ___ Python tracker ___

Re: If you are running 32-bit 3.6 on Windows, please test this

2017-09-02 Thread Pavol Lisy
On 9/2/17, eryk sun wrote: > On Fri, Sep 1, 2017 at 3:23 AM, Peter Otten <__pete...@web.de> wrote: >> >> I think you have to specify the types yourself: >> > import ctypes > libm = ctypes.cdll.LoadLibrary("libm.so") > libm.sqrt(42) >> 0 > libm.sqrt.argtypes =

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

2017-09-02 Thread Elena Oat
Elena Oat added the comment: It maintains *whitespace*, not the new lines. I've tested this using whitespaces and I think it keeps them according to the original description. See the image attached. -- nosy: +Elena.Oat Added file: http://bugs.python.org/file47117/Screen Shot

Re: Python string replace the values

2017-09-02 Thread Peter Otten
Steve D'Aprano wrote: > On Sat, 2 Sep 2017 03:13 am, Ganesh Pal wrote: > >> Example : >> >> "a" and "1" => a0001 >> >> "a" and "aa" => c00aa > > Why does the leading 'a' change to a 'c'? Is that a mistake? I'll assume > its a typo. > > You want string slicing. > > base = 'a'

Re: Python string replace the values

2017-09-02 Thread Ganesh Pal
MRAB , Thanks for your solution it looks neat and best ! On Fri, Sep 1, 2017 at 11:14 PM, MRAB wrote: > On 2017-09-01 18:13, Ganesh Pal wrote: > >> In the fixed length string i.e "a",last 4 bits i.e "" should be >> replaced by the user provided value ( the