[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-21 Thread bryan.koch
bryan.koch added the comment: steven your generator example is exactly what I wanted to do; looks like I'm upgrading to Python 3.8 for the new assignment syntax. I was actually expecting the SyntaxError to be raised at runtime which would be a pretty large behavior change (definitely require

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-21 Thread Anthony Sottile
New submission from Anthony Sottile : Unless I'm reading incorrectly: https://github.com/python/cpython/blob/7a2368063f25746d4008a74aca0dc0b82f86ff7b/Modules/clinic/posixmodule.c.h#L30-L31 https://github.com/python/cpython/blob/7a2368063f25746d4008a74aca0dc0b82f86ff7b/Modules/clinic/posixmodu

[issue34656] [CVE-2018-20406] memory exhaustion in Modules/_pickle.c:1393

2019-01-21 Thread Matej Cepl
Matej Cepl added the comment: > * Python 2.7 has no C accelerator _pickle (Modules/_pickle.c) And Modules/cPickle.c is that drastically different? -- ___ Python tracker ___ _

[issue14802] Python fails to compile with VC11 ARM configuration

2019-01-21 Thread Ned Deily
Ned Deily added the comment: Unless Steve thinks otherwise, I agree that this isn’t a candidate for backporting to 3.7 without all the work to fully support new platform configurations. -- ___ Python tracker __

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-21 Thread Anthony Sottile
Anthony Sottile added the comment: looks true for os.chmod as well: https://github.com/python/cpython/blob/7a2368063f25746d4008a74aca0dc0b82f86ff7b/Modules/clinic/posixmodule.c.h#L327-L328 -- ___ Python tracker

[issue35699] distutils cannot find Build Tools 2017 since 3.7.2

2019-01-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: @Steve, we are investigating and tracking this issue here: https://bugs.python.org/issue35795 According to the buildbot owner "directory tree removal needs to go through support.rmtree, not any of the stdlib methods for doing so. In a nutshell, the

[issue35797] concurrent.futures.ProcessPoolExecutor does not work in venv on Windows

2019-01-21 Thread Steve Dower
Steve Dower added the comment: > I would prefer a -X command-line option, such as "VIRTUAL_ENV". > multiprocessing could propagate this option to worker processes. Right, so would I, but it needs to be propagated basically everywhere (unless "everywhere" all defers through multiprocessing, w

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-21 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch, patch pull_requests: +11422, 11423 stage: -> patch review ___ Python tracker ___ _

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-21 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +11422 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue35803] Test and document that `dir=...` in tempfile may be PathLike

2019-01-21 Thread Anthony Sottile
New submission from Anthony Sottile : This appears to be true in 3.6+ -- I'd like to add a test and documentation ensuring that going forward. Related: https://github.com/python/typeshed/issues/2749 -- assignee: docs@python components: Documentation, Tests messages: 334188 nosy: Antho

[issue35800] remove smtpd.MailmanProxy

2019-01-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Yes, it should be deprecated and removed. TBH, IMHO smtpd.py should be entirely deprecated. aiosmtpd (3rd party) is a much more modern approach. -- ___ Python tracker __

[issue35803] Test and document that `dir=...` in tempfile may be PathLike

2019-01-21 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +11424 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue35803] Test and document that `dir=...` in tempfile may be PathLike

2019-01-21 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch, patch, patch pull_requests: +11424, 11425, 11426 stage: -> patch review ___ Python tracker ___ ___

[issue35803] Test and document that `dir=...` in tempfile may be PathLike

2019-01-21 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch, patch pull_requests: +11424, 11425 stage: -> patch review ___ Python tracker ___ _

[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: > steven your generator example is exactly what I wanted to do; looks > like I'm upgrading to Python 3.8 for the new assignment syntax. Sorry to have mislead you, but I don't think it will do what I thought. After giving it some more thought, I decided to te

[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-21 Thread bryan.koch
bryan.koch added the comment: Thanks for testing that. I'm off to write an ugly `next()` wrapper then. -- ___ Python tracker ___ _

[issue35756] Using `return value` in a generator function skips the returned value on for-loop iteration

2019-01-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: > I'm off to write an ugly `next()` wrapper then. Wouldn't it be simpler to re-design the generators to yield the final result instead of returning it? To process the final item differently from the rest, you just need something like this: last = next(it)

[issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1

2019-01-21 Thread Tom Wilson
Tom Wilson added the comment: Hi there. I get this behavior as well, although only in a venv. Main Virtual v3.7.1:260ec2c36a CompletesCompletes v3.7.2:9a3ffc0492 Completes Hangs Some other details of my setup: - Windows 10 Pro, Version 1803 (OS Bu

[issue35627] multiprocessing.queue in 3.7.2 doesn't behave as it was in 3.7.1

2019-01-21 Thread Tom Wilson
Tom Wilson added the comment: In case this is a clue - the attached script "mp_hang2.py" adds a call to qsize() and uses only a single consumer. When I run it from the command line it does one of two things: Option 1: C:\TEMP\Py-3.7.2b-Venv\Scripts>.\python.exe "C:\Users\Tom.Wilson\Docume

[issue35795] test_pkgutil test_zipapp fail in AMD64 Windows7 SP1 3.x and AMD64 Windows7 SP1 3.7 buildbots

2019-01-21 Thread Jeremy Kloth
Jeremy Kloth added the comment: Also of note, a largish temporary directory (16K+ entries) seemed to be causing a slowdown in the cleanup of the tests, thus triggering the failures. A quick purge later and the tests seem to run to completion. Although the tests are currently passing, they a

[issue35132] python-gdb error: Python Exception Type does not have a target

2019-01-21 Thread Lisa Roach
Lisa Roach added the comment: I experienced this bug as well and have tried to dig into it a little. I experimented with a service I have that uses shared libraries. If I compile with high level of optimizations for the C++ code (-O3) I don't experience the issue, but compiling without any

[issue20479] Efficiently support weight/frequency mappings in the statistics module

2019-01-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: Here is some further information on weights in statistics in general, and SAS and Stata specifically: https://blogs.sas.com/content/iml/2017/10/02/weight-variables-in-statistics-sas.html Quote: use the FREQ statement to specify integer frequencies for

[issue35766] Merge typed_ast back into CPython

2019-01-21 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch, patch pull_requests: +11427, 11428 stage: needs patch -> patch review ___ Python tracker ___ _

[issue35766] Merge typed_ast back into CPython

2019-01-21 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +11427 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35766] Merge typed_ast back into CPython

2019-01-21 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch, patch, patch pull_requests: +11427, 11428, 11429 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35780] Recheck logic in the C version of the lru_cache()

2019-01-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I am not sure about an addition _PyDict_GetItem_KnownHash(). It is a necessary check. The user call is allowed to update the cache so we no longer know without checking whether the new key/result pair has already been added. That is in fact the main b

[issue33944] Deprecate and remove pth files

2019-01-21 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: FYI I have 3 projects that use pth files to activate various features (an env var is usually the trigger): https://pypi.org/project/pytest-cov - enables coverage measurement in any subprocess https://pypi.org/project/manhole - installs a debug service

<    1   2