[issue31833] Compile fail on gentoo for MIPS CPU of loongson 2f

2017-10-20 Thread emtone
New submission from emtone : Here is the error message: building '_multiprocessing' extension creating build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing mips64el-unknown-linux-gnu-gcc -pthread -fPIC

[issue31832] Async list comprehension (PEP 530) causes SyntaxError in Python 3.6.3

2017-10-20 Thread Roel van der Goot
Roel van der Goot added the comment: Thank you! -- ___ Python tracker ___ ___

[issue31832] Async list comprehension (PEP 530) causes SyntaxError in Python 3.6.3

2017-10-20 Thread Zachary Ware
Zachary Ware added the comment: That's already provided, just do `return outputs` instead of `print(outputs)`, and `outputs = event_loop.run_until_complete(main())`. See

[issue31832] Async list comprehension (PEP 530) causes SyntaxError in Python 3.6.3

2017-10-20 Thread Roel van der Goot
Roel van der Goot added the comment: I have been thinking about my previous comment a bit more. For consistency there should at least be an await somewhere to move back from async land to non-async land. For example: #!/usr/bin/env python3 import asyncio

[issue31831] EmailMessage.add_attachment(filename="long or spécial") crashes or produces invalid output

2017-10-20 Thread R. David Murray
R. David Murray added the comment: Does the patch in gh-3488 fix this? I think it should, or if it doesn't that's a bug in the PR patch. -- ___ Python tracker

[issue20825] containment test for "ip_network in ip_network"

2017-10-20 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: +4035 ___ Python tracker ___ ___

[issue31832] Async list comprehension (PEP 530) causes SyntaxError in Python 3.6.3

2017-10-20 Thread Roel van der Goot
Roel van der Goot added the comment: Zachary, Thank you for your response. I had the impression that async comprehensions are a bridge between async functions and non-async functions. Is there a wat to use async (and asyncio) and then go back to regular python? Or

[issue31832] Async list comprehension (PEP 530) causes SyntaxError in Python 3.6.3

