[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 -fno-strict-aliasing -O2
-march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fwrapv -DNDEBUG
-IModules/_multiprocessing -I. -IInclude -I/usr/local/include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/mips64el-unknown-linux-gnu
-c 
/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/multiprocessing.c
-o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/multiprocessing.o
mips64el-unknown-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2
-march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fwrapv -DNDEBUG
-IModules/_multiprocessing -I. -IInclude -I/usr/local/include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/mips64el-unknown-linux-gnu
-c 
/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/socket_connection.c
-o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/socket_connection.o
mips64el-unknown-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -O2
-march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fwrapv -DNDEBUG
-IModules/_multiprocessing -I. -IInclude -I/usr/local/include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Include
-I/var/tmp/portage/dev-lang/python-2.7.12/work/mips64el-unknown-linux-gnu
-c 
/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/semaphore.c
-o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/semaphore.o
mips64el-unknown-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed
-L. -Wl,-O1 -Wl,--as-needed -L. -fno-strict-aliasing -O2
-march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fwrapv -DNDEBUG -I.
-IInclude
-I/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Include
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/multiprocessing.o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/socket_connection.o
build/temp.linux-mips64-2.7/var/tmp/portage/dev-lang/python-2.7.12/work/Python-2.7.12/Modules/_multiprocessing/semaphore.o
-L. -lpython2.7 -o build/lib.linux-mips64-2.7/_multiprocessing.so ***
WARNING: importing extension "_multiprocessing" failed with : [Errno 89] Function not implemented

--
components: Extension Modules
messages: 304695
nosy: emtone
priority: normal
severity: normal
status: open
title: Compile fail on gentoo for MIPS CPU of loongson 2f
type: compile error
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



[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 

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



[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 
https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.AbstractEventLoop.run_until_complete

--

___
Python tracker 

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



[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

async def main():
cmds = [['ssh', 'user@host', 'echo {}'.format(i)] for i in range(4)]
creations = [asyncio.create_subprocess_exec(*cmd, 
stdout=asyncio.subprocess.PIPE, 
stderr=asyncio.subprocess.PIPE)
for cmd in cmds]
processes = [await creation for creation in creations]
outputs = [await process.communicate() for process in processes]
print(outputs)

if __name__ == '__main__':
event_loop = asyncio.get_event_loop()
event_loop.run_until_complete(main())

prints

[(b'0\n', b''), (b'1\n', b''), (b'2\n', b''), (b'3\n', b'')]

It would be nice if you could somehow return outputs from main() and process 
the results in a non-async function. There are no async concepts left in 
outputs after all. But I am not aware of a way you can do this in Python 
currently.

--

___
Python tracker 

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



[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 

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



[issue20825] containment test for "ip_network in ip_network"

2017-10-20 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
pull_requests: +4035

___
Python tracker 

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



[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 am I just wishful 
thinking? :-)

For example, it would be nice to start multiple processes through 
asyncio.create_subprocess_exec (or _shell) await twice and then process all the 
output in "traditional" (i.e., non-async) Python.

Cheers :),
Cannedrag

--

___
Python tracker 

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



[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 
works:

async def arange(n):
for i in range(n):
yield i

async def alistcomp():
return [i async for i in arange(10)]

try:
next(alistcomp().__await__())
except StopIteration as e:
value = e.value

print(value)

--
nosy: +zach.ware
resolution:  -> not a bug
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



[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
... 
>>> [i async for i in arange(10)]
  File "", line 1
[i async for i in arange(10)]
   ^
SyntaxError: invalid syntax
>>>

--
components: asyncio
messages: 304688
nosy: cannedrag, yselivanov
priority: normal
severity: normal
status: open
title: Async list comprehension (PEP 530) causes SyntaxError in Python 3.6.3
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



[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 issue, please feel free to submit a PR!

--
resolution: not a bug -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[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 truly reserved words now, not just only reserved in 
certain contexts. If that's true, shouldn't they also appear in the list in the 
lexical analysis doc?

I'd appreciate any clarification you (or anyone else) can offer.

--

___
Python tracker 

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



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

--
versions: +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



[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 in the filename but apparently 
it does not go so well.txt" 
)
print(mail)

Output on python 3.7.0a1: 
https://gist.github.com/altendky/33c235e8a693235acd0551affee0a4f6
Output on python 3.6.2: https://oremilac.tk/paste/python-rfc2231-oops.log


Additionally, a behavioral issue is demonstrated by replacing in the above:
filename = "What happens if we try French in here? touché!.txt"


Which results in the following output (headers):

Content-Type: text/plain
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename*=utf-8''What%20happens%20if%20we%20try%20French%20in%20here%3F%20touch%C3%A9%21.txt
MIME-Version: 1.0


Instead of, for example, this correct output (by Mozilla Thunderbird here):

Content-Type: text/plain; charset=UTF-8;
 name="=?UTF-8?Q?What_happens_if_we_try_French_in_here=3f_touch=c3=a9!.txt?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename*0*=utf-8''%57%68%61%74%20%68%61%70%70%65%6E%73%20%69%66%20%77%65;
 filename*1*=%20%74%72%79%20%46%72%65%6E%63%68%20%69%6E%20%68%65%72%65%3F;
 filename*2*=%20%74%6F%75%63%68%C3%A9%21%2E%74%78%74


Issues to note here:
-the "filename" parameter is not indented, mail clients ignore it
-the "filename" parameter is not split according to RFC 2231

The relevant standard is exemplified in section 4.1 of 
https://tools.ietf.org/html/rfc2231#page-5


Python 3.4.6 and 3.5.4 simply do not wrap anything, which works with  but is 
not conformant to standards.


Solving all of the above would imply correctly splitting any header.
Function "set_param" in /usr/lib/python*/email/message.py looked like a place 
to look.

Unfortunately I do not understand what's going on there very well.


As yet an additional misbehaviour to note, try to repeat the above print 
statement twice.
The result is not identical, and the second time you get the following output:

Content-Type: text/plain
Content-Transfer-Encoding: base64
Content-Disposition: 
attachment;*=utf-8''What%20happens%20if%20we%20try%20French%20in%20here%3F%20touch%C3%A9%21.txt
MIME-Version: 1.0

It would appear that "filename" has disappeared.
The issue does not reveal itself with simple values for the 'filename' 
argument, e.g. "test.txt".


PS: The above output also illustrates this (way more minor) issue: 
https://bugs.python.org/issue25235

--
components: email
messages: 304684
nosy: barry, calimeroteknik, r.david.murray
priority: normal
severity: normal
status: open
title: EmailMessage.add_attachment(filename="long or spécial") crashes or 
produces invalid output
type: crash
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



[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 

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



[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 

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



[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 file: https://bugs.python.org/file47228/show.py

___
Python tracker 

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



[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 

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



[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 

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



[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 

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



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


--
nosy: +brett.cannon

___
Python tracker 

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



[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 

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



[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

___
Python tracker 

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



[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 

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



[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 

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



[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 fundamentally 
broken as it is placing a burden upon the entire application that it lives 
within that the application and no other libraries may use threads or if it 
does that it may not launch subprocesses.

That is unrealistic.  So I'd blame OpenBlas and OpenMP.

Supporting alternate system calls seems like it would just paper over the issue 
of improper use of pthread_atfork rather than address the fundamental problem.

--
versions:  -Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[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 

___
___
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-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 symbol: Tcl_GetCharLength
On Fri, 20 Oct 2017 at 20:57, Ned Deily  wrote:

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

--

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

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



[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 

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



[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 running tests by import in IDLE -> Failures 
and crashes when running tests by import

___
Python tracker 

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



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

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



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



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



[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

___
Python tracker 

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



[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 

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



[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 

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



[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 

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



[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 

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



[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 

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



[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 

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



[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 

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



[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 

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



[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 __file__
try:
m.__file__ = os.path.abspath(m.__file__)
except (AttributeError, OSError):
pass

This code assumes that if an object [not coded in python] has read-only 
attributes, so that the attempt to write would raise TypeError, then it do not 
have .__file__, so there will be an AttributeError, and there will not be a 
TypeError to catch.  This is true of CPython builtins.

>>> list.__file__
Traceback (most recent call last):
  File "", line 1, in 
list.__file__
AttributeError: type object 'list' has no attribute '__file__'

>>> list.__file__ = ''
Traceback (most recent call last):
  File "", line 1, in 
list.__file__ = ''
TypeError: can't set attributes of built-in/extension type 'list'

On the other hand, C-coded _tkinter has a re-writable .__file__. 
>>> import _tkinter
>>> _tkinter.__file__
'C:\\Programs\\Python27\\DLLs\\_tkinter.pyd'
>>> _tkinter.__file__ = ''

>From the minimal information given, it appears that clr defies this 
>expectation by having an unwritable .__file__ attribute.  Hence the TypeError 
>in abs_file.  Unless a read_only .__file__ is somewhere documented as 
>prohibited, the bug seems to be not including TypeError in the exception tuple.

In 3.x, abs__file__ became abs_paths.  It has the same line with the same 
problem.

For testing, perhaps an instance of this in sys.modules would work.

class UnsettableFile:
def __getattr__(self, name):
return __file__
def __setattr__(self, name, value):
raise TypeError()

--
stage: needs patch -> test needed
status:  -> open

___
Python tracker 

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



[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 done 
only after the period of emitting FutureWarning.

--

___
Python tracker 

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



[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:
pickle.dump(data, f)

Initially pickle was a text protocol. But since implementing more efficient 
binary opcodes it is a binary protocol. Even the default protocol 0 is not 
completely text-safe. If save and load data containing Unicode strings with 
"text" protocol 0 using different text/binary modes or using text mode on 
different platforms, you can get an error or incorrect data.

I propose to add more defensive checks for pickle.

1. When save a pickle with protocol 0 (default) to a file opened in text mode 
(default) emit a Py3k warning.

2. When save a pickle with binary protocols (must be specified explicitly) to a 
file opened in text mode raise a ValueError on Windows and Mac Classic 
(resulting data is likely corrupted) and emit a warning on Unix and Linux. What 
the type of of warnings is more appropriate? DeprecationWarning, 
DeprecationWarning in py3k mode, RuntimeWarning, or UnicodeWarning?

3. Escape \r and \x1a (end-of-file in MS DOS) when pickle Unicode strings with 
protocol 0.

4. Detect the most common errors (e.g. module name ending with \r when load on 
Linux a pickle saved with text mode on Windows) and raise more informative 
error message.

5. Emit a warning when load an Unicode string ending with \r. This is likely an 
error (if the pickle was saved with text mode on Windows), but  this can a 
correct data if the saved Unicode string actually did end with \r. This is the 
most dubious proposition. On one hand, it is better to warn than silently 
return an incorrect result. On other hand, the correct result shouldn't provoke 
a warning.

--
components: Library (Lib)
messages: 304667
nosy: alexandre.vassalotti, benjamin.peterson, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Portability issues with pickle
type: enhancement
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



[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, willingc

___
Python tracker 

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



[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 

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



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



[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
>>> time.clock is time.perf_counter
True

--

___
Python tracker 

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



[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 

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



[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 

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



[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 

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



[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 Py_tss_NEEDS_INIT   {0}

which results in a C compiler error for assignments like "x = 
Py_tss_NEEDS_INIT".

I proposed to change this to

#define Py_tss_NEEDS_INIT   ((Py_tss_t) {0})

in compliance with GCC and C99, but that fails to compile in MSVC and probably 
other old C++-ish compilers.

I'm not sure how to improve this declaration, but given that it's a public 
header file, restricting its applicability seems really unfortunate.

--
components: Extension Modules, Interpreter Core
messages: 304661
nosy: masamoto, ncoghlan, scoder
priority: normal
pull_requests: 4031
severity: normal
status: open
title: Support Py_tss_NEEDS_INIT outside of static initialisation
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



[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 module/package as a script, I 
> say we change the message/documentation to say it does an import with 
> __name__ changed and make specifying a script as the weird 
> reading-a-file-directly thing.

I agree the explanation makes sense. But is that the design we want?

In my opinion, the most meaningful purpose of `-m` is its ability to run a 
module/package as a script. I've rarely seen it used as a convenience for 
executing a Python file, but I've seen it used extensively for providing entry 
to the canonical behavior for a library:

- pip: python -m pip
- pytest: python -m pytest
- setuptools: python -m easy_install
- virtualenv: python -m virtualenv

[rwt](https://pypi.org/project/rwt) takes advantage of this mechanism as the 
primary way to invoke a module (because scripts don't provide an API at the 
Python interpreter level):

$ rwt -q paver -- -m paver --version
Paver 1.2.4 

I began using this functionality extensively when on Windows using pylauncher, 
as it was the only reliable mechanism to invoke behavior with a desired Python 
interpreter:

PS> py -3.3 -m pip

If the semantics of -m are by design and need to be retained, it seems to me 
there's a strong argument for a new parameter, one which works much as -m, but 
which has the semantics of launching a script (as much as possible). Consider 
"python -r module" (for Run). Alternatively, Python could distribute a new 
runner executable whose purpose is specifically for running modules. Consider 
"pyrun module".

I don't think it will be sufficient to simply add a --nopath0 option, as that 
would impose that usage on the user... and `python -m modulename` is just at 
the limit of what syntax I think I can reasonably expect my users to bear for 
launching a script.

My preference would be to alter the semantics of `-m` with the explicit 
intention to align it with script launch behavior, or to provide a new concise 
mechanism for achieving this goal.

Thoughts?

--

___
Python tracker 

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



[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 

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



[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 

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



[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 

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



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


--

___
Python tracker 

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



[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 

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



[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 

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



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

2017-10-20 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4028

___
Python tracker 

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



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


--

___
Python tracker 

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



[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 was introduced to get a smooth transition to time as floating 
point number, to keep the backward compatibility with Python 2.2.

In Python 2.5, os.stat() returns time as float by default: commit 
fe33d0ba87f5468b50f939724b303969711f3be5.

Python 2.5 was released 11 years ago. I consider that people had enough time to 
migrate their code to float time :-)

I modified os.stat_float_times() to emit a DeprecationWarning in Python 3.1: 
commit 034d0aa2171688c40cee1a723ddcdb85bbce31e8 (bpo-14711).

--
messages: 304655
nosy: haypo
priority: normal
severity: normal
status: open
title: Remove os.stat_float_times()
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



[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

while documentation indicates changes in the modules.

Semantic versioning (recommended by PEP 440) suggests that at least minor 
version should change in such case.

I suspect it to be a "code fossil" which may be removed according to PEP 396.

--
components: Library (Lib)
messages: 304654
nosy: abukaj
priority: normal
severity: normal
status: open
title: Misleading __version__ attribute of modules in standard library
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



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

--

___
Python tracker 

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



[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 

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



[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 

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



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

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



[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 

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



[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 

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



[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 argument not in range(0x11))


Python 3.6.1 (default, Sep  7 2017, 16:36:03) 
[GCC 6.3.0 20170406] on linux

--
messages: 304651
nosy: nait
priority: normal
severity: normal
status: open
title: bytes decode raises OverflowError desipte errors='ignore'
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



[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

___
Python tracker 

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



[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 

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



[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 function doing that.

Spawning a subprocess can have side effects as well, whereas the subprocess is 
only need if you call the function after forking which is not the most common 
pattern in Python.

--

___
Python tracker 

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



[issue31203] socket.IP_PKTINFO is missing from python

2017-10-20 Thread Quentin Dawans

Change by Quentin Dawans :


--
nosy: +qdawans

___
Python tracker 

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



[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 w.r.t. the macOS port:

1) Integrate nicely with the platform

2) Be like other unixy platforms

The former requires the use of Apple specific APIs, like those used in 
_scproxy, but those cause problems when using fork without calling exec.

The latter is technically an issue for all processing using threads on POSIX 
systems (see 
), AFAIK 
users get bitten by this more on macOS because Apple appears to use threading 
in their implementation (making processes multi-threaded without explicitly 
using threading in user code), and because Apple explicitly checks for the 
"fork without exec" case and crashes the child proces.

This can of course also be seen as a qualify of implementation issue on macOS, 
as in "Apple can't be bothered to do the work to support this use case" ;-/

Anyways: As Ned writes this is unlikely to change on Apple's side and we have 
to life with that.

There's three options going forward:

1) Remove _scproxy

I'm -1 on that because I'm in favour of having good platform integration, 
Python's URL fetching APIs should transparently use the system proxy config 
configuration.

2) Document this problem and move on

3) Find a workaround (such as calling the APIs used by _scproxy in a clean 
supprocess).

The 3th option is probably the most useful in the long run, but requires 
someone willing to do the work.  I'm in principle willing to do the work, but 
haven't had enough free time to work on CPython for quite a while now (which 
saddens me, but that's off topic).

--

___
Python tracker 

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



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