[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

By the way, the submitted PR follows Dan's argument about the initializer's 
argument: the actual call is `initializer(*initargs)`. If someone wants to know 
about the current thread or process, it's trivial to call 
`thread.current_thread()` or `multiprocessing.current_process()` (and I don't 
it's a bad idiom in itself :-)).

If you want to comment on the PR, I would recommend doing it quick, as I plan 
to merge in a day or two :-)

--

___
Python tracker 

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



[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 4f57409a2f7bdf8fb559cddc7c6533ca2c471c67 by Serhiy Storchaka (Tal 
Einat) in branch 'master':
bpo-31926: fix missing *_METHODDEF statements by argument clinic (#4230)
https://github.com/python/cpython/commit/4f57409a2f7bdf8fb559cddc7c6533ca2c471c67


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31930] IDLE: Pressing "Home" on Windows places cursor before ">>>"

2017-11-03 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

On Ubuntu, HOME initially goes to between the text and >>>.  Pressing it again 
moves it before the >>> and then it toggles between the two.  So, it appears to 
be working as expected.

--

___
Python tracker 

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



[issue18835] Add PyMem_AlignedAlloc()

2017-11-03 Thread Stefan Krah

Stefan Krah  added the comment:

> I'm not sure that the cost of the memory allocator itself defeats the gain of 
> aligned memory on algorithms. I expect data processing to be much more 
> expensive than the memory allocation, no?

I guess this issue isn't easy to focus due to the vast variety of use cases. So 
the is only about numpy/ndtypes:

What you write is true, but I'm simply getting cold feet w.r.t locking
myself into memset(). calloc() uses mmap() for large allocations, so I think 
one can happily allocate a large number of huge arrays without any
cost on Linux, as long as they're not accessed.

At least that's what my tests indicate.


Couple that with the fact that one has to use aligned_free() anyway,
and that posix_memalign() isn't that great, and the use case seems
less solid **for scientific computing**.


So I rather waste a couple of bytes per allocation and deal with
some Valgrind macros to get proper bounds checking.


Note that CPython still knows any allocation from ndtypes, because
ndt_callocfunc will be set to PyMem_Calloc() [1] and the custom
ndt_aligned_calloc() uses ndt_callocfunc.


[1] If #31912 is solved.

--

___
Python tracker 

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



[issue31890] Please define the flag METH_STACKLESS for Stackless Python

2017-11-03 Thread STINNER Victor

STINNER Victor  added the comment:

Anselm Kruis: Python 3.7 now has your METH_STACKLESS flag. Enjoy ;-)

--
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



[issue31931] test_concurrent_futures: ProcessPoolSpawnExecutorTest.test_shutdown_race_issue12456() leaked dangling process on x86 Tiger 3.x

2017-11-03 Thread STINNER Victor

New submission from STINNER Victor :

http://buildbot.python.org/all/#/builders/30/builds/109/steps/4/logs/stdio

0:24:58 load avg: 2.01 [274/407/1] test_concurrent_futures failed (env changed) 
(279 sec)
(...)
test_shutdown_race_issue12456 
(test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) ... 7.42s
Warning -- reap_children() reaped child process 3411
ok
(...)
Warning -- multiprocessing.process._dangling was modified by 
test_concurrent_futures
  Before: <_weakrefset.WeakSet object at 0x269fd54>
  After:  <_weakrefset.WeakSet object at 0x26a64cc>

--
components: Tests
keywords: buildbot
messages: 305468
nosy: haypo
priority: normal
severity: normal
status: open
title: test_concurrent_futures: 
ProcessPoolSpawnExecutorTest.test_shutdown_race_issue12456() leaked dangling 
process on x86 Tiger 3.x
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



[issue31931] test_concurrent_futures: ProcessPoolSpawnExecutorTest.test_shutdown_race_issue12456() leaked dangling process on x86 Tiger 3.x

2017-11-03 Thread STINNER Victor

STINNER Victor  added the comment:

More context:

test_correct_timeout_exception_msg 
(test.test_concurrent_futures.ProcessPoolSpawnAsCompletedTests) ... 2.66s ok
test_duplicate_futures 
(test.test_concurrent_futures.ProcessPoolSpawnAsCompletedTests) ... 4.64s ok
test_free_reference_yielded_future 
(test.test_concurrent_futures.ProcessPoolSpawnAsCompletedTests) ... 2.69s ok
test_no_timeout (test.test_concurrent_futures.ProcessPoolSpawnAsCompletedTests) 
... 2.80s ok
test_zero_timeout 
(test.test_concurrent_futures.ProcessPoolSpawnAsCompletedTests) ... 4.72s ok
test_free_reference (test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) 
... 9.49s ok
test_killed_child (test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) 
... 2.44s ok
test_map (test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) ... 2.71s 
ok
test_map_chunksize (test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) 
... 2.69s ok
test_map_exception (test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) 
... 2.65s ok
test_map_timeout (test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) 
... 8.65s ok
test_max_workers_negative 
(test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) ... 2.64s ok
test_no_stale_references 
(test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) ... 2.66s ok
test_ressources_gced_in_workers 
(test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) ... 4.75s ok
test_shutdown_race_issue12456 
(test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) ... 7.42s Warning 
-- reap_children() reaped child process 3411
ok
test_submit (test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) ... 
2.97s ok
test_submit_keyword (test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) 
... 3.03s ok
test_traceback (test.test_concurrent_futures.ProcessPoolSpawnExecutorTest) ... 
2.92s ok
test_context_manager_shutdown 
(test.test_concurrent_futures.ProcessPoolSpawnShutdownTest) ... 2.95s ok
test_del_shutdown (test.test_concurrent_futures.ProcessPoolSpawnShutdownTest) 
... 2.74s ok
test_hang_issue12364 
(test.test_concurrent_futures.ProcessPoolSpawnShutdownTest) ... 3.65s ok
test_interpreter_shutdown 
(test.test_concurrent_futures.ProcessPoolSpawnShutdownTest) ... 7.00s ok

--

___
Python tracker 

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



[issue31932] setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

2017-11-03 Thread Hugh Fisher

New submission from Hugh Fisher :

This was raised in issue #23246 but apparently not addressed at the time.

The Visual C for Python 2.7 tools on my MS Windows 8.1 system installed 
themselves under the invisible AppData directory because I did not do so as 
Administrator. Running setup.py to build a (2.7) native extension then fails 
because it can't find VCVERSALL.BAT.

Fix is a couple of extra lines in find_vcvarsall in msvc9compiler.py to search 
under AppData if it can't be found in the system location. I will submit a pull 
request.

--
components: Distutils
messages: 305470
nosy: dstufft, eric.araujo, laranzu
priority: normal
severity: normal
status: open
title: setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user 
AppData
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue31911] Use malloc_usable_size() in pymalloc for realloc