2017-10-20 Thread Zachary Ware
Zachary Ware added the comment: Your async listcomp must also be defined within a coroutine to turn `async` into a keyword in 3.6. The following is far from best practice (don't do this, I don't know what I'm doing! :), but at least it compiles and shows that it

[issue31832] Async list comprehension (PEP 530) causes SyntaxError in Python 3.6.3

2017-10-20 Thread Roel van der Goot
New submission from Roel van der Goot : $ python3 Python 3.6.3 (default, Oct 3 2017, 21:45:48) [GCC 7.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> async def arange(n): ... for i in range(n): ... yield i ... >>>

[issue31811] async and await missing from keyword list in lexical analysis doc

2017-10-20 Thread Yury Selivanov
Yury Selivanov added the comment: Ah, you mean this list: https://docs.python.org/3/reference/lexical_analysis.html#keywords ? Your original link was a bit hard to read as it shows rest markup and not the actual list of keywords. So I missed it, sorry. I'll reopen the

[issue31811] async and await missing from keyword list in lexical analysis doc

2017-10-20 Thread Colin Dunklau
Colin Dunklau added the comment: Hi Yury, perhaps I've misinterpreted PEP 492, and I can't claim to understand how the parser works and thus how the changes in https://github.com/python/cpython/pull/1669 affect things, but it seems to me that async and await are

[issue31831] EmailMessage.add_attachment(filename="long or spécial") crashes or produces invalid output

2017-10-20 Thread calimeroteknik
calimeroteknik added the comment: Erratum: the output generated by python 3.5 and 3.4 causes line wraps in the SMTP delivery chain, which cause exactly the same breakage as ulterior versions: the crucially needed indendation of one space ends up being absent.

[issue31831] EmailMessage.add_attachment(filename="long or spécial") crashes or produces invalid output

2017-10-20 Thread calimeroteknik
New submission from calimeroteknik : The following code excerpt demonstrates a crash: import email.message mail = email.message.EmailMessage() mail.add_attachment( b"test", maintype = "text", subtype = "plain", filename = "I thought I could put a few words

[issue20825] containment test for "ip_network in ip_network"

2017-10-20 Thread Mark Ignacio
Mark Ignacio added the comment: Hey Michel, Are you still interested in pushing this patch through? It's be awesome if this got committed. -- ___ Python tracker

[issue20825] containment test for "ip_network in ip_network"

2017-10-20 Thread Mark Ignacio
Change by Mark Ignacio : -- nosy: +Mark.Ignacio versions: +Python 3.8 -Python 3.6 ___ Python tracker ___

[issue31830] asyncio.create_subprocess_exec doesn't capture all stdout output

2017-10-20 Thread Roel van der Goot
Change by Roel van der Goot : -- components: asyncio files: show.py nosy: cannedrag, yselivanov priority: normal severity: normal status: open title: asyncio.create_subprocess_exec doesn't capture all stdout output type: behavior versions: Python 3.6 Added

[issue31756] subprocess.run should alias universal_newlines to text

2017-10-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___

[issue31761] Failures and crashes when running tests by import

2017-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps there are issues specific to IDLE, but we should first fix issues not related to IDLE in #31794. -- ___ Python tracker

[issue31781] crashes when calling methods of an uninitialized zipimport.zipimporter object

2017-10-20 Thread Brett Cannon
Brett Cannon added the comment: As always, thanks for the fix, Oren! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31781] crashes when calling methods of an uninitialized zipimport.zipimporter object

2017-10-20 Thread Brett Cannon
Brett Cannon added the comment: New changeset db60a5bfa5d5f7a6f1538cc1fe76f0fda57b524e by Brett Cannon (Oren Milman) in branch 'master': bpo-31781: Prevent crashes when calling methods of an uninitialized zipimport.zipimporter object (GH-3986)

[issue31761] Failures and crashes when running tests by import

2017-10-20 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I didn't read you comment. I just saw IDLE, I missed that you wrote that the bug is unrelated to IDLE. Ooops -- ___ Python tracker

[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2017-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: This looks to be a duplicate of https://bugs.python.org/issue28326 -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> multiprocessing.Process depends on sys.stdout being open

[issue31812] Document PEP 545 (documentation translation) in What's New in Python 3.7

2017-10-20 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +4034 stage: -> patch review ___ Python tracker ___

[issue31814] subprocess_fork_exec more stable with vfork

2017-10-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- components: +Extension Modules -Interpreter Core type: behavior -> enhancement ___ Python tracker ___

[issue31814] subprocess_fork_exec more stable with vfork

2017-10-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: Using new syscalls for _posixsubprocess.c would be a feature so it would be limited to 3.7+ if done at all. My gut feeling is that the real bug is in *any* library code that uses pthread_atfork() in a non thread safe manner. That code is

[issue9842] Document ... used in recursive repr of containers

2017-10-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +4033 stage: needs patch -> patch review ___ Python tracker ___

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

2017-10-20 Thread Josh Cullum
Josh Cullum added the comment: Hi Ned, LD_LIBRARY_PATH has been set with the lib paths for both, like I said the module itself builds, I’ll add the module build logs later but the module try’s to get loaded before the tests which unfortunately gives the error undefined

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

2017-10-20 Thread Ned Deily
Ned Deily added the comment: You may need to set LD_LIBRARY_PATH env variable to point to your Tcl and Tk libraries or, better, add an rpath entry to LDFLAGS. -- nosy: +ned.deily ___ Python tracker

[issue31203] socket.IP_PKTINFO is missing from python

2017-10-20 Thread Ned Deily
Change by Ned Deily : -- nosy: +` stage: -> commit review versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue31761] Failures and crashes when running tests by import

2017-10-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Victor, why do you persist in the nearly irrelevant focus on IDLE? As I reported above, failures and crashes happen ***without*** involving IDLE. Serhiy appears to report the same in #31794. -- title: Failures and crashes when

[issue31794] Issues with test.autotest

2017-10-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: As I reported on #31761, the exact result of 'import test.autotest' depends on exactly how it is run and with what. I suspect that OS might have an effect. -- nosy: +terry.reedy ___ Python

[issue31810] Travis CI, buildbots: run "make smelly" to check if CPython leaks symbols

2017-10-20 Thread Ned Deily
Change by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list

[issue31814] subprocess_fork_exec more stable with vfork

2017-10-20 Thread Ned Deily
Change by Ned Deily : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list

[issue31811] async and await missing from keyword list in lexical analysis doc

2017-10-20 Thread Yury Selivanov
Yury Selivanov added the comment: They are covered here: https://github.com/python/cpython/blob/4a2d00cb4525fcb3209f04531472ba6a359ed418/Doc/reference/compound_stmts.rst#coroutines -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue31826] Misleading __version__ attribute of modules in standard library

2017-10-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +barry, serhiy.storchaka versions: +Python 3.7 -Python 3.4, Python 3.5 ___ Python tracker ___

[issue31803] time.clock() should emit a DeprecationWarning

2017-10-20 Thread Ethan Furman
Ethan Furman added the comment: We definitely need time with either DeprecationWarning or FutureWarning before removing/substituting a function. -- ___ Python tracker

[issue31813] python -m ensurepip hangs

2017-10-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: python -m enshure pip stucks -> python -m ensurepip hangs ___ Python tracker ___

[issue31811] async and await missing from keyword list in lexical analysis doc

2017-10-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +yselivanov ___ Python tracker ___ ___

[issue31807] unitest.mock: Using autospec=True conflicts with 'wraps'

2017-10-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +michael.foord ___ Python tracker ___ ___

[issue31807] unitest.mock: Using autospec=True conflicts with 'wraps'

2017-10-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +ezio.melotti, rbcollins ___ Python tracker ___ ___

[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2017-10-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.5 ___ Python tracker ___

[issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw)

2017-10-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +davin, pitrou, terry.reedy ___ Python tracker ___ ___

[issue31798] `site.abs__file__` fails for modules where `__file__` cannot be modified

2017-10-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: 2.7 site module has def abs__file__(): """Set all module' __file__ attribute to an absolute path""" for m in sys.modules.values(): if hasattr(m, '__loader__'): continue # don't mess with a PEP 302-supplied

[issue31803] time.clock() should emit a DeprecationWarning

2017-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This will break a code that depends on the current behavior on non-Windows platforms. And this will contradict the expectation of non-Windows programmers. If change the behavior of clock() on non-Windows platforms, it should be

[issue31829] Portability issues with pickle

2017-10-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : After reading numerous pickle-related issues on GitHab, I have found that the most common issue with pickle in Python 2 is using it with files opened with text mode. with open(file_name, "w") as f:

[issue31793] Allow to specialize smart quotes in documentation translations

2017-10-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patch is trivial two lines but needs review and merge from someone familiar with Sphinx stuff. [Éric, https://docs.python.org/devguide/experts.html contains the invalid Eric.Araujo] -- nosy: +ezio.melotti, merwok, terry.reedy,

[issue31790] double free or corruption (while using smem)

2017-10-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: The error log is not present. Try uploading again. -- nosy: +terry.reedy ___ Python tracker ___

[issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down

2017-10-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +bquinlan ___ Python tracker ___ ___ Python-bugs-list

[issue31803] time.clock() should emit a DeprecationWarning

2017-10-20 Thread STINNER Victor
STINNER Victor added the comment: I wrote the PR 4062 which removes time.clock() implementation: time.clock becomes an alias to time.perf_counter. haypo@selma$ ./python Python 3.7.0a2+ (heads/clock-dirty:16b6a3033e, Oct 20 2017, 18:55:58) >>> import time >>>

[issue31803] time.clock() should emit a DeprecationWarning

2017-10-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4032 stage: resolved -> patch review ___ Python tracker ___

[issue31782] Add a timeout to multiprocessing's Pool.join

2017-10-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +davin, pitrou versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-10-20 Thread Stefan Behnel
Stefan Behnel added the comment: Seems like this isn't trivial, so I created a new ticket for this. See issue 31828. -- ___ Python tracker

[issue31828] Support Py_tss_NEEDS_INIT outside of static initialisation

2017-10-20 Thread Stefan Behnel
New submission from Stefan Behnel : Following up on issue 25658, it was found that the current definition of Py_tss_NEEDS_INIT restricts its use to initialisers in C and cannot be used for arbitrary assignments. It is currently declared as follows: #define

[issue16737] Different behaviours in script run directly and via runpy.run_module

2017-10-20 Thread Jason R. Coombs
Jason R. Coombs added the comment: > All of the differences in semantics make total sense when you realize `-m > pkg` is really conceptually shorthand for `import pkg.__main__` (w/ the > appropriate __name__ flourishes). > So instead of selling `-m` as a way to run a

[issue31827] Remove os.stat_float_times()

2017-10-20 Thread STINNER Victor
STINNER Victor added the comment: Attached PR 4061 removes os.stat_float_times(). -- components: +Library (Lib) ___ Python tracker

[issue31827] Remove os.stat_float_times()

2017-10-20 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4030 stage: -> patch review ___ Python tracker ___

[issue31825] bytes decode raises OverflowError desipte errors='ignore'

2017-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report Sebastian. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31825] bytes decode raises OverflowError desipte errors='ignore'

2017-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1e78ed6825701029aa45a68f9e62dd3bb8d4e928 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (GH-4058) (#4059)

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-10-20 Thread Stefan Behnel
Stefan Behnel added the comment: It seems that there's a simpler way that uses a cast on the literal. I added a pull request. Looks simple enough to not merit its own ticket, I think. -- ___ Python tracker

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-10-20 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +4029 ___ Python tracker ___ ___

[issue31825] bytes decode raises OverflowError desipte errors='ignore'

2017-10-20 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4028 ___ Python tracker ___

[issue31825] bytes decode raises OverflowError desipte errors='ignore'

2017-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f by Serhiy Storchaka in branch 'master': bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058)

[issue31827] Remove os.stat_float_times()

2017-10-20 Thread STINNER Victor
New submission from STINNER Victor : os.stat_float_times() was introduced in Python 2.3 to get file modification times with sub-second resolution. The default remains to get time as seconds (integer). See commit f607bdaa77475ec8c94614414dc2cecf8fd1ca0a. The function

[issue31826] Misleading __version__ attribute of modules in standard library

2017-10-20 Thread Jakub Mateusz Dzik
New submission from Jakub Mateusz Dzik : Several modules of the standard library (at least `re` and `csv`) have `__version__` strings. The string is the same for Python 2.7-3.6: >>> import re, csv; print(re.__version__, csv.__version__) 2.2.1 1.0

[issue31814] subprocess_fork_exec more stable with vfork

2017-10-20 Thread Albert Zeyer
Albert Zeyer added the comment: Here is some more background for a case where this occurs: https://stackoverflow.com/questions/46849566/multi-threaded-openblas-and-spawning-subprocesses My proposal here would fix this. -- ___

[issue31761] Failures and crashes when running tests by import in IDLE

2017-10-20 Thread STINNER Victor
Change by STINNER Victor : -- title: Failures and crashes when running tests by import. -> Failures and crashes when running tests by import in IDLE ___ Python tracker

[issue31825] bytes decode raises OverflowError desipte errors='ignore'

2017-10-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4027 stage: -> patch review ___ Python tracker ___

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-10-20 Thread Nick Coghlan
Nick Coghlan added the comment: Stefan: I'd expect so, but that's best covered by a new RFE and an associated PR (I'm not sure what you mean from the text description, but I assume it will be obvious as C code) -- ___ Python

[issue31825] bytes decode raises OverflowError desipte errors='ignore'

2017-10-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka components: +Interpreter Core, Unicode nosy: +eric.smith, ezio.melotti, haypo, serhiy.storchaka type: -> behavior versions: +Python 3.7 ___ Python tracker

[issue31810] Travis CI, buildbots: run "make smelly" to check if CPython leaks symbols

2017-10-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4026 ___ Python tracker ___ ___

[issue31825] bytes decode raises OverflowError desipte errors='ignore'

2017-10-20 Thread Sebastian Kacprzak
New submission from Sebastian Kacprzak : In Python 3.5 and earlier (tested 3.5.3 and 2.7.13) b'\\\xfa'.decode('unicode-escape', errors='ignore') did return '\\ú' but in Python 3.6 it raises OverflowError: decoding with 'unicode-escape' codec failed (OverflowError: character

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-10-20 Thread Stefan Behnel
Stefan Behnel added the comment: Would it be possible to define Py_tss_NEEDS_INIT as a constant variable instead of a static initialiser? That would enable its use also for non-static initialisations. -- nosy: +scoder ___

[issue17799] settrace docs are wrong about "c_call" events

2017-10-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +4025 stage: -> patch review ___ Python tracker ___

[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2017-10-20 Thread STINNER Victor
STINNER Victor added the comment: > 3) Find a workaround (such as calling the APIs used by _scproxy in a clean > supprocess). I dislike the idea of *always* spawning a child process, I prefer to leave it as it is, but add a recipe in the doc, or add a new helper

[issue31203] socket.IP_PKTINFO is missing from python

2017-10-20 Thread Quentin Dawans
Change by Quentin Dawans : -- nosy: +qdawans ___ Python tracker ___ ___

[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2017-10-20 Thread Ronald Oussoren
Ronald Oussoren added the comment: Calling get_proxies() in a subprocess would also work, although I'd then prefer to use a small daemon proces to avoid the startup cost of a new process for every call to _scproxy functions. There is a conflict between two goals

[issue31810] Travis CI, buildbots: run "make smelly" to check if CPython leaks symbols

2017-10-20 Thread Tal Einat
Change by Tal Einat : -- nosy: +taleinat ___ Python tracker ___ ___ Python-bugs-list