[issue31185] Miscellaneous errors in asyncio speedup module

2017-09-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +3313

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 notification mechanism.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
test.test_concurrent_futures.ProcessPoolAsCompletedTests.test_zero_timeout
(...)
test_concurrent_futures leaked [27, 27, 27] references, sum=81
test_concurrent_futures leaked [16, 17, 16] memory blocks, sum=49
(...)

--
nosy: +haypo
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 string to int'

But the help function doesn't find that __doc__:

>>> help(basetwo)
class partial(builtins.object)
 |  partial(func, *args, **keywords) - new function with partial application
...

Perhaps this could be solved by having PyDoc check for isinstance of a Callable 
or making partial an instance of a Function?

>>> type(basetwo)

>>> basetwo.__dict__
{'__doc__': 'convert base 2 string to int'}
>>> type(basetwo)

>>> isinstance(basetwo, partial)
True
>>> from types import FunctionType; from collections import Callable
>>> isinstance(basetwo, FunctionType)
False
>>> isinstance(basetwo, Callable)
True

The partial repr seems to get us close:

>>> repr(basetwo)
"functools.partial(, base=2)"

I haven't dug much further into this, but I'm interested in doing the work to 
finish it, and I don't think the patch submitted 6 years ago quite gets us 
there. Any other thoughts before I decide to give it a go?

--
nosy: +Aaron Hall
versions: +Python 3.7 -Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 new script based on  
Lib/distutils/msvccompiler.py to Lib/distutils and adding a new item in the 
following dictionary in Lib/distutils/ccompiler.py?  


compiler_class = { 'unix':('unixccompiler', 'UnixCCompiler',
   "standard UNIX-style compiler"),
   'msvc':('_msvccompiler', 'MSVCCompiler',
   "Microsoft Visual C++"),
   'cygwin':  ('cygwinccompiler', 'CygwinCCompiler',
   "Cygwin port of GNU C Compiler for Win32"),
   'mingw32': ('cygwinccompiler', 'Mingw32CCompiler',
   "Mingw32 port of GNU C Compiler for Win32"),
   'bcpp':('bcppcompiler', 'BCPPCompiler',
   "Borland C++ Compiler"),
 }

The executable of it is at C:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\ClangC2\bin\amd64.  The help message of it is:

OVERVIEW: clang LLVM compiler

USAGE: clang.exe [options] 

OPTIONS:
  -###Print (but do not run) the commands to run for this 
compilation
  --analyze   Run the static analyzer
  -arcmt-migrate-emit-errors
  Emit ARC errors even if the migrator can fix them
  -arcmt-migrate-report-output 
  Output path for the plist report
  -B2  Location of backend dll
  -bigobj Generate extended COFF format
  --cuda-device-only  Do device-side CUDA compilation only
  --cuda-host-onlyDo host-side CUDA compilation only
  --cuda-path= CUDA installation path
  -cxx-isystem 
  Add directory to the C++ SYSTEM include search path
  -c  Only run preprocess, compile, and assemble steps
  -d2  Additional arguments to forward to the backend
  -dD Print macro definitions in -E mode in addition to 
normal output
  -dependency-dot  Filename to write DOT-formatted header dependencies to
  -dependency-file 
  Filename (or -) to write dependency output to
  -dM Print macro definitions in -E mode instead of normal 
output
  -emit-ast   Emit Clang AST files for source inputs
  -emit-llvm  Use the LLVM representation for assembler and object 
files
  -E  Only run the preprocessor
  -faltivec   Enable AltiVec vector initializer syntax
  -fansi-escape-codes Use ANSI escape codes for diagnostics
  -fapple-kextUse Apple's kernel extensions ABI
  -fapple-pragma-pack Enable Apple gcc-compatible #pragma pack handling
  -fapplication-extension Restrict code to those available for App Extensions
  -fasync-exceptions  Catch SEH exceptions in catch-alls
  -fblocksEnable the 'blocks' language feature
  -fborland-extensionsAccept non-standard constructs supported by the 
Borland compiler
  -fbuild-session-file=
  Use the last modification time of  as the build 
session timestamp
  -fbuild-session-timestamp=
  Time when the current build session started
  -fcolor-diagnostics Use colors in diagnostics
  -fcomment-block-commands=
  Treat each comma separated argument in  as a 
documentation comment block command
  -fcoverage-mapping  Generate coverage mapping to enable code coverage 
analysis
  -fcxx-exceptionsEnable C++ exceptions
  -fdata-sections Place each data in its own section (ELF Only)
  -fdebug-prefix-map=
  remap file source paths in debug info
  -fdebug-types-section   Place debug types in their own section (ELF Only)
  -fdeclspec  Allow __declspec as a keyword
  -fdelayed-template-parsing
  Parse templated function definitions at the end of 
the translation unit
  -fdiagnostics-parseable-fixits
  Print fix-its in machine parseable form
  -fdiagnostics-print-source-range-info
  Print source range spans in numeric form
  -fdiagnostics-show-note-include-stack
  Display include stacks for diagnostic notes
  -fdiagnostics-show-option
  Print option name with mappable diagnostics
  -fdiagnostics-show-template-tree
  Print a template comparison tree for differing 
templates
  -fdollars-in-identifiers
  Allow '$' in identifiers
  -femit-all-declsEmit all declarations, even if unused
  -femulated-tls  Use emutls functions to access thread_local variables
  

[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)
invalid command name "140245613968200font_timer_event"
while executing
"140245613968200font_timer_event"
("after" script)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

The response, if it occurs while one in entering a statement, 'pushes down' the 
entry in progress.

=== RESTART: F:\Python\mypy\tem.py ===
>>> go()
>>> It is Sat Sep  2 19:42:10 2017 and 2+2 is 4  #<== output
a = (
12,   # <== 2nd line of entry in progress

The prompt should be pushed down too.

--
assignee: terry.reedy
components: IDLE
messages: 301177
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: Move prompts with input.
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 add and sometimes useful, so it seemed like a good 
idea at the time" ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346874] httplib simply ignores CONTINUE

2017-09-02 Thread Georg Sauthoff

Changes by Georg Sauthoff :


--
nosy: +gms

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/990b2d043cdfaafc3378550f7d27259410a6b918


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 '\n\n'.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 pieces (usage, description, help, epilog) the 
formatter strips out duplicate newlines.  This is needed because the process of 
assembly freely inserts newlines between the pieces, regardless of whether they 
are blank or not.  It can't, or at least doesn't try to, distinguish between 
newlines within a block like the description, and newlines between blocks.

If someone could come up with a simple patch, great.  Or a simple change to the 
doc wording.  But I don't think this issue merits a larger fix.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the docs.  However, changing it has backward 
compatibility implications, so we might go for a doc fix regardless.

--
nosy: +paul.j3, r.david.murray
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 2017-09-02 at 
10.45.48.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com