2017-11-03 Thread STINNER Victor

Change by STINNER Victor :


--
title: Use malloc_usable_size() is pymalloc for realloc -> Use 
malloc_usable_size() in pymalloc for realloc

___
Python tracker 

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



[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Davin, I think I'm going to merge the PR for this.  If you object it, it can 
still be reverted later.

--

___
Python tracker 

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



[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-11-03 Thread Ned Deily

Ned Deily  added the comment:

Josh, sorry I don't have any further ideas off the top of my head and I likely 
won't have time for several weeks to try to reproduce this myself.  Have you 
tried renaming the _tkinter extension back, doing a "make install", and seeing 
whether it imports properly from the installed python?

--

___
Python tracker 

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



[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Jack O'Connor

New submission from Jack O'Connor :

See https://github.com/BLAKE2/libb2/issues/12.

All Blake2 params have to be encoded in little-endian byte order. For the two 
multi-byte integer params, leaf_length and node_offset, that means that 
assigning a native-endian integer to them appears to work on little-endian 
platforms, but gives the wrong result on big-endian. The current libb2 API 
doesn't make that very clear, and @sneves is working on new API functions in 
the GH issue above. In the meantime, we can work around the problem by 
explicitly assigning little-endian values to the parameter block.

--
messages: 305473
nosy: oconnor663
priority: normal
severity: normal
status: open
title: some Blake2 parameters are encoded backwards on big-endian platforms
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Roundup Robot

Change by Roundup Robot :


--
keywords: +patch
pull_requests: +4211
stage:  -> patch review

___
Python tracker 

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



[issue20171] Derby #2: Convert 115 sites to Argument Clinic in Modules/_cursesmodule.c

2017-11-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4213
stage: needs patch -> patch review

___
Python tracker 

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



[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset fc6b348b12ad401cab0261b7b71a65c60a08c0a8 by Antoine Pitrou in 
branch 'master':
bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary 
(#3246)
https://github.com/python/cpython/commit/fc6b348b12ad401cab0261b7b71a65c60a08c0a8


--

___
Python tracker 

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



[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +4214

___
Python tracker 

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



[issue20171] Derby #2: Convert 115 sites to Argument Clinic in Modules/_cursesmodule.c

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 4251 converts most of functions in the _curses and _curses_panel modules 
(around 130 functions) to Argument Clinic. Many functions didn't have 
docstrings, the PR adds them. You can test new signatures and docstrings by the 
following commands:

./python -m pydoc curses
./python -m pydoc curses.window
./python -m pydoc curses.panel
./python -m pydoc curses.panel.panel

3 functions can't be converted. The initial versions of Argument Clinic 
supported such declarations, but now it doesn't support them. Will try to fix 
Argument Clinic in other issue. Yet 35 generated window methods have not been 
converted because I'm too tired by this patch. They will be converted by other 
patches.

I tried to make new and existing docstrings short and clear, but I think many 
docstrings still need editing.

--
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



[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Christian Heimes

Christian Heimes  added the comment:

Good work, thanks for your PR!

--
assignee:  -> christian.heimes
components: +Extension Modules
nosy: +christian.heimes
versions:  -Python 3.8

___
Python tracker 

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



[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 019c99f325287741d1e0eefeef2b75c8e00b884f by Antoine Pitrou in 
branch '3.6':
[3.6] bpo-31308: If multiprocessing's forkserver dies, launch it again when 
necessary (GH-3246) (#4252)
https://github.com/python/cpython/commit/019c99f325287741d1e0eefeef2b75c8e00b884f


--

___
Python tracker 

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



[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou

Change 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



[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread Tal Einat

Change by Tal Einat :


--
pull_requests: +4215

___
Python tracker 

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



[issue30844] selectors: Add urgent data to read event

2017-11-03 Thread Pim Klanke

Pim Klanke  added the comment:

On 02-11-17 16:54, STINNER Victor wrote:
> STINNER Victor  added the comment:
>
> It seems like kqueue supports urgent data:
>
> "EV_OOBAND: Read filter on socket may set this flag to indicate the presence 
> of out of band data on the descriptor."
>
> Example: 
> https://github.com/daurnimator/cqueues/commit/52baaf1c25bc7e6f7cb4685cb05f4ed47a3f404a
Looks promising. I will have to look into this.
> Be careful, I also found:
>
> // Older versions of Mac OS X may not define EV_OOBAND.
> #if !defined(EV_OOBAND)
> # define EV_OOBAND EV_FLAG1
> #endif // !defined(EV_OOBAND)
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue31920] pygettext ignores directories as inputfile argument

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your patch Oleg. 3.4 and 3.5 are in security fixes only mode now.

Good catch, the usage of os.walk() in pygettext.py is incorrect. But your 
change is not enough. In _visit_pyfiles() the name 'CVS' is removed from the 
names list. If names is a list of directories emitted by os.walk(), this would 
exclude the whole directory CVS from searching. But if it is a new list "dirs + 
files", this doesn't have any effect. And directories with the ".py" extension 
shouldn't be added to the list of Python files. Hence _visit_pyfiles should 
take two separate lists for directories and files. And since it no longer is a 
callback, it would be better to inline its code.

There are tests for pygettext in Lib/test/test_tools/test_i18n.py. It would be 
nice to add a new test for the fixed feature.

--
nosy: +serhiy.storchaka
stage: patch review -> needs patch
versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
versions: +Python 3.6

___
Python tracker 

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



[issue31310] semaphore tracker isn't protected against crashes

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset cbe1756e3ecefc0e24a5d0a4b8663db9b6d0cc52 by Antoine Pitrou in 
branch 'master':
bpo-31310: multiprocessing's semaphore tracker should be launched again if 
crashed (#3247)
https://github.com/python/cpython/commit/cbe1756e3ecefc0e24a5d0a4b8663db9b6d0cc52


--

___
Python tracker 

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



[issue31310] semaphore tracker isn't protected against crashes

2017-11-03 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +4216

___
Python tracker 

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



[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset f8b3f6b178e48773cd7298141cbaf408c6917e41 by Victor Stinner (Tal 
Einat) in branch '3.6':
[3.6] bpo-31926: fix missing *_METHODDEF statements by argument clinic 
(GH-4230) (#4253)
https://github.com/python/cpython/commit/f8b3f6b178e48773cd7298141cbaf408c6917e41


--
nosy: +haypo

___
Python tracker 

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



[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread STINNER Victor

STINNER Victor  added the comment:

Thank you Tal Einat for your bug report and your fix. It's now merged into 3.6 
and master (future 3.7).

--
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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-11-03 Thread STINNER Victor

STINNER Victor  added the comment:

I really hate the title of these issues "Derby #13: Convert 50 sites to 
Argument Clinic across 5 files". I would prefer to have one issue per file. 
Would it possible to close this one and open a new issue once someone has a PR 
for one file?

--
nosy: +haypo

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-11-03 Thread Tal Einat

Tal Einat  added the comment:

As the author of all of the updated patches, I wouldn't mind opening new issues 
separately for each of the remaining modules. Actually I would prefer it :)

--

___
Python tracker 

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



[issue31310] semaphore tracker isn't protected against crashes

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset b5f09acf0a0219cec32b7eba3acdcb573fc74ab5 by Antoine Pitrou in 
branch '3.6':
[3.6] bpo-31310: multiprocessing's semaphore tracker should be launched again 
if crashed (GH-3247) (#4254)
https://github.com/python/cpython/commit/b5f09acf0a0219cec32b7eba3acdcb573fc74ab5


--

___
Python tracker 

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



[issue31310] semaphore tracker isn't protected against crashes

2017-11-03 Thread Antoine Pitrou

Change 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



[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Xavier de Gaye

New submission from Xavier de Gaye :

The error message when building out of a not clean source tree:

renaming build/scripts-3.7/2to3 to build/scripts-3.7/2to3-3.7
renaming build/scripts-3.7/pyvenv to build/scripts-3.7/pyvenv-3.7
gcc -pthread   -Xlinker -export-dynamic -o Programs/_testembed 
Programs/_testembed.o libpython3.7m.a -lpthread -ldl  -lutil   -lm
gcc: error: Programs/_testembed.o: No such file or directory
make[1]: *** [Makefile:707: Programs/_testembed] Error 1

--
components: Build
messages: 305486
nosy: xdegaye
priority: normal
severity: normal
status: open
title: Failure to build out of source from a not clean source
type: behavior
versions: Python 2.7, 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



[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
keywords: +patch
pull_requests: +4217
stage:  -> patch review

___
Python tracker 

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



[issue31932] setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

2017-11-03 Thread Zachary Ware

Change by Zachary Ware :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue31935] subprocess.run() timeout not working with grandchildren and stdout=PIPE

2017-11-03 Thread Martin Ritter

New submission from Martin Ritter :

Hi,

I tried to use 

subprocess.run(..., stdout=subprocess.PIPE, timeout=N)

to run some test scripts with a given timeout. 

This works as expected with simple scripts. However if the script itself 
creates other children which write to stdout then `subprocess.run()` seems to 
wait for all of the children to finish. I've attached a minimal example.

I looked into subprocess.py and `subprocess.run()` calls 
`process.communicate()` again without timeout when handling the TimeoutExpired 
exception which then in turn waits for the pipes to be closed by all children.

If communicate() would check if the process is still alive while waiting for 
output and close the pipes once the process has finished the timeout feature 
should work as expected and descendants would get a SIGPIPE when writing to 
stdout/stderr.

--
components: Library (Lib)
files: test_killsub.py
messages: 305487
nosy: Martin Ritter
priority: normal
severity: normal
status: open
title: subprocess.run() timeout not working with grandchildren and stdout=PIPE
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47251/test_killsub.py

___
Python tracker 

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



[issue31699] Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error

2017-11-03 Thread Thomas Moreau

Change by Thomas Moreau :


--
keywords: +patch
pull_requests: +4218
stage:  -> patch review

___
Python tracker 

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



[issue31920] pygettext ignores directories as inputfile argument

2017-11-03 Thread Oleg Krasnikov

Oleg Krasnikov  added the comment:

Thanks for quite sensible notes Serhiy. I've fixed all that in recent commit 
and added a regression test. Still not sure about "testing conventions" here 
cause this is my first PR to python repository, so please let me know if 
something is wrong and I'll fix that.

--

___
Python tracker 

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



[issue31932] setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

2017-11-03 Thread Stefan Krah

Change by Stefan Krah :


--
nosy: +jyrkih

___
Python tracker 

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



[issue28706] msvc9compiler does not find a vcvarsall.bat of Visual C++ for Python 9.0

2017-11-03 Thread Stefan Krah

Change by Stefan Krah :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> setup.py cannot find vcversall.bat on MSWin 8.1 if installed in 
user AppData

___
Python tracker 

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



[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Daniel U. Thibault

New submission from Daniel U. Thibault :

https://docs.python.org/3/reference/import.html#importsystem
"Other mechanisms for invoking the import system (such as 
importlib.import_module()) may choose to subvert __import__() and use its own 
solution to implement import semantics."
should be
"Other mechanisms for invoking the import system (such as 
importlib.import_module()) may choose to subvert __import__() and use their own 
solution to implement import semantics."

--
assignee: docs@python
components: Documentation
messages: 305489
nosy: Daniel.U..Thibault, docs@python
priority: normal
severity: normal
status: open
title: "5. The import system" grammatical error
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-11-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 2, 2017, at 22:50, INADA Naoki  wrote:
> 
> When adding environment variable option, it should be documented in
> man page and `python -h`.

I thought about that, but the problem is that none of the -X options are 
documented in the —help output.  So do we only document the ones (e.g. 
importtime) that have an environment variable version, or do we now have to 
document them all?

I opted to document PYTHONPROFILEIMPORTTIME only in the cmdline documentation.

--

___
Python tracker 

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



[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
nosy: +barry
versions: +Python 3.7 -Python 3.8

___
Python tracker 

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



[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
keywords: +patch
pull_requests: +4219
stage:  -> patch review

___
Python tracker 

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



[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Re-reading the paragraph now, it also parsed weirdly for me.  See the linked PR 
for a suggested improvement, along with your change.

Thanks!

--

___
Python tracker 

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



[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Brett Cannon

Brett Cannon  added the comment:

What's "unclean" in this case? I mean you can always re-run Make after making 
changes and the build succeeds, so I'm not quite sure what leads to this state.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> I didn't think it's worth enough because import will be much slower than one 
> dict lookup.

I agree. The main value of my patch is handling possible (but very unlike) 
errors. Implementing negative value caching adds not many lines to the existing 
code and additional error handling.

But now, after adding the environment variable, do we still need the -X option? 
From a user side I don't see much difference between specifying an option and 
an environment variable, but the code for handling the environment variable is 
much simpler.

--

___
Python tracker 

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



[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thanks for the report! I will push your patch soon.

--
versions: +Python 3.6, Python 3.7 -Python 2.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



[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +4220
stage:  -> patch review

___
Python tracker 

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



[issue31898] Add a `recommended-packages.txt` file

2017-11-03 Thread Éric Araujo

Change by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4222

___
Python tracker 

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



[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset a7723d8b09f516a2b75837a3527b8cc7bee89fad by Serhiy Storchaka in 
branch 'master':
bpo-31924: Fix test_curses on NetBSD 8. (#4228)
https://github.com/python/cpython/commit/a7723d8b09f516a2b75837a3527b8cc7bee89fad


--

___
Python tracker 

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



[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4221

___
Python tracker 

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



[issue31907] Clarify error message when attempting to call function via str.format()

2017-11-03 Thread mickey695

mickey695  added the comment:

I think it should be documented properly.

In roughly two weeks I will have some time to look into it. 
So I could probably document the current behaviour by the start of 
December(unless someone beats me to it)

--

___
Python tracker 

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



[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset f6f90ff079a22b79a58d47b6117cc8a8c7d366f3 by Antoine Pitrou in 
branch 'master':
bpo-30057: Fix potential missed signal in signal.signal(). (#4258)
https://github.com/python/cpython/commit/f6f90ff079a22b79a58d47b6117cc8a8c7d366f3


--

___
Python tracker 

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



[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4223

___
Python tracker 

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



[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset dcfb0e3c04f1b29a0d09bb0a81dcd5ee5a5fef1a by Christian Heimes 
(Jack O'Connor) in branch 'master':
bpo-31933: fix blake2 multi-byte params on big endian platforms (#4250)
https://github.com/python/cpython/commit/dcfb0e3c04f1b29a0d09bb0a81dcd5ee5a5fef1a


--

___
Python tracker 

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



[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4224

___
Python tracker 

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



[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +4225

___
Python tracker 

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



[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset ea80ae04e2ec68c7e289048d3224a24b3c3fb107 by Antoine Pitrou (Miss 
Islington (bot)) in branch '3.6':
bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4261)
https://github.com/python/cpython/commit/ea80ae04e2ec68c7e289048d3224a24b3c3fb107


--

___
Python tracker 

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



[issue31914] Document Pool.(star)map return type

2017-11-03 Thread Дилян Палаузов

Дилян Палаузов  added the comment:

If the idea is one day to switch the return type to an iterable/generator, 
returning from starmap() before all parallel executions have completed, this 
needs to be documented and the typeshed adjusted accordingly.

--

___
Python tracker 

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



[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset c713837e91f39dc18740c74729cb7cebcf54fe6e by Antoine Pitrou in 
branch '2.7':
[2.7] bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) 
(#4263)
https://github.com/python/cpython/commit/c713837e91f39dc18740c74729cb7cebcf54fe6e


--

___
Python tracker 

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



[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 2.7

___
Python tracker 

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



[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset a512493371a073e252a2e52b445aa2d66ddca7cb by Christian Heimes 
(Miss Islington (bot)) in branch '3.6':
bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250) 
(#4262)
https://github.com/python/cpython/commit/a512493371a073e252a2e52b445aa2d66ddca7cb


--

___
Python tracker 

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



[issue31889] difflib SequenceMatcher ratio() still have unpredictable behavior

2017-11-03 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +tim.peters
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



[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4226
status: pending -> open

___
Python tracker 

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



[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 8ce98543ef959bb65da2fb57b0d442b3b6e8a087 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-31924: Fix test_curses on NetBSD 8. (GH-4228) (#4259)
https://github.com/python/cpython/commit/8ce98543ef959bb65da2fb57b0d442b3b6e8a087


--

___
Python tracker 

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



[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 6a9a331b34f39a3df1c3a91ffcac12a9608b1e57 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '2.7':
bpo-31924: Fix test_curses on NetBSD 8. (GH-4228) (#4260)
https://github.com/python/cpython/commit/6a9a331b34f39a3df1c3a91ffcac12a9608b1e57


--

___
Python tracker 

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



[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
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



[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Christian Heimes

Change by Christian Heimes :


--
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



[issue31415] Add -X option to show import time

2017-11-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 3, 2017, at 11:05, Serhiy Storchaka  wrote:
> 
> But now, after adding the environment variable, do we still need the -X 
> option? From a user side I don't see much difference between specifying an 
> option and an environment variable, but the code for handling the environment 
> variable is much simpler.

It’s a good question.  I guess in the limited amount of time I’ve used the 
feature so far, I find it kind of nice to be able to type `python -X 
importtime` when doing general import profiling.  The use case for the 
environment variable is more compelling IMHO which is why I really wanted to 
add it.  I suppose typing `PYTHONPROFILEIMPORTTIME=x python` isn’t *too* 
onerous, even if it is kind of a weird long mashed together word.

I suppose I’m -0 on removing the -X option, and +0 on adding the negative cache.

--

___
Python tracker 

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



[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:


New changeset 93952f881500053057c2e08c4b253ac61233d7db by Barry Warsaw in 
branch 'master':
Fix a grammatical problem and reword for clarity. (#4257)
https://github.com/python/cpython/commit/93952f881500053057c2e08c4b253ac61233d7db


--

___
Python tracker 

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



[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
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



[issue31895] Native hijri calendar support

2017-11-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Haneef, thank you for the explanation.  Any such addition would need a PEP.  
But I agree with Marc-Andre that supporting the multitude of calendars is out 
of scope for the stdlib.  So I suspect such a PEP would be rejected, with the 
suggestion already given here, that this belongs on PyPI.  An existing example 
is the time module of the astropy module,
http://docs.astropy.org/en/stable/time/index.html .

I could be wrong, but I have a vague impression that expanding calendar support 
has been requested and rejected before.  We have enough to do properly 
supporting the existing time, datetime, and calendar modules.

--
nosy: +terry.reedy
resolution:  -> rejected
stage:  -> 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



[issue31896] In function define class inherit ctypes.structure, and using ctypes.pointer leak memory

2017-11-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The tracker is for patching CPython.  Please consider closing this and asking 
your question on python-list.  When you post code, do so only once, and without 
line numbers, so it can be copied and run as is.  Do include data on the ref 
leaks.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue31937] Add the term "dunder" to the glossary

2017-11-03 Thread Brett Cannon

New submission from Brett Cannon :

The term "dunder" is used out in the community regularly, but if you have never 
been exposed to it before it can seem a little odd without context.

--
assignee: docs@python
components: Documentation
messages: 305509
nosy: brett.cannon, docs@python
priority: normal
severity: normal
status: open
title: Add the term "dunder" to the glossary

___
Python tracker 

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



[issue31937] Add the term "dunder" to the glossary

2017-11-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

-1 until we have something we can call a "mifflin".

(Kidding of course!)

--
nosy: +barry

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2017-11-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The following might be relevant to this issue:
https://www.python.org/dev/peps/pep-0011/#supporting-platforms

--
nosy: +terry.reedy

___
Python tracker 

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



[issue31937] Add the term "dunder" to the glossary

2017-11-03 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

> until we have something we can call a "mifflin".

Name of next GitHub bot? :P

--
nosy: +Mariatta

___
Python tracker 

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



[issue31937] Add the term "dunder" to the glossary

2017-11-03 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Anyway, +1 to adding dunder to glossary.

--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2017-11-03 Thread Tal Einat

New submission from Tal Einat :

Continuing the work begun as part of issue #20182, this is regarding the 
Argument Clinic conversion of Modules/selectmodule.c.h.

I have a complete conversion ready and will create a PR momentarily.

--
components: Argument Clinic
messages: 305514
nosy: haypo, larry, serhiy.storchaka, taleinat
priority: normal
severity: normal
status: open
title: Convert selectmodule.c to Argument Clinic
type: enhancement
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



[issue31415] Add -X option to show import time

2017-11-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

> `PYTHONPROFILEIMPORTTIME=x python` isn’t *too* onerous

It does not work on Windows.

C:\Users\Terry>PYTHONPROFILEIMPORTTIME=x python
'PYTHONPROFILEIMPORTTIME' is not recognized as an internal or external command, 
operable program or batch file.

Does it set the EV for the entire session (which one likely would not want), or 
just the one command (which has no Windows equivalent that I know of)?  Please 
leave the easily remembered and typed option.

--

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Note that with environment variable you get more information.

$ ./python -X importtime -c pass
import time: self [us] | cumulative | imported package
import time:88 | 88 | _codecs
import time:   789 |876 |   codecs
import time:   602 |602 |   encodings.aliases
import time:   809 |   2287 | encodings
...

$ PYTHONPROFILEIMPORTTIME=1 ./python -c pass
import time: self [us] | cumulative | imported package
import time:  3133 |   3133 | _frozen_importlib_external
import time:   371 |371 | zipimport
import time:   327 |327 | _codecs
import time:  2656 |   2982 |   codecs
import time:  1821 |   1821 |   encodings.aliases
import time:  2604 |   7406 | encodings
...

--

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-11-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

On Windows you can create a 2-line bat-file that sets the environment variable 
and runs Python.

--

___
Python tracker 

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



[issue31932] setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

2017-11-03 Thread Hugh Fisher

Change by Hugh Fisher :


--
keywords: +patch
pull_requests: +4227
stage:  -> patch review

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2017-11-03 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

obviously didn't make it in 3.6 but this still seems desirable.  I just saw 
someone at work propose a trivial port of golang's sort.Search - 
https://golang.org/pkg/sort/#Search - in Python which caused me to hunt for an 
issue on bisect key= support.

--
nosy: +gregory.p.smith
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



[issue31870] add timeout parameter for get_server_certificate in ssl.py

2017-11-03 Thread Christian Heimes

Change by Christian Heimes :


--
assignee:  -> christian.heimes
components: +SSL -Library (Lib)
nosy: +alex, christian.heimes, dstufft, janssen
stage:  -> patch review
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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-11-03 Thread Tal Einat

Change by Tal Einat :


--
pull_requests: +4229

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-11-03 Thread Tal Einat

Tal Einat  added the comment:

See issue #31938 regarding Modules/selectmodule.c.

--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2017-11-03 Thread Tal Einat

Tal Einat  added the comment:

See PR 4265.

--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2017-11-03 Thread Tal Einat

Change by Tal Einat :


--
keywords: +patch
pull_requests: +4228
stage:  -> patch review

___
Python tracker 

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



[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

When you build out of the source tree and this source tree has been built 
previously (by running 'make' in the source tree), then you get the error msg 
printed in msg305486 when you try to build *out* of this not clean source tree. 
The solution is to run 'make clean' in the source tree first.

The reason that one must use a clean source tree is that otherwise 'make' finds 
an existing Programs/_testembed.o file in the source tree as the prerequisite 
to the Programs/_testembed target, but cannot build this target since 
Programs/_testembed.o does not exist locally.

It is not obvious from the error message to understand the reason for the build 
failure and one can waste quite some time finding the solution.

--

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-11-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 3, 2017, at 14:41, Serhiy Storchaka  wrote:
> 
> Note that with environment variable you get more information.

Fun!

--

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-11-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 3, 2017, at 14:23, Terry J. Reedy  wrote:
> 
> Does it set the EV for the entire session (which one likely would not want), 
> or just the one command (which has no Windows equivalent that I know of)?  
> Please leave the easily remembered and typed option.

On *nix, this sets the environment variable for just this process.

--

___
Python tracker 

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



[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

To build out of the 'src' source tree (a subdirectory of the current directory) 
in a 'build' subdirectory:

$ ls -ld src
drwxr-xr-x 21 xavier xavier 4.0K Nov  3 23:50 src/
$ mkdir build
$ cd build
$ $(cd ../src && pwd)/configure && make

This is useful when you build for multiple platform configurations. For example 
on Android one can build for multiple API versions and multiple architectures 
(x86_64, armv7, aarch64, ...).

--

___
Python tracker 

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



[issue31939] Support return annotation in signature for Argument Clinic

2017-11-03 Thread STINNER Victor

New submission from STINNER Victor :

Argument Clinic supports a few return types like NoneType, int, bool, etc. But 
the return type is omitted in the private docstring used to build the 
__text_signature__, finally used to build a Signature object in 
inspect.signature().


For example, os.dup() is declared in Modules/posixmodule.c with:

/*[clinic input]
os.dup -> int

fd: int
/

Return a duplicate of a file descriptor.
[clinic start generated code]*/


Currently, Argument Clinic generates:

PyDoc_STRVAR(os_dup__doc__,
"dup($module, fd, /)\n"
"--\n"
"\n"
"Return a duplicate of a file descriptor.");

The return type is omitted in the first line.


Finally, the return type is not documented in the signature:

haypo@selma$ ./python -c "import os,inspect; print(inspect.signature(os.dup))"
(fd, /)


I noticed this limitation while reviewing the PR 4265 which converts the select 
module to Argument Clinic. Previously, the return type like "-> None" or "-> 
int" was documented. With Argument Clinic, it's not documented nor generated in 
the signature, the information is lost.

--
messages: 305525
nosy: brett.cannon, haypo, larry, ncoghlan, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Support return annotation in signature for Argument Clinic
type: enhancement
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



[issue31938] Convert selectmodule.c to Argument Clinic

2017-11-03 Thread STINNER Victor

STINNER Victor  added the comment:

While reviewing PR 4265, I noticed that the return type like "-> None" or "-> 
int" is removed from the function definition, so the PR removes this 
information. But it seems to be a limitation of Argument Clinic: I opened the 
issue #31939.

IHMO it's not a blocker issue. We can add it back later, once the issue #31939 
is implemented.

--

___
Python tracker 

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



[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile

New submission from Anthony Sottile :

Fortunately, this can be reproduced with the testsuite:

```
==
ERROR: test_copystat_symlinks (__main__.TestShutil)
--
Traceback (most recent call last):
  File "/usr/lib/python3.6/test/test_shutil.py", line 366, in 
test_copystat_symlinks
os.lchmod(src_link, stat.S_IRWXO)
OSError: [Errno 95] Not supported: '/tmp/tmplfli9msi/baz'

```

My simplest reproduction involves docker:

```dockerfile
FROM alpine
RUN apk update && apk add curl python3

RUN mkdir foo && ln -s /dev/null foo/bar

CMD [ \
"python3", "-c", \
"import shutil; shutil.copytree('foo', 'bar', symlinks=True)" \
]
```

```
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.6/shutil.py", line 359, in copytree
raise Error(errors)
shutil.Error: [('foo/bar', 'bar/bar', "[Errno 95] Not supported: 'bar/bar'")]
```


By looking at pyconfig, I get the following:

```
/ # grep -E '(HAVE_FCHMODAT|HAVE_LCHMOD)' /usr/include/python3.6m/pyconfig.h 
#define HAVE_FCHMODAT 1
#define HAVE_LCHMOD 1
```

But it seems lchmod is actually nonfunctional in this case.

I think the fix is to augment `configure` to detect faulty `lchmod` and not set 
`HAVE_LCHMOD`?  I'm not terribly familiar with the autotools pipeline but 
that's where I'm going to take a stab at it!

I'm originally finding this issue via 
https://github.com/pre-commit/pre-commit/issues/655

--
components: Build, Library (Lib), Tests
messages: 305527
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: copystat on symlinks fails for alpine -- faulty lchmod implementation?
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile

Anthony Sottile  added the comment:

Here's one idea for a patch (inspired by the rest of the function):

```
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 464ee91..2099289 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -213,6 +213,13 @@ def copystat(src, dst, *, follow_symlinks=True):
 # symlink.  give up, suppress the error.
 # (which is what shutil always did in this circumstance.)
 pass
+except OSError as why:
+# lchmod on alpine will raise this with symlinks: #31940
+for err in 'EOPNOTSUPP', 'ENOTSUP':
+if hasattr(errno, err) and why.errno == getattr(errno, err):
+break
+else:
+raise
 if hasattr(st, 'st_flags'):
 try:
 lookup("chflags")(dst, st.st_flags, follow_symlinks=follow)
```

However lchmod seems to be just broken on alpine so the tests continue to fail 
(however my usecase is fixed)

--

___
Python tracker 

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



  1   2   